31#ifndef PROTOCORE_SB_MODBUS_H
32#define PROTOCORE_SB_MODBUS_H
36#if PROTOCORE_ENABLE_SOUTHBOUND && PROTOCORE_ENABLE_MODBUS_MASTER
51typedef int (*protocore_sb_modbus_txn)(
void *io,
const uint8_t *req,
size_t req_len, uint8_t *resp,
size_t resp_cap);
54#define PROTOCORE_SB_MODBUS_EXCEPTION (-100)
63 protocore_sb_modbus_txn txn;
68 uint8_t last_exception;
69} protocore_sb_modbus_ctx;
89 protocore_sb_modbus_ctx *ctx;
90 protocore_sb_modbus_txn txn;
94 SouthboundDriver *drv_out;
100extern SbModbusVars SbModbusV;
105 void (*
const init)(uint8_t *work);
106 void (*
const driver)(uint8_t *work);
111void protocore_sb_modbus_init(uint8_t *work);
112void protocore_sb_modbus_driver(uint8_t *work);
118static const SbModbusNs SbModbus __attribute__((unused)) = {
119 .init = protocore_sb_modbus_init,
120 .driver = protocore_sb_modbus_driver,
Zero-heap Modbus TCP slave/server (Modbus Application Protocol v1.1b3).
Southbound protocol-driver framework (PROTOCORE_ENABLE_SOUTHBOUND).
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
#define PROTOCORE_END_DECLS