Public Member Functions | Private Attributes
segwayrmp::SerialRMPIO Class Reference

#include <rmp_serial.h>

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

List of all members.

Public Member Functions

void configure (std::string port, int baudrate)
void connect ()
void disconnect ()
int read (unsigned char *buffer, int size)
 SerialRMPIO ()
int write (unsigned char *buffer, int size)
 ~SerialRMPIO ()

Private Attributes

int baudrate
bool configured
std::string port
serial::Serial serial_port

Detailed Description

Provides a serial based interface for reading and writing packets.

Definition at line 49 of file rmp_serial.h.


Constructor & Destructor Documentation

Constructs the SerialRMPIO object.

Definition at line 9 of file rmp_serial.cc.

Definition at line 13 of file rmp_serial.cc.


Member Function Documentation

void SerialRMPIO::configure ( std::string  port,
int  baudrate 
)

Configures the serial port.

Parameters:
portThe com port identifier like '/dev/ttyUSB0' on POSIX and like 'COM1' on windows.
baudrateThe speed of the serial communication.

Definition at line 17 of file rmp_serial.cc.

void SerialRMPIO::connect ( ) [virtual]

Connects to the serial port if it has been configured. Can throw ConnectionFailedException.

Implements segwayrmp::RMPIO.

Definition at line 23 of file rmp_serial.cc.

void SerialRMPIO::disconnect ( ) [virtual]

Disconnects from the serial port if it is open.

Implements segwayrmp::RMPIO.

Definition at line 41 of file rmp_serial.cc.

int SerialRMPIO::read ( unsigned char *  buffer,
int  size 
) [virtual]

Read Function, reads from the serial port.

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

Implements segwayrmp::RMPIO.

Definition at line 49 of file rmp_serial.cc.

int SerialRMPIO::write ( unsigned char *  buffer,
int  size 
) [virtual]

Write Function, writes to the serial port.

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

Implements segwayrmp::RMPIO.

Definition at line 53 of file rmp_serial.cc.


Member Data Documentation

Definition at line 97 of file rmp_serial.h.

Definition at line 94 of file rmp_serial.h.

std::string segwayrmp::SerialRMPIO::port [private]

Definition at line 96 of file rmp_serial.h.

Definition at line 99 of file rmp_serial.h.


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


libsegwayrmp
Author(s): William Woodall
autogenerated on Mon Oct 6 2014 01:48:09