nRF5 SDK for Thread and Zigbee v3.2.0
Data Structures | Macros | Functions
ZCL OTA device firmware upgrade add-ons

Data Structures

struct  zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t
 OTA server periodical discovery context structure. More...
 

Macros

#define ZB_ZCL_OTA_SERVER_DISCOVERY_INTERVAL_S   (5 * 60)
 Periodical discovery interval for OTA server. The value must be lower than 24 hours, as defined in the OUPC9 requirement of the OTA cluster PICS. Once an OTA server in the Zigbee network is found, the periodical discovery process will end.
 

Functions

ret_code_t zb_zcl_ota_upgrade_client_with_periodical_discovery_init (zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t *p_context, app_timer_id_t const *p_timer_id, zb_uint8_t endpoint)
 Function for initializing OTA Upgrade cluster client and periodical OTA server discovery. More...
 
ret_code_t zb_zcl_ota_upgrade_client_with_periodical_discovery_start (zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t *p_context)
 Function for starting periodical OTA server discovery. More...
 
zb_bool_t zb_zcl_ota_upgrade_client_periodical_discovery_status (zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t *p_context)
 Function for getting the state of periodical OTA server discovery. More...
 
ret_code_t zb_zcl_ota_upgrade_client_periodical_discovery_stop (zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t *p_context)
 Function for stopping the periodical OTA server discovery. More...
 

Detailed Description

Function Documentation

zb_bool_t zb_zcl_ota_upgrade_client_periodical_discovery_status ( zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t p_context)

Function for getting the state of periodical OTA server discovery.

Parameters
[in]p_contextPointer to the initialized context structure of the periodical OTA server discovery.
Return values
ZB_TRUEIf periodical discovery is active on an endpoint that is associated with the context structure.
ZB_FALSEIf periodical discovery is inactive on an endpoint that is associated with the context structure. or the p_context is NULL.
ret_code_t zb_zcl_ota_upgrade_client_periodical_discovery_stop ( zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t p_context)

Function for stopping the periodical OTA server discovery.

Parameters
[in]p_contextPointer to the initialized context structure of the periodical OTA server discovery.
Return values
NRF_SUCCESSThe discovery timer was successfully stopped.
NRF_ERROR_INVALID_PARAMA parameter is invalid.
NRF_ERROR_INVALID_STATEThe discovery timer module has not been initialized or the timer has not been created.
NRF_ERROR_NO_MEMThe queue for application timer operations is full.
ret_code_t zb_zcl_ota_upgrade_client_with_periodical_discovery_init ( zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t p_context,
app_timer_id_t const *  p_timer_id,
zb_uint8_t  endpoint 
)

Function for initializing OTA Upgrade cluster client and periodical OTA server discovery.

Parameters
[in]p_contextPointer to the uninitialized context structure of the periodical OTA server discovery.
[in]p_timer_idPointer to the app_timer instance that will be used to schedule periodical OTA server discovery.
[in]endpointEndpoint number on which the OTA server discovery is to be performed.
Return values
NRF_SUCCESSThe discovery timer was successfully created.
NRF_ERROR_INVALID_PARAMA parameter is invalid.
NRF_ERROR_INVALID_STATEThe discovery timer module has not been initialized or the timer is running.
Note
This function must be called exactly once before any other call to other API provided by this module.
ret_code_t zb_zcl_ota_upgrade_client_with_periodical_discovery_start ( zb_zcl_ota_upgrade_client_periodical_discovery_ctx_t p_context)

Function for starting periodical OTA server discovery.

Parameters
[in]p_contextPointer to the initialized context structure of the periodical OTA server discovery.
Return values
NRF_SUCCESSThe discovery timer was successfully started.
NRF_ERROR_INVALID_PARAMA parameter is invalid.
NRF_ERROR_INVALID_STATEThe discovery timer module has not been initialized or the timer has not been created.
NRF_ERROR_NO_MEMThe queue for application timer operations is full.

Documentation feedback | Developer Zone | Subscribe | Updated