| | |
| | | #include <functional> |
| | | #include <vector> |
| | | #include <map> |
| | | #include "CCollectionEvent.h" |
| | | |
| | | |
| | | #define EQCONSTANT_VALUE_MAX 64 |
| | |
| | | typedef std::function<void(void* pFrom)> SECSEQOFFLINE; |
| | | typedef std::function<void(void* pFrom, std::vector<EQConstant>&)> SECSEQCONSTANTREQUEST; |
| | | typedef std::function<void(void* pFrom, const char*, std::vector<CommandParameter>&)> SECSCommand; |
| | | typedef std::function<void(void* pFrom, SYSTEMTIME& time)> DATETIMESYNC; |
| | | typedef std::function<void(void* pFrom, bool bEnable, std::vector<unsigned int>& ids)> EDEVENTREPORT; |
| | | typedef std::function<void(void* pFrom, bool bEnable, unsigned int id)> EDALARMREPORT; |
| | | typedef struct _SECSListener |
| | | { |
| | | SECSEQOFFLINE onEQOffLine; |
| | |
| | | SECSEQCONSTANTREQUEST onEQConstantRequest; |
| | | SECSEQCONSTANTREQUEST onEQConstantSend; |
| | | SECSCommand onCommand; |
| | | DATETIMESYNC onDatetimeSync; |
| | | EDEVENTREPORT onEnableDisableEventReport; |
| | | EDALARMREPORT onEnableDisableAlarmReport; |
| | | } SECSListener; |
| | | |
| | | |
| | |
| | | // 取消/删除所有 define report |
| | | void deleteAllReport(); |
| | | |
| | | // 从文件中加载CVariable列表 |
| | | int loadVarialbleList(const char* pszFilepath); |
| | | |
| | | |
| | | void setListener(SECSListener listener); |
| | | unsigned OnCimWork(); |
| | | void OnTimer(UINT nTimerid); |
| | |
| | | inline void Lock() { EnterCriticalSection(&m_criticalSection); } |
| | | inline void Unlock() { LeaveCriticalSection(&m_criticalSection); } |
| | | int onRecvMsg(IMessage* pMessage); |
| | | void clearAllVariabel(); |
| | | |
| | | private: |
| | | CModel* m_pModel; |
| | |
| | | |
| | | // VID to Report |
| | | std::map<unsigned int, VALUE> m_mapValue; |
| | | |
| | | // CVariable vector |
| | | std::vector<SERVO::CVariable*> m_variabels; |
| | | }; |
| | | |