mod_ContactlessCard.cpp 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // mod_ContactlessCard.cpp : Defines the exported functions for the DLL application.
  2. //
  3. #include "stdafx.h"
  4. #include "mod_ContactlessCard.h"
  5. //oiltest
  6. #include "ContactlessCard_msg_g.h"
  7. bool bCard = false;
  8. void ContactlessCardServerSession::Handle_Insert(SpReqAnsContext<ContactlessCardService_Insert_Req, ContactlessCardService_Insert_Ans>::Pointer ctx)
  9. {
  10. LOG_FUNCTION();
  11. DbgToBeidou(ctx->link, __FUNCTION__)();
  12. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Insert")("Invoke Insert");
  13. m_pEntity->Insert(ctx);
  14. }
  15. void ContactlessCardServerSession::Handle_CancelInsert(SpOnewayCallContext<ContactlessCardService_CancelInsert_Info>::Pointer ctx)
  16. {
  17. LOG_FUNCTION();
  18. DbgToBeidou(ctx->link, __FUNCTION__)();
  19. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CancelInsert")("Invoke CancelInsert");
  20. m_pEntity->CancelInsert(ctx);
  21. }
  22. void ContactlessCardServerSession::Handle_InsertWaitMore(SpOnewayCallContext<ContactlessCardService_InsertWaitMore_Info>::Pointer ctx)
  23. {
  24. LOG_FUNCTION();
  25. DbgToBeidou(ctx->link, __FUNCTION__)();
  26. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("InsertWaitMore")("Invoke InsertWaitMore");
  27. m_pEntity->InsertWaitMore(ctx);
  28. }
  29. void ContactlessCardServerSession::Handle_PreOnline(SpReqAnsContext<ContactlessCardService_PreOnline_Req, ContactlessCardService_PreOnline_Ans>::Pointer ctx)
  30. {
  31. LOG_FUNCTION();
  32. DbgToBeidou(ctx->link, __FUNCTION__)();
  33. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("PreOnline")("Invoke PreOnline");
  34. m_pEntity->PreOnline(ctx);
  35. }
  36. void ContactlessCardServerSession::Handle_PostOnline(SpReqAnsContext<ContactlessCardService_PostOnline_Req, ContactlessCardService_PostOnline_Ans>::Pointer ctx)
  37. {
  38. LOG_FUNCTION();
  39. DbgToBeidou(ctx->link, __FUNCTION__)();
  40. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("PostOnline")("Invoke PostOnline");
  41. m_pEntity->PostOnline(ctx);
  42. }
  43. void ContactlessCardServerSession::Handle_Eject(SpReqAnsContext<ContactlessCardService_Eject_Req, ContactlessCardService_Eject_Ans>::Pointer ctx)
  44. {
  45. LOG_FUNCTION();
  46. DbgToBeidou(ctx->link, __FUNCTION__)();
  47. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Eject")("Invoke Eject");
  48. m_pEntity->Eject(ctx);
  49. }
  50. void ContactlessCardServerSession::Handle_Exit(SpOnewayCallContext<ContactlessCardService_Exit_Info>::Pointer ctx)
  51. {
  52. LOG_FUNCTION();
  53. DbgToBeidou(ctx->link, __FUNCTION__)();
  54. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Exit")("Invoke Exit");
  55. m_pEntity->Exit(ctx);
  56. }
  57. void ContactlessCardServerSession::Handle_QueryCardInfo(SpReqAnsContext<ContactlessCardService_QueryCardInfo_Req, ContactlessCardService_QueryCardInfo_Ans>::Pointer ctx)
  58. {
  59. LOG_FUNCTION();
  60. DbgToBeidou(ctx->link, __FUNCTION__)();
  61. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("QueryCardInfo")("Invoke QueryCardInfo");
  62. m_pEntity->QueryCardInfo(ctx);
  63. }
  64. void ContactlessCardServerSession::Handle_GetDevInfo(SpReqAnsContext<ContactlessCardService_GetDevInfo_Req, ContactlessCardService_GetDevInfo_Ans>::Pointer ctx)
  65. {
  66. LOG_FUNCTION();
  67. DbgToBeidou(ctx->link, __FUNCTION__)();
  68. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetDevInfo")("Invoke GetDevInfo");
  69. m_pEntity->GetDevInfo(ctx);
  70. }
  71. SP_BEGIN_ENTITY_MAP()
  72. SP_ENTITY(CContactlessCardEntity)
  73. SP_END_ENTITY_MAP()