rllib
1
|
#include <rlmodbus.h>
Public Attributes | |
unsigned char | u_char [4] |
char | s_char [4] |
unsigned short | u_short [2] |
short | s_short [2] |
unsigned int | u_int |
int | s_int |
float | s_float |
data exchanged by Modbus is either: 1byte unsigned for coils 2byte unsigned for registers
Helper union for converting Modbus data to data types that are not standard Modbus data types Example: rlModbus::DATA data; data.u_short[0] = registers[0]; // store an unsigned 16 bit register in union data printf("print registers[0] as signed int value=%d\n", data.s_short[0]);
Definition at line 162 of file rlmodbus.h.
char rlModbus::DATA::s_char[4] |
Definition at line 165 of file rlmodbus.h.
float rlModbus::DATA::s_float |
Definition at line 170 of file rlmodbus.h.
int rlModbus::DATA::s_int |
Definition at line 169 of file rlmodbus.h.
short rlModbus::DATA::s_short[2] |
Definition at line 167 of file rlmodbus.h.
unsigned char rlModbus::DATA::u_char[4] |
Definition at line 164 of file rlmodbus.h.
unsigned int rlModbus::DATA::u_int |
Definition at line 168 of file rlmodbus.h.
unsigned short rlModbus::DATA::u_short[2] |
Definition at line 166 of file rlmodbus.h.