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>
|
| 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.
|
|
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.
◆ EthernetCommunication() [1/4]
EthernetCommunication::EthernetCommunication |
( |
| ) |
|
◆ EthernetCommunication() [2/4]
EthernetCommunication::EthernetCommunication |
( |
MONITORING_MODE |
monitoring | ) |
|
◆ EthernetCommunication() [3/4]
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.
◆ 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
-
commandToSend | The 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
-
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 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: