Переглянути джерело

Z991239-6033 #comment feat: 新接口

Signed-Off-By: commit-hook
刘文涛80174520 8 місяців тому
батько
коміт
95fbedd9aa

+ 1 - 1
Module/mod_CardIssuerStand/CardIssuerFSM.h

@@ -894,7 +894,7 @@ public:
 	void DecodeTracksData(const char *track2, DWORD dwT2size, const char *track3, DWORD dwT3size,char *&magData,bool bT2OK=true,bool bT3OK=true);
 	int GetFSMState()
 	{ 
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("m_currentFSMState:%d", m_currentFSMState));
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("m_currentFSMState:%d", m_currentFSMState));
 		return m_currentFSMState;
 	}
 	void GetCardInfo(int &findCard, int &cardPos)

+ 8 - 8
Module/mod_CardIssuerStand/mod_cardissuer.cpp

@@ -152,56 +152,56 @@ void CardIssuerServerSession::Handle_ReadJS(SpReqAnsContext<CardIssuerStandServi
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadJS");
-	//m_pEntity->ReadJS(ctx);
+	m_pEntity->ReadJS(ctx);
 }
 void CardIssuerServerSession::Handle_PostOnlineJS(SpReqAnsContext<CardIssuerStandService_PostOnlineJS_Req, CardIssuerStandService_PostOnlineJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke PostOnlineJS");
-	//m_pEntity->PostOnlineJS(ctx);
+	m_pEntity->PostOnlineJS(ctx);
 }
 void CardIssuerServerSession::Handle_EjectJS(SpReqAnsContext<CardIssuerStandService_EjectJS_Req, CardIssuerStandService_EjectJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke EjectJS");
-	//m_pEntity->EjectJS(ctx);
+	m_pEntity->EjectJS(ctx);
 }
 void CardIssuerServerSession::Handle_CaptureJS(SpReqAnsContext<CardIssuerStandService_CaptureJS_Req, CardIssuerStandService_CaptureJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CaptureJS");
-	//m_pEntity->CaptureJS(ctx);
+	m_pEntity->CaptureJS(ctx);
 }
 void CardIssuerServerSession::Handle_QueryHasCardJS(SpReqAnsContext<CardIssuerStandService_QueryHasCardJS_Req, CardIssuerStandService_QueryHasCardJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke QueryHasCardJS");
-	//m_pEntity->QueryHasCardJS(ctx);
+	m_pEntity->QueryHasCardJS(ctx);
 }
 void CardIssuerServerSession::Handle_IssueFromBoxJS(SpReqAnsContext<CardIssuerStandService_IssueFromBoxJS_Req, CardIssuerStandService_IssueFromBoxJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke IssueFromBoxJS");
-	//m_pEntity->IssueFromBoxJS(ctx);
+	m_pEntity->IssueFromBoxJS(ctx);
 }
 void CardIssuerServerSession::Handle_InsertJS(SpReqAnsContext<CardIssuerStandService_InsertJS_Req, CardIssuerStandService_InsertJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke InsertJS");
-	//m_pEntity->InsertJS(ctx);
+	m_pEntity->InsertJS(ctx);
 }
 void CardIssuerServerSession::Handle_CancelInsertJS(SpOnewayCallContext<CardIssuerStandService_CancelInsertJS_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelInsertJS");
-	//m_pEntity->CancelInsertJS(ctx);
+	m_pEntity->CancelInsertJS(ctx);
 }
 
 void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName)

+ 45 - 0
Module/mod_CardIssuerStand/mod_cardissuer.h

@@ -165,6 +165,7 @@ public:
 			if (ctx->Req.reserved1.GetLength() > 0 && strnicmp("kaku#", (const char*)ctx->Req.reserved1, 5) == 0)
 			{
 				int state = m_fsm.GetFSMState();
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("m_currentFSMState:%d", state));
 				if (state == 9)
 				{
 					ctx->Answer(Error_BridgeNotOK);
@@ -269,6 +270,7 @@ public:
 	{
 		LOG_FUNCTION();
 		int state = m_fsm.GetFSMState();
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("m_currentFSMState:%d", state));
 		if (!m_fsm.GetDevInitFlag()) {
 			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
 		}
@@ -319,6 +321,49 @@ public:
 	virtual void OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName);
 	virtual bool IsService()const{return true;}
 	virtual bool IsMultiThread()const{return true;}
+
+	//JS接口实现
+	void ReadJS(SpReqAnsContext<CardIssuerStandService_ReadJS_Req, CardIssuerStandService_ReadJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void PostOnlineJS(SpReqAnsContext<CardIssuerStandService_PostOnlineJS_Req, CardIssuerStandService_PostOnlineJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void EjectJS(SpReqAnsContext<CardIssuerStandService_EjectJS_Req, CardIssuerStandService_EjectJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void CaptureJS(SpReqAnsContext<CardIssuerStandService_CaptureJS_Req, CardIssuerStandService_CaptureJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void QueryHasCardJS(SpReqAnsContext<CardIssuerStandService_QueryHasCardJS_Req, CardIssuerStandService_QueryHasCardJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void IssueFromBoxJS(SpReqAnsContext<CardIssuerStandService_IssueFromBoxJS_Req, CardIssuerStandService_IssueFromBoxJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void InsertJS(SpReqAnsContext<CardIssuerStandService_InsertJS_Req, CardIssuerStandService_InsertJS_Ans>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+	void CancelInsertJS(SpOnewayCallContext<CardIssuerStandService_CancelInsertJS_Info>::Pointer ctx)
+	{
+		LOG_FUNCTION();
+
+	}
+
 protected:
 private:
 	CCardIssuerFSM m_fsm;