mod_heartbeat.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // mod_heartbeat.cpp : Defines the exported functions for the DLL application.
  2. //
  3. #include "stdafx.h"
  4. #include "mod_heartbeat.h"
  5. void HeartBeatServerSession::Handle_Instruction(SpReqAnsContext<HeartBeatService_Instruction_Req, HeartBeatService_Instruction_Ans>::Pointer ctx)
  6. {
  7. LOG_FUNCTION();
  8. DbgToBeidou(ctx->link, __FUNCTION__)();
  9. m_pEntity->Instruction(ctx);
  10. }
  11. void HeartBeatServerSession::Handle_CardActive(SpReqAnsContext<HeartBeatService_CardActive_Req, HeartBeatService_CardActive_Ans>::Pointer ctx)
  12. {
  13. LOG_FUNCTION();
  14. DbgToBeidou(ctx->link, __FUNCTION__)();
  15. m_pEntity->CardActive(ctx);
  16. }
  17. void CHeartBeatEntity::OnSysVarEvent(const char *pszKey,
  18. const char *pszValue, const char *pszOldValue, const char *pszEntityName)
  19. {
  20. //if ((_strnicmp(pszKey, "TerminalStage", strlen("TerminalStage")) == 0))
  21. //{
  22. // if (_strnicmp(pszValue, "A", strlen("A")) == 0)
  23. // {
  24. // DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("To set terminal stage to %s.",pszValue);
  25. //
  26. // }
  27. //}
  28. }
  29. void CHeartBeatEntity::OnBroadcastEvent(CUUID SubID, const char *pszEntityName, DWORD dwMessageId, DWORD dwMessageSignature, CAutoBuffer Buffer)
  30. {
  31. }
  32. void CHeartBeatEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID, const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
  33. const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
  34. const CAutoArray<DWORD> &Param, const char *pszEntityName, const char *pszModuleName,const char *pszMessage, const linkContext &pLinkInfo)
  35. {
  36. switch (dwUserCode)
  37. {
  38. default:
  39. break;
  40. }
  41. }
  42. SP_BEGIN_ENTITY_MAP()
  43. SP_ENTITY(CHeartBeatEntity)
  44. SP_END_ENTITY_MAP()