Public Member Functions | Protected Member Functions | Protected Attributes
segwayrmp::RMPIO Class Reference

#include <rmp_io.h>

Inheritance diagram for segwayrmp::RMPIO:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Provides a generic interface for getting, building, manipulating, and sending packets.

Definition at line 68 of file rmp_io.h.


Constructor & Destructor Documentation

Definition at line 70 of file rmp_io.h.


Member Function Documentation

void segwayrmp::RMPIO::cancel ( ) [inline]

Cancels any currently being processed packets, should be called at shudown.

Definition at line 123 of file rmp_io.h.

unsigned char RMPIO::computeChecksum ( unsigned char *  usb_packet) [protected]

Definition at line 138 of file rmp_io.cc.

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]

Definition at line 129 of file rmp_io.cc.

void RMPIO::getPacket ( Packet packet)

This function reads from the RMP and returns one complete packet.

Parameters:
packetA packet by reference to be read into.

Definition at line 18 of file rmp_io.cc.

bool segwayrmp::RMPIO::isConnected ( ) [inline]

A function to see if the underlying I/O interface is connected.

Returns:
bool weather or not the underlying I/O interface is connected.

Definition at line 118 of file rmp_io.h.

virtual int segwayrmp::RMPIO::read ( unsigned char *  buffer,
int  size 
) [pure virtual]

Abstract Read Function, implemented by subclass.

Parameters:
bufferAn unsigned char array for data to be read into.
sizeThe amount of data to be read.
Returns:
int Bytes read.

Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.

void RMPIO::sendPacket ( Packet packet)

This function validates and writes a packet to the RMP.

Parameters:
packetA packet by reference to be written.

Definition at line 109 of file rmp_io.cc.

virtual int segwayrmp::RMPIO::write ( unsigned char *  buffer,
int  size 
) [pure virtual]

Abstract Write Function, implemented by subclass.

Parameters:
bufferAn unsigned char array of data to be written.
sizeThe amount of data to be written.
Returns:
int Bytes written.

Implemented in segwayrmp::FTD2XXRMPIO, and segwayrmp::SerialRMPIO.


Member Data Documentation

bool segwayrmp::RMPIO::canceled [protected]

Definition at line 130 of file rmp_io.h.

bool segwayrmp::RMPIO::connected [protected]

Definition at line 129 of file rmp_io.h.

std::vector<unsigned char> segwayrmp::RMPIO::data_buffer [protected]

Definition at line 132 of file rmp_io.h.


The documentation for this class was generated from the following files:


libsegwayrmp
Author(s): William Woodall
autogenerated on Wed Aug 26 2015 12:23:19