18 #include "mbmaster_default_config.h" 20 #include "auxiliary.h" 122 uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count,
138 uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count,
154 uint16_t start_addr, uint16_t quantity,
155 uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout);
170 uint16_t start_addr, uint16_t quantity,
171 uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout);
186 uint16_t coil_value, uint16_t *resp_addr, uint16_t *resp_value,
187 uint8_t *exception_code, uint32_t timeout);
202 uint16_t register_value, uint16_t *resp_addr, uint16_t *resp_value,
203 uint8_t *exception_code, uint32_t timeout);
219 uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr,
220 uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout);
235 uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr,
236 uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout);
enum mb_status mb_status_t
struct mb_handler mb_handler_t
mb_status_t mbmaster_rtu_uninit(mb_handler_t *req_handler)
mb_status_t mbmaster_read_holding_registers(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout)
mb_status_t(* adu_disassemble_func_t)(mb_handler_t *handler)
mb_status_t mbmaster_rtu_init(mb_handler_t **handler, uint8_t port, uint32_t baud_rate, mb_parity_t parity)
mb_status_t mbmaster_write_single_coil(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t coil_addr, uint16_t coil_value, uint16_t *resp_addr, uint16_t *resp_value, uint8_t *exception_code, uint32_t timeout)
mb_status_t mbmaster_write_multiple_coils(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr, uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout)
mb_status_t mbmaster_read_input_registers(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout)
mb_status_t mbmaster_write_single_register(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t register_addr, uint16_t register_value, uint16_t *resp_addr, uint16_t *resp_value, uint8_t *exception_code, uint32_t timeout)
mb_status_t mbmaster_read_coils(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout)
mb_status_t(* frame_send_func_t)(mb_handler_t *handler, uint32_t timeout)
mb_status_t(* adu_assemble_func_t)(mb_handler_t *handler)
mb_status_t mbmaster_read_discrete_inputs(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout)
mb_status_t mbmaster_write_multiple_registers(mb_handler_t *req_handler, uint8_t slave_addr, uint16_t start_addr, uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr, uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout)
mb_status_t(* frame_recv_func_t)(mb_handler_t *handler)
@ MB_SERIAL_UNINIT_FAILED
@ MB_FUNCTION_CODE_NOT_SUPPORT
frame_recv_func_t frame_recv
adu_assemble_func_t adu_assemble
uint8_t mb_frame_buff[ADU_BUF_MAX_LENGTH]
adu_disassemble_func_t adu_disassemble
frame_send_func_t frame_send