#include <communication.h>
Inheritance diagram for Communication:

Everything related to the communication must belong to this class.
Public Member Functions | |
| Communication (void) | |
| The constructor. | |
| virtual int | send (unsigned char const *buffer, int numBytes)=0 |
| Transmits data. | |
| virtual int | receive (unsigned char *buffer, int numBytes)=0 |
| Receives data. | |
| void | setFD (int fd_tmp) |
| Sets the descriptor of the communication port. | |
| int | getFD (void) |
| Gets the descriptor of the communication port. | |
| void | setTimeout (int value) |
| Sets the timeout for the reception of data. | |
| int | getTimeout (void) |
| Gets the actual value of the timeout for reception. | |
|
|
The constructor. Sets the timeout to 100ms. |
|
|
Gets the descriptor of the communication port.
Reimplemented in CommUDP. |
|
|
Gets the actual value of the timeout for reception.
|
|
||||||||||||
|
Receives data.
Implemented in CommPLC, and CommSerial. |
|
||||||||||||
|
Transmits data.
Implemented in CommPLC, CommSerial, and CommUDP. |
|
|
Sets the descriptor of the communication port.
Reimplemented in CommUDP. |
|
|
Sets the timeout for the reception of data.
|
1.3.7