Minor change: renamed function sendUpdateInfToIsmas() to

emulateUpdatesAvailable() for clarity.
This commit is contained in:
Gerhard Hoffmann 2023-07-17 16:48:04 +02:00
parent 43f5f3ecae
commit 5eb33f3e31
2 changed files with 5 additions and 5 deletions

View File

@ -61,6 +61,7 @@ void ApismClient::restartApism() {
void ApismClient::sendTransaction(const VendingData *vendingData) {
Q_UNUSED(vendingData);
#if 0
QScopedPointer<ISMAS::TransferData> transferData(new ISMAS::TransferData());
@ -411,14 +412,14 @@ void ApismClient::sendCmdSendVersionToIsmas(QString const &msg) {
QByteArray data = "#M=APISM#C=CMD_SENDVERSION#J=";
data += document.toJson(QJsonDocument::Compact);
printf("data=%s\n", QString(data).toStdString().c_str());
// printf("data=%s\n", QString(data).toStdString().c_str());
this->currentRequest = ISMAS::REQUEST::NO_REQUEST;
this->apismTcpSendClient->sendData(data);
}
void ApismClient::sendUpdateInfoToIsmas(QString const &msg) {
void ApismClient::emulateUpdatesAvailable(QString const &msg) {
QJsonParseError parseError;
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
if (parseError.error != QJsonParseError::NoError) {
@ -435,7 +436,7 @@ void ApismClient::sendUpdateInfoToIsmas(QString const &msg) {
QByteArray data = "#M=APISM#C=CMD_EVENT#J=";
data += document.toJson(QJsonDocument::Compact);
printf("data=%s\n", QString(data).toStdString().c_str());
qDebug() << "EMULATE UPDATES AVAILABLE" << QString(data).toStdString().c_str();
this->currentRequest = ISMAS::REQUEST::NO_REQUEST;
this->apismTcpSendClient->sendData(data);
@ -447,7 +448,6 @@ void ApismClient::sendState(const QString & state, const QString & msg)
qCritical() << " state: " << state;
qCritical() << " msg: " << msg;
QJsonParseError parseError;
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
if (parseError.error != QJsonParseError::NoError) {

View File

@ -57,7 +57,7 @@ public slots:
//void sendEvent(const ATBMachineEvent* machineEvent);
void sendState(const QString & state, const QString & msg);
void sendUpdateInfoToIsmas(QString const &msg);
void emulateUpdatesAvailable(QString const &msg);
void sendCmdSendVersionToIsmas(QString const &msg);
void requestAvailableIsmasUpdates();