diff --git a/src/ATBAPP/DeviceControllerDiag.cpp b/src/ATBAPP/DeviceControllerDiag.cpp index e781fad..a7d546e 100644 --- a/src/ATBAPP/DeviceControllerDiag.cpp +++ b/src/ATBAPP/DeviceControllerDiag.cpp @@ -5,6 +5,9 @@ #include #include +#include "support/JSON.h" + + DeviceControllerDiag::DeviceControllerDiag(PersistentData *pData, QObject *parent) : QObject(parent) , coinProcessorType(nsDeviceControllerInterface::COIN_PROCESSOR::ESCROW) @@ -543,6 +546,16 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result) this->lastState = result; + /** + * Variant: send 'parameter' as JSON: + * + JSON::setPrettySerialize(false); + JSON::JsonObject json = JSON::objectBuilder() + ->set("description", parameter) + ->create(); + QString parameterJsonString = JSON::serialize(json); + */ + ATBMachineEvent *machineEvent = new ATBMachineEvent( eventId, "DC", @@ -553,8 +566,6 @@ void DeviceControllerDiag::private_sendDiagEvent(DeviceController::State result) "" // second level info ); - //emit diagResponse(machineEvent); - QCoreApplication::postEvent(eventReceiver, machineEvent); }