25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

  1. #pragma once
  2. #include "JObject_NetSDK.h"
  3. NS_NETSDK_CFG_BEGIN
  4. /////////////////////////Attribute相关数据的取值及注释//////////////////
  5. ///实际波特率取值1200,2400,4800,9600,19200,38400,57600,115200
  6. ///校验位对应对应字符串注释
  7. #define NOPARITY "None" //无
  8. #define ODDPARITY "Odd" //奇校验
  9. #define EVENPARITY "Even" //偶校验
  10. #define MARKPARITY "Mark" //标志位校验
  11. #define SPACEPARITY "Space" //空检验
  12. ///数据位取值为5,6,7,8
  13. ///停止位取值为1,2
  14. #define JK_Uart_RS485 "Uart.RS485"
  15. class Uart_RS485 : public JObject
  16. {
  17. public:
  18. JStrObj ProtocolName; /// 串口协议
  19. JIntObj DeviceNo; /// 云台设备地址编号
  20. JIntObj NumberInMatrixs; /// 在矩阵中的统一编号
  21. JIntObj PortNo; /// 串口端口号 [1, 4]
  22. JObjArray<JIntObj> Attribute; /// 串口属性:数组中第一个是实际波特率;第二个是校验位;第三个是数据位;第四个是停止位
  23. public:
  24. Uart_RS485(JObject *pParent = NULL, const char *szName = JK_Uart_RS485):
  25. JObject(pParent,szName),
  26. ProtocolName(this, "ProtocolName"),
  27. DeviceNo(this, "DeviceNo"),
  28. NumberInMatrixs(this, "NumberInMatrixs"),
  29. PortNo(this, "PortNo"),
  30. Attribute(this, "Attribute"){
  31. };
  32. ~Uart_RS485(void){};
  33. };
  34. NS_NETSDK_CFG_END