瀏覽代碼

Z991239-4473 #comment 同步指纹实体接口定义代码

Signed-Off-By: commit-hook
刘文涛80174520 2 年之前
父節點
當前提交
168669835c

+ 3 - 2
Module/mod_FingerPrint/FingerPrint_UserErrorCode.h

@@ -2,6 +2,9 @@
 #define _FINGERPRINT_USER_ERRORCODE_H
 #pragma once
 
+#define FingerPrint_Open_ID "QLR040220499"
+#define FingerPrint_Scan_ID "QLR040220407"
+
 #define FingerPrint_UserErrorCode_Start									0x20400200
 #define FingerPrint_UserErrorCode_GET_DLLNAME_FAILED_ONINIT				( FingerPrint_UserErrorCode_Start + 1 )		//指纹仪实体初始化时,获取适配器名称失败 - LogWarn
 #define FingerPrint_UserErrorCode_OPEN_ROOT_FAILED_ONINIT				( FingerPrint_UserErrorCode_Start + 2 )		//指纹仪实体初始化时,打开root.ini文件失败 - LogWarn
@@ -42,9 +45,7 @@
 
 #define FingerPrint_UserErrorCode_GETFEATURE_FAILED_MATCH				( FingerPrint_UserErrorCode_Start + 35 )		//识别时,采集接口调用成功,但返回的特征值为空 - LogError
 #define FingerPrint_UserErrorCode_FEATURELEN_ISNOTRIGHT_MATCH			( FingerPrint_UserErrorCode_Start + 36 )		//识别时 返回的指纹特征长度错误
-
 #define FingerPrint_UserErrorCode_DevOpen_Failed_Registe				( FingerPrint_UserErrorCode_Start + 37 )	//采集指纹时,指纹是打开失败状态
-
 #define FingerPrint_UserErrorCode_Real_Root_Config						( FingerPrint_UserErrorCode_Start + 41 )	//实际加载的root配置
 
 #endif

+ 1 - 0
Module/mod_FingerPrint/FingerPrint_client_g.h

@@ -32,6 +32,7 @@ public:
 	}
 	void OnClose(ErrorCodeEnum)
 	{
+		Dbg("session closed.");
 		bSessionClosed = true;
 	}
 	bool QuerySessionClosed()

+ 11 - 0
Module/mod_FingerPrint/FingerPrint_def_g.h

@@ -34,6 +34,17 @@ namespace FingerPrint {
 #define FingerPrintService_MethodSignature_GetFingerPrint -2051396936
 #define FingerPrintService_MethodSignature_GenerateTemplate 1610871029
 
+#define FingerPrintService_LogCode_GetImageAndFeature "QLR040220400"
+#define FingerPrintService_LogCode_CancelRegister "QLR040220401"
+#define FingerPrintService_LogCode_CancelMatch "QLR040220402"
+#define FingerPrintService_LogCode_Exit "QLR040220403"
+#define FingerPrintService_LogCode_Match "QLR040220404"
+#define FingerPrintService_LogCode_GetDevStatus "QLR040220405"
+#define FingerPrintService_LogCode_GetDevInfo "QLR040220499"
+#define FingerPrintService_LogCode_GetImageAndFeatureEx "QLR040220406"
+#define FingerPrintService_LogCode_GetFingerPrint "QLR040220407"
+#define FingerPrintService_LogCode_GenerateTemplate "QLR040220408"
+
 struct FingerPrintService_GetImageAndFeature_Req
 {
 	int times;

+ 12 - 2
Module/mod_FingerPrint/mod_FingerPrint.cpp

@@ -6,60 +6,70 @@
 void FingerPrintServerSession::Handle_GetDevInfo(SpReqAnsContext<FingerPrintService_GetDevInfo_Req, FingerPrintService_GetDevInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetDevInfo")("Invoke GetDevInfo");
 	m_pEntity->GetDevInfo(ctx);
 }
 
 void FingerPrintServerSession::Handle_GetDevStatus(SpReqAnsContext<FingerPrintService_GetDevStatus_Req, FingerPrintService_GetDevStatus_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetDevStatus")("Invoke GetDevStatus");
 	m_pEntity->GetDevStatus(ctx);
 }
 
 void FingerPrintServerSession::Handle_GetImageAndFeature(SpReqAnsContext<FingerPrintService_GetImageAndFeature_Req, FingerPrintService_GetImageAndFeature_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetImageAndFeature")("Invoke GetImageAndFeature");
 	m_pEntity->GetImageAndFeature(ctx);
 }
 
 void FingerPrintServerSession::Handle_GetImageAndFeatureEx(SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req, FingerPrintService_GetImageAndFeatureEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetImageAndFeatureEx")("Invoke GetImageAndFeatureEx");
 	m_pEntity->GetImageAndFeatureEx(ctx);
 }
-
+//有用接口:加入交易记录日志扫描动作
 void FingerPrintServerSession::Handle_GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetFingerPrint")("Invoke GetFingerPrint");
 	m_pEntity->GetFingerPrint(ctx);
 }
-
+//有用接口:加入交易记录日志生成指纹模板
 void FingerPrintServerSession::Handle_GenerateTemplate(SpReqAnsContext<FingerPrintService_GenerateTemplate_Req, FingerPrintService_GenerateTemplate_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GenerateTemplate")("Invoke GenerateTemplate");
 	m_pEntity->GenerateTemplate(ctx);
 }
 
 void FingerPrintServerSession::Handle_CancelRegister(SpOnewayCallContext<FingerPrintService_CancelRegister_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CancelRegister")("Invoke CancelRegister");
 	m_pEntity->CancelRegister(ctx);
 }
 
 void FingerPrintServerSession::Handle_CancelMatch(SpOnewayCallContext<FingerPrintService_CancelMatch_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CancelMatch")("Invoke CancelMatch");
 	m_pEntity->CancelMatch(ctx);
 }
 
 void FingerPrintServerSession::Handle_Match(SpReqAnsContext<FingerPrintService_Match_Req, FingerPrintService_Match_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CheckAndMatch")("Invoke CheckAndMatch");
 	m_pEntity->CheckAndMatch(ctx);
 }
 
 void FingerPrintServerSession::Handle_Exit(SpOnewayCallContext<FingerPrintService_Exit_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Exit")("Invoke Exit");
 	m_pEntity->Exit(ctx);
 }
 

+ 4 - 4
Module/mod_FingerPrint/mod_FingerPrint.h

@@ -42,7 +42,7 @@ public:
 	{
 		LOG_FUNCTION();
 		ErrorCodeEnum ec = m_fsm.Init(this);
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Init:%d", ec);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("OnPreStart, Init:%d", ec);
 		pTransactionContext->SendAnswer(ec);
 	}
 
@@ -74,7 +74,7 @@ public:
 
 	virtual CServerSessionBase* OnNewSession(const char* , const char * )
 	{
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("A new connecting request arrived.");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("A new connecting request arrived.");
 		m_bNewSessionInit = true;
 		return new FingerPrintServerSession(this);
 	}
@@ -131,7 +131,7 @@ public:
 		DevCategoryInfo devCatInfo;
 		m_fsm.GetDevCatInfo(devCatInfo);
 		ctx->Ans.model = devCatInfo.szModel;
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%s", (const char*)ctx->Ans.model);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("GetDevInfo model is:%s", (const char*)ctx->Ans.model);
 		ctx->Answer(Error_Succeed);
 	}
 
@@ -140,7 +140,7 @@ public:
 		int status = 0;
 		m_fsm.GetDevState(status);
 		ctx->Ans.status = status;
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("FingerPrint state is:%d.", status);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("FingerPrint state is:%d", status);
 		ctx->Answer(Error_Succeed);
 	}