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

#include <rmp_ftd2xx.h>

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

List of all members.

Public Member Functions

void configureUSBByDescription (std::string description, int baudrate)
void configureUSBByIndex (unsigned int device_index, int baudrate)
void configureUSBBySerial (std::string serial_number, int baudrate)
void connect ()
void disconnect ()
 FTD2XXRMPIO ()
int read (unsigned char *buffer, int size)
int write (unsigned char *buffer, int size)
 ~FTD2XXRMPIO ()

Private Member Functions

void connectByDescription ()
void connectByIndex ()
void connectBySerial ()
std::vector
< FT_DEVICE_LIST_INFO_NODE
enumerateUSBDevices_ ()

Private Attributes

int baudrate
ConfigurationType config_type
bool configured
bool is_open
std::string port_description
unsigned int port_index
std::string port_serial_number
FT_HANDLE usb_port_handle

Detailed Description

Definition at line 59 of file rmp_ftd2xx.h.


Constructor & Destructor Documentation

Constructs the FTD2XXRMPIO object.

Definition at line 145 of file rmp_ftd2xx.cc.

Definition at line 155 of file rmp_ftd2xx.cc.


Member Function Documentation

void FTD2XXRMPIO::configureUSBByDescription ( std::string  description,
int  baudrate 
)

Configures the usb port using the devices Description.

Parameters:
descriptionThe description of the RMP device, something like 'Robotic Mobile Platform'.
baudrateThe speed of the usb communication.

Definition at line 324 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::configureUSBByIndex ( unsigned int  device_index,
int  baudrate 
)

Configures the usb port using the devices index.

Parameters:
device_indexThe index of the FTDI, something like 0. This is its index amoung all FTD2XX devices on the system.
baudrateThe speed of the usb communication.

Definition at line 351 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::configureUSBBySerial ( std::string  serial_number,
int  baudrate 
)

Configures the usb port using the devices Serial Number.

Parameters:
serial_numberThe serial number of the RMP device, something like '00000056'.
baudrateThe speed of the usb communication.

Definition at line 296 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::connect ( ) [virtual]

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

Implements segwayrmp::RMPIO.

Definition at line 159 of file rmp_ftd2xx.cc.

Definition at line 332 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::connectByIndex ( ) [private]

Definition at line 359 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::connectBySerial ( ) [private]

Definition at line 304 of file rmp_ftd2xx.cc.

void FTD2XXRMPIO::disconnect ( ) [virtual]

Disconnects from the usb port if it is open.

Implements segwayrmp::RMPIO.

Definition at line 248 of file rmp_ftd2xx.cc.

Definition at line 291 of file rmp_ftd2xx.cc.

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

Read Function, reads from the usb 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 257 of file rmp_ftd2xx.cc.

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

Write Function, writes to the usb 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 274 of file rmp_ftd2xx.cc.


Member Data Documentation

Definition at line 136 of file rmp_ftd2xx.h.

Definition at line 130 of file rmp_ftd2xx.h.

Definition at line 126 of file rmp_ftd2xx.h.

Definition at line 128 of file rmp_ftd2xx.h.

Definition at line 133 of file rmp_ftd2xx.h.

unsigned int segwayrmp::FTD2XXRMPIO::port_index [private]

Definition at line 134 of file rmp_ftd2xx.h.

Definition at line 132 of file rmp_ftd2xx.h.

Definition at line 138 of file rmp_ftd2xx.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