1 /* 2 * Copyright (C) 2015-2018 Alibaba Group Holding Limited 3 */ 4 5 #ifndef MAIN_PROCESS_H 6 #define MAIN_PROCESS_H 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 /* process function code 0x01 0x02 0x03 0x04, they have the same request parameters */ 13 mb_status_t mbmaster_main_type1_process(mb_handler_t *req_handler, uint8_t function_code, uint8_t slave_addr, 14 uint16_t start_addr, uint16_t quantity, uint8_t *respond_buf, 15 uint8_t *respond_count, uint32_t timeout); 16 17 /* process function code 0x05 0x06, they have the same request parameters */ 18 mb_status_t mbmaster_main_type2_process(mb_handler_t *req_handler, uint8_t function_code, uint8_t slave_addr, 19 uint16_t register_addr, uint16_t register_value, uint16_t *resp_addr, 20 uint16_t *resp_value, uint8_t* exception_code, uint32_t timeout); 21 22 /* process function code 0x0F 0x10, they have the same request parameters */ 23 mb_status_t mbmaster_main_type3_process(mb_handler_t *req_handler, uint8_t function_code, uint8_t slave_addr, 24 uint16_t start_addr, uint16_t quantity, uint8_t *outputs_buf, uint16_t *resp_addr, 25 uint16_t *resp_quantity, uint8_t *exception_code, uint32_t timeout); 26 27 #ifdef __cplusplus 28 } 29 #endif 30 31 #endif /* MAIN_PROCESS_H */ 32 33