Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
Firmware Update Meta Data
+ Collaboration diagram for Firmware Update Meta Data:

Macros

#define WAITTIME_FWU_FAIL   2
 

Enumerations

enum  OTA_STATUS {
  OTA_STATUS_DONE = 0 ,
  OTA_STATUS_ABORT = 1 ,
  OTA_STATUS_TIMEOUT = 2
}
 

Functions

bool CC_FirmwareUpdate_SetStartCallback (uint16_t fwId, uint16_t CRC)
 
void CC_FirmwareUpdate_SetFinishCallback (OTA_STATUS pOtaFinish)
 

Detailed Description

Command Class Firmware Update Meta Data enables a device to have its firmware updated remotely.

CC Firmware Update MD can be configured in cc_firmware_update_config.h.

This CC offers the option to define two functions in the application that will override the weak implementations:

The specification of CC Firmware Update MD can be found in https://github.com/Z-Wave-Alliance/AWG/tree/main/source/management_command_classes/command_class_definitions

Macro Definition Documentation

◆ WAITTIME_FWU_FAIL

#define WAITTIME_FWU_FAIL   2

Defines for WaitTime field used in commmand = FIRMWARE_UPDATE_MD_STATUS_REPORT. The WaitTime field MUST report the time that is needed before the receiving node again becomes available for communication after the transfer of an image. The unit is the second.

Enumeration Type Documentation

◆ OTA_STATUS

enum OTA_STATUS

enum type OTA_STATUS use to

Enumerator
OTA_STATUS_DONE 
OTA_STATUS_ABORT 
OTA_STATUS_TIMEOUT 

Function Documentation

◆ CC_FirmwareUpdate_SetFinishCallback()

void CC_FirmwareUpdate_SetFinishCallback ( OTA_STATUS pOtaFinish)

Invoked when the firmware update process finishes either successfully or with an error.

If the device reboots right after the firmware update, the function is invoked before the reboot.

The function must take an argument that is the status of the firmware update.

Note
This function is weakly defined to do nothing and can be defined by the application if desired.
Parameters
pOtaFinishStatus of the firmware update.

◆ CC_FirmwareUpdate_SetStartCallback()

bool CC_FirmwareUpdate_SetStartCallback ( uint16_t fwId,
uint16_t CRC )

Invoked when another node initiates a firmware update of this device.

If the function returns true, the process will continue. If the function returns false, the node will report to the initiator that the firmware update requires authentication.

The function must take two arguments where the first one is the firmware ID and the second one is the CRC value of the firmware.

Note
This function is weakly defined to return true, but can be defined by the application if desired.
Parameters
fwIdID of the firmware.
CRCCRC of the firmware.
Returns
Return true to continue the firmware update process and false to cancel it.