diff options
Diffstat (limited to 'include/mts/MTS_IO_ICellularRadio.h')
-rw-r--r-- | include/mts/MTS_IO_ICellularRadio.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index f2d4dfe..e1edbcd 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -103,6 +103,7 @@ namespace MTS { static const char *RSP_OK; static const char *RSP_ERROR; + static const char *RSP_CONNECT; static const char *VALUE_NOT_REGISTERED; static const char *VALUE_REGISTERED; @@ -427,6 +428,71 @@ namespace MTS { */ virtual CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb) = 0; + /** + * @brief updateFumoLocal - Performs the radio firmware upgrade using local firmware image. + * + * This command uploads (injects) the whole delta firmware image to the radio, performs the + * upgrade and waits for it to complete. + * + * @param fd - file descriptor of a file that shall be injected to the radio. + * @param stepCb - callback to receive status updates during the firmware upgrade. + * @return CODE::SUCCESS when the firmware upgrade was successful, + * CODE::INVALID_ARGS when the file can't be opened for reading, + * CODE::FAILURE when upgrade failed on the radio side, + * CODE::NOT_APPLICABLE when not supported by this radio, + * CODE::ERROR otherwise. + */ + virtual CODE updateFumoLocal(int fd, UpdateCb& stepCb) = 0; + + /** + * @brief fumoLocalInject - upload delta file to the radio's internal memory. + * + * This command uploads (injects) the whole delta firmware image to some place that + * can be later used by the radio to perform the Delta Radio Firmware Upgrade. + * + * This delta firmware image is NOT validated on the firmware image upload step. + * + * @param fd - file sescriptor of a file that shall be uploaded to the radio. + * @param stepCb - callback to receive status updates during the upload. + * @return CODE::SUCCESS when the file was successfully uploaded, + * CODE::INVALID_ARGS when the file can't be opened for reading, + * CODE::NOT_APPLICABLE when not supported by this radio, + * CODE::ERROR otherwise. + */ + virtual CODE fumoLocalInject(int fd, UpdateCb& stepCb) = 0; + + /** + * @brief fumoLocalApply - apply the delta file that was previously uploaded. + * + * This commands initializes and tracks the progress of the delta firmware upgrade + * procedure using the delta firmware image file that was previously uploaded + * into internal memory of the radio. + * + * See ICellularRadio::fumoLocalInject to upload the file and prepare + * for the upgrade. + * + * @param fd - file descriptor of a file that shall be uploaded to the radio. + * @param stepCb - the callback to receive status updates during the upgrade. + * @return CODE::SUCCESS when the firmware upgrade was successful, + * CODE::FAILURE when upgrade failed on the radio side, + * CODE::NOT_APPLICABLE when not supported by this radio, + * CODE::ERROR otherwise. + */ + virtual CODE fumoLocalApply(UpdateCb& stepCb) = 0; + + /** + * @brief fumoLocalCleanup - remove the delta file from the radio's internal memory. + * + * This command allows to remove the old delta firmware image from the radio's internal + * memory for cases when it's no longer needed. + * + * @return CODE::SUCCESS when the file was successfully deleted, + * CODE::FAILURE when the file can't be deleted (i.e. no such file), + * CODE::NOT_APPLICABLE when not supported by this radio, + * CODE::ERROR otherwise. + */ + virtual CODE fumoLocalCleanup() = 0; + /* * jArgs = { * "msl" : "Master Subsidy Lock (Sprint): STRING" |