|
@@ -53,7 +53,7 @@ enum EvtType
|
|
|
USER_EVT_ISSUE_EX_FINISHED,
|
|
|
USER_EVT_BACK_TO_INIT,
|
|
|
//新定义JS状态机事件枚举
|
|
|
- USER_EVT_JS_CAPTURE = EVT_USER + 38,
|
|
|
+ USER_EVT_JS_CAPTURE,
|
|
|
USER_EVT_JS_CAPTURE_FINISHED,
|
|
|
USER_EVT_JS_EJECT,
|
|
|
USER_EVT_JS_EJECT_FINISHED,
|
|
@@ -146,14 +146,6 @@ public:
|
|
|
CardAcceptEvent() : FSMEvent(USER_EVT_ACCEPT) {}
|
|
|
~CardAcceptEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card accept unhandled");
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
class CardIssueEvent : public FSMEvent
|
|
|
{
|
|
@@ -161,14 +153,6 @@ public:
|
|
|
CardIssueEvent() : FSMEvent(USER_EVT_ISSUE) {}
|
|
|
~CardIssueEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card issue unhandled");
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class CancelAcceptEvent : public FSMEvent
|
|
@@ -176,10 +160,6 @@ class CancelAcceptEvent : public FSMEvent
|
|
|
public:
|
|
|
CancelAcceptEvent() : FSMEvent(USER_EVT_ACCEPT_CANCEL) {}
|
|
|
~CancelAcceptEvent() {}
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- //DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card cancel accept unhandled");
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class CardReadEvent : public FSMEvent
|
|
@@ -188,14 +168,6 @@ public:
|
|
|
CardReadEvent() : FSMEvent(USER_EVT_READ) {}
|
|
|
~CardReadEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card read unhandled");
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -205,13 +177,6 @@ public:
|
|
|
CardReadFinishedEvent() : FSMEvent(USER_EVT_READ_FINISHED) {}
|
|
|
~CardReadFinishedEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- //DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card read unhandled(new)");
|
|
|
- }
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -237,11 +202,6 @@ public:
|
|
|
PreOnlineEvent() : FSMEvent(USER_EVT_PREONLINE){}
|
|
|
~PreOnlineEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -251,11 +211,6 @@ public:
|
|
|
PostOnlineEvent() : FSMEvent(USER_EVT_POSTONLINE){}
|
|
|
~PostOnlineEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -265,11 +220,6 @@ public:
|
|
|
CardCaptureEvent() : FSMEvent(USER_EVT_CAPTURE){}
|
|
|
~CardCaptureEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
|
|
|
protected:
|
|
|
private:
|
|
@@ -280,11 +230,6 @@ public:
|
|
|
CardEjectEvent() : FSMEvent(USER_EVT_EJECT){}
|
|
|
~CardEjectEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -295,11 +240,6 @@ public:
|
|
|
GetMaterialExEvent() : FSMEvent(USER_EVT_GET_MATERIAL_EX) {}
|
|
|
~GetMaterialExEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -309,11 +249,6 @@ public:
|
|
|
SetMaterialExEvent() : FSMEvent(USER_EVT_SET_MATERIAL_EX){}
|
|
|
~SetMaterialExEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
protected:
|
|
|
private:
|
|
|
};
|
|
@@ -323,14 +258,6 @@ public:
|
|
|
CardIssueExEvent() : FSMEvent(USER_EVT_ISSUE_EX){}
|
|
|
~CardIssueExEvent(){}
|
|
|
SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("card issue ex unhandled");
|
|
|
- ctx->Answer(Error_InvalidState);
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
#pragma region JS接口 event
|
|
@@ -341,13 +268,6 @@ public:
|
|
|
EjectJSEvent() : FSMEvent(USER_EVT_JS_EJECT) {}
|
|
|
~EjectJSEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_EjectJS_Req, CardIssuerStandService_EjectJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("EjectJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class CaptureJSEvent : public FSMEvent
|
|
@@ -356,13 +276,6 @@ public:
|
|
|
CaptureJSEvent() : FSMEvent(USER_EVT_JS_CAPTURE) {}
|
|
|
~CaptureJSEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_CaptureJS_Req, CardIssuerStandService_CaptureJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("CaptureJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class PostOnlineJSEvent : public FSMEvent
|
|
@@ -371,13 +284,6 @@ public:
|
|
|
PostOnlineJSEvent() : FSMEvent(USER_EVT_JS_POSTONLINE) {}
|
|
|
~PostOnlineJSEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_PostOnlineJS_Req, CardIssuerStandService_PostOnlineJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("PostOnlineJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class IssueFromBoxJSEvent : public FSMEvent
|
|
@@ -386,30 +292,10 @@ public:
|
|
|
IssueFromBoxJSEvent() : FSMEvent(USER_EVT_JS_ISSUE_FROM_BOX) {}
|
|
|
~IssueFromBoxJSEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_IssueFromBoxJS_Req, CardIssuerStandService_IssueFromBoxJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("IssueFromBoxJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
|
|
|
-class ReadJSEvent : public FSMEvent
|
|
|
-{
|
|
|
-public:
|
|
|
- ReadJSEvent() : FSMEvent(USER_EVT_JS_READ) {}
|
|
|
- ~ReadJSEvent() {}
|
|
|
- SpReqAnsContext<CardIssuerStandService_ReadJS_Req, CardIssuerStandService_ReadJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("ReadJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
+
|
|
|
|
|
|
class InsertJSEvent : public FSMEvent
|
|
|
{
|
|
@@ -417,13 +303,6 @@ public:
|
|
|
InsertJSEvent() : FSMEvent(USER_EVT_JS_INSERT) {}
|
|
|
~InsertJSEvent() {}
|
|
|
SpReqAnsContext<CardIssuerStandService_InsertJS_Req, CardIssuerStandService_InsertJS_Ans>::Pointer ctx;
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- if (ctx != NULL)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("InsertJS Operate unhandled");
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
class CancelInsertJSEvent : public FSMEvent
|
|
@@ -431,10 +310,6 @@ class CancelInsertJSEvent : public FSMEvent
|
|
|
public:
|
|
|
CancelInsertJSEvent() : FSMEvent(USER_EVT_JS_INSERT_CANCEL) {}
|
|
|
~CancelInsertJSEvent() {}
|
|
|
- virtual void OnUnhandled()
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CL")("CancelInsertJS Operate unhandled");
|
|
|
- }
|
|
|
};
|
|
|
|
|
|
#pragma endregion JS接口 event
|
|
@@ -1108,13 +983,25 @@ public:
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("rtaMsg=%s", rtaMsg.GetData());
|
|
|
return rtaMsg;
|
|
|
}
|
|
|
+
|
|
|
private:
|
|
|
bool m_bCancelInsert;
|
|
|
bool m_bDoExit;
|
|
|
bool m_bReturnMainPage;//正在处理过程中是否退到首页变量
|
|
|
ULLINT m_ullBeginTime, m_ullEndTime;
|
|
|
BYTE m_btCID/*9f27*/;
|
|
|
+ void FSMEventDefaultProcess(FSMEvent* pEvt, DWORD dwUserCode);
|
|
|
};
|
|
|
+
|
|
|
+class ReadJSEvent : public FSMEvent
|
|
|
+{
|
|
|
+public:
|
|
|
+ ReadJSEvent() : FSMEvent(USER_EVT_JS_READ){}
|
|
|
+ ~ReadJSEvent() {}
|
|
|
+ SpReqAnsContext<CardIssuerStandService_ReadJS_Req, CardIssuerStandService_ReadJS_Ans>::Pointer ctx;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
struct InitTask : public ITaskSp
|
|
|
{
|
|
|
CCardIssuerFSM* fsm;
|