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

An ETHERNET oriented communication class. It inherits from BaseCommunication. It ensures the ETHERNET communication on both UDP and TCP This class holds the multi process mechanism to hold the command exchange between a HOST and a CLIENT. More...

#include <EthernetCommunication.h>

Inheritance diagram for EthernetCommunication:

Public Member Functions

 EthernetCommunication ()
 Base constructor.
 
 EthernetCommunication (MONITORING_MODE monitoring)
 Copy constructor.
 
 EthernetCommunication (EthernetSettings *settings)
 Copy constructor (sets the ethernet settings)
 
 EthernetCommunication (EthernetSettings *settings, MONITORING_MODE monitoring)
 Copy constructor (sets the ethernet settings)
 
 ~EthernetCommunication ()
 Destructor, stops the running threads by calling the StopAndClean internal method.
 
void Connect ()
 Proceed to TCP and UDP connection semaphores and mutex creation and Threads launching.
 
void Disconnect ()
 Disconnects all communication channels, stops the running threads and wait them to join Closes the semaphores and mutex handles.
 
string SendCommand (string commandToSend)
 Send a string command on the appropriate communication channel media.
 
RawData WaitForRawData (int waitTimeout, unsigned long *semStatus)
 Wait the DATAWORKER to produce a RAW DATA. This method will wait on the _selRawDataAvailable semaphore to release the data dequeued from the _rawDataQueue.
 

Public Attributes

const int TCP_NEWORKQUEUE_OVERFLOWLIMIT = 20
 
const int TCP_RAWDATA_QUEUE_OVERFLOWLIMIT = 20
 
const int MAX_SIZE_TO_READ = 40000
 
const int COMMAND_ACK_TIMEOUT = 5000
 

Detailed Description

An ETHERNET oriented communication class. It inherits from BaseCommunication. It ensures the ETHERNET communication on both UDP and TCP This class holds the multi process mechanism to hold the command exchange between a HOST and a CLIENT.

Constructor & Destructor Documentation

◆ EthernetCommunication() [1/4]

EthernetCommunication::EthernetCommunication ( )

Base constructor.

◆ EthernetCommunication() [2/4]

EthernetCommunication::EthernetCommunication ( MONITORING_MODE  monitoring)

Copy constructor.

◆ EthernetCommunication() [3/4]

EthernetCommunication::EthernetCommunication ( EthernetSettings settings)

Copy constructor (sets the ethernet settings)

Parameters
settingsThe ethernet settings to be set

◆ EthernetCommunication() [4/4]

EthernetCommunication::EthernetCommunication ( EthernetSettings settings,
MONITORING_MODE  monitoring 
)

Copy constructor (sets the ethernet settings)

Parameters
settingsThe ethernet settings to be set
monitoringThe MONITORING_MASK to be set

◆ ~EthernetCommunication()

EthernetCommunication::~EthernetCommunication ( )

Destructor, stops the running threads by calling the StopAndClean internal method.

Member Function Documentation

◆ Connect()

void EthernetCommunication::Connect ( )

Proceed to TCP and UDP connection semaphores and mutex creation and Threads launching.

◆ Disconnect()

void EthernetCommunication::Disconnect ( )

Disconnects all communication channels, stops the running threads and wait them to join Closes the semaphores and mutex handles.

◆ SendCommand()

string EthernetCommunication::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 EthernetCommunication::WaitForRawData ( int  waitTimeout,
unsigned long *  semStatus 
)

Wait the DATAWORKER to produce a RAW DATA. This method will wait on the _selRawDataAvailable semaphore to release the data dequeued from the _rawDataQueue.

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 EthernetCommunication::COMMAND_ACK_TIMEOUT = 5000

◆ MAX_SIZE_TO_READ

const int EthernetCommunication::MAX_SIZE_TO_READ = 40000

◆ TCP_NEWORKQUEUE_OVERFLOWLIMIT

const int EthernetCommunication::TCP_NEWORKQUEUE_OVERFLOWLIMIT = 20

◆ TCP_RAWDATA_QUEUE_OVERFLOWLIMIT

const int EthernetCommunication::TCP_RAWDATA_QUEUE_OVERFLOWLIMIT = 20

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