Connect all hwapi signals

This commit is contained in:
Siegfried Siegert 2023-05-22 11:20:28 +02:00
parent ca5e43e0d7
commit 30d790b84f
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 61 additions and 4 deletions

View File

@ -14,8 +14,13 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject(
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_OK()), this, SLOT(onPrintFinishedOK())); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_OK()), this, SLOT(onPrintFinishedOK()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_Err()), this, SLOT(onPrintFinishedERR())); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_Err()), this, SLOT(onPrintFinishedERR()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_gotNewCoin()), this, SLOT(onCashGotCoin())); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_gotNewCoin()), this, SLOT(onCashGotCoin()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_vendStopByMax()), this, SLOT(onCashVendStopByMax())); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByMax()), this, SLOT(onCashPayStopByMax()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout()));
} }
ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {} ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {}
@ -235,7 +240,7 @@ void ATBDeviceControllerPlugin::onCashGotCoin()
} }
void ATBDeviceControllerPlugin::onCashVendStopByMax() void ATBDeviceControllerPlugin::onCashPayStopByMax()
{ {
// DEBUG // DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashVendStopByMax()"; qCritical() << "ATBDeviceControllerPlugin::onCashVendStopByMax()";
@ -251,6 +256,55 @@ void ATBDeviceControllerPlugin::onCashVendStopByMax()
} }
void ATBDeviceControllerPlugin::onCashPayStopByEscrow()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopByEscrow()";
uint32_t amountInt = this->hw->getInsertedAmount();
QString amountString = QString::number(amountInt);
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::ERROR_BACKEND,
amountString,
"",
"");
}
void ATBDeviceControllerPlugin::onCashPayStopByError()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopByError()";
uint32_t amountInt = this->hw->getInsertedAmount();
QString amountString = QString::number(amountInt);
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::ERROR_BACKEND,
amountString,
"",
"");
}
void ATBDeviceControllerPlugin::onCashPayStopByTimeout()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopByTimeout()";
uint32_t amountInt = this->hw->getInsertedAmount();
QString amountString = QString::number(amountInt);
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::ERROR_BACKEND,
amountString,
"",
"");
}
/************************************************************************************************ /************************************************************************************************
* Mandatory plugin methods * Mandatory plugin methods
* *

View File

@ -119,7 +119,10 @@ private slots:
// cash payment // cash payment
void onCashGotCoin(); void onCashGotCoin();
void onCashVendStopByMax(); void onCashPayStopByMax();
void onCashPayStopByEscrow();
void onCashPayStopByError();
void onCashPayStopByTimeout();
}; };
#endif // ATBDEVICECONTROLLERPLUGIN_H #endif // ATBDEVICECONTROLLERPLUGIN_H