#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.
|
inline |
|
protected |
|
pure virtual |
Abstract Connect Function, implemented by subclass.
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
|
pure virtual |
Abstract Disconnect Function, implemented by subclass.
Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.
| void RMPIO::getPacket | ( | Packet & | packet | ) |
|
inline |
|
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 | ) |
|
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.
|
protected |