|
@@ -106,10 +106,16 @@ CardIssuerImpl::~CardIssuerImpl()
|
|
|
|
|
|
ErrorCodeEnum CardIssuerImpl::GetDevCategory(DevCategoryInfo& devCategory)
|
|
|
{
|
|
|
- strcpy(devCategory.szModel, "szModel");
|
|
|
- strcpy(devCategory.szType, "szType");
|
|
|
- strcpy(devCategory.szVendor, "szVendor=cmbszSimulator");
|
|
|
- return Error_Succeed;
|
|
|
+ if (GetDevCategoryHttp(devCategory)) {
|
|
|
+ strcpy(devCategory.szModel, "CM=2.0#CID=00000000");
|
|
|
+ strcpy(devCategory.szType, "PVER=ACT#MID=ACT-F5-5540-0SH");
|
|
|
+ strcpy(devCategory.szVendor, "cmbszSimulator");
|
|
|
+ return Error_Succeed;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return Error_Exception;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
ErrorCodeEnum CardIssuerImpl::Reset()
|
|
@@ -126,9 +132,10 @@ ErrorCodeEnum CardIssuerImpl::GetLastErr(DevErrorInfo& devErrInfo)
|
|
|
{
|
|
|
static int times = 0;
|
|
|
char szMessage[1024];
|
|
|
- sprintf(szMessage, "这是第 %d 条错误信息", ++times);
|
|
|
- strcpy(devErrInfo.szErrMsg, szMessage);
|
|
|
- devErrInfo.dwErrMsgLen = strlen(szMessage);
|
|
|
+ string lastErr = "{\"Description\": \"测试模式,硬件执行失败\"}";
|
|
|
+ //sprintf(szMessage, "这是第 %d 条错误信息", ++times);
|
|
|
+ strcpy(devErrInfo.szErrMsg, lastErr.c_str());
|
|
|
+ devErrInfo.dwErrMsgLen = lastErr.length();
|
|
|
return Error_Succeed;
|
|
|
}
|
|
|
|
|
@@ -409,6 +416,12 @@ ErrorCodeEnum CardIssuerImpl::PrintCardFaceRightNow(const KakuPrintInfo printInf
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+bool CardIssuerImpl::GetDevCategoryHttp(DevCategoryInfo& devCategory)
|
|
|
+{
|
|
|
+ LOG4VTM(INFO, "GetDevCategoryHttp");
|
|
|
+ return commonSimpleHttp("GetDevCategory");
|
|
|
+}
|
|
|
+
|
|
|
/////////////////////////////////////////
|
|
|
|
|
|
bool CardIssuerImpl::GetDevStatusHttp(CardIssuerStatus& devStatus)
|