nRF5 SDK for Thread and Zigbee v4.1.0
Data Structures | Typedefs | Enumerations | Functions
ZCL OTA Upgrade cluster

Data Structures

struct  zb_zcl_ota_upgrade_file_header_s
 Structure representsation of OTA File Header, see OTA spec 6.3.2. More...
 
struct  zb_zcl_ota_upgrade_file_header_optional_s
 
struct  zb_zcl_ota_upgrade_sub_element_s
 Structure representsation of OTA File Sub-element, see OTA spec 6.3.3. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_s
 Structure representsation of OTA ECDSA Signature, see OTA spec 6.3.5. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_signing_s
 Structure representsation of OTA ECDSA Signature, see OTA spec 6.3.6. More...
 
struct  zb_zcl_ota_upgrade_ecdsa_certificate_s
 Structure representsation of OTA ECDSA Certificate, see OTA spec 6.3.7. More...
 
struct  zb_zcl_ota_upgrade_server_insert_file_s
 Structure representsation of Data for insert OTA file to upgrade mechanism. More...
 
struct  zb_zcl_ota_upgrade_server_remove_file_s
 Structure representsation of Data for insert OTA file to upgrade mechanism. More...
 
struct  zb_zcl_ota_upgrade_data_s
 Structure representsation of OTA file on server side. More...
 
struct  zb_zcl_ota_upgrade_server_variable_s
 Structure representsation 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 representsation of client side variables. More...
 
struct  zb_zcl_ota_upgrade_query_next_image_s
 Structure representsation of Query Next Image Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_block_s
 Structure representsation of Image Block Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_page_s
 Structure representsation of Image Page Request command payload. More...
 
struct  zb_zcl_ota_upgrade_upgrade_end_s
 Structure representsation of Upgrade End Request command payload. More...
 
struct  zb_zcl_ota_upgrade_query_specific_file_s
 Structure representsation of Query Specific File Request command payload. More...
 
struct  zb_zcl_ota_upgrade_image_notify_s
 Structure representsation of Image Notify response command payload. More...
 
struct  zb_zcl_ota_upgrade_query_next_image_res_s
 Structure representsation of Query Next Image Response command payload. More...
 
struct  zb_zcl_ota_upgrade_image_block_res_s
 Structure representsation of Image Block Response command payload. More...
 
struct  zb_zcl_ota_upgrade_upgrade_end_res_s
 Structure representsation of Upgrade End Response command payload. More...
 
struct  zb_zcl_ota_upgrade_query_specific_file_res_s
 Structure representsation 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)
 
zb_void_t 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 }
 OTA File header - Security Credential Version. More...
 
typedef struct
zb_zcl_ota_upgrade_file_header_s 
zb_zcl_ota_upgrade_file_header_t
 Structure representsation of OTA File Header, see OTA spec 6.3.2.
 
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 spec 6.3.2.1.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HEADER_FILE_VERSION   0x0100
 Default OTA Upgrade File Version, see spec 6.3.2.2.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_HEADER_MANUFACTURE_CODE_WILD_CARD   0xffff
 Special Manufacturer Code, see spec 6.3.2.5.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_APP_RELEASE(ver)   (((ver) >>24) & 0xff)
 OTA Upgrade File Version, App release, see spec 6.3.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_APP_BUILD(ver)   (((ver) >>16) & 0xff)
 OTA Upgrade File Version, App build, see spec 6.3.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_STACK_RELEASE(ver)   (((ver) >>8) & 0xff)
 OTA Upgrade File Version, Stack release, see spec 6.3.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_STACK_BUILD(ver)   ((ver) & 0xff)
 OTA Upgrade File Version, Stack build, see spec 6.3.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 verston, see spec 6.3.2.7.
 
#define ZB_ZCL_OTA_UPGRADE_VERSION_CMP(ver1, ver2)   ( (ver1) != (ver2) )
 Compare 2 OTA versions and deside 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 spec 6.3.2.13.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_GET_HW_REVISION(ver)   ((ver) & 0xff)
 OTA Upgrade HW Version Get Revision, see spec 6.3.2.13.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_MAKE_HW_VERSION(ver, rev)   ((ver) << 8 | (rev))
 OTA Upgrade Make HW Version, see spec 6.3.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-elementformat

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_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 representsation of OTA File Sub-element, see OTA spec 6.3.3.
 
typedef struct
zb_zcl_ota_upgrade_ecdsa_s 
zb_zcl_ota_upgrade_ecdsa_t
 Structure representsation of OTA ECDSA Signature, see OTA spec 6.3.5.
 
typedef struct
zb_zcl_ota_upgrade_ecdsa_signing_s 
zb_zcl_ota_upgrade_ecdsa_signing_t
 Structure representsation 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 representsation of OTA ECDSA Certificate, see OTA spec 6.3.7.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_TAG_ID   0x0001
 Special Manufacturer Code, see spec 6.3.5.
 
#define ZB_ZCL_OTA_UPGRADE_ECDSA_LENGTH   0x00000032
 Special Manufacturer Code, see spec 6.3.5.
 
#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
}
 OTA Image Upgrade Status Attribute Values. More...
 
typedef zb_uint8_t *(* zb_zcl_ota_upgrade_next_data_ind_t )(zb_uint8_t index, zb_uint32_t offset, zb_uint8_t size)
 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 representsation 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 representsation of Data for insert OTA file to upgrade mechanism.
 
typedef struct
zb_zcl_ota_upgrade_data_s 
zb_zcl_ota_upgrade_data_t
 Structure representsation of OTA file on server side.
 
typedef struct
zb_zcl_ota_upgrade_server_variable_s 
zb_zcl_ota_upgrade_server_variable_t
 Structure representsation 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 representsation of client side variables.
 
zb_void_t 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...
 
zb_void_t 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...
 
zb_void_t zb_zcl_ota_upgrade_stop_client (void)
 Stop process OTA Upgrade / OTA query new images Client stop schedule OTA command & clear OTA status.
 
zb_void_t 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...
 
zb_void_t zb_zcl_ota_upgrade_set_query_interval (zb_uint8_t endpoint, zb_uint16_t interval)
 Set Freqency request server about new upgrade file (minutes) More...
 
zb_void_t zb_zcl_ota_upgrade_file_upgraded (zb_uint8_t endpoint)
 Clear attribute after upgrade. More...
 
#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, OTA spec 6.7.1.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_OFFSET_DEF_VALUE   0xffffffff
 Default value for FileOffset attribute, OTA spec 6.7.2.
 
#define ZB_ZCL_OTA_UPGRADE_FILE_VERSION_DEF_VALUE   0xffffffff
 Default value for CurrentFileVersion attribute, OTA spec 6.7.3.
 
#define ZB_ZCL_OTA_UPGRADE_STACK_VERSION_DEF_VALUE   0xffff
 Default value for CurrentZigbeeStackVersion attribute, OTA spec 6.7.4.
 
#define ZB_ZCL_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_DEF_VALUE   0xffffffff
 Default value for DownloadedFileVersion attribute, OTA spec 6.7.5.
 
#define ZB_ZCL_OTA_UPGRADE_DOWNLOADED_STACK_DEF_VALUE   0xffff
 Default value for DownloadedZigbeeStackVersion attribute, OTA spec 6.7.6.
 
#define ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DEF_VALUE   0x00
 Default value for ImageUpgradeStatus attribute, OTA spec 6.7.7.
 
#define ZB_ZCL_OTA_UPGRADE_IMAGE_STAMP_MIN_VALUE   0x0256
 Maximum value for MinimumBlockReque attribute, OTA spec 6.7.11.
 
#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 Freqency 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 representsation 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 representsation of Image Block Request command payload. More...
 
typedef struct
zb_zcl_ota_upgrade_image_page_s 
zb_zcl_ota_upgrade_image_page_t
 Structure representsation of Image Page Request command payload. More...
 
typedef struct
zb_zcl_ota_upgrade_upgrade_end_s 
zb_zcl_ota_upgrade_upgrade_end_t
 Structure representsation 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 representsation 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 representsation 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 representsation 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 representsation 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 representsation 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 representsation 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 OTA spec 6.10.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 OTA spec 6.10.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 OTA spec 6.10.6. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_REQ(data_ptr, buffer, status)
 Macro for getting "Image Block Request" command, see OTA spec 6.10.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 OTA spec 6.10.7. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_PAGE_REQ(data_ptr, buffer, status)
 Macro for getting "Image Page Request" command, see OTA spec 6.10.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)
 OTA Image Upgrade Status Attribute Values. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_REQ(data_ptr, buffer, status_)
 Macro for getting "Upgrade End Request" command, see OTA spec 6.10.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 OTA spec 6.10.11. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_REQ(data_ptr, buffer, status)
 Macro for getting "Query Specific File Request" command, see OTA spec 6.10.11. 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 OTA spec 6.10.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 OTA spec 6.10.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 OTA spec 6.10.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 OTA spec 6.10.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 OTA spec 6.10.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 OTA spec 6.10.8. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_RES(data_ptr, buffer, status_)
 Macro for getting Image Block Response command, see OTA spec 6.10.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 OTA spec 6.10.10. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_RES(data_ptr, buffer, status_)
 Macro for getting Upgrade End Response command, see OTA spec 6.10.10. 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 OTA spec 6.10.12. More...
 
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_RES(data_ptr, buffer, status_)
 Macro for getting Query Specific File Response command, see OTA spec 6.10.12. More...
 

Detailed Description

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

Macro Definition Documentation

#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(attr_list) \
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
CurrentZigbeeStackVersion attribute, OTA spec 6.7.4.
Definition: zb_zcl_ota_upgrade.h:535
UpgradeServerID attribute, OTA spec 6.7.1.
Definition: zb_zcl_ota_upgrade.h:529
DownloadedZigbeeStackVersion attribute, OTA spec 6.7.6.
Definition: zb_zcl_ota_upgrade.h:539
OTA server endpoint custom attribute.
Definition: zb_zcl_ota_upgrade.h:559
ImageUpgradeStatus attribute, OTA spec 6.7.7.
Definition: zb_zcl_ota_upgrade.h:541
OTA server addr custom attribute.
Definition: zb_zcl_ota_upgrade.h:561
FileOffset attribute, OTA spec 6.7.2.
Definition: zb_zcl_ota_upgrade.h:531
Image Stamp attribute, OTA spec 6.7.11.
Definition: zb_zcl_ota_upgrade.h:549
Structure representsation of client side variables.
Definition: zb_zcl_ota_upgrade.h:509
MinimumBlockReque attribute, OTA spec 6.7.10.
Definition: zb_zcl_ota_upgrade.h:547
DownloadedFileVersion attribute, OTA spec 6.7.5.
Definition: zb_zcl_ota_upgrade.h:537
Manufacturer ID attribute, OTA spec 6.7.8.
Definition: zb_zcl_ota_upgrade.h:543
DownloadedFileSize custom attribute.
Definition: zb_zcl_ota_upgrade.h:563
CurrentFileVersion attribute, OTA spec 6.7.3.
Definition: zb_zcl_ota_upgrade.h:533
Image Type ID attribute, OTA spec 6.7.9.
Definition: zb_zcl_ota_upgrade.h:545

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
#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(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_DATA_ID, &(server_var_##attr_list)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST
Server variables- see OTA spec 6.8 and Custom data.
Definition: zb_zcl_ota_upgrade.h:566
struct zb_zcl_ota_upgrade_server_variable_s zb_zcl_ota_upgrade_server_variable_t
Structure representsation of server side variables.
Structure representsation of OTA file on server side.
Definition: zb_zcl_ota_upgrade.h:389

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
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
\
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)); \
} \
} \
}
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:471
Definition: zb_zcl_common.h:325
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:132
Request node’s IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:998
Structure representsation of Image Block Request command payload.
Definition: zb_zcl_ota_upgrade.h:978
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
BlockRequestDelay present.
Definition: zb_zcl_ota_upgrade.h:1000
struct zb_zcl_ota_upgrade_image_block_s zb_zcl_ota_upgrade_image_block_t
Structure representsation of Image Block Request command payload.
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting "Image Block Request" command, see OTA spec 6.10.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).
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_BLOCK_RES (   data_ptr,
  buffer,
  status_ 
)

Macro for getting Image Block Response command, see OTA spec 6.10.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!
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_NOTIFY_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
if (zb_buf_len((buffer)) <= sizeof(zb_uint8_t)) \
{ \
} \
else \
{ \
(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; \
} \
} \
}
Definition: zb_zcl_common.h:325
struct zb_zcl_ota_upgrade_image_notify_s zb_zcl_ota_upgrade_image_notify_t
Structure representsation of Image Notify response command payload.
Structure representsation of Image Notify response command payload.
Definition: zb_zcl_ota_upgrade.h:1346
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388
#define ZB_ZCL_OTA_UPGRADE_GET_IMAGE_PAGE_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
\
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); \
} \
} \
}
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:471
Definition: zb_zcl_common.h:325
Definition: zb_zcl_common.h:324
Request node's IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:1114
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
Structure representsation of Image Page Request command payload.
Definition: zb_zcl_ota_upgrade.h:1093
struct zb_zcl_ota_upgrade_image_page_s zb_zcl_ota_upgrade_image_page_t
Structure representsation of Image Page Request command payload.
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting "Image Page Request" command, see OTA spec 6.10.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).
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_REQ (   data_ptr,
  buffer,
  status 
)

Macro for getting "Query Next Image Request" command, see OTA spec 6.10.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).
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_NEXT_IMAGE_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
\
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)); \
} \
} \
}
Definition: zb_zcl_common.h:341
Definition: zb_zcl_common.h:325
Structure representsation of Query Next Image Response command payload.
Definition: zb_zcl_ota_upgrade.h:1444
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
struct zb_zcl_ota_upgrade_query_next_image_res_s zb_zcl_ota_upgrade_query_next_image_res_t
Structure representsation of Query Next Image Response command payload.
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting Query Next Image Response command, see OTA spec 6.10.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).
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
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)); \
} \
}
Structure representsation of Query Specific File Request command payload.
Definition: zb_zcl_ota_upgrade.h:1272
Definition: zb_zcl_common.h:325
struct zb_zcl_ota_upgrade_query_specific_file_s zb_zcl_ota_upgrade_query_specific_file_t
Structure representsation of Query Specific File Request command payload.
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting "Query Specific File Request" command, see OTA spec 6.10.11.

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).
#define ZB_ZCL_OTA_UPGRADE_GET_QUERY_SPECIFIC_FILE_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
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)); \
} \
} \
}
Definition: zb_zcl_common.h:341
Definition: zb_zcl_common.h:325
Structure representsation of Query Specific File Response command payload.
Definition: zb_zcl_ota_upgrade.h:1776
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
struct zb_zcl_ota_upgrade_query_specific_file_res_s zb_zcl_ota_upgrade_query_specific_file_res_t
Structure representsation of Query Specific File Response command payload.
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting Query Specific File Response command, see OTA spec 6.10.12.

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).
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_REQ (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
\
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)); \
} \
}
Definition: zb_zcl_common.h:325
struct zb_zcl_ota_upgrade_upgrade_end_s zb_zcl_ota_upgrade_upgrade_end_t
Structure representsation of Upgrade End Request command payload.
Structure representsation of Upgrade End Request command payload.
Definition: zb_zcl_ota_upgrade.h:1199
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388

Macro for getting "Upgrade End Request" command, see OTA spec 6.10.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).
#define ZB_ZCL_OTA_UPGRADE_GET_UPGRADE_END_RES (   data_ptr,
  buffer,
  status_ 
)
Value:
{ \
if (zb_buf_len((buffer)) != sizeof(zb_zcl_ota_upgrade_upgrade_end_res_t) ) \
{ \
} \
else \
{ \
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)); \
} \
}
Definition: zb_zcl_common.h:325
Definition: zb_zcl_common.h:324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:341
Structure representsation of Upgrade End Response command payload.
Definition: zb_zcl_ota_upgrade.h:1704
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:388
struct zb_zcl_ota_upgrade_upgrade_end_res_s zb_zcl_ota_upgrade_upgrade_end_res_t
Structure representsation of Upgrade End Response command payload.

Macro for getting Upgrade End Response command, see OTA spec 6.10.10.

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).
#define ZB_ZCL_OTA_UPGRADE_INSERT_FILE (   buf,
  ep,
  i,
  file,
  upgrade_tm,
  notify,
  ret_code 
)
Value:
{ \
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_ret_t zb_zcl_ota_upgrade_insert_file(zb_uint8_t param)
Insert upgrade OTA file into Server upgrade table.
struct zb_zcl_ota_upgrade_server_insert_file_s zb_zcl_ota_upgrade_server_insert_file_t
Structure representsation of Data for insert OTA file to upgrade mechanism.
Structure representsation of Data for insert OTA file to upgrade mechanism.
Definition: zb_zcl_ota_upgrade.h:332
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:478
#define ZB_ZCL_OTA_UPGRADE_REMOVE_FILE (   buf,
  ep,
  i,
  ret_code 
)
Value:
{ \
file_data->endpoint = (ep); \
file_data->index = (i); \
(ret_code) = zb_zcl_ota_upgrade_remove_file(buf); \
}
Structure representsation of Data for insert OTA file to upgrade mechanism.
Definition: zb_zcl_ota_upgrade.h:364
zb_ret_t zb_zcl_ota_upgrade_remove_file(zb_uint8_t param)
Remove upgrade file from Server upgrade table.
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:478
struct zb_zcl_ota_upgrade_server_remove_file_s zb_zcl_ota_upgrade_server_remove_file_t
Structure representsation of Data for insert OTA file to upgrade mechanism.
#define ZB_ZCL_OTA_UPGRADE_SEND_IMAGE_BLOCK_ABORT_RES (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  seq 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}
Definition: zb_zcl_ota_upgrade.h:840
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
Definition: zb_zcl_common.h:363
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206

Send Image Block Response command - abort status, see OTA spec 6.10.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
#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_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); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
Request node’s IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:998
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1389
Definition: zb_zcl_ota_upgrade.h:827
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
BlockRequestDelay present.
Definition: zb_zcl_ota_upgrade.h:1000
#define ZB_ZCL_PACKET_PUT_DATA_IEEE(dst_ptr, src_ptr)
Put IEEE address into packet.
Definition: zb_zcl_common.h:1546
Definition: zb_zcl_common.h:231

Send "Image Block Request" command, see OTA spec 6.10.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)
#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_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, \
}
Definition: zb_zcl_ota_upgrade.h:840
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
Definition: zb_zcl_common.h:341
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
#define ZB_ZCL_PACKET_PUT_DATA_N(ptr, val, n)
Put N byte data to packet.
Definition: zb_zcl_common.h:1555
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206
#define ZB_ASSERT(expr)
Definition: zb_debug.h:75

Send Image Block Response command - success status, see OTA spec 6.10.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
#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_ZCL_PACKET_PUT_2DATA32_VAL(ptr, (current_time), (request_time)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}
Definition: zb_zcl_ota_upgrade.h:840
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1389
Definition: zb_zcl_common.h:366
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206

Send Image Block Response command - wait for data status, see OTA spec 6.10.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
#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_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL_A( \
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, \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
Definition: zb_zcl_common.h:897
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
Standard profile command.
Definition: zb_zcl_common.h:867
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
Definition: zb_zcl_ota_upgrade.h:838
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32-bit value to packet.
Definition: zb_zcl_common.h:1401

Send Image Notify command, see OTA spec 6.10.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
#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_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, \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
Definition: zb_zcl_ota_upgrade.h:828
Request node's IEEE address Present.
Definition: zb_zcl_ota_upgrade.h:1114
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
#define ZB_ZCL_PACKET_PUT_DATA_IEEE(dst_ptr, src_ptr)
Put IEEE address into packet.
Definition: zb_zcl_common.h:1546
Definition: zb_zcl_common.h:231

Send "Image Page Request" command, see OTA spec 6.10.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
#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_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); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
Definition: zb_zcl_ota_upgrade.h:826
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1389
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Hardware Version Present.
Definition: zb_zcl_ota_upgrade.h:894
Definition: zb_zcl_common.h:231
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32-bit value to packet.
Definition: zb_zcl_common.h:1401
Definition: zb_types.h:112

Send "Query Next Image Request" command, see OTA spec 6.10.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
#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_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, \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
Definition: zb_zcl_common.h:341
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
Definition: zb_zcl_ota_upgrade.h:839
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206

Send Query Next Image Response command, see OTA spec 6.10.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 zb_zcl_status_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
image_size- Image size
#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, \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
Definition: zb_zcl_ota_upgrade.h:830
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1389
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
#define ZB_ZCL_PACKET_PUT_DATA_IEEE(dst_ptr, src_ptr)
Put IEEE address into packet.
Definition: zb_zcl_common.h:1546
Definition: zb_zcl_common.h:231
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32-bit value to packet.
Definition: zb_zcl_common.h:1401

Send "Query Specific File Request" command, see OTA spec 6.10.11.

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
#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_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, \
}
Definition: zb_zcl_ota_upgrade.h:842
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
Definition: zb_zcl_common.h:341
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206

Send Query Specific File Response command, see OTA spec 6.10.12.

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 zb_zcl_status_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
image_size- Image size
#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, \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1370
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1262
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
Definition: zb_zcl_ota_upgrade.h:829
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32-bit value to packet.
Definition: zb_zcl_common.h:1401

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.10.9.1.2

Send "Upgrade End Request" command, see OTA spec 6.10.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 zb_zcl_status_e
manufacturer- Manufacturer code
image_type- Image type
file_version- File version
#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_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, \
}
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1344
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1219
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1678
Definition: zb_zcl_ota_upgrade.h:841
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:128
Definition: zb_zcl_common.h:231
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32-bit value to packet.
Definition: zb_zcl_common.h:1401
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1206

Send Upgrade End Response command, see OTA spec 6.10.10.

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

Optional parts of the OTA file header

Structure representsation of Image Block Response command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.8.1

Structure representsation of Image Block Request command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.6.1

Structure representsation of Image Notify response command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.3.1

Structure representsation of Image Page Request command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.7.1
typedef zb_uint8_t*(* zb_zcl_ota_upgrade_next_data_ind_t)(zb_uint8_t index, zb_uint32_t offset, zb_uint8_t size)

Callback function for send next data portion.

Structure representsation of Query Next Image Response command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.5.1

Structure representsation of Query Next Image Request command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.4.1

Structure representsation of Query Specific File Response command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.12.1

Structure representsation of Query Specific File Request command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.11.1

Structure representsation of Upgrade End Response command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.10.1

Structure representsation of Upgrade End Request command payload.

See also
OTA spec, OTA Upgrade Cluster 6.10.9.1

Enumeration Type Documentation

OTA Upgrade cluster attribute identifiers.

See also
OTA spec, OTA Upgrade Cluster 6.7,
Enumerator
ZB_ZCL_ATTR_OTA_UPGRADE_SERVER_ID 

UpgradeServerID attribute, OTA spec 6.7.1.

ZB_ZCL_ATTR_OTA_UPGRADE_FILE_OFFSET_ID 

FileOffset attribute, OTA spec 6.7.2.

ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID 

CurrentFileVersion attribute, OTA spec 6.7.3.

ZB_ZCL_ATTR_OTA_UPGRADE_STACK_VERSION_ID 

CurrentZigbeeStackVersion attribute, OTA spec 6.7.4.

ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_ID 

DownloadedFileVersion attribute, OTA spec 6.7.5.

ZB_ZCL_ATTR_OTA_UPGRADE_DOWNLOADED_STACK_VERSION_ID 

DownloadedZigbeeStackVersion attribute, OTA spec 6.7.6.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STATUS_ID 

ImageUpgradeStatus attribute, OTA spec 6.7.7.

ZB_ZCL_ATTR_OTA_UPGRADE_MANUFACTURE_ID 

Manufacturer ID attribute, OTA spec 6.7.8.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID 

Image Type ID attribute, OTA spec 6.7.9.

ZB_ZCL_ATTR_OTA_UPGRADE_MIN_BLOCK_REQUE_ID 

MinimumBlockReque attribute, OTA spec 6.7.10.

ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_STAMP_ID 

Image Stamp attribute, OTA spec 6.7.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.

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.

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.

OTA Upgrade cluster client to server command identifiers.

See also
OTA spec, OTA Upgrade Cluster, 6.10.1
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 Specific File Request" command

OTA File header - fc fields structure.

See also
OTA spec, OTA Upgrade Cluster 6.3.2.4
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.

OTA File header - Image Type Values.

See also
OTA spec, OTA Upgrade Cluster 6.3.2.6
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_MANUF_SPEC_MAX 

Manufacturer Specific - maximum value.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_SECURITY_CRED 

Security credential.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_CONFIG 

Configuration.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_LOG 

Log.

ZB_ZCL_OTA_UPGRADE_FILE_HEADER_IMAGE_WILD_CARD 

Wild card value.

OTA File header - Security Credential Version.

See also
OTA spec, OTA Upgrade Cluster 6.3.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.

OTA File header - Zigbee Stack version.

See also
OTA spec, OTA Upgrade Cluster 6.3.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.

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.10.6.1.2
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.

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.10.3.2
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.

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.10.7.1.2
Enumerator
ZB_ZCL_OTA_UPGRADE_QUERY_IMAGE_PAGE_IEEE_PRESENT 

Request node's IEEE address Present.

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.7.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.

OTA Image Upgrade Status Attribute Values.

See also
OTA spec, OTA Upgrade Cluster 6.10.4.1.2
Enumerator
ZB_ZCL_OTA_UPGRADE_QUERY_NEXT_IMAGE_HW_VERSION 

Hardware Version Present.

OTA Upgrade cluster server to client command identifiers.

See also
OTA spec, OTA Upgrade Cluster, 6.10.1
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 Specific File Response" command

ZB_ZCL_CMD_OTA_UPGRADE_INTERNAL_ABORT_ID 

ZBOSS internal command

OTA File header - Tag Identifiers.

See also
OTA spec, OTA Upgrade Cluster 6.3.4
Enumerator
ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA 

ECDSA Signature.

ZB_ZCL_OTA_UPGRADE_FILE_TAG_ECDSA_CERT 

ECDSA Signature Certificate.

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_void_t zb_zcl_ota_upgrade_file_upgraded ( zb_uint8_t  endpoint)

Clear attribute after upgrade.

Parameters
endpoint- endpoint
Note
After colling this command OTA file may be removed from memory
zb_void_t 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_void_t 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_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
OTA file must be saved in memory until call 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
After calling this command OTA file may be removed from memory
zb_void_t 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_void_t zb_zcl_ota_upgrade_set_query_interval ( zb_uint8_t  endpoint,
zb_uint16_t  interval 
)

Set Freqency request server about new upgrade file (minutes)

Parameters
endpoint- endpoint of the OTA cluster
interval- new interval value (in minutes)
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
zb_void_t 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

Documentation feedback | Developer Zone | Subscribe | Updated