Friendly LWM2M client
wpp::FwInternalDl Interface Referenceabstract

#include <FwInternalDl.h>

+ Collaboration diagram for wpp::FwInternalDl:

Public Member Functions

 FwInternalDl ()=default
 
virtual ~FwInternalDl ()=default
 
virtual void downloadIsStarted ()=0
 Notify about dwnloading process start. More...
 
virtual bool saveDownloadedBlock (const OPAQUE_T &dataBlock)=0
 Request to save downloaded block of the firmware package. More...
 
virtual void downloadIsCompleted ()=0
 Notify about dwnloading process completion. Regardless of the reason for the termination, whether it is a complete firmware downloading or an downloading error. More...
 
virtual FwUpdRes downloadResult ()=0
 Contains the result of the download process. Possible results when download is successful: R_INITIAL Possible results when error occured: R_NOT_ENOUGH_FLASH, R_OUT_OF_RAM, R_INTEGRITY_CHECK_FAIL, R_UNSUPPORTED_PKG_TYPE. More...
 
virtual void reset ()=0
 Reset the download process. When this method is called, the download process is reset and the download process can be started again. This methos can not be called when the updeate process is started. All the information about the previous download process is cleared. So downloadResult() should return R_INITIAL. More...
 

Detailed Description

auto downloading the firmware through uri and package resource. The FwInternalDl is registered in the FirmwareUpdate object. With using this interface, FirmwareUpdate notifies user about downloaded blocks, required operation and gets the result of the operation. Downloading process is occured on the Wpp lib side.

Note
The implementation of each method must not use blocking functions and must terminate as quickly as possible. If possible, operations that take a long time should be performed asynchronously.

Definition at line 17 of file FwInternalDl.h.

Constructor & Destructor Documentation

◆ FwInternalDl()

wpp::FwInternalDl::FwInternalDl ( )
default

◆ ~FwInternalDl()

virtual wpp::FwInternalDl::~FwInternalDl ( )
virtualdefault

Member Function Documentation

◆ downloadIsCompleted()

virtual void wpp::FwInternalDl::downloadIsCompleted ( )
pure virtual

Notify about dwnloading process completion. Regardless of the reason for the termination, whether it is a complete firmware downloading or an downloading error.

◆ downloadIsStarted()

virtual void wpp::FwInternalDl::downloadIsStarted ( )
pure virtual

Notify about dwnloading process start.

Parameters
pkgName- Name of the firmware package.
pkgVersion- Version of the firmware package.

◆ downloadResult()

virtual FwUpdRes wpp::FwInternalDl::downloadResult ( )
pure virtual

Contains the result of the download process. Possible results when download is successful: R_INITIAL Possible results when error occured: R_NOT_ENOUGH_FLASH, R_OUT_OF_RAM, R_INTEGRITY_CHECK_FAIL, R_UNSUPPORTED_PKG_TYPE.

◆ reset()

virtual void wpp::FwInternalDl::reset ( )
pure virtual

Reset the download process. When this method is called, the download process is reset and the download process can be started again. This methos can not be called when the updeate process is started. All the information about the previous download process is cleared. So downloadResult() should return R_INITIAL.

◆ saveDownloadedBlock()

virtual bool wpp::FwInternalDl::saveDownloadedBlock ( const OPAQUE_T dataBlock)
pure virtual

Request to save downloaded block of the firmware package.

Parameters
dataBlock- Block of the firmware package. If the saving block is not possible, the method should return false, and set appropriate download result, that will be returned by downloadResult() method.
Returns
true if the block is saved successfully, otherwise false.