#include <rmp_io.h>
Public Member Functions | |
void | cancel () |
virtual void | connect ()=0 |
virtual void | disconnect ()=0 |
void | getPacket (Packet &packet) |
bool | isConnected () |
virtual int | read (unsigned char *buffer, int size)=0 |
RMPIO () | |
void | sendPacket (Packet &packet) |
virtual int | write (unsigned char *buffer, int size)=0 |
Protected Member Functions | |
unsigned char | computeChecksum (unsigned char *usb_packet) |
void | fillBuffer () |
Protected Attributes | |
bool | canceled |
bool | connected |
std::vector< unsigned char > | data_buffer |
Provides a generic interface for getting, building, manipulating, and sending packets.
segwayrmp::RMPIO::RMPIO | ( | ) | [inline] |
void segwayrmp::RMPIO::cancel | ( | ) | [inline] |
unsigned char RMPIO::computeChecksum | ( | unsigned char * | usb_packet | ) | [protected] |
virtual void segwayrmp::RMPIO::connect | ( | ) | [pure virtual] |
Abstract Connect Function, implemented by subclass.
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
virtual void segwayrmp::RMPIO::disconnect | ( | ) | [pure virtual] |
Abstract Disconnect Function, implemented by subclass.
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
void RMPIO::fillBuffer | ( | ) | [protected] |
void RMPIO::getPacket | ( | Packet & | packet | ) |
bool segwayrmp::RMPIO::isConnected | ( | ) | [inline] |
virtual int segwayrmp::RMPIO::read | ( | unsigned char * | buffer, |
int | size | ||
) | [pure virtual] |
Abstract Read Function, implemented by subclass.
buffer | An unsigned char array for data to be read into. |
size | The amount of data to be read. |
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
void RMPIO::sendPacket | ( | Packet & | packet | ) |
virtual int segwayrmp::RMPIO::write | ( | unsigned char * | buffer, |
int | size | ||
) | [pure virtual] |
Abstract Write Function, implemented by subclass.
buffer | An unsigned char array of data to be written. |
size | The amount of data to be written. |
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
bool segwayrmp::RMPIO::canceled [protected] |
bool segwayrmp::RMPIO::connected [protected] |
std::vector<unsigned char> segwayrmp::RMPIO::data_buffer [protected] |