18 #include "mbmaster_default_config.h"
20 #include "auxiliary.h"
123 uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count,
139 uint16_t quantity, uint8_t *respond_buf, uint8_t *respond_count,
155 uint16_t start_addr, uint16_t quantity,
156 uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout);
171 uint16_t start_addr, uint16_t quantity,
172 uint8_t *respond_buf, uint8_t *respond_count, uint32_t timeout);
187 uint16_t coil_value, uint16_t *resp_addr, uint16_t *resp_value,
188 uint8_t *exception_code, uint32_t timeout);
203 uint16_t register_value, uint16_t *resp_addr, uint16_t *resp_value,
204 uint8_t *exception_code, uint32_t timeout);
220 uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr,
221 uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout);
236 uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr,
237 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_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_rtu_init(mb_handler_t **handler, uint8_t port, uint32_t baud_rate, mb_parity_t parity, 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