Implement new interface method sendDeviceParameter()
This commit is contained in:
parent
849305bc8f
commit
6a08cf0b62
@ -134,6 +134,37 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con
|
||||
}
|
||||
|
||||
|
||||
void ATBDeviceControllerPlugin::sendDeviceParameter(const QJsonObject &jsonObject)
|
||||
{
|
||||
|
||||
qCritical() << "ATBDeviceControllerPlugin::sendDeviceParameter:";
|
||||
|
||||
|
||||
// extract location info and store location info in persistent data:
|
||||
QJsonValue jsonSubVal;
|
||||
jsonSubVal = jsonObject["Location"];
|
||||
|
||||
QString locationString = jsonSubVal.toString("");
|
||||
|
||||
if (locationString == "") {
|
||||
|
||||
qCritical() << " --> locationString NULL";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
uint16_t customerNr = PTUSystem::readCustomerNumber();
|
||||
uint16_t machineNr = PTUSystem::readMachineNumber();
|
||||
uint16_t borough = PTUSystem::readZoneNumber();
|
||||
uint16_t zone = PTUSystem::readGroupNumber();
|
||||
uint16_t alias = 0;
|
||||
QByteArray locationBa = locationString.toLocal8Bit();
|
||||
|
||||
this->hw->sendMachineID(customerNr, machineNr, borough, zone, alias, locationBa.data());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ATBDeviceControllerPlugin::startPhysicalLayer()
|
||||
{
|
||||
if (!this->isMaster) return;
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
// interface:
|
||||
PLUGIN_STATE initDCPlugin(QObject *eventReceiver, const QSettings & settings);
|
||||
|
||||
void sendDeviceParameter(const QJsonObject & jsonObject);
|
||||
|
||||
// TASKS: Cash handling -------------------------------------------------------
|
||||
void requestStartCashInput(const QString & amount);
|
||||
void requestStopCashInput();
|
||||
|
Loading…
Reference in New Issue
Block a user