DCState: send EVENT_CLASS::STATE as eventName "Mxxxx"

This commit is contained in:
Siegfried Siegert 2024-11-20 14:12:28 +01:00
parent bf1bdc34bb
commit 8fe705f49b
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 18 additions and 17 deletions

View File

@ -166,7 +166,7 @@ void DeviceControllerDiag::sys_superviseSystem()
// es gibt keinerlei gültige Daten vom DC // es gibt keinerlei gültige Daten vom DC
qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!"; qCritical() << "DeviceControllerDiag::sys_superviseSystem() no valid data!";
hw->dc_autoRequest(true); hw->dc_autoRequest(true);
this->private_sendDiagEvent(DeviceController::State::E254); this->private_sendDiagEvent(DeviceController::State::M0254);
this->diagRequestTimeoutTimer->stop(); this->diagRequestTimeoutTimer->stop();
this->isRequestRunning = false; this->isRequestRunning = false;
if (this->E255counter > 5) { this->restartCArun(); } if (this->E255counter > 5) { this->restartCArun(); }
@ -232,13 +232,13 @@ void DeviceControllerDiag::sub_componentAssessment()
// Service or battery door is open // Service or battery door is open
flag_sendOperate = false; flag_sendOperate = false;
qCritical() << "DeviceControllerDiag::sys_superviseSystem() Service or battery door is open, goto INTRUSION MODE"; qCritical() << "DeviceControllerDiag::sys_superviseSystem() Service or battery door is open, goto INTRUSION MODE";
this->private_sendDiagEvent(DeviceController::State::E253); this->private_sendDiagEvent(DeviceController::State::M0253);
} }
if (dynMaCond.middleDoor) { if (dynMaCond.middleDoor) {
// vault door is open // vault door is open
flag_sendOperate = false; flag_sendOperate = false;
qCritical() << "DeviceControllerDiag::sys_superviseSystem() vault door is open, goto INTRUSION MODE"; qCritical() << "DeviceControllerDiag::sys_superviseSystem() vault door is open, goto INTRUSION MODE";
this->private_sendDiagEvent(DeviceController::State::E252); this->private_sendDiagEvent(DeviceController::State::M0252);
} }
// check for invalid states: // check for invalid states:
@ -366,12 +366,12 @@ void DeviceControllerDiag::sub_componentAssessment()
if (dynMaCond.nowCardTest>0) { if (dynMaCond.nowCardTest>0) {
flag_sendOperate = false; flag_sendOperate = false;
this->private_sendDiagEvent(DeviceController::State::E072); this->private_sendDiagEvent(DeviceController::State::M0072);
} }
if (dynMaCond.startupTestIsRunning>0) { if (dynMaCond.startupTestIsRunning>0) {
flag_sendOperate = false; flag_sendOperate = false;
this->private_sendDiagEvent(DeviceController::State::E073); this->private_sendDiagEvent(DeviceController::State::M0073);
} }
if (modCond.voltage>=200) { if (modCond.voltage>=200) {
@ -526,28 +526,28 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result)
this->_isErrorState = true; this->_isErrorState = true;
break; break;
case DeviceController::State::E071: // cash box change is ongoing case DeviceController::State::M0071: // cash box change is ongoing
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "cash box change is ongoing"; parameter = "cash box change is ongoing";
break; break;
case DeviceController::State::E072: // card test running case DeviceController::State::M0072: // card test running
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "card test running"; parameter = "card test running";
break; break;
case DeviceController::State::E073: // startup-test is running case DeviceController::State::M0073: // startup-test is running
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "startup-test is running"; parameter = "startup-test is running";
break; break;
case DeviceController::State::E252: // cash box door open case DeviceController::State::M0252: // cash box door open
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "cash box door open"; parameter = "cash box door open";
break; break;
case DeviceController::State::E253: // service or battery door open case DeviceController::State::M0253: // service or battery door open
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "service or battery door open"; parameter = "service or battery door open";
break; break;
case DeviceController::State::E254: // no valid data from DeviceController case DeviceController::State::M0254: // no valid data from DeviceController
eventClass = EVENT_CLASS::STATE; eventClass = EVENT_CLASS::STATE;
parameter = "no valid data from DeviceController"; parameter = "no valid data from DeviceController";
break; break;

View File

@ -41,13 +41,14 @@ namespace DeviceController {
E034, E034,
E071, M0071, // cashbox change is ongoing
E072, M0072, // cardtest is running
E073, M0073, // startup-test is running
M0252, // cashbox door open
M0253, // service or battery door is open
M0254, // no valid data from DC
E252,
E253,
E254,
E255, E255,
W001, W001,