|
@@ -3,6 +3,7 @@
|
|
|
#include "SpHelper.h"
|
|
|
#include "CardIssuerStandFSM.h"
|
|
|
#include "EventCode.h"
|
|
|
+#include "RVCEventCode.h"
|
|
|
#include "RVCComm.h"
|
|
|
//oilyang@20200522 go on using
|
|
|
// deprecated!! [4/17/2020 16:15 @Gifur]
|
|
@@ -1520,7 +1521,7 @@ int CCardIssuerFSM::Reset()
|
|
|
LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_CaptureCard_Reset, "issue flag is 1, to capture card.");
|
|
|
m_CardCaptured++;
|
|
|
if (!SetCardCaptured(m_CardCaptured))
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("set card captured failed.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("set card captured failed.");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -2182,10 +2183,10 @@ int CCardIssuerFSM::IssueCard(SpReqAnsContext<CardIssuerStandService_Issue_Req,
|
|
|
}
|
|
|
m_bSettingMaterial = true;//oilyang 借用于延迟同步,紧接着设置remains时更新到后台数据库
|
|
|
if (!SetCardIssued(m_issuedEx[m_currentHopper - 1], m_currentHopper))
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("IssueCard, Set card issued failed.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("IssueCard, Set card issued failed.");
|
|
|
m_bSettingMaterial = false;
|
|
|
if (!SetCardRemains(m_remainsEx[m_currentHopper - 1], m_currentHopper))
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("IssueCard, Set card remains failed.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("IssueCard, Set card remains failed.");
|
|
|
m_bUseRFTillNext = false;
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040220320")("IssueCard success.");
|
|
|
Sleep(1000);
|
|
@@ -2224,7 +2225,7 @@ int CCardIssuerFSM::CaptureCard(SpReqAnsContext<CardIssuerStandService_Capture_R
|
|
|
ret = 1;
|
|
|
m_CardCaptured++;
|
|
|
if (!SetCardCaptured(m_CardCaptured))
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<CaptureCard>, set card captured failed");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("<CaptureCard>, set card captured failed");
|
|
|
m_pCardProcess->DataInit();
|
|
|
if (Error_Succeed == eErr){
|
|
|
l_beginTime = GetTickCountRVC();
|
|
@@ -3997,7 +3998,7 @@ bool CCardIssuerFSM::FSMSetIssueFlag(int value)
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("(FSMSetIssueFlag) open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("(FSMSetIssueFlag) open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
eErrDev = spConfig->WriteConfigValueInt("all", "IsIssue", value);
|
|
@@ -4005,7 +4006,7 @@ bool CCardIssuerFSM::FSMSetIssueFlag(int value)
|
|
|
return true;
|
|
|
}
|
|
|
else {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("(FSMSetIssueFlag) write IsIssue err:%d, value:%d", eErrDev, value);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("(FSMSetIssueFlag) write IsIssue err:%d, value:%d", eErrDev, value);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -4015,14 +4016,14 @@ bool CCardIssuerFSM::SetCardCaptured(const int num,bool bClear)
|
|
|
num, bClear, m_maxRetainCount, m_bSettingMaterial);
|
|
|
if (num < 0)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardCaptured>, wrong reset card captured");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("<SetCardCaptured>, wrong reset card captured");
|
|
|
return false;
|
|
|
}
|
|
|
CSmartPointer<IEntityFunction> spEntityFunction = GetEntityBase()->GetFunction();
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardCaptured>, open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("<SetCardCaptured>, open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
m_CardCaptured = num;
|
|
@@ -4041,7 +4042,7 @@ bool CCardIssuerFSM::SetCardCaptured(const int num,bool bClear)
|
|
|
return true;
|
|
|
}
|
|
|
else {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardCaptured>, write CardCaptured err:%d, num:%d, bClear:%d", eErrDev, num, bClear);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("<SetCardCaptured>, write CardCaptured err:%d, num:%d, bClear:%d", eErrDev, num, bClear);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -4052,7 +4053,7 @@ bool CCardIssuerFSM::SetCardIssued(const int num, const int hopper)
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardIssued>, open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("<SetCardIssued>, open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
char buf[8];
|
|
@@ -4081,7 +4082,7 @@ bool CCardIssuerFSM::SetCardIssued(const int num, const int hopper)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardIssued>, write CardIssued err:%d, num :%d, hopper: %d", eErrDev, num, hopper);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("<SetCardIssued>, write CardIssued err:%d, num :%d, hopper: %d", eErrDev, num, hopper);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
@@ -4120,7 +4121,7 @@ bool CCardIssuerFSM::SetCardRemains(const int num, const int hopper,bool bInit)
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardRemains>, open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("<SetCardRemains>, open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
char buf[8];
|
|
@@ -4138,7 +4139,7 @@ bool CCardIssuerFSM::SetCardRemains(const int num, const int hopper,bool bInit)
|
|
|
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardRemains>, write CardInit err:%d", eErrDev);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("<SetCardRemains>, write CardInit err:%d", eErrDev);
|
|
|
return false;
|
|
|
}
|
|
|
//oilyang@20170428 汪磊东要求单卡箱也要同步数据
|
|
@@ -4151,7 +4152,7 @@ bool CCardIssuerFSM::SetCardRemains(const int num, const int hopper,bool bInit)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardRemains>, write CardRemains err:%d, num:%d, hopper:%d, bInit:%d", eErrDev, num, hopper, bInit);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("<SetCardRemains>, write CardRemains err:%d, num:%d, hopper:%d, bInit:%d", eErrDev, num, hopper, bInit);
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
@@ -4163,12 +4164,12 @@ bool CCardIssuerFSM::SetCardMixed(const int num, const int hopper)
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardMixed>, open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("<SetCardMixed>, open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
if (hopper < 1 || hopper > HOPPER_NUM)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")(CSimpleStringA::Format("wrong hopper num:%d .", hopper));
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("wrong hopper num:%d .", hopper));
|
|
|
return false;
|
|
|
}
|
|
|
if (num == 0)
|
|
@@ -4193,7 +4194,7 @@ bool CCardIssuerFSM::SetCardMixed(const int num, const int hopper)
|
|
|
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("<SetCardMixed>, write CardMixed err:%d", eErrDev);
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_WRITE_FAILED)("<SetCardMixed>, write CardMixed err:%d", eErrDev);
|
|
|
return false;
|
|
|
}
|
|
|
//oilyang@20170428 汪磊东要求单卡箱也要同步数据
|
|
@@ -4284,7 +4285,7 @@ int CCardIssuerFSM::UpdateLocalRunCfg(CAutoArray<int> hopperArr)
|
|
|
CSmartPointer<IConfigInfo> spConfig;
|
|
|
ErrorCodeEnum eErrDev = spEntityFunction->OpenConfig(Config_Run, spConfig);
|
|
|
if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23CZ")("(UpdateLocalRunCfg)open cfg file failed!");
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(RTAERR_CONFIG_OPEN_FAILED)("(UpdateLocalRunCfg)open cfg file failed!");
|
|
|
return false;
|
|
|
}
|
|
|
|