|
- #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_RS485 "Uart.RS485"
- class Uart_RS485 : public JObject
- {
- public:
- JStrObj ProtocolName; /// 串口协议
- JIntObj DeviceNo; /// 云台设备地址编号
- JIntObj NumberInMatrixs; /// 在矩阵中的统一编号
- JIntObj PortNo; /// 串口端口号 [1, 4]
- JObjArray<JIntObj> Attribute; /// 串口属性:数组中第一个是实际波特率;第二个是校验位;第三个是数据位;第四个是停止位
-
- public:
- Uart_RS485(JObject *pParent = NULL, const char *szName = JK_Uart_RS485):
- JObject(pParent,szName),
- ProtocolName(this, "ProtocolName"),
- DeviceNo(this, "DeviceNo"),
- NumberInMatrixs(this, "NumberInMatrixs"),
- PortNo(this, "PortNo"),
- Attribute(this, "Attribute"){
- };
-
- ~Uart_RS485(void){};
- };
-
- NS_NETSDK_CFG_END
|