Public Member Functions | Private Member Functions | Private Attributes | List of all members
segwayrmp::FTD2XXRMPIO Class Reference

#include <rmp_ftd2xx.h>

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

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 ()
 
- Public Member Functions inherited from segwayrmp::RMPIO
void cancel ()
 
void getPacket (Packet &packet)
 
bool isConnected ()
 
 RMPIO ()
 
void sendPacket (Packet &packet)
 

Private Member Functions

void connectByDescription ()
 
void connectByIndex ()
 
void connectBySerial ()
 
std::vector< FT_DEVICE_LIST_INFO_NODEenumerateUSBDevices_ ()
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from segwayrmp::RMPIO
unsigned char computeChecksum (unsigned char *usb_packet)
 
void fillBuffer ()
 
- Protected Attributes inherited from segwayrmp::RMPIO
bool canceled
 
bool connected
 
std::vector< unsigned char > data_buffer
 

Detailed Description

Definition at line 59 of file rmp_ftd2xx.h.

Constructor & Destructor Documentation

FTD2XXRMPIO::FTD2XXRMPIO ( )

Constructs the FTD2XXRMPIO object.

Definition at line 145 of file rmp_ftd2xx.cc.

FTD2XXRMPIO::~FTD2XXRMPIO ( )

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.

void FTD2XXRMPIO::connectByDescription ( )
private

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.

std::vector< FT_DEVICE_LIST_INFO_NODE > FTD2XXRMPIO::enumerateUSBDevices_ ( )
private

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

int segwayrmp::FTD2XXRMPIO::baudrate
private

Definition at line 136 of file rmp_ftd2xx.h.

ConfigurationType segwayrmp::FTD2XXRMPIO::config_type
private

Definition at line 130 of file rmp_ftd2xx.h.

bool segwayrmp::FTD2XXRMPIO::configured
private

Definition at line 126 of file rmp_ftd2xx.h.

bool segwayrmp::FTD2XXRMPIO::is_open
private

Definition at line 128 of file rmp_ftd2xx.h.

std::string segwayrmp::FTD2XXRMPIO::port_description
private

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.

std::string segwayrmp::FTD2XXRMPIO::port_serial_number
private

Definition at line 132 of file rmp_ftd2xx.h.

FT_HANDLE segwayrmp::FTD2XXRMPIO::usb_port_handle
private

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 Mon Jun 10 2019 13:46:50