Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
UsbCommunication Class Reference

This class handles the USB communication. More...

#include <UsbCommunication.h>

Inheritance diagram for UsbCommunication:

Public Member Functions

 UsbCommunication ()
 Base constructor.
 
 UsbCommunication (UsbSettings *settings)
 Copy constructor.
 
 ~UsbCommunication ()
 Destructor.
 
void Connect ()
 Connects to the USB Device.
 
void Disconnect ()
 Disconnect from the USB device.
 
string SendCommand (string commandToSend)
 Send a string command on the appropriate communication channel media.
 
RawData 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.
 

Static Public Member Functions

static vector< UsbInformationGetDeviceList ()
 A static method that retrieve the devices wired to the computer throug USB.
 

Public Attributes

const int COMMAND_ACK_TIMEOUT = 5000
 
const int MAX_SIZE_TO_READ = 40000
 

Protected Member Functions

int GetCommunicationStatus ()
 Returns the comminication status (NOT IMPLEMENTED FOR USB) -> Always return 0.
 
void Connect (bool forceMonitoring)
 Connects to the USB Device.
 

Detailed Description

This class handles the USB communication.

Constructor & Destructor Documentation

◆ UsbCommunication() [1/2]

UsbCommunication::UsbCommunication ( )

Base constructor.

◆ UsbCommunication() [2/2]

UsbCommunication::UsbCommunication ( UsbSettings settings)

Copy constructor.

◆ ~UsbCommunication()

UsbCommunication::~UsbCommunication ( )

Destructor.

Member Function Documentation

◆ 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
forceMoninoringtrue: 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()

vector< UsbInformation > UsbCommunication::GetDeviceList ( )
static

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
commandToSendThe 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
waitTimeoutThe amount of miliseconds the process has to wait befor being released
semStatusThe status of the semaphore (updated by reference)
Returns
A pointer to the RAW Data
Parameters
waitTimeoutThe amount of miliseconds the process has to wait befor being released
semStatusThe status of the semaphore (updated by reference)


Returns
A pointer to the RAW Data

Member Data Documentation

◆ 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: