|
- #pragma once
- #include "JObject_NetSDK.h"
- NS_NETSDK_CFG_BEGIN
-
-
- /////////////////////////Attribute相关数据的取值及注释//////////////////
- ///实际波特率取值1200,2400,4800,9600,19200,38400,57600,115200
- ///校验位对应对应字符串注释
- #define NOPARITY "None" //无
- #define ODDPARITY "Odd" //奇校验
- #define EVENPARITY "Even" //偶校验
- #define MARKPARITY "Mark" //标志位校验
- #define SPACEPARITY "Space" //空检验
- ///数据位取值为5,6,7,8
- ///停止位取值为1,2
-
-
- #define JK_Uart_Comm "Uart.Comm"
- class Uart_Comm : public JObject
- {
- public:
- JStrObj ProtocolName; ///串口协议
- JIntObj PortNo; ///端口号
- JObjArray<JIntObj> Attribute; ///串口属性:数组中第一个是实际波特率;第二个是校验位;第三个是数据位;第四个是停止位
-
- public:
- Uart_Comm(JObject *pParent = NULL, const char *szName = JK_Uart_Comm):
- JObject(pParent,szName),
- ProtocolName(this, "ProtocolName"),
- PortNo(this, "PortNo"),
- Attribute(this, "Attribute"){
- };
-
- ~Uart_Comm(void){};
- };
-
- NS_NETSDK_CFG_END
|