| Visioscan Set SDK Libraries 1.3.5 Visioscan Set SDK Help documentation file for C++ and C++/CLI |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
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.
CommunicationStatus | 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.
string | SendCommand (string commandToSend, int specificTimeout)
| 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 = 8000

## 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

  settings | The ethernet settings to be set

## ◆ EthernetCommunication() [4/4]

EthernetCommunication::EthernetCommunication | ( | EthernetSettings * | settings,
|  | MONITORING_MODE | monitoring )

Copy constructor (sets the ethernet settings)

Parameters

  settings | The ethernet settings to be set
  monitoring | The MONITORING_MASK to be set

## ◆ ~EthernetCommunication()

EthernetCommunication::~EthernetCommunication | ( |  | ) |

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

## Member Function Documentation

## ◆ Connect()

CommunicationStatus 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() [1/2]

string EthernetCommunication::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

## ◆ SendCommand() [2/2]

string EthernetCommunication::SendCommand | ( | string | commandToSend,
|  | int | specificTimeout )

Send a string command on the appropriate communication channel media

Parameters

  commandToSend | A string representing the command to be sent
  specificTimeout | A int representing the wished timeout in milliseconds

Returns

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

  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

## Member Data Documentation

## ◆ COMMAND_ACK_TIMEOUT

const int EthernetCommunication::COMMAND_ACK_TIMEOUT = 8000

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

- EthernetCommunication.h
- EthernetCommunication.cpp