Searched refs:adu (Results 1 – 6 of 6) sorted by relevance
/Zephyr-Core-2.7.6/subsys/modbus/ |
D | modbus_raw.c | 51 int modbus_raw_submit_rx(const int iface, const struct modbus_adu *adu) in modbus_raw_submit_rx() argument 67 ctx->rx_adu.trans_id = adu->trans_id; in modbus_raw_submit_rx() 68 ctx->rx_adu.proto_id = adu->proto_id; in modbus_raw_submit_rx() 69 ctx->rx_adu.length = adu->length; in modbus_raw_submit_rx() 70 ctx->rx_adu.unit_id = adu->unit_id; in modbus_raw_submit_rx() 71 ctx->rx_adu.fc = adu->fc; in modbus_raw_submit_rx() 72 memcpy(ctx->rx_adu.data, adu->data, in modbus_raw_submit_rx() 73 MIN(adu->length, sizeof(ctx->rx_adu.data))); in modbus_raw_submit_rx() 79 void modbus_raw_put_header(const struct modbus_adu *adu, uint8_t *header) in modbus_raw_put_header() argument 81 uint16_t length = MIN(adu->length, CONFIG_MODBUS_BUFFER_SIZE); in modbus_raw_put_header() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/modbus/src/ |
D | test_modbus_raw.c | 19 int server_raw_cb(const int iface, const struct modbus_adu *adu) in server_raw_cb() argument 23 tmp_adu.trans_id = adu->trans_id; in server_raw_cb() 24 tmp_adu.proto_id = adu->proto_id; in server_raw_cb() 25 tmp_adu.length = adu->length; in server_raw_cb() 26 tmp_adu.unit_id = adu->unit_id; in server_raw_cb() 27 tmp_adu.fc = adu->fc; in server_raw_cb() 28 memcpy(tmp_adu.data, adu->data, in server_raw_cb() 29 MIN(adu->length, sizeof(tmp_adu.data))); in server_raw_cb() 41 int client_raw_cb(const int iface, const struct modbus_adu *adu) in client_raw_cb() argument 48 tmp_adu.trans_id = adu->trans_id; in client_raw_cb() [all …]
|
D | test_modbus.h | 50 int client_raw_cb(const int iface, const struct modbus_adu *adu); 51 int server_raw_cb(const int iface, const struct modbus_adu *adu);
|
/Zephyr-Core-2.7.6/samples/subsys/modbus/tcp_server/src/ |
D | main.c | 126 static int server_raw_cb(const int iface, const struct modbus_adu *adu) in server_raw_cb() argument 130 tmp_adu.trans_id = adu->trans_id; in server_raw_cb() 131 tmp_adu.proto_id = adu->proto_id; in server_raw_cb() 132 tmp_adu.length = adu->length; in server_raw_cb() 133 tmp_adu.unit_id = adu->unit_id; in server_raw_cb() 134 tmp_adu.fc = adu->fc; in server_raw_cb() 135 memcpy(tmp_adu.data, adu->data, in server_raw_cb() 136 MIN(adu->length, CONFIG_MODBUS_BUFFER_SIZE)); in server_raw_cb() 168 static int modbus_tcp_reply(int client, struct modbus_adu *adu) in modbus_tcp_reply() argument 172 modbus_raw_put_header(adu, header); in modbus_tcp_reply() [all …]
|
/Zephyr-Core-2.7.6/include/modbus/ |
D | modbus.h | 383 typedef int (*modbus_raw_cb_t)(const int iface, const struct modbus_adu *adu); 482 int modbus_raw_submit_rx(const int iface, const struct modbus_adu *adu); 493 void modbus_raw_put_header(const struct modbus_adu *adu, uint8_t *header); 503 void modbus_raw_get_header(struct modbus_adu *adu, const uint8_t *header); 512 void modbus_raw_set_server_failure(struct modbus_adu *adu); 526 int modbus_raw_backend_txn(const int iface, struct modbus_adu *adu);
|
/Zephyr-Core-2.7.6/samples/subsys/modbus/tcp_gateway/src/ |
D | main.c | 44 static int modbus_tcp_reply(int client, struct modbus_adu *adu) in modbus_tcp_reply() argument 48 modbus_raw_put_header(adu, header); in modbus_tcp_reply() 53 if (send(client, adu->data, adu->length, 0) < 0) { in modbus_tcp_reply()
|