Lines Matching refs:rx_adu
85 LOG_INF("FC 0x%02x Error 0x%02x", ctx->rx_adu.fc, excep_code); in mbs_exception_rsp()
120 if (ctx->rx_adu.length != request_len) { in mbs_fc01_coil_read()
130 coil_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc01_coil_read()
131 coil_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc01_coil_read()
219 if (ctx->rx_adu.length != request_len) { in mbs_fc02_di_read()
229 di_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc02_di_read()
230 di_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc02_di_read()
317 if (ctx->rx_adu.length != request_len) { in mbs_fc03_hreg_read()
322 reg_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc03_hreg_read()
323 reg_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc03_hreg_read()
429 if (ctx->rx_adu.length != request_len) { in mbs_fc04_inreg_read()
434 reg_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc04_inreg_read()
435 reg_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc04_inreg_read()
539 if (ctx->rx_adu.length != request_len) { in mbs_fc05_coil_write()
540 LOG_ERR("Wrong request length %u", ctx->rx_adu.length); in mbs_fc05_coil_write()
550 coil_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc05_coil_write()
551 coil_val = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc05_coil_write()
597 if (ctx->rx_adu.length != request_len) { in mbs_fc06_hreg_write()
598 LOG_ERR("Wrong request length %u", ctx->rx_adu.length); in mbs_fc06_hreg_write()
607 reg_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc06_hreg_write()
608 reg_val = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc06_hreg_write()
647 if (ctx->rx_adu.length != request_len) { in mbs_fc08_diagnostics()
648 LOG_ERR("Wrong request length %u", ctx->rx_adu.length); in mbs_fc08_diagnostics()
652 sfunc = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc08_diagnostics()
653 data = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc08_diagnostics()
741 if (ctx->rx_adu.length < request_len) { in mbs_fc15_coils_write()
742 LOG_ERR("Wrong request length %u", ctx->rx_adu.length); in mbs_fc15_coils_write()
751 coil_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc15_coils_write()
752 coil_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc15_coils_write()
754 num_bytes = ctx->rx_adu.data[4]; in mbs_fc15_coils_write()
764 (ctx->rx_adu.length != (num_bytes + 5))) { in mbs_fc15_coils_write()
777 temp = ctx->rx_adu.data[data_ix++]; in mbs_fc15_coils_write()
840 if (ctx->rx_adu.length < request_len) { in mbs_fc16_hregs_write()
841 LOG_ERR("Wrong request length %u", ctx->rx_adu.length); in mbs_fc16_hregs_write()
845 reg_addr = sys_get_be16(&ctx->rx_adu.data[0]); in mbs_fc16_hregs_write()
846 reg_qty = sys_get_be16(&ctx->rx_adu.data[2]); in mbs_fc16_hregs_write()
848 num_bytes = ctx->rx_adu.data[4]; in mbs_fc16_hregs_write()
877 if ((ctx->rx_adu.length - 5) != num_bytes) { in mbs_fc16_hregs_write()
890 prx_data = &ctx->rx_adu.data[5]; in mbs_fc16_hregs_write()
942 rval = p->cb(iface, &ctx->rx_adu, &ctx->tx_adu, &p->excep_code, in mbs_try_user_fc()
963 uint8_t addr = ctx->rx_adu.unit_id; in modbus_server_handler()
964 uint8_t fc = ctx->rx_adu.fc; in modbus_server_handler()
985 ctx->tx_adu.trans_id = ctx->rx_adu.trans_id; in modbus_server_handler()
986 ctx->tx_adu.proto_id = ctx->rx_adu.proto_id; in modbus_server_handler()