DETI-Dynamixel Interface  1
DevComm Class Referenceabstract

Abstract class to handle the communication with the device This class has the base methods to open, close and send/receive a packet over the used device. The class is fully virtual, a child from this class must implement the functions according to the target OS and device management. More...

#include <DevComm.h>

Inheritance diagram for DevComm:

Public Member Functions

virtual void openChannel ()=0
 
virtual void closeChannel ()=0
 
virtual bool txRx (const char *txPacket, char *rxPacket, int rxSize)=0
 

Detailed Description

Abstract class to handle the communication with the device This class has the base methods to open, close and send/receive a packet over the used device. The class is fully virtual, a child from this class must implement the functions according to the target OS and device management.

Member Function Documentation

virtual void DevComm::closeChannel ( )
pure virtual

This function will be responsible for closing the communication channel.

Implemented in DevCommUsb.

virtual void DevComm::openChannel ( )
pure virtual

This function will be responsible for opening the communication channel using the device available.

Implemented in DevCommUsb.

virtual bool DevComm::txRx ( const char *  txPacket,
char *  rxPacket,
int  rxSize 
)
pure virtual

This function will be responsible for dealing with the "physical" transmission of the data. It will then proceed to listening for the correspondent response. Whoever calls this function is responsible for guaranteeing that the reception buffer is large enough for rxSize+1 (+1 for '\0')

Parameters
txPacketThe data to be transmitted, provided by the DxComm method that invokes the transmission.
rxPacketThe array to store the response from the deti DX board. The DxComm method invoking the transmission will further handle its data.
rxSizeThe maximum size of data on the response packet corresponding to the invoking method.
Returns
a boolean value indicating if the transmission/reception was performed. True in the normal situation, False in case of timeout on reception or channel error.

Implemented in DevCommUsb.


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