選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

37 行
1018 B

  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_Comm "Uart.Comm"
  15. class Uart_Comm : public JObject
  16. {
  17. public:
  18. JStrObj ProtocolName; ///串口协议
  19. JIntObj PortNo; ///端口号
  20. JObjArray<JIntObj> Attribute; ///串口属性:数组中第一个是实际波特率;第二个是校验位;第三个是数据位;第四个是停止位
  21. public:
  22. Uart_Comm(JObject *pParent = NULL, const char *szName = JK_Uart_Comm):
  23. JObject(pParent,szName),
  24. ProtocolName(this, "ProtocolName"),
  25. PortNo(this, "PortNo"),
  26. Attribute(this, "Attribute"){
  27. };
  28. ~Uart_Comm(void){};
  29. };
  30. NS_NETSDK_CFG_END