This class handles the USB communication.
More...
#include <UsbCommunication.h>
|
int | GetCommunicationStatus () |
| Returns the comminication status (NOT IMPLEMENTED FOR USB) -> Always return 0.
|
|
void | Connect (bool forceMonitoring) |
| Connects to the USB Device.
|
|
This class handles the USB communication.
◆ UsbCommunication() [1/2]
UsbCommunication::UsbCommunication |
( |
| ) |
|
◆ UsbCommunication() [2/2]
UsbCommunication::UsbCommunication |
( |
UsbSettings * |
settings | ) |
|
◆ ~UsbCommunication()
UsbCommunication::~UsbCommunication |
( |
| ) |
|
◆ Connect() [1/2]
void UsbCommunication::Connect |
( |
| ) |
|
Connects to the USB Device.
◆ Connect() [2/2]
void UsbCommunication::Connect |
( |
bool |
forceMonitoring | ) |
|
|
protected |
Connects to the USB Device.
Proceed to USB connection semaphores and mutex creation and Threads launching force monitoring or not.
- Parameters
-
forceMoninoring | true: forces the monitoring check |
◆ Disconnect()
void UsbCommunication::Disconnect |
( |
| ) |
|
Disconnect from the USB device.
◆ GetCommunicationStatus()
int UsbCommunication::GetCommunicationStatus |
( |
| ) |
|
|
protected |
Returns the comminication status (NOT IMPLEMENTED FOR USB) -> Always return 0.
- Returns
- Success = 0, -1 for failure
◆ GetDeviceList()
A static method that retrieve the devices wired to the computer throug USB.
- Returns
- A detailed list of conected devices
◆ SendCommand()
string UsbCommunication::SendCommand |
( |
string |
commandToSend | ) |
|
Send a string command on the appropriate communication channel media.
- Parameters
-
commandToSend | The command to send as a string |
- Returns
- A string representing the command replied on the communication channel media
◆ WaitForRawData()
RawData UsbCommunication::WaitForRawData |
( |
int |
waitTimeout, |
|
|
unsigned long * |
semStatus |
|
) |
| |
Wait the callback to produce a RAW DATA. This method will wait on the appropriate semaphore to produce a data.
- Parameters
-
waitTimeout | The amount of miliseconds the process has to wait befor being released |
semStatus | The status of the semaphore (updated by reference) |
- Returns
- A pointer to the RAW Data
- Parameters
-
waitTimeout | The amount of miliseconds the process has to wait befor being released |
semStatus | The status of the semaphore (updated by reference) |
- Returns
- A pointer to the RAW Data
◆ COMMAND_ACK_TIMEOUT
const int UsbCommunication::COMMAND_ACK_TIMEOUT = 5000 |
◆ MAX_SIZE_TO_READ
const int UsbCommunication::MAX_SIZE_TO_READ = 40000 |
The documentation for this class was generated from the following files: