Add handling door events
This commit is contained in:
@@ -30,6 +30,14 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject(
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError()));
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout()));
|
||||
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorServiceDoorOpened()), this, SLOT(onServiceDoorOpened())); // switch to ModeSERVICE
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorVaultDoorOpened()), this, SLOT(onVaultDoorOpened())); // Screen?? with message
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorCoinBoxRemoved()), this, SLOT(onCoinBoxRemoved())); // Create/Send Account
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorCoinBoxInserted()), this, SLOT(onCoinBoxInserted()));
|
||||
//connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorCBinAndAllDoorsClosed()), this, SLOT( ??? )));
|
||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorAllDoorsClosed()), this, SLOT(onAllDoorsClosed())); // check for errors, switch to mode IDLE
|
||||
|
||||
|
||||
this->currentSelectedTicketType = 0;
|
||||
}
|
||||
|
||||
@@ -65,22 +73,19 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *healthEventReceive
|
||||
void ATBDeviceControllerPlugin::onChangedProgramModeToSELL()
|
||||
{
|
||||
hw->dc_autoRequest(true);
|
||||
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::changedProgramModeToSERVICE()
|
||||
void ATBDeviceControllerPlugin::onChangedProgramModeToSERVICE()
|
||||
{
|
||||
hw->dc_autoRequest(true);
|
||||
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::changedProgramModeToIDLE()
|
||||
void ATBDeviceControllerPlugin::onChangedProgramModeToIDLE()
|
||||
{
|
||||
hw->dc_autoRequest(false);
|
||||
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::changedProgramModeToOOO()
|
||||
void ATBDeviceControllerPlugin::onChangedProgramModeToOOO()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -117,12 +122,57 @@ void ATBDeviceControllerPlugin::cashAbort()
|
||||
}
|
||||
|
||||
// TASKS: Account -------------------------------------------------------------
|
||||
|
||||
// for an external account request, e.g. by an ui-button:
|
||||
void ATBDeviceControllerPlugin::requestAccount()
|
||||
{
|
||||
qCritical() << "TODO: implement ATBDeviceControllerPlugin::requestAccount()";
|
||||
}
|
||||
|
||||
|
||||
// Door Events / Hardware contacts --------------------------------------------
|
||||
void ATBDeviceControllerPlugin::onServiceDoorOpened()
|
||||
{
|
||||
qCritical() << "ATBDeviceControllerPlugin::onServiceDoorOpened()";
|
||||
|
||||
// switch to mode service
|
||||
emit this->requestModeSERVICE();
|
||||
|
||||
// TODO:
|
||||
// - create an HealthEvent (-> ISMAS-Event)
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
||||
{
|
||||
// TODO:
|
||||
// - show special screen / message on screen
|
||||
// - create an HealthEvent (-> ISMAS-Event)
|
||||
qCritical() << "TODO: implement ATBDeviceControllerPlugin::onVaultDoorOpened()";
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::onCoinBoxRemoved()
|
||||
{
|
||||
// TODO:
|
||||
// - create and send account (-> requestAccountResponse())
|
||||
qCritical() << "TODO: implement ATBDeviceControllerPlugin::onCoinBoxRemoved()";
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::onCoinBoxInserted()
|
||||
{
|
||||
qCritical() << "TODO: implement ATBDeviceControllerPlugin::onCoinBoxInserted()";
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::onAllDoorsClosed()
|
||||
{
|
||||
// TODO:
|
||||
// - check for errors, switch to mode IDLE
|
||||
|
||||
qCritical() << "TODO: implement ATBDeviceControllerPlugin::onAllDoorsClosed()";
|
||||
|
||||
emit this->requestModeIDLE();
|
||||
}
|
||||
|
||||
|
||||
// TASKS: printing ------------------------------------------------------------
|
||||
void ATBDeviceControllerPlugin::requestPrintTicket(const QHash<QString, QVariant> & printingData)
|
||||
{
|
||||
|
Reference in New Issue
Block a user