| | |
| | | #include <string> |
| | | #include <list> |
| | | #include "HsmsAction.h" |
| | | #include <functional> |
| | | #include <vector> |
| | | |
| | | |
| | | #define ER_NOERROR 0 |
| | | #define ER_NOTSELECT -1 |
| | | #define ER_BUSY -2 |
| | | #define ER_PARAM_ERROR -3 |
| | | |
| | | typedef std::function<void(void* pFrom, const std::vector<unsigned int>& ecids, |
| | | std::vector<unsigned int>& ecvs)> SECSEQCONSTANTREQUEST; |
| | | typedef std::function<void(void* pFrom, int error)> ONDATAERROR; |
| | | typedef struct _SECSListener |
| | | { |
| | | SECSEQCONSTANTREQUEST onEQConstantRequest; |
| | | } SECSListener; |
| | | |
| | | class CModel; |
| | | class CHsmsPassive |
| | |
| | | /* 设置软件版本号 最大长度 20 bytes */ |
| | | void setSoftRev(const char* pszRev); |
| | | |
| | | void setListener(SECSListener listener); |
| | | unsigned OnCimWork(); |
| | | void OnTimer(UINT nTimerid); |
| | | void setActionTimeout(int nSecond); |
| | |
| | | /* reply开头的函数为回复函数 */ |
| | | int replyAreYouThere(IMessage* pRecv); |
| | | int replyEstablishCommunications(IMessage* pRecv); |
| | | int replyEquipmentConstant(IMessage* pRecv); |
| | | int replyDatetime(IMessage* pRecv); |
| | | int replyEanbleDisableEventReport(IMessage* pRecv); |
| | | int replyEanbleDisableAlarmReport(IMessage* pRecv); |
| | |
| | | std::list<CHsmsAction*> m_listActionSent; |
| | | |
| | | private: |
| | | SECSListener m_listener; |
| | | BOOL m_bCimWorking; |
| | | HANDLE m_hCimWorkEvent; |
| | | HANDLE m_hCimWorkThreadHandle; |