protocol.h 487 B

1234567891011121314
  1. #ifndef __PROTOCOL_H
  2. #define __PROTOCOL_H
  3. #include "gateway_message.h"
  4. // 解析发过来的数据是modbus还是dlt645
  5. #define MODBUS_WRITE 4 //本机用于区分读写
  6. #define MODBUS 3
  7. #define DLT645_07 2
  8. #define DLT645_97 1
  9. int masterSendNodeString(uint8_t nodeIndex, uint8_t *string, uint16_t *size);
  10. uint8_t SlaveProtocolAnalysis(uint8_t *buff, uint16_t len);
  11. void nodeSendReaddValue(uint8_t *string,uint16_t *size);
  12. int GatewayProtocolAnalysis(uint8_t *string, uint16_t len);
  13. #endif