#pragma once #include #include #include #include "HbdLanguage.h" #include "../Controller/Base.h" using namespace std; #pragma pack(1) class CommunicationCfg :public Base { public: enum ComType { COM = 0, TCP, S7 }; CommunicationCfg(); CommunicationCfg(int mid, string cc, string name, const string& sContent, int type); ~CommunicationCfg() {} void GetUpdateSql(vector& ups); void GetInitInsertSql(vector& ins); public: char m_startFlag; //开始标记 IntData* m_MachineId; StrData* m_ClientCode; //编码 StrData* m_Name; IntData* m_Type; StrData* m_IP; IntData* m_Port; UcharData* m_Addr; StrData* m_COM; IntData* m_BaudRate; IntData* m_Parity; IntData* m_DataBits; IntData* m_StopBits; UIntData* m_Interval; UIntData* m_AlarmTimeoutTimes; BoolData* m_Enable; StrData* m_szIp; StrData* m_szCom; StrData* m_ShowContent; char m_endFlag; //结束标记 //static map s_CommunicationTr; public: static const string TABLE_NAME; static const string FIELD_MACHINE_ID; static const string FIELD_CLIENT_CODE; static const string FIELD_PARAM_CODE; static const string FIELD_PARAM_VALUE; static const string PARAM_NAME; static const string PARAM_TYPE; static const string PARAM_IP; static const string PARAM_PORT; static const string PARAM_ADDR; static const string PARAM_COM; static const string PARAM_BAUD_RATE; static const string PARAM_PARITY; static const string PARAM_DATABITS; static const string PARAM_STOPBITS; static const string PARAM_INTERVAL; static const string PARAM_ALARM_TIMEOUT_TIMES; static const string PARAM_ENABLE; }; #pragma pack()