Add new macro-values to improve output sent to ISMAS:
DOWNLOAD_CASH_FILE DOWNLOAD_CASH_FILE_FAILURE DOWNLOAD_CASH_FILE_SUCCESS DOWNLOAD_DEVICE_FILE DOWNLOAD_DEVICE_FILE_FAILURE DOWNLOAD_DEVICE_FILE_SUCCESS DOWNLOAD_JSON_FILE DOWNLOAD_JSON_FILE_FAILURE DOWNLOAD_JSON_FILE_SUCCESS Adapt percent-counters to show progress of update process.
This commit is contained in:
parent
bd785e7df1
commit
2b68242d04
@ -79,7 +79,6 @@
|
|||||||
#define _SYNC_CUSTOMER_REPOSITORY_SUCCESS (35)
|
#define _SYNC_CUSTOMER_REPOSITORY_SUCCESS (35)
|
||||||
#define _FILES_TO_UPDATE (36)
|
#define _FILES_TO_UPDATE (36)
|
||||||
#define _CHECK_FOR_REPOSITORY_CHANGES_FAILURE (37)
|
#define _CHECK_FOR_REPOSITORY_CHANGES_FAILURE (37)
|
||||||
#define _FILES_TO_DOWNLOAD (38)
|
|
||||||
#define _EXEC_OPKG_COMMANDS (39)
|
#define _EXEC_OPKG_COMMANDS (39)
|
||||||
#define _EXEC_OPKG_COMMAND_1 (40)
|
#define _EXEC_OPKG_COMMAND_1 (40)
|
||||||
#define _EXEC_OPKG_COMMAND_2 (41)
|
#define _EXEC_OPKG_COMMAND_2 (41)
|
||||||
@ -93,13 +92,23 @@
|
|||||||
#define _EXEC_OPKG_COMMAND_LAST (49)
|
#define _EXEC_OPKG_COMMAND_LAST (49)
|
||||||
#define _EXEC_OPKG_COMMAND_FAILURE (50)
|
#define _EXEC_OPKG_COMMAND_FAILURE (50)
|
||||||
#define _EXEC_OPKG_COMMAND_SUCCESS (51)
|
#define _EXEC_OPKG_COMMAND_SUCCESS (51)
|
||||||
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE (60)
|
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE (59)
|
||||||
#define _DOWNLOAD_CONFIG_FILE (61)
|
#define _FILES_TO_DOWNLOAD (60)
|
||||||
#define _DOWNLOAD_CONFIG_FILE_SUCCESS (62)
|
#define _DOWNLOAD_CASH_FILE (61)
|
||||||
#define _DOWNLOAD_CONFIG_FILE_FAILURE (63)
|
#define _DOWNLOAD_CASH_FILE_FAILURE (62)
|
||||||
#define _DOWNLOAD_DEVICE_CONTROLLER (64)
|
#define _DOWNLOAD_CASH_FILE_SUCCESS (63)
|
||||||
#define _DOWNLOAD_DEVICE_CONTROLLER_SUCCESS (85)
|
#define _DOWNLOAD_CONFIG_FILE (64)
|
||||||
#define _DOWNLOAD_DEVICE_CONTROLLER_FAILURE (86)
|
#define _DOWNLOAD_CONFIG_FILE_FAILURE (65)
|
||||||
|
#define _DOWNLOAD_CONFIG_FILE_SUCCESS (66)
|
||||||
|
#define _DOWNLOAD_DEVICE_FILE (67)
|
||||||
|
#define _DOWNLOAD_DEVICE_FILE_FAILURE (68)
|
||||||
|
#define _DOWNLOAD_DEVICE_FILE_SUCCESS (69)
|
||||||
|
#define _DOWNLOAD_JSON_FILE (70)
|
||||||
|
#define _DOWNLOAD_JSON_FILE_FAILURE (71)
|
||||||
|
#define _DOWNLOAD_JSON_FILE_SUCCESS (72)
|
||||||
|
#define _DOWNLOAD_DEVICE_CONTROLLER (84)
|
||||||
|
#define _DOWNLOAD_DEVICE_CONTROLLER_FAILURE (85)
|
||||||
|
#define _DOWNLOAD_DEVICE_CONTROLLER_SUCCESS (86)
|
||||||
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE (87)
|
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE (87)
|
||||||
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS (88)
|
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS (88)
|
||||||
#define _SAVE_LOGS (92)
|
#define _SAVE_LOGS (92)
|
||||||
@ -326,6 +335,15 @@ public:
|
|||||||
DOWNLOAD_CONFIG_FILE = _DOWNLOAD_CONFIG_FILE,
|
DOWNLOAD_CONFIG_FILE = _DOWNLOAD_CONFIG_FILE,
|
||||||
DOWNLOAD_CONFIG_FILE_SUCCESS = _DOWNLOAD_CONFIG_FILE_SUCCESS,
|
DOWNLOAD_CONFIG_FILE_SUCCESS = _DOWNLOAD_CONFIG_FILE_SUCCESS,
|
||||||
DOWNLOAD_CONFIG_FILE_FAILURE = _DOWNLOAD_CONFIG_FILE_FAILURE,
|
DOWNLOAD_CONFIG_FILE_FAILURE = _DOWNLOAD_CONFIG_FILE_FAILURE,
|
||||||
|
DOWNLOAD_CASH_FILE = _DOWNLOAD_CASH_FILE,
|
||||||
|
DOWNLOAD_CASH_FILE_FAILURE = _DOWNLOAD_CASH_FILE_FAILURE,
|
||||||
|
DOWNLOAD_CASH_FILE_SUCCESS = _DOWNLOAD_CASH_FILE_SUCCESS,
|
||||||
|
DOWNLOAD_DEVICE_FILE = _DOWNLOAD_DEVICE_FILE,
|
||||||
|
DOWNLOAD_DEVICE_FILE_FAILURE = _DOWNLOAD_DEVICE_FILE_FAILURE,
|
||||||
|
DOWNLOAD_DEVICE_FILE_SUCCESS = _DOWNLOAD_DEVICE_FILE_SUCCESS,
|
||||||
|
DOWNLOAD_JSON_FILE = _DOWNLOAD_JSON_FILE,
|
||||||
|
DOWNLOAD_JSON_FILE_FAILURE = _DOWNLOAD_JSON_FILE_FAILURE,
|
||||||
|
DOWNLOAD_JSON_FILE_SUCCESS = _DOWNLOAD_JSON_FILE_SUCCESS,
|
||||||
DOWNLOAD_DEVICE_CONTROLLER = _DOWNLOAD_DEVICE_CONTROLLER,
|
DOWNLOAD_DEVICE_CONTROLLER = _DOWNLOAD_DEVICE_CONTROLLER,
|
||||||
DOWNLOAD_DEVICE_CONTROLLER_SUCCESS = _DOWNLOAD_DEVICE_CONTROLLER_SUCCESS,
|
DOWNLOAD_DEVICE_CONTROLLER_SUCCESS = _DOWNLOAD_DEVICE_CONTROLLER_SUCCESS,
|
||||||
DOWNLOAD_DEVICE_CONTROLLER_FAILURE = _DOWNLOAD_DEVICE_CONTROLLER_FAILURE,
|
DOWNLOAD_DEVICE_CONTROLLER_FAILURE = _DOWNLOAD_DEVICE_CONTROLLER_FAILURE,
|
||||||
@ -655,6 +673,24 @@ private:
|
|||||||
break;
|
break;
|
||||||
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE:
|
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE:
|
||||||
break;
|
break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
||||||
lst << instance->m_debugMsg;
|
lst << instance->m_debugMsg;
|
||||||
Utils::printUpdateStatusMsg(debug, lst);
|
Utils::printUpdateStatusMsg(debug, lst);
|
||||||
@ -1088,12 +1124,34 @@ private:
|
|||||||
case UPDATE_STEP::FILES_TO_UPDATE:
|
case UPDATE_STEP::FILES_TO_UPDATE:
|
||||||
ismasClient.setProgressInPercent(_FILES_TO_UPDATE);
|
ismasClient.setProgressInPercent(_FILES_TO_UPDATE);
|
||||||
break;
|
break;
|
||||||
case UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE:
|
case UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE: {
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_FILES_TO_PSA_HARDWARE);
|
ismasClient.setProgressInPercent(_DOWNLOAD_FILES_TO_PSA_HARDWARE);
|
||||||
break;
|
QString const &ismasUpdateNews =
|
||||||
case UPDATE_STEP::FILES_TO_DOWNLOAD:
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::FILES_TO_DOWNLOAD: {
|
||||||
ismasClient.setProgressInPercent(_FILES_TO_DOWNLOAD);
|
ismasClient.setProgressInPercent(_FILES_TO_DOWNLOAD);
|
||||||
break;
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::EXEC_OPKG_COMMANDS:
|
case UPDATE_STEP::EXEC_OPKG_COMMANDS:
|
||||||
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMANDS);
|
ismasClient.setProgressInPercent(_EXEC_OPKG_COMMANDS);
|
||||||
break;
|
break;
|
||||||
@ -1229,15 +1287,180 @@ private:
|
|||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
} break;
|
} break;
|
||||||
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE:
|
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE: {
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE);
|
//ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE);
|
||||||
break;
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_SUCCESS:
|
QString const &ismasUpdateNews =
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE_SUCCESS);
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
break;
|
ismasClient.updateNewsToIsmas(
|
||||||
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE:
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CONFIG_FILE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_SUCCESS: {
|
||||||
|
//ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE_SUCCESS);
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CONFIG_FILE_SUCCESS],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE: {
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE_FAILURE);
|
ismasClient.setProgressInPercent(_DOWNLOAD_CONFIG_FILE_FAILURE);
|
||||||
break;
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::JSON_FILES_DOWNLOAD_ERROR,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CASH_FILE_FAILURE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE: {
|
||||||
|
//ismasClient.setProgressInPercent(_DOWNLOAD_CASH_FILE);
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CASH_FILE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_FAILURE: {
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_CASH_FILE_FAILURE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::JSON_FILES_DOWNLOAD_ERROR,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CASH_FILE_FAILURE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_SUCCESS: {
|
||||||
|
//ismasClient.setProgressInPercent(_DOWNLOAD_CASH_FILE_SUCCESS);
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_CASH_FILE_SUCCESS],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE: {
|
||||||
|
//ismasClient.setProgressInPercent(_DOWNLOAD_DEVICE_FILE);
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_DEVICE_FILE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_FAILURE: {
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_DEVICE_FILE_FAILURE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::JSON_FILES_DOWNLOAD_ERROR,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_DEVICE_FILE_FAILURE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_SUCCESS: {
|
||||||
|
//ismasClient.setProgressInPercent(_DOWNLOAD_DEVICE_FILE_SUCCESS);
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_DEVICE_FILE_SUCCESS],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE: {
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_JSON_FILE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_FAILURE: {
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE_FAILURE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::JSON_FILES_DOWNLOAD_ERROR,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_JSON_FILE_FAILURE],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_SUCCESS: {
|
||||||
|
ismasClient.setProgressInPercent(_DOWNLOAD_JSON_FILE);
|
||||||
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::DOWNLOAD_JSON_FILE_SUCCESS],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_DEVICE_CONTROLLER);
|
ismasClient.setProgressInPercent(_DOWNLOAD_DEVICE_CONTROLLER);
|
||||||
break;
|
break;
|
||||||
@ -1275,9 +1498,20 @@ private:
|
|||||||
case UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE:
|
case UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE:
|
||||||
ismasClient.setProgressInPercent(_DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE);
|
ismasClient.setProgressInPercent(_DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE);
|
||||||
break;
|
break;
|
||||||
case UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY:
|
case UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY: {
|
||||||
ismasClient.setProgressInPercent(_SYNC_CUSTOMER_REPOSITORY);
|
ismasClient.setProgressInPercent(_SYNC_CUSTOMER_REPOSITORY);
|
||||||
break;
|
QString const &ismasUpdateNews =
|
||||||
|
QString("#M=APISM#C=CMD_EVENT#J=") +
|
||||||
|
ismasClient.updateNewsToIsmas(
|
||||||
|
_ISMAS_CONTINUE,
|
||||||
|
ismasClient.getProgressInPercent(),
|
||||||
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
|
smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY],
|
||||||
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
|
ismasClient.sendRequestReceiveResponse(
|
||||||
|
IsmasClient::APISM::DB_PORT, ismasUpdateNews);
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS: {
|
case UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS: {
|
||||||
ismasClient.setProgressInPercent(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
|
ismasClient.setProgressInPercent(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
|
||||||
QString const &ismasUpdateNews =
|
QString const &ismasUpdateNews =
|
||||||
@ -1286,7 +1520,7 @@ private:
|
|||||||
_ISMAS_CONTINUE,
|
_ISMAS_CONTINUE,
|
||||||
ismasClient.getProgressInPercent(),
|
ismasClient.getProgressInPercent(),
|
||||||
IsmasClient::RESULT_CODE::SUCCESS,
|
IsmasClient::RESULT_CODE::SUCCESS,
|
||||||
smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY],
|
smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS],
|
||||||
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
instance->m_ismasMsg.join(' ').toStdString().c_str(),
|
||||||
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
instance->m_versionInfo.size() >= 1 ? instance->m_versionInfo.at(0).toUtf8().constData() : "N/A");
|
||||||
ismasClient.sendRequestReceiveResponse(
|
ismasClient.sendRequestReceiveResponse(
|
||||||
@ -1552,6 +1786,24 @@ private:
|
|||||||
break;
|
break;
|
||||||
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE:
|
case UPDATE_STEP::DOWNLOAD_CONFIG_FILE_FAILURE:
|
||||||
break;
|
break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_CASH_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_DEVICE_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_FAILURE: {
|
||||||
|
} break;
|
||||||
|
case UPDATE_STEP::DOWNLOAD_JSON_FILE_SUCCESS: {
|
||||||
|
} break;
|
||||||
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER:
|
||||||
break;
|
break;
|
||||||
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER_SUCCESS:
|
case UPDATE_STEP::DOWNLOAD_DEVICE_CONTROLLER_SUCCESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user