Agile Modbus
1.1.4
Lightweight modbus protocol stack.
|
Functions | |
static uint16_t | agile_modbus_rtu_crc16 (uint8_t *buffer, uint16_t buffer_length) |
RTU CRC16 calculation. More... | |
static int | agile_modbus_rtu_set_slave (agile_modbus_t *ctx, int slave) |
RTU sets the address interface. More... | |
static int | agile_modbus_rtu_build_request_basis (agile_modbus_t *ctx, int function, int addr, int nb, uint8_t *req) |
RTU builds the basic request message interface (header message) More... | |
static int | agile_modbus_rtu_build_response_basis (agile_modbus_sft_t *sft, uint8_t *rsp) |
RTU builds the basic response message interface (header message) More... | |
static int | agile_modbus_rtu_prepare_response_tid (const uint8_t *req, int *req_length) |
RTU ready response interface. More... | |
static int | agile_modbus_rtu_send_msg_pre (uint8_t *req, int req_length) |
RTU pre-send data interface. More... | |
static int | agile_modbus_rtu_check_integrity (agile_modbus_t *ctx, uint8_t *msg, const int msg_length) |
RTU check received data integrity interface (CRC16 comparison) More... | |
static int | agile_modbus_rtu_pre_check_confirmation (agile_modbus_t *ctx, const uint8_t *req, const uint8_t *rsp, int rsp_length) |
RTU pre-check confirmation interface (request response address comparison) More... | |
|
static |
RTU CRC16 calculation.
buffer | data pointer |
buffer_length | data length |
Definition at line 100 of file agile_modbus_rtu.c.
|
static |
RTU sets the address interface.
ctx | modbus handle |
slave | slave address |
Definition at line 122 of file agile_modbus_rtu.c.
|
static |
RTU builds the basic request message interface (header message)
ctx | modbus handle |
function | function code |
addr | register address |
nb | number of registers |
req | data storage pointer |
Definition at line 137 of file agile_modbus_rtu.c.
|
static |
RTU builds the basic response message interface (header message)
sft | modbus header parameter structure pointer |
rsp | data storage pointer |
Definition at line 157 of file agile_modbus_rtu.c.
|
static |
RTU ready response interface.
req | request data pointer |
req_length | request data length |
Definition at line 172 of file agile_modbus_rtu.c.
|
static |
RTU pre-send data interface.
req | data storage pointer |
req_length | existing data length |
Definition at line 187 of file agile_modbus_rtu.c.
|
static |
RTU check received data integrity interface (CRC16 comparison)
ctx | modbus handle |
msg | Receive data pointer |
msg_length | valid data length |
Definition at line 203 of file agile_modbus_rtu.c.
|
static |
RTU pre-check confirmation interface (request response address comparison)
ctx | modbus handle |
req | request data pointer |
rsp | response data pointer |
rsp_length | response data length |
Definition at line 227 of file agile_modbus_rtu.c.