Developing with ZBOSS for Zigbee
ZCL OTA Upgrade cluster

Data Structures

struct  zb_zcl_ota_upgrade_file_header_s
 Structure representation of OTA File Header, see ZCL8 specification, subsection 11.4.2, Table 11-2. OTA Header Fields. More...
 
struct  zb_zcl_ota_upgrade_file_header_optional_s
 
struct  zb_zcl_ota_upgrade_sub_element_s
 Structure representation of OTA File Sub-element, see ZCL8 specification, subsection 11.4.3. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_s
 Structure representation of OTA ECDSA Signature (Crypto Suite 1), see ZCL8 specification, subsection 11.4.6. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_signing_s
 Structure representation of OTA ECDSA Signature, see OTA spec 6.3.6. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_certificate_s
 Structure representation of OTA ECDSA Certificate, see OTA spec 6.3.7. More...
 
struct  zb_zcl_ota_upgrade_server_insert_file_s
 Structure representation of Data for insert OTA file to upgrade mechanism. More...
 
struct  zb_zcl_ota_upgrade_server_remove_file_s
 Structure representation of Data for insert OTA file to upgrade mechanism. More...
 
struct  zb_zcl_ota_upgrade_data_s
 Structure representation of OTA file on server side. More...
 
struct  zb_zcl_ota_upgrade_server_variable_s
 Structure representation of server side variables. More...
 
struct  zb_zcl_ota_upgrade_srv_query_img_param_s
 
struct  zb_zcl_ota_upgrade_srv_upgrade_started_param_s
 
struct  zb_zcl_ota_upgrade_srv_upgrade_aborted_param_s
 
struct  zb_zcl_ota_upgrade_srv_upgrade_end_param_s
 
struct  zb_zcl_ota_upgrade_client_variable_s
 Structure representation of client side variables. More...
 
struct  zb_zcl_ota_upgrade_query_next_image_s
 Structure representation of Query Next Image Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_block_s
 Structure representation of Image Block Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_page_s
 Structure representation of Image Page Request command payload. More...
 
struct  zb_zcl_ota_upgrade_upgrade_end_s
 Structure representation of Upgrade End Request command payload. More...
 
struct  zb_zcl_ota_upgrade_query_specific_file_s
 Structure representation of Query Specific File Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_notify_s
 Structure representation of Image Notify response command payload. More...
 
struct  zb_zcl_ota_upgrade_query_next_image_res_s
 Structure representation of Query Next Image Response command payload. More...
 
struct  zb_zcl_ota_upgrade_image_block_res_s
 Structure representation of Image Block Response command payload. More...
 
struct  zb_zcl_ota_upgrade_upgrade_end_res_s
 Structure representation of Upgrade End Response command payload. More...
 
struct  zb_zcl_ota_upgrade_query_specific_file_res_s
 Structure representation of Query Specific File Response command payload. More...
 
struct  zb_zcl_ota_upgrade_value_param_s
 Declare User Application about upgrade status. More...
 

Typedefs

typedef struct zb_zcl_ota_upgrade_value_param_s zb_zcl_ota_upgrade_value_param_t
 Declare User Application about upgrade status.
 

Enumerations

enum  zb_zcl_ota_upgrade_status_e {
  ZB_ZCL_OTA_UPGRADE_STATUS_START, ZB_ZCL_OTA_UPGRADE_STATUS_APPLY, ZB_ZCL_OTA_UPGRADE_STATUS_RECEIVE, ZB_ZCL_OTA_UPGRADE_STATUS_FINISH,
  ZB_ZCL_OTA_UPGRADE_STATUS_ABORT, ZB_ZCL_OTA_UPGRADE_STATUS_CHECK, ZB_ZCL_OTA_UPGRADE_STATUS_OK, ZB_ZCL_OTA_UPGRADE_STATUS_ERROR,
  ZB_ZCL_OTA_UPGRADE_STATUS_REQUIRE_MORE_IMAGE, ZB_ZCL_OTA_UPGRADE_STATUS_BUSY, ZB_ZCL_OTA_UPGRADE_STATUS_SERVER_NOT_FOUND
}
 Possible statuses of OTA upgrade.
 

Functions

zb_ret_t zb_zcl_check_value_ota_upgrade (zb_uint16_t attr_id, zb_uint8_t endpoint, zb_uint8_t *value)
 
void zcl_ota_abort (zb_uint8_t endpoint, zb_uint8_t param)
 Abort OTA Upgrade process. More...
 

OTA File Header format

Hook on Write attribute send Check-in if change Check-in interval & Check-in remain time > new check-in interval

Structures for representation OTA File Header

enum  zb_zcl_ota_upgrade_file_header_fc_e { ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_CREDENTIAL_VER = 1 << 0, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_DEVICE_SPECIFIC = 1 << 1, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_HW_VER = 1 << 2 }
 OTA File header - fc fields structure. More...
 
enum  zb_zcl_ota_upgrade_file_header_image_type_e {
  ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_MANUF_SPEC_MAX = 0xffbf, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_SECURITY_CRED = 0xffc0, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_CONFIG = 0xffc1, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_LOG = 0xffc2,
  ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_WILD_CARD = 0xffff
}
 OTA File header - Image Type Values. More...
 
enum  zb_zcl_ota_upgrade_file_header_stack_version_e { ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_2006 = 0x0000, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_2007 = 0x0001, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_PRO = 0x0002, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_IP = 0x0003 }
 OTA File header - Zigbee Stack version. More...
 
enum  zb_zcl_ota_upgrade_file_header_security_version_e { ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_0 = 0x00, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_1 = 0x01, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE2_0 = 0x02, ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_2 = 0x03 }
 OTA File header - Security Credential Version. More...
 
typedef struct zb_zcl_ota_upgrade_file_header_s zb_zcl_ota_upgrade_file_header_t
 Structure representation of OTA File Header, see ZCL8 specification, subsection 11.4.2, Table 11-2. OTA Header Fields.
 
typedef struct zb_zcl_ota_upgrade_file_header_optional_s zb_zcl_ota_upgrade_file_header_optional_t
 
#define ZB_ZCL_OTA_FILE_IS_FILE_SPECIFIC(head)   (((head)->fc) & ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_DEVICE_SPECIFIC)
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FILE_ID   0x0BEEF11E
 Default OTA Upgrade File Identifier, see ZCL8 specification, subsection 11.4.2.1.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FILE_VERSION   0x0100
 Default OTA Upgrade File Version, see ZCL8 specification, subsection 11.4.2.2.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HEADER_MANUFACTURE_CODE_WILD_CARD   0xffff
 Special Manufacturer Code, see ZCL8 specification, subsection 11.4.2.5.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_APP_RELEASE(ver)   (((ver) >>24) & 0xff)
 OTA Upgrade File Version, App release, see ZCL8 specification, subsection 11.4.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_APP_BUILD(ver)   (((ver) >>16) & 0xff)
 OTA Upgrade File Version, App build, see ZCL8 specification, subsection 11.4.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_STACK_RELEASE(ver)   (((ver) >>8) & 0xff)
 OTA Upgrade File Version, Stack release, see ZCL8 specification, subsection 11.4.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_STACK_BUILD(ver)   ((ver) & 0xff)
 OTA Upgrade File Version, Stack build, see ZCL8 specification, subsection 11.4.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_MAKE_VERSION(app_rel, app_build, stack_rel, stack_build)   ((app_rel) << 24 | (app_build) << 16 | (stack_rel) << 8 | (stack_build))
 OTA Upgrade File Version, make file version, see ZCL8 specification, subsection 11.4.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_VERSION_CMP(ver1, ver2)   ( (ver1) != (ver2) )
 Compare 2 OTA versions and decide if it is needed to do upgrade.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_HW_VERSION(ver)   (((ver) >>8) & 0xff)
 OTA Upgrade HW Version Get Version, see ZCL8 specification, subsection 11.4.2.13.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_HW_REVISION(ver)   ((ver) & 0xff)
 OTA Upgrade HW Version Get Revision, see ZCL8 specification, subsection 11.4.2.13.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_MAKE_HW_VERSION(ver, rev)   ((ver) << 8 | (rev))
 OTA Upgrade Make HW Version, see ZCL8 specification, subsection 11.4.2.13.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HW_VERSION_DEF_VALUE   0xffff
 Default value of OTA Upgrade HW Version.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_DEST_ADDRESS_DEF_VALUE   { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
 Default value of OTA Upgrade destination address.
 

OTA File Sub-element format

Structures for representation OTA File Sub-element

enum  zb_zcl_ota_upgrade_sub_element_tags_e {
  ZB_ZCL_OTA_UPGRADE_FILE_TAG_UPGRADE_IMAGE = 0x0000, ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA = 0x0001, ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_CERT = 0x0002, ZB_ZCL_OTA_UPGRADE_FILE_TAG_IMAGE_INTEGRITY_CODE = 0x0003,
  ZB_ZCL_OTA_UPGRADE_FILE_TAG_PICTURE_DATA = 0x0004, ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_V_2 = 0x0005, ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_CERT_V_2 = 0x0006, ZB_ZCL_OTA_UPGRADE_FILE_TAG_MANUF_MIN = 0xf000,
  ZB_ZCL_OTA_UPGRADE_FILE_TAG_MANUF_MAX = 0xffff
}
 OTA File header - Tag Identifiers. More...
 
typedef struct zb_zcl_ota_upgrade_sub_element_s zb_zcl_ota_upgrade_sub_element_t
 Structure representation of OTA File Sub-element, see ZCL8 specification, subsection 11.4.3.
 
typedef struct zb_zcl_ota_upgrade_ecdsa_s zb_zcl_ota_upgrade_ecdsa_t
 Structure representation of OTA ECDSA Signature (Crypto Suite 1), see ZCL8 specification, subsection 11.4.6.
 
typedef struct zb_zcl_ota_upgrade_ecdsa_signing_s zb_zcl_ota_upgrade_ecdsa_signing_t
 Structure representation of OTA ECDSA Signature, see OTA spec 6.3.6.
 
typedef struct zb_zcl_ota_upgrade_ecdsa_certificate_s zb_zcl_ota_upgrade_ecdsa_ertificate_t
 Structure representation of OTA ECDSA Certificate, see OTA spec 6.3.7.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_TAG_ID   ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA
 Special Manufacturer Code, see ZCL8 specification, subsection 11.4.6.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_LENGTH   0x00000032
 Special Manufacturer Code, see ZCL8 specification, subsection 11.4.6.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_SIGNING_TAG_ID   0x0002
 Special Manufacturer Code, see spec 6.3.6.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_SIGNING_LENGTH   0x00000030
 Special Manufacturer Code, see spec 6.3.6.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_CERTIFICATE_TAG_ID   0x0003
 Special Manufacturer Code, see spec 6.3.7.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_CERTIFICATE_LENGTH   0x00000010
 Special Manufacturer Code, see spec 6.3.7.
 

OTA Upgrade cluster attributes

enum  zb_zcl_ota_upgrade_attr_e {
  ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID = 0x0000, ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID = 0x0001, ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID = 0x0002, ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID = 0x0003,
  ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID = 0x0004, ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID = 0x0005, ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID = 0x0006, ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID = 0x0007,
  ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID = 0x0008, ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID = 0x0009, ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID = 0x000a, ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_ACTIVATION_POLICY_ID = 0x000b,
  ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_TIMEOUT_POLICY_ID = 0x000c, ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID = 0xfff3, ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID = 0xfff2, ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID = 0xfff1,
  ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID = 0xfff0
}
 OTA Upgrade cluster attribute identifiers. More...
 
enum  zb_zcl_ota_upgrade_image_status_e {
  ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_NORMAL = 0x00, ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DOWNLOADING = 0x01, ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DOWNLOADED = 0x02, ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAITING_UPGRADE = 0x03,
  ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_COUNT_DOWN = 0x04, ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAIT_FOR_MORE = 0x05, ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAIT_TO_UPGRADE_VIA_EXT_EVENT = 0x06
}
 OTA Image Upgrade Status Attribute Values. More...
 
typedef zb_ret_t(* zb_zcl_ota_upgrade_next_data_ind_t) (zb_uint8_t index, zb_zcl_parsed_hdr_t *zcl_header, zb_uint32_t offset, zb_uint8_t size, zb_uint8_t **data)
 Callback function for send next data portion. More...
 
typedef struct zb_zcl_ota_upgrade_server_insert_file_s zb_zcl_ota_upgrade_server_insert_file_t
 Structure representation of Data for insert OTA file to upgrade mechanism.
 
typedef struct zb_zcl_ota_upgrade_server_remove_file_s zb_zcl_ota_upgrade_server_remove_file_t
 Structure representation of Data for insert OTA file to upgrade mechanism.
 
typedef struct zb_zcl_ota_upgrade_data_s zb_zcl_ota_upgrade_data_t
 Structure representation of OTA file on server side.
 
typedef struct zb_zcl_ota_upgrade_server_variable_s zb_zcl_ota_upgrade_server_variable_t
 Structure representation of server side variables.
 
typedef struct zb_zcl_ota_upgrade_srv_query_img_param_s zb_zcl_ota_upgrade_srv_query_img_param_t
 
typedef struct zb_zcl_ota_upgrade_srv_upgrade_started_param_s zb_zcl_ota_upgrade_srv_upgrade_started_param_t
 
typedef struct zb_zcl_ota_upgrade_srv_upgrade_aborted_param_s zb_zcl_ota_upgrade_srv_upgrade_aborted_param_t
 
typedef struct zb_zcl_ota_upgrade_srv_upgrade_end_param_s zb_zcl_ota_upgrade_srv_upgrade_end_param_t
 
typedef struct zb_zcl_ota_upgrade_client_variable_s zb_zcl_ota_upgrade_client_variable_t
 Structure representation of client side variables.
 
void zb_zcl_ota_upgrade_init_server (zb_uint8_t endpoint, zb_zcl_ota_upgrade_next_data_ind_t next_data_ind_cb)
 Initialize OTA Upgrade cluster - server part For server clear custom data and registry next data indication. More...
 
zb_ret_t zb_zcl_ota_upgrade_insert_file (zb_uint8_t param)
 Insert upgrade OTA file into Server upgrade table. More...
 
zb_ret_t zb_zcl_ota_upgrade_remove_file (zb_uint8_t param)
 Remove upgrade file from Server upgrade table. More...
 
void zb_zcl_ota_upgrade_init_client (zb_uint8_t param)
 Initialize OTA Upgrade cluster - client part For server clear custom data For client initiate search Upgrade server. More...
 
zb_ret_t zb_zcl_ota_upgrade_start_client (zb_uint8_t server_ep, zb_uint16_t server_addr)
 Start OTA Upgrade client with pre-defined OTA Upgrade Server attributes (without Service Discovery) More...
 
void zb_zcl_ota_upgrade_stop_client (void)
 Stop process OTA Upgrade / OTA query new images Client stop schedule OTA command & clear OTA status.
 
void zb_zcl_ota_upgrade_resume_client (zb_uint8_t param, zb_uint8_t upgrade_status)
 Resume process OTA Upgrade if it was previously suspended by the application. More...
 
void zb_zcl_ota_upgrade_set_query_interval (zb_uint8_t endpoint, zb_uint16_t interval)
 Set Frequency request server about new upgrade file (minutes) More...
 
void zb_zcl_ota_upgrade_file_upgraded (zb_uint8_t endpoint)
 Clear attribute after upgrade. More...
 
#define ZB_ZCL_OTA_UPGRADE_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0004u)
 Default value for OTA Upgrade cluster revision global attribute.
 
#define ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_DATA_SIZE_MAX   64
 Maximum size data for Query Image Block Request.
 
#define ZB_ZCL_OTA_UPGRADE_INSERT_FILE(buf, ep, i, file, upgrade_tm, notify, ret_code)
 
#define ZB_ZCL_OTA_UPGRADE_REMOVE_FILE(buf, ep, i, ret_code)
 
#define ZB_ZCL_OTA_UPGRADE_DATA_SIZE_DEF_VALUE   0xff
 Default value for DataSize, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_QUERY_JITTER_MIN_VALUE   0x01
 Minimum value for QueryJitter, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_QUERY_JITTER_MAX_VALUE   0x64
 Maximum value for QueryJitter, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_QUERY_JITTER_DEF_VALUE   0x32
 Default value for QueryJitter, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_CURRENT_TIME_DEF_VALUE   0xffffffff
 Default value for currentTime, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_UPGRADE_TIME_DEF_VALUE   0xffffffff
 Default value for UpgradeTime, OTA spec

 
#define ZB_ZCL_OTA_UPGRADE_SERVER_DEF_VALUE   { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
 Default value for UpgradeServerID attribute, ZCL8 specification, subsection 11.10.1.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_OFFSET_DEF_VALUE   0xffffffff
 Default value for FileOffset attribute, ZCL8 specification, subsection 11.10.2.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_VERSION_DEF_VALUE   0xffffffff
 Default value for CurrentFileVersion attribute, ZCL8 specification, subsection 11.10.3.
 
#define ZB_ZCL_OTA_UPGRADE_STACK_VERSION_DEF_VALUE   0xffff
 Default value for CurrentZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.4.
 
#define ZB_ZCL_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_DEF_VALUE   0xffffffff
 Default value for DownloadedFileVersion attribute, ZCL8 specification, subsection 11.10.5.
 
#define ZB_ZCL_OTA_UPGRADE_DOWNLOADED_STACK_DEF_VALUE   0xffff
 Default value for DownloadedZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.6.
 
#define ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DEF_VALUE   0x00
 Default value for ImageUpgradeStatus attribute, ZCL8 specification, subsection 11.10.7.
 
#define ZB_ZCL_OTA_UPGRADE_IMAGE_STAMP_MIN_VALUE   0xfffe
 Maximum value for MinimumBlockPeriod attribute, ZCL8 specification, subsection 11.10.10.
 
#define ZB_ZCL_OTA_UPGRADE_SERVER_ENDPOINT_DEF_VALUE   0xff
 Default value for OTA server endpoint custom attribute.
 
#define ZB_ZCL_OTA_UPGRADE_SERVER_ADDR_DEF_VALUE   0xffff
 Default value for OTA server addr custom attribute.
 
#define ZB_ZCL_OTA_UPGRADE_QUERY_TIMER_COUNT_DEF   (24*60)
 Default Frequency request server about new upgrade file (minutes)
 
#define ZB_ZCL_OTA_UPGRADE_QUERY_TIMER_INTERVAL   60l * ZB_TIME_ONE_SECOND
 Timer interval for Query timer

 
#define ZB_ZCL_OTA_UPGRADE_MAX_INTERVAL   60
 Maximum value of nextImageQuery interval

 
#define ZB_ZCL_OTA_UPGRADE_RESEND_BUFFER_DELAY   ZB_TIME_ONE_SECOND * 45
 Resend buffer delay.
 
#define ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST(attr_list, upgrade_server, file_offset, file_version, stack_version, downloaded_file_ver, downloaded_stack_ver, image_status, manufacturer, image_type, min_block_reque, image_stamp, server_addr, server_ep, hardware_version, max_data_size, query_timer)
 Declare attribute list for OTA Upgrade cluster - client side. More...
 
#define ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST_SERVER(attr_list, query_jitter, current_time, length)
 Declare attribute list for OTA Upgrade cluster - server side. More...
 

OTA Upgrade cluster commands

enum  zb_zcl_ota_upgrade_cmd_e {
  ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_ID = 0x01, ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_ID = 0x03, ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_PAGE_ID = 0x04, ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_ID = 0x06,
  ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_ID = 0x08
}
 OTA Upgrade cluster client to server command identifiers. More...
 
enum  zb_zcl_ota_upgrade_resp_cmd_e {
  ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_NOTIFY_ID = 0x00, ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_RESP_ID = 0x02, ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_RESP_ID = 0x05, ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_RESP_ID = 0x07,
  ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_RESP_ID = 0x09, ZB_ZCL_CMD_OTA_UPGRADE_INTERNAL_ABORT_ID = 0xf9
}
 OTA Upgrade cluster server to client command identifiers. More...
 
enum  zb_zcl_ota_upgrade_query_next_image_fc_e { ZB_ZCL_OTA_UPGRADE_QUERY_NEXT_IMAGE_HW_VERSION = 1 << 0 }
 OTA Image Upgrade Status Attribute Values. More...
 
enum  zb_zcl_ota_upgrade_image_block_fc_e { ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_IEEE_PRESENT = 1 << 0, ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_DELAY_PRESENT = 1 << 1 }
 OTA Image Upgrade Status Attribute Values. More...
 
enum  zb_zcl_ota_upgrade_image_page_fc_e { ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_PAGE_IEEE_PRESENT = 1 << 0 }
 OTA Image Upgrade Status Attribute Values. More...
 
enum  zb_zcl_ota_upgrade_image_notify_payload_type_e { ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER = 0x00, ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE = 0x01, ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE_IMAGE = 0x02, ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE_IMAGE_VER = 0x03 }
 OTA Image Upgrade Status Attribute Values. More...
 
typedef struct zb_zcl_ota_upgrade_query_next_image_s zb_zcl_ota_upgrade_query_next_image_t
 Structure representation of Query Next Image Request command payload. More...
 
typedef struct zb_zcl_ota_upgrade_image_block_s zb_zcl_ota_upgrade_image_block_t
 Structure representation of Image Block Request command payload. More...
 
typedef struct zb_zcl_ota_upgrade_image_page_s zb_zcl_ota_upgrade_image_page_t
 Structure representation of Image Page Request command payload. More...
 
typedef struct zb_zcl_ota_upgrade_upgrade_end_s zb_zcl_ota_upgrade_upgrade_end_t
 Structure representation of Upgrade End Request command payload. More...
 
typedef struct zb_zcl_ota_upgrade_query_specific_file_s zb_zcl_ota_upgrade_query_specific_file_t
 Structure representation of Query Specific File Request command payload. More...
 
typedef struct zb_zcl_ota_upgrade_image_notify_s zb_zcl_ota_upgrade_image_notify_t
 Structure representation of Image Notify response command payload. More...
 
typedef struct zb_zcl_ota_upgrade_query_next_image_res_s zb_zcl_ota_upgrade_query_next_image_res_t
 Structure representation of Query Next Image Response command payload. More...
 
typedef struct zb_zcl_ota_upgrade_image_block_res_s zb_zcl_ota_upgrade_image_block_res_t
 Structure representation of Image Block Response command payload. More...
 
typedef struct zb_zcl_ota_upgrade_upgrade_end_res_s zb_zcl_ota_upgrade_upgrade_end_res_t
 Structure representation of Upgrade End Response command payload. More...
 
typedef struct zb_zcl_ota_upgrade_query_specific_file_res_s zb_zcl_ota_upgrade_query_specific_file_res_t
 Structure representation of Query Specific File Response command payload. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, fc, manufacturer, image_type, file_version, hw_version, aps_secured)
 Send "Query Next Image Request" command, see ZCL8 specification, subsection 11.13.4. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ(data_ptr, buffer, status)
 Macro for getting "Query Next Image Request" command, see ZCL8 specification, subsection 11.13.4. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, fc, manufacturer, image_type, file_version, file_offset, data_size_max, node_addr, block_delay, current_delay)
 Send "Image Block Request" command, see ZCL8 specification, subsection 11.13.6. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_REQ(data_ptr, buffer, status)
 Macro for getting "Image Block Request" command, see ZCL8 specification, subsection 11.13.6. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_PAGE_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, fc, manufacturer, image_type, file_version, file_offset, data_size_max, page_size, response_spacing, node_addr)
 Send "Image Page Request" command, see ZCL8 specification, subsection 11.13.7. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_PAGE_REQ(data_ptr, buffer, status)
 Macro for getting "Image Page Request" command, see ZCL8 specification, subsection 11.13.7. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, status, manufacturer, image_type, file_version)
 Send "Upgrade End Request" command, see ZCL8 specification, subsection 11.13.9. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_REQ(data_ptr, buffer, status_)
 Macro for getting "Upgrade End Request" command, see ZCL8 specification, subsection 11.13.9. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, node_addr, manufacturer, image_type, file_version, stack_version)
 Send "Query Specific File Request" command, see ZCL8 specification, subsection 11.13.10. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_REQ(data_ptr, buffer, status)
 Macro for getting "Query Specific File Request" command, see ZCL8 specification, subsection 11.13.10. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_NOTIFY_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, payload_type, query_jitter, manufacturer, image_type, file_version)
 Send Image Notify command, see ZCL8 specification, subsection 11.13.3. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_NOTIFY_REQ(data_ptr, buffer, status)
 
#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq, status, manufacturer, image_type, file_version, image_size)
 Send Query Next Image Response command, see ZCL8 specification, subsection 11.13.5. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_RES(data_ptr, buffer, status_)
 Macro for getting Query Next Image Response command, see ZCL8 specification, subsection 11.13.5. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_SUCCESS_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq, manufacturer, image_type, file_version, file_offset, data_size, image_data)
 Send Image Block Response command - success status, see ZCL8 specification, subsection 11.13.8. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_WAIT_FOR_DATA_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq, current_time, request_time, delay)
 Send Image Block Response command - wait for data status, see ZCL8 specification, subsection 11.13.8. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_ABORT_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq)
 Send Image Block Response command - abort status, see ZCL8 specification, subsection 11.13.8. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_RES(data_ptr, buffer, status_)
 Macro for getting Image Block Response command, see ZCL8 specification, subsection 11.13.8. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq, manufacturer, image_type, file_version, current_time, upgrade_time)
 Send Upgrade End Response command, see ZCL8 specification, subsection 11.13.9.6. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_RES(data_ptr, buffer, status_)
 Macro for getting Upgrade End Response command, see ZCL8 specification, subsection 11.13.9.6. More...
 
#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, seq, status, manufacturer, image_type, file_version, image_size)
 Send Query Specific File Response command, see ZCL8 specification, subsection 11.13.11. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_RES(data_ptr, buffer, status_)
 Macro for getting Query Specific File Response command, see ZCL8 specification, subsection 11.13.11. More...
 

Detailed Description

All commands in the cluster have only request form, and carry no payload.

Macro Definition Documentation

◆ ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST

#define ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST (   attr_list,
  upgrade_server,
  file_offset,
  file_version,
  stack_version,
  downloaded_file_ver,
  downloaded_stack_ver,
  image_status,
  manufacturer,
  image_type,
  min_block_reque,
  image_stamp,
  server_addr,
  server_ep,
  hardware_version,
  max_data_size,
  query_timer 
)
Value:
zb_zcl_ota_upgrade_client_variable_t client_var_##attr_list = \
{0, query_timer, 1, hardware_version, max_data_size, 0, 0}; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, ZB_ZCL_OTA_UPGRADE) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID , (upgrade_server)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID , (file_offset)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID , (file_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID , (stack_version)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID , (downloaded_file_ver)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID, (downloaded_stack_ver)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID , (image_status)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID , (manufacturer)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID , (image_type)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID , (min_block_reque)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID , (image_stamp)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID , (server_addr)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID , (server_ep)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID, &(client_var_##attr_list)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for OTA Upgrade cluster - client side.

endcond

Parameters
attr_list- attribute list name
upgrade_server- pointer to variable to store UpgradeServerID attribute
file_offset- pointer to variable to store FileOffset attribute
file_version- pointer to variable to store CurrentFileVersion attribute
stack_version- pointer to variable to store CurrentZigbeeStackVersion attribute
downloaded_file_ver- pointer to variable to store DownloadedFileVersion attribute
downloaded_stack_ver- pointer to variable to store DownloadedZigbeeStackVersion attribute
image_status- pointer to variable to store ImageUpgradeStatus attribute
manufacturer- pointer to variable to store Manufacturer ID attribute
image_type- pointer to variable to store Image Type ID attribute
min_block_reque- pointer to variable to store MinimumBlockReque attribute
image_stamp- pointer to variable to store Image Stamp attribute
server_addr- server short address
server_ep- server endpoint
hardware_version- (const) hardware version
max_data_size- (const) maximum data size Query Block Image commands
query_timer- (const) query timer count

◆ ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST_SERVER

#define ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST_SERVER (   attr_list,
  query_jitter,
  current_time,
  length 
)
Value:
zb_zcl_ota_upgrade_data_t table_##attr_list[length]; \
zb_zcl_ota_upgrade_server_variable_t server_var_##attr_list = { \
query_jitter, /* 0, 0,*/ current_time, /*ZB_ZCL_OTA_UPGRADE_UPGRADE_TIME_DEF_VALUE,*/ \
length, table_##attr_list }; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, ZB_ZCL_OTA_UPGRADE) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID, &(server_var_##attr_list)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for OTA Upgrade cluster - server side.

Parameters
attr_list- attribute list name
query_jitter- (8bit) pointer to variable to store QueryJitter value
current_time- (32bit) pointer to variable to store CurrentTime
length- (const) length of server table with upgrade image data

◆ ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
zb_zcl_ota_upgrade_image_block_t *src_ptr = \
\
if (zb_buf_len((buffer)) < sizeof(zb_zcl_ota_upgrade_image_block_t) - \
{ \
} \
else \
{ \
(data_ptr)->fc = src_ptr->fc; \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE32(&((data_ptr)->file_offset), &(src_ptr->file_offset)); \
(data_ptr)->data_size_max = src_ptr->data_size_max; \
{ \
ZB_IEEE_ADDR_COPY((data_ptr)->node_addr, (src_ptr)->node_addr); \
} \
{ \
ZB_HTOLE16(&((data_ptr)->block_delay), &(src_ptr->block_delay)); \
} \
} \
}

Macro for getting "Image Block Request" command, see ZCL8 specification, subsection 11.13.6.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_image_block_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_RES

#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_RES (   data_ptr,
  buffer,
  status_ 
)

Macro for getting Image Block Response command, see ZCL8 specification, subsection 11.13.8.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_image_block_res_s.
buffercontaining the packet (by pointer).
status_- variable to put parse status to (see zb_zcl_parse_status_t).
Note
File data is placed in buffer, payload saves pointer to data only!

◆ ZB_ZCL_OTA_UPGRADE_GET_IMAGE_NOTIFY_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_NOTIFY_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
if (zb_buf_len((buffer)) <= sizeof(zb_uint8_t)) \
{ \
} \
else \
{ \
zb_zcl_ota_upgrade_image_notify_t *src_ptr = \
(data_ptr)->payload_type = src_ptr->payload_type; \
(data_ptr)->query_jitter = src_ptr->query_jitter; \
switch ( src_ptr->payload_type ) \
{ \
case 0x03: \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version));\
/* FALLTHROUGH */ \
case 0x02: \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
/* FALLTHROUGH */ \
case 0x01: \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer));\
/* FALLTHROUGH */ \
default: \
break; \
} \
} \
}

◆ ZB_ZCL_OTA_UPGRADE_GET_IMAGE_PAGE_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_PAGE_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
zb_zcl_ota_upgrade_image_page_t *src_ptr = \
\
if (zb_buf_len((buffer)) < sizeof(zb_zcl_ota_upgrade_image_page_t) - \
{ \
} \
else \
{ \
(data_ptr)->fc = src_ptr->fc; \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE32(&((data_ptr)->file_offset), &(src_ptr->file_offset)); \
(data_ptr)->data_size_max = src_ptr->data_size_max; \
ZB_HTOLE16(&((data_ptr)->page_size), &(src_ptr->page_size)); \
ZB_HTOLE16(&((data_ptr)->response_spacing), &(src_ptr->response_spacing)); \
{ \
ZB_IEEE_ADDR_COPY((data_ptr)->node_addr, (src_ptr)->node_addr); \
} \
} \
}

Macro for getting "Image Page Request" command, see ZCL8 specification, subsection 11.13.7.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_image_page_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ (   data_ptr,
  buffer,
  status 
)

Macro for getting "Query Next Image Request" command, see ZCL8 specification, subsection 11.13.4.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_query_next_image_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_RES

#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
zb_zcl_ota_upgrade_query_next_image_res_t *src_ptr = \
\
if (zb_buf_len((buffer)) < ( (src_ptr->status)==ZB_ZCL_STATUS_SUCCESS ? \
{ \
TRACE_MSG(TRACE_ZLL1, "ERROR: buf_len %i", (FMT__H, zb_buf_len((buffer)))); \
} \
else \
{ \
(data_ptr)->status = src_ptr->status; \
if( src_ptr->status == ZB_ZCL_STATUS_SUCCESS) \
{ \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE32(&((data_ptr)->image_size), &(src_ptr->image_size)); \
} \
} \
}

Macro for getting Query Next Image Response command, see ZCL8 specification, subsection 11.13.5.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_query_next_image_res_s.
buffercontaining the packet (by pointer).
status_- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
zb_zcl_ota_upgrade_query_specific_file_t *src_ptr = \
ZB_IEEE_ADDR_COPY((data_ptr)->node_addr, (src_ptr)->node_addr); \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE16(&((data_ptr)->stack_version), &(src_ptr->stack_version)); \
} \
}

Macro for getting "Query Specific File Request" command, see ZCL8 specification, subsection 11.13.10.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_query_specific_file_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_RES

#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
zb_zcl_ota_upgrade_query_specific_file_res_t *src_ptr = \
if (zb_buf_len((buffer)) < ( (src_ptr->status)==ZB_ZCL_STATUS_SUCCESS ? \
{ \
} \
else \
{ \
(data_ptr)->status = src_ptr->status; \
if( src_ptr->status == ZB_ZCL_STATUS_SUCCESS) \
{ \
ZB_HTOLE32(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE32(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE32(&((data_ptr)->image_size), &(src_ptr->image_size)); \
} \
} \
}

Macro for getting Query Specific File Response command, see ZCL8 specification, subsection 11.13.11.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_query_specific_file_res_s.
buffercontaining the packet (by pointer).
status_- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_REQ

#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_REQ (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
zb_zcl_ota_upgrade_upgrade_end_t *src_ptr = \
\
if (zb_buf_len((buffer)) < sizeof(zb_zcl_ota_upgrade_upgrade_end_t) ) \
{ \
} \
else \
{ \
(data_ptr)->status = src_ptr->status; \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
} \
}

Macro for getting "Upgrade End Request" command, see ZCL8 specification, subsection 11.13.9.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_upgrade_end_s.
buffercontaining the packet (by pointer).
status_- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_RES

#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
{ \
} \
else \
{ \
zb_zcl_ota_upgrade_upgrade_end_res_t *src_ptr = \
ZB_HTOLE16(&((data_ptr)->manufacturer), &(src_ptr->manufacturer)); \
ZB_HTOLE16(&((data_ptr)->image_type), &(src_ptr->image_type)); \
ZB_HTOLE32(&((data_ptr)->file_version), &(src_ptr->file_version)); \
ZB_HTOLE32(&((data_ptr)->current_time), &(src_ptr->current_time)); \
ZB_HTOLE32(&((data_ptr)->upgrade_time), &(src_ptr->upgrade_time)); \
} \
}

Macro for getting Upgrade End Response command, see ZCL8 specification, subsection 11.13.9.6.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_ota_upgrade_upgrade_end_res_s.
buffercontaining the packet (by pointer).
status_- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_OTA_UPGRADE_INSERT_FILE

#define ZB_ZCL_OTA_UPGRADE_INSERT_FILE (   buf,
  ep,
  i,
  file,
  upgrade_tm,
  notify,
  ret_code 
)
Value:
{ \
zb_zcl_ota_upgrade_server_insert_file_t *file_data = \
ZB_BUF_GET_PARAM(buf, zb_zcl_ota_upgrade_server_insert_file_t); \
file_data->endpoint = (ep); \
file_data->index = (i); \
file_data->ota_file = (file); \
file_data->upgrade_time = (upgrade_tm); \
file_data->notify_on = (notify); \
(ret_code) = zb_zcl_ota_upgrade_insert_file(buf); \
}

◆ ZB_ZCL_OTA_UPGRADE_REMOVE_FILE

#define ZB_ZCL_OTA_UPGRADE_REMOVE_FILE (   buf,
  ep,
  i,
  ret_code 
)
Value:
{ \
zb_zcl_ota_upgrade_server_remove_file_t *file_data = \
ZB_BUF_GET_PARAM(buf, zb_zcl_ota_upgrade_server_remove_file_t); \
file_data->endpoint = (ep); \
file_data->index = (i); \
(ret_code) = zb_zcl_ota_upgrade_remove_file(buf); \
}

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_ABORT_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_ABORT_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, ZB_ZCL_STATUS_ABORT); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Image Block Response command - abort status, see ZCL8 specification, subsection 11.13.8.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  fc,
  manufacturer,
  image_type,
  file_version,
  file_offset,
  data_size_max,
  node_addr,
  block_delay,
  current_delay 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (fc)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (file_offset)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (data_size_max)); \
{ \
ZB_ZCL_PACKET_PUT_DATA_IEEE(ptr, (node_addr)); \
} \
{ \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (block_delay)); \
} \
ZB_ZCL_FINISH_PACKET_O((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT_SCHEDULE( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
current_delay); \
}

Send "Image Block Request" command, see ZCL8 specification, subsection 11.13.6.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
fc- Field Control, see zb_zcl_ota_upgrade_image_block_fc_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
file_offset- File offset
data_size_max- Maximum data size
node_addr- Request node address
block_delay- BlockRequestDelay
current_delay- Delay current send (millisec)

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_SUCCESS_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_SUCCESS_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq,
  manufacturer,
  image_type,
  file_version,
  file_offset,
  data_size,
  image_data 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, ZB_ZCL_STATUS_SUCCESS); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (file_offset)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (data_size)); \
ZB_ASSERT(image_data != NULL); \
ZB_ZCL_PACKET_PUT_DATA_N(ptr, (image_data), (data_size)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Image Block Response command - success status, see ZCL8 specification, subsection 11.13.8.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
file_offset- File offset
data_size- data size
image_data- image data

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_WAIT_FOR_DATA_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_WAIT_FOR_DATA_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq,
  current_time,
  request_time,
  delay 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, ZB_ZCL_STATUS_WAIT_FOR_DATA); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (current_time), (request_time)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (delay)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Image Block Response command - wait for data status, see ZCL8 specification, subsection 11.13.8.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence
current_time- Current time
request_time- Request time
delay- BlockRequestDelay

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_NOTIFY_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_NOTIFY_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  payload_type,
  query_jitter,
  manufacturer,
  image_type,
  file_version 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL_A( \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (payload_type)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (query_jitter)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (file_version)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Image Notify command, see ZCL8 specification, subsection 11.13.3.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
payload_type- Payload type
query_jitter- Query jitter
manufacturer- Manufacturer code
image_type- Image type
file_version- File version

◆ ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_PAGE_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_PAGE_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  fc,
  manufacturer,
  image_type,
  file_version,
  file_offset,
  data_size_max,
  page_size,
  response_spacing,
  node_addr 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (fc)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (file_offset)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (data_size_max)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (page_size), (response_spacing)); \
{ \
ZB_ZCL_PACKET_PUT_DATA_IEEE(ptr, (node_addr)); \
} \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Image Page Request" command, see ZCL8 specification, subsection 11.13.7.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
fc- Field Control, see zb_zcl_ota_upgrade_image_page_fc_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
file_offset- File offset
data_size_max- Maximum data size
page_size- Page size
response_spacing- Response Spacing
node_addr- Request node address

◆ ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  fc,
  manufacturer,
  image_type,
  file_version,
  hw_version,
  aps_secured 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (fc)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (file_version)); \
{ \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (hw_version)); \
} \
ZB_ZCL_FINISH_N_SEND_PACKET_NEW((buffer), ptr, addr, dst_addr_mode, \
dst_ep, ep, prfl_id, ZB_ZCL_CLUSTER_ID_OTA_UPGRADE, cb, aps_secured, \
ZB_FALSE, 0); \
}

Send "Query Next Image Request" command, see ZCL8 specification, subsection 11.13.4.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
fc- Field Control, see zb_zcl_ota_upgrade_image_notify_payload_type_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
hw_version- Hardware version
aps_secured- APS security

◆ ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_NEXT_IMAGE_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq,
  status,
  manufacturer,
  image_type,
  file_version,
  image_size 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
if( (status) == ZB_ZCL_STATUS_SUCCESS) \
{ \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (image_size)); \
} \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Query Next Image Response command, see ZCL8 specification, subsection 11.13.5.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence
status- Status, see zcl_status
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
image_size- Image size

◆ ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  node_addr,
  manufacturer,
  image_type,
  file_version,
  stack_version 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA_IEEE(ptr, (node_addr)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (file_version)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (stack_version)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Query Specific File Request" command, see ZCL8 specification, subsection 11.13.10.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
node_addr- Node address
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
stack_version- Zigbee stack version

◆ ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_QUERY_SPECIFIC_FILE_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq,
  status,
  manufacturer,
  image_type,
  file_version,
  image_size 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
if( (status) == ZB_ZCL_STATUS_SUCCESS) \
{ \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (image_size)); \
} \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Query Specific File Response command, see ZCL8 specification, subsection 11.13.11.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence
status- Status, see zcl_status
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
image_size- Image size

◆ ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_REQ

#define ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  status,
  manufacturer,
  image_type,
  file_version 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (file_version)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Upgrade End Request" command, see ZCL8 specification, subsection 11.13.9.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
status- Status, see zcl_status
manufacturer- Manufacturer code
image_type- Image type
file_version- File version

◆ ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_RES

#define ZB_ZCL_OTA_UPGRADE_SEND_UPGRADE_END_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq,
  manufacturer,
  image_type,
  file_version,
  current_time,
  upgrade_time 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, seq, \
ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, (manufacturer), (image_type)); \
ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (file_version), (current_time)); \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (upgrade_time)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send Upgrade End Response command, see ZCL8 specification, subsection 11.13.9.6.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
seq- sequence
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
current_time- Current time
upgrade_time- Upgrade time

Typedef Documentation

◆ zb_zcl_ota_upgrade_file_header_optional_t

Optional parts of the OTA file header See ZCL8 specification, subsection 11.4.2, Table 11-2. OTA Header Fields

◆ zb_zcl_ota_upgrade_image_block_res_t

Structure representation of Image Block Response command payload.

See also
ZCL8 specification, subsection 11.13.8.1

◆ zb_zcl_ota_upgrade_image_block_t

Structure representation of Image Block Request command payload.

See also
ZCL8 specification, subsection 11.13.6.1

◆ zb_zcl_ota_upgrade_image_notify_t

Structure representation of Image Notify response command payload.

See also
ZCL8 specification, subsection 11.13.3.1

◆ zb_zcl_ota_upgrade_image_page_t

Structure representation of Image Page Request command payload.

See also
ZCL8 specification, subsection 11.13.7

◆ zb_zcl_ota_upgrade_next_data_ind_t

typedef zb_ret_t(* zb_zcl_ota_upgrade_next_data_ind_t) (zb_uint8_t index, zb_zcl_parsed_hdr_t *zcl_header, zb_uint32_t offset, zb_uint8_t size, zb_uint8_t **data)

Callback function for send next data portion.

◆ zb_zcl_ota_upgrade_query_next_image_res_t

Structure representation of Query Next Image Response command payload.

See also
ZCL8 specification, subsection 11.13.5.1

◆ zb_zcl_ota_upgrade_query_next_image_t

Structure representation of Query Next Image Request command payload.

See also
ZCL8 specification, subsection 11.13.4

◆ zb_zcl_ota_upgrade_query_specific_file_res_t

Structure representation of Query Specific File Response command payload.

See also
ZCL8 specification, subsection 11.13.11.1

◆ zb_zcl_ota_upgrade_query_specific_file_t

Structure representation of Query Specific File Request command payload.

See also
ZCL8 specification, subsection 11.13.10

◆ zb_zcl_ota_upgrade_upgrade_end_res_t

Structure representation of Upgrade End Response command payload.

See also
ZCL8 specification, subsection 11.13.9.6.1

◆ zb_zcl_ota_upgrade_upgrade_end_t

Structure representation of Upgrade End Request command payload.

See also
ZCL8 specification, subsection 11.13.9

Enumeration Type Documentation

◆ zb_zcl_ota_upgrade_attr_e

OTA Upgrade cluster attribute identifiers.

See also
ZCL8 specification, subsection 11.10, Table 11-10. Attributes of OTA Upgrade Cluster
Enumerator
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID 

UpgradeServerID attribute, ZCL8 specification, subsection 11.10.1.

ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID 

FileOffset attribute, ZCL8 specification, subsection 11.10.2.

ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID 

CurrentFileVersion attribute, ZCL8 specification, subsection 11.10.3.

ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID 

CurrentZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.4.

ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID 

DownloadedFileVersion attribute, ZCL8 specification, subsection 11.10.5.

ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID 

DownloadedZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.6.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID 

ImageUpgradeStatus attribute, ZCL8 specification, subsection 11.10.7.

ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID 

Manufacturer ID attribute, ZCL8 specification, subsection 11.10.8.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID 

Image Type ID attribute, ZCL8 specification, subsection 11.10.9.

ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID 

MinimumBlockPeriod attribute, ZCL8 specification, subsection 11.10.10.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID 

Image Stamp attribute, ZCL8 specification, subsection 11.10.11.

ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_ACTIVATION_POLICY_ID 

This attribute indicates what behavior the client device supports for activating a fully downloaded but not installed upgrade image. See ZCL8 specification, subsection 11.10.12

ZB_ZCL_ATTR_OTA_UPGRADE_UPGRADE_TIMEOUT_POLICY_ID 

This attribute indicates what behavior the client device supports for activating a fully downloaded image when the OTA server cannot be reached. See ZCL8 specification, subsection 11.10.13

ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID 

OTA server endpoint custom attribute.

ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID 

OTA server addr custom attribute.

ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID 

DownloadedFileSize custom attribute.

ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID 

Server variables- see OTA spec 6.8 and Custom data.

◆ zb_zcl_ota_upgrade_cmd_e

OTA Upgrade cluster client to server command identifiers.

See also
ZCL8 spec, Table 11-16
Enumerator
ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_ID 

"Query Next Image Request" command

ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_ID 

"Image Block Request" command

ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_PAGE_ID 

"Image Page Request" command

ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_ID 

"Upgrade End Request" command

ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_ID 

"Query Device Specific File Request" command

◆ zb_zcl_ota_upgrade_file_header_fc_e

OTA File header - fc fields structure.

See also
ZCL8 specification, subsection 11.4.2.4, Table 11-3. OTA Header Field Control Bitmask
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_CREDENTIAL_VER 

Security Credential Version Present.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_DEVICE_SPECIFIC 

Device Specific File.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FC_HW_VER 

Hardware Versions Present.

◆ zb_zcl_ota_upgrade_file_header_image_type_e

OTA File header - Image Type Values.

See also
ZCL8 specification, subsection 11.4.2.6, Table 11-4. Image Type Values
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_MANUF_SPEC_MAX 

Manufacturer Specific - maximum value.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_SECURITY_CRED 

Client Security credentials.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_CONFIG 

Client Configuration.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_LOG 

Server Log.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_WILD_CARD 

Wild card value.

◆ zb_zcl_ota_upgrade_file_header_security_version_e

OTA File header - Security Credential Version.

See also
ZCL8 specification, subsection 11.4.2.11
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_0 

SE 1.0.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_1 

SE 1.1.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE2_0 

SE 2.0.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_SECURITY_VER_SE1_2 

SE 1.2.

◆ zb_zcl_ota_upgrade_file_header_stack_version_e

OTA File header - Zigbee Stack version.

See also
ZCL8 specification, subsection 11.4.2.8
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_2006 

Zigbee 2006.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_2007 

Zigbee 2007.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_PRO 

Zigbee Pro.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_IP 

Zigbee IP.

◆ zb_zcl_ota_upgrade_image_block_fc_e

OTA Image Upgrade Status Attribute Values.

See also
ZCL8 specification, subsection 11.13.6.2.1
Enumerator
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_IEEE_PRESENT 

Request node's IEEE address Present.

ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_DELAY_PRESENT 

BlockRequestDelay present.

◆ zb_zcl_ota_upgrade_image_notify_payload_type_e

OTA Image Upgrade Status Attribute Values.

See also
ZCL8 specification, subsection 11.13.3.2.1
Enumerator
ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER 

Query jitter.

ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE 

Query jitter and manufacturer code.

ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE_IMAGE 

Query jitter, manufacturer code, and image type.

ZB_ZCL_OTA_UPGRADE_IMAGE_NOTIFY_PAYLOAD_JITTER_CODE_IMAGE_VER 

Query jitter, manufacturer code, image type, and new file version.

◆ zb_zcl_ota_upgrade_image_page_fc_e

OTA Image Upgrade Status Attribute Values.

See also
ZCL8 specification, subsection 11.13.7.2.1
Enumerator
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_PAGE_IEEE_PRESENT 

Request node's IEEE address Present.

◆ zb_zcl_ota_upgrade_image_status_e

OTA Image Upgrade Status Attribute Values.

See also
ZCL8 specification, subsection 11.10.7
Enumerator
ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_NORMAL 

Normal.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DOWNLOADING 

Download in progress.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DOWNLOADED 

Download complete.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAITING_UPGRADE 

Waiting to upgrade.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_COUNT_DOWN 

Count down.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAIT_FOR_MORE 

Wait for more.

ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_WAIT_TO_UPGRADE_VIA_EXT_EVENT 

Waiting to Upgrade via External Event.

◆ zb_zcl_ota_upgrade_query_next_image_fc_e

OTA Image Upgrade Status Attribute Values.

See also
ZCL8 specification, subsection 11.13.4.2.1
Enumerator
ZB_ZCL_OTA_UPGRADE_QUERY_NEXT_IMAGE_HW_VERSION 

Hardware Version Present.

◆ zb_zcl_ota_upgrade_resp_cmd_e

OTA Upgrade cluster server to client command identifiers.

See also
ZCL8 spec, Table 11-16
Enumerator
ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_NOTIFY_ID 

"Image Notify" command

ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_RESP_ID 

"Query Next Image Response" command

ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_RESP_ID 

"Image Block Response" command

ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_RESP_ID 

"Upgrade End Response" command

ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_RESP_ID 

"Query Device Specific File Response" command

ZB_ZCL_CMD_OTA_UPGRADE_INTERNAL_ABORT_ID 

ZBOSS internal command

◆ zb_zcl_ota_upgrade_sub_element_tags_e

OTA File header - Tag Identifiers.

See also
ZCL8 specification, subsection 11.4.4
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_TAG_UPGRADE_IMAGE 

Upgrade Image.

ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA 

ECDSA Signature (Crypto Suite 1)

ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_CERT 

ECDSA Signature Certificate (Crypto Suite 1)

ZB_ZCL_OTA_UPGRADE_FILE_TAG_IMAGE_INTEGRITY_CODE 

Image Integrity Code.

ZB_ZCL_OTA_UPGRADE_FILE_TAG_PICTURE_DATA 

Picture Data.

ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_V_2 

ECDSA Signature (Crypto Suite 2)

ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_CERT_V_2 

ECDSA Signature Certificate (Crypto Suite 2)

ZB_ZCL_OTA_UPGRADE_FILE_TAG_MANUF_MIN 

Manufacturer Specific Use - minimum.

ZB_ZCL_OTA_UPGRADE_FILE_TAG_MANUF_MAX 

Manufacturer Specific Use - maximum.

Function Documentation

◆ zb_zcl_ota_upgrade_file_upgraded()

void zb_zcl_ota_upgrade_file_upgraded ( zb_uint8_t  endpoint)

Clear attribute after upgrade.

Parameters
endpoint- endpoint
Note
After calling this command OTA file may be removed from memory

◆ zb_zcl_ota_upgrade_init_client()

void zb_zcl_ota_upgrade_init_client ( zb_uint8_t  param)

Initialize OTA Upgrade cluster - client part For server clear custom data For client initiate search Upgrade server.

Parameters
param- empty buffer

◆ zb_zcl_ota_upgrade_init_server()

void zb_zcl_ota_upgrade_init_server ( zb_uint8_t  endpoint,
zb_zcl_ota_upgrade_next_data_ind_t  next_data_ind_cb 
)

Initialize OTA Upgrade cluster - server part For server clear custom data and registry next data indication.

Parameters
endpoint- destination endpoint
next_data_ind_cb- callback to be called on received image block For client initiate search Upgrade server

◆ zb_zcl_ota_upgrade_insert_file()

zb_ret_t zb_zcl_ota_upgrade_insert_file ( zb_uint8_t  param)

Insert upgrade OTA file into Server upgrade table.

Parameters
param- buffer with zb_zcl_ota_upgrade_server_insert_file_s structure
Note
Takes buffer ownership.
OTA file must be saved in memory until call zb_zcl_ota_upgrade_remove_file

◆ zb_zcl_ota_upgrade_remove_file()

zb_ret_t zb_zcl_ota_upgrade_remove_file ( zb_uint8_t  param)

Remove upgrade file from Server upgrade table.

Parameters
param- buffer with zb_zcl_ota_upgrade_server_remove_file_s structure
Note
Takes buffer ownership.
After calling this command OTA file may be removed from memory

◆ zb_zcl_ota_upgrade_resume_client()

void zb_zcl_ota_upgrade_resume_client ( zb_uint8_t  param,
zb_uint8_t  upgrade_status 
)

Resume process OTA Upgrade if it was previously suspended by the application.

Parameters
param- buffer to be resumed
upgrade_status- application upgrade status
See also
zb_zcl_ota_upgrade_status_e

◆ zb_zcl_ota_upgrade_set_query_interval()

void zb_zcl_ota_upgrade_set_query_interval ( zb_uint8_t  endpoint,
zb_uint16_t  interval 
)

Set Frequency request server about new upgrade file (minutes)

Parameters
endpoint- endpoint of the OTA cluster
interval- new interval value (in minutes)

◆ zb_zcl_ota_upgrade_start_client()

zb_ret_t zb_zcl_ota_upgrade_start_client ( zb_uint8_t  server_ep,
zb_uint16_t  server_addr 
)

Start OTA Upgrade client with pre-defined OTA Upgrade Server attributes (without Service Discovery)

Parameters
server_ep- OTA Upgrade server endpoint
server_addr- OTA Upgrade server short address
Returns
RET_OK on success or RET_ERROR on error

◆ zcl_ota_abort()

void zcl_ota_abort ( zb_uint8_t  endpoint,
zb_uint8_t  param 
)

Abort OTA Upgrade process.

Parameters
endpoint- endpoint for OTA Upgrade
param- buffer to be aborted
ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_RESP_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_RESP_ID
Definition: zb_zcl_ota_upgrade.h:857
zb_zcl_ota_upgrade_server_remove_file_s
Structure representation of Data for insert OTA file to upgrade mechanism.
Definition: zb_zcl_ota_upgrade.h:373
ZB_ZCL_START_PACKET
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1518
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
zb_zcl_ota_upgrade_client_variable_s
Structure representation of client side variables.
Definition: zb_zcl_ota_upgrade.h:521
ZB_ZCL_OTA_UPGRADE_QUERY_NEXT_IMAGE_HW_VERSION
@ ZB_ZCL_OTA_UPGRADE_QUERY_NEXT_IMAGE_HW_VERSION
Hardware Version Present.
Definition: zb_zcl_ota_upgrade.h:911
ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_RESP_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_RESP_ID
Definition: zb_zcl_ota_upgrade.h:856
zb_zcl_ota_upgrade_data_s
Structure representation of OTA file on server side.
Definition: zb_zcl_ota_upgrade.h:400
zb_zcl_ota_upgrade_remove_file
zb_ret_t zb_zcl_ota_upgrade_remove_file(zb_uint8_t param)
Remove upgrade file from Server upgrade table.
ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID
Manufacturer ID attribute, ZCL8 specification, subsection 11.10.8.
Definition: zb_zcl_ota_upgrade.h:555
ZB_ZCL_FRAME_DIRECTION_TO_CLI
#define ZB_ZCL_FRAME_DIRECTION_TO_CLI
Definition: zb_zcl_common.h:1038
ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID
MinimumBlockPeriod attribute, ZCL8 specification, subsection 11.10.10.
Definition: zb_zcl_ota_upgrade.h:559
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_DELAY_PRESENT
@ ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_DELAY_PRESENT
BlockRequestDelay present.
Definition: zb_zcl_ota_upgrade.h:1017
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1438
zb_zcl_ota_upgrade_upgrade_end_s
Structure representation of Upgrade End Request command payload.
Definition: zb_zcl_ota_upgrade.h:1216
ZB_ZCL_NOT_MANUFACTURER_SPECIFIC
#define ZB_ZCL_NOT_MANUFACTURER_SPECIFIC
Definition: zb_zcl_common.h:991
ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID
FileOffset attribute, ZCL8 specification, subsection 11.10.2.
Definition: zb_zcl_ota_upgrade.h:543
ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID
CurrentZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.4.
Definition: zb_zcl_ota_upgrade.h:547
zb_zcl_ota_upgrade_query_next_image_res_s
Structure representation of Query Next Image Response command payload.
Definition: zb_zcl_ota_upgrade.h:1458
zb_zcl_ota_upgrade_server_insert_file_s
Structure representation of Data for insert OTA file to upgrade mechanism.
Definition: zb_zcl_ota_upgrade.h:339
ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID
ImageUpgradeStatus attribute, ZCL8 specification, subsection 11.10.7.
Definition: zb_zcl_ota_upgrade.h:553
ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_RESP_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_RESP_ID
Definition: zb_zcl_ota_upgrade.h:859
ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_QUERY_NEXT_IMAGE_ID
Definition: zb_zcl_ota_upgrade.h:843
zb_zcl_ota_upgrade_image_notify_s
Structure representation of Image Notify response command payload.
Definition: zb_zcl_ota_upgrade.h:1360
ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_QUERY_SPECIFIC_FILE_ID
Definition: zb_zcl_ota_upgrade.h:847
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID
UpgradeServerID attribute, ZCL8 specification, subsection 11.10.1.
Definition: zb_zcl_ota_upgrade.h:541
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:343
zb_zcl_ota_upgrade_upgrade_end_res_s
Structure representation of Upgrade End Response command payload.
Definition: zb_zcl_ota_upgrade.h:1719
ZB_ZCL_STATUS_ABORT
#define ZB_ZCL_STATUS_ABORT
Definition: zb_zcl_common.h:374
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_IEEE_PRESENT
@ ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_BLOCK_IEEE_PRESENT
Request node's IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:1015
zb_ieee_addr_t
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:554
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ADDR_ID
OTA server addr custom attribute.
Definition: zb_zcl_ota_upgrade.h:575
ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID
Image Stamp attribute, ZCL8 specification, subsection 11.10.11.
Definition: zb_zcl_ota_upgrade.h:561
ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_BLOCK_ID
Definition: zb_zcl_ota_upgrade.h:844
ZB_ZCL_PARSE_STATUS_SUCCESS
@ ZB_ZCL_PARSE_STATUS_SUCCESS
Definition: zb_zcl_common.h:328
ZB_ZCL_STATUS_WAIT_FOR_DATA
#define ZB_ZCL_STATUS_WAIT_FOR_DATA
Definition: zb_zcl_common.h:376
ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID
CurrentFileVersion attribute, ZCL8 specification, subsection 11.10.3.
Definition: zb_zcl_ota_upgrade.h:545
ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_CLIENT_DATA_ID
DownloadedFileSize custom attribute.
Definition: zb_zcl_ota_upgrade.h:577
zb_zcl_ota_upgrade_insert_file
zb_ret_t zb_zcl_ota_upgrade_insert_file(zb_uint8_t param)
Insert upgrade OTA file into Server upgrade table.
ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID
DownloadedFileVersion attribute, ZCL8 specification, subsection 11.10.5.
Definition: zb_zcl_ota_upgrade.h:549
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID
Server variables- see OTA spec 6.8 and Custom data.
Definition: zb_zcl_ota_upgrade.h:580
zb_zcl_ota_upgrade_query_specific_file_res_s
Structure representation of Query Specific File Response command payload.
Definition: zb_zcl_ota_upgrade.h:1792
ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_PAGE_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_PAGE_ID
Definition: zb_zcl_ota_upgrade.h:845
zb_uint16_t
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:157
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_PAGE_IEEE_PRESENT
@ ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_PAGE_IEEE_PRESENT
Request node's IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:1131
ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID
DownloadedZigbeeStackVersion attribute, ZCL8 specification, subsection 11.10.6.
Definition: zb_zcl_ota_upgrade.h:551
zb_zcl_ota_upgrade_image_page_s
Structure representation of Image Page Request command payload.
Definition: zb_zcl_ota_upgrade.h:1110
ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_ID
Definition: zb_zcl_ota_upgrade.h:846
zb_zcl_ota_upgrade_image_block_s
Structure representation of Image Block Request command payload.
Definition: zb_zcl_ota_upgrade.h:995
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ENDPOINT_ID
OTA server endpoint custom attribute.
Definition: zb_zcl_ota_upgrade.h:573
ZB_ZCL_CLUSTER_ID_OTA_UPGRADE
#define ZB_ZCL_CLUSTER_ID_OTA_UPGRADE
Definition: zb_zcl_common.h:228
ZB_ZCL_STATUS_SUCCESS
#define ZB_ZCL_STATUS_SUCCESS
Definition: zb_zcl_common.h:346
ZB_ZCL_PARSE_STATUS_FAILURE
@ ZB_ZCL_PARSE_STATUS_FAILURE
Definition: zb_zcl_common.h:329
ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_NOTIFY_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_IMAGE_NOTIFY_ID
Definition: zb_zcl_ota_upgrade.h:855
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:374
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:361
ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_RESP_ID
@ ZB_ZCL_CMD_OTA_UPGRADE_UPGRADE_END_RESP_ID
Definition: zb_zcl_ota_upgrade.h:858
zb_zcl_ota_upgrade_query_specific_file_s
Structure representation of Query Specific File Request command payload.
Definition: zb_zcl_ota_upgrade.h:1286
ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID
@ ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID
Image Type ID attribute, ZCL8 specification, subsection 11.10.9.
Definition: zb_zcl_ota_upgrade.h:557