#include <plcmodem.h>
Include dependency graph for communication.h:

This graph shows which files directly or indirectly include this file:

Data Structures | |
| class | Communication |
| Communication class. More... | |
| class | PLC_ERROR |
Defines | |
| #define | SERIAL_PORT "/dev/ttyS0" |
| Serial Port. | |
| #define | MARCA 1 |
| Defines a constant for one. | |
| #define | ESPACO 0 |
| Defines a constant for zero. | |
| #define | MAX_NUM_NACK 0x07 |
| Defines the maximum number of NAK signals for a specific data block. | |
| #define | MAX_NUM_WAIT 0x0C |
| Defines the maximum number of WAIT signals for a specific data block. | |
| #define | MAX_NUM_REP 0x07 |
| Defines the maximum number of repetitions for a specific command to be transmitted. | |
| #define | OK 1 |
| Defines a constant for OK. | |
| #define | NOK 0 |
| Defines a constant for NOK. | |
| #define | ETIMEOUT -2 |
| Defines an error code for timeout during communication. | |
Enumerations | |
| enum | COMM_STATE { DISCONNECTED = 0xA, TRYING_CONNECTION = 0xB, CONNECTED = 0xC, COMMUNICATION = 0xD, END_CONNECTION = 0xE } |
| Defines the possible states in the FSM for the communication. More... | |
| enum | COMM_SIGNAL { ENQ = 0x05, ACK = 0x06, NAK = 0x15, WAIT = 0x10 } |
| Defines the bytes (signals) used in the communication. More... | |
Functions | |
| unsigned | calcularCRC (unsigned char *buffer, int numBytes) |
| a normal function to calculate the CRC of the data to be trasmitted. | |
Variables | |
| const int | MAX_BUFFER_RESPOSTA = 258 |
| Defines the maximum number of bytes permitted in the answer frame. | |
| const int | MAX_BUFFER_DADOS = 66 |
| Defines the maximum number of bytes permitted in the command frame. | |
|
|
Defines the bytes (signals) used in the communication.
|
|
|
Defines the possible states in the FSM for the communication.
|
|
||||||||||||
|
a normal function to calculate the CRC of the data to be trasmitted.
|
1.3.7