Minor change: renamed function sendUpdateInfToIsmas() to
emulateUpdatesAvailable() for clarity.
This commit is contained in:
parent
43f5f3ecae
commit
5eb33f3e31
@ -61,6 +61,7 @@ void ApismClient::restartApism() {
|
|||||||
|
|
||||||
void ApismClient::sendTransaction(const VendingData *vendingData) {
|
void ApismClient::sendTransaction(const VendingData *vendingData) {
|
||||||
|
|
||||||
|
Q_UNUSED(vendingData);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
QScopedPointer<ISMAS::TransferData> transferData(new ISMAS::TransferData());
|
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=";
|
QByteArray data = "#M=APISM#C=CMD_SENDVERSION#J=";
|
||||||
data += document.toJson(QJsonDocument::Compact);
|
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->currentRequest = ISMAS::REQUEST::NO_REQUEST;
|
||||||
this->apismTcpSendClient->sendData(data);
|
this->apismTcpSendClient->sendData(data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApismClient::sendUpdateInfoToIsmas(QString const &msg) {
|
void ApismClient::emulateUpdatesAvailable(QString const &msg) {
|
||||||
QJsonParseError parseError;
|
QJsonParseError parseError;
|
||||||
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
|
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
|
||||||
if (parseError.error != QJsonParseError::NoError) {
|
if (parseError.error != QJsonParseError::NoError) {
|
||||||
@ -435,7 +436,7 @@ void ApismClient::sendUpdateInfoToIsmas(QString const &msg) {
|
|||||||
QByteArray data = "#M=APISM#C=CMD_EVENT#J=";
|
QByteArray data = "#M=APISM#C=CMD_EVENT#J=";
|
||||||
data += document.toJson(QJsonDocument::Compact);
|
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->currentRequest = ISMAS::REQUEST::NO_REQUEST;
|
||||||
this->apismTcpSendClient->sendData(data);
|
this->apismTcpSendClient->sendData(data);
|
||||||
@ -447,7 +448,6 @@ void ApismClient::sendState(const QString & state, const QString & msg)
|
|||||||
qCritical() << " state: " << state;
|
qCritical() << " state: " << state;
|
||||||
qCritical() << " msg: " << msg;
|
qCritical() << " msg: " << msg;
|
||||||
|
|
||||||
|
|
||||||
QJsonParseError parseError;
|
QJsonParseError parseError;
|
||||||
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
|
QJsonDocument document(QJsonDocument::fromJson(msg.toUtf8(), &parseError));
|
||||||
if (parseError.error != QJsonParseError::NoError) {
|
if (parseError.error != QJsonParseError::NoError) {
|
||||||
|
@ -57,7 +57,7 @@ public slots:
|
|||||||
//void sendEvent(const ATBMachineEvent* machineEvent);
|
//void sendEvent(const ATBMachineEvent* machineEvent);
|
||||||
|
|
||||||
void sendState(const QString & state, const QString & msg);
|
void sendState(const QString & state, const QString & msg);
|
||||||
void sendUpdateInfoToIsmas(QString const &msg);
|
void emulateUpdatesAvailable(QString const &msg);
|
||||||
void sendCmdSendVersionToIsmas(QString const &msg);
|
void sendCmdSendVersionToIsmas(QString const &msg);
|
||||||
void requestAvailableIsmasUpdates();
|
void requestAvailableIsmasUpdates();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user