Searched refs:rx_adu (Results 1 – 7 of 7) sorted by relevance
/Zephyr-latest/subsys/modbus/ |
D | modbus_server.c | 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() [all …]
|
D | modbus_raw.c | 20 if (ctx->rx_adu.length < MODBUS_RAW_MIN_MSG_SIZE || in modbus_raw_rx_adu() 21 ctx->rx_adu.length > MODBUS_RAW_BUFFER_SIZE) { in modbus_raw_rx_adu() 26 if (ctx->rx_adu.proto_id != MODBUS_ADU_PROTO_ID) { in modbus_raw_rx_adu() 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() [all …]
|
D | modbus_serial.c | 109 prx_data = &ctx->rx_adu.data[0]; in modbus_ascii_rx_adu() 133 hex2bin(pmsg, 2, &ctx->rx_adu.unit_id, 1); in modbus_ascii_rx_adu() 136 hex2bin(pmsg, 2, &ctx->rx_adu.fc, 1); in modbus_ascii_rx_adu() 141 ctx->rx_adu.length = 0; in modbus_ascii_rx_adu() 148 ctx->rx_adu.length++; in modbus_ascii_rx_adu() 153 ctx->rx_adu.crc = frame_lrc; in modbus_ascii_rx_adu() 257 ctx->rx_adu.unit_id = cfg->uart_buf[0]; in modbus_rtu_rx_adu() 258 ctx->rx_adu.fc = cfg->uart_buf[1]; in modbus_rtu_rx_adu() 261 ctx->rx_adu.length = cfg->uart_buf_ctr - 4; in modbus_rtu_rx_adu() 265 memcpy(ctx->rx_adu.data, data_ptr, ctx->rx_adu.length); in modbus_rtu_rx_adu() [all …]
|
D | modbus_client.c | 33 uint8_t resp_fc = ctx->rx_adu.fc; in mbc_validate_response_fc() 34 uint8_t excep_code = ctx->rx_adu.data[0]; in mbc_validate_response_fc() 38 if (unit_id != ctx->rx_adu.unit_id) { in mbc_validate_response_fc() 64 resp_byte_cnt = ctx->rx_adu.data[0]; in mbc_validate_fc03fp_response() 65 resp_data = &ctx->rx_adu.data[1]; in mbc_validate_fc03fp_response() 101 resp_byte_cnt = ctx->rx_adu.data[0]; in mbc_validate_rd_response() 102 resp_data = &ctx->rx_adu.data[1]; in mbc_validate_rd_response() 106 if ((resp_byte_cnt + 1) > sizeof(ctx->rx_adu.data)) { in mbc_validate_rd_response() 173 resp_sfunc = sys_get_be16(&ctx->rx_adu.data[0]); in mbc_validate_fc08_response() 174 resp_data = sys_get_be16(&ctx->rx_adu.data[2]); in mbc_validate_fc08_response() [all …]
|
D | modbus_internal.h | 119 struct modbus_adu rx_adu; member
|
/Zephyr-latest/samples/subsys/modbus/tcp_server/src/ |
D | main.c | 32 const struct modbus_adu *rx_adu, in custom_handler() argument 45 if (rx_adu->length != request_len) { in custom_handler() 51 subfunc = rx_adu->data[0]; in custom_handler() 52 data_len = rx_adu->data[1]; in custom_handler()
|
/Zephyr-latest/include/zephyr/modbus/ |
D | modbus.h | 434 const struct modbus_adu *const rx_adu,
|