11#ifndef TR_OVER_THE_AIR_BOOTLOADING_CLIENT_H
12#define TR_OVER_THE_AIR_BOOTLOADING_CLIENT_H
14#ifndef TR_OTA_UPGRADE_QUERY_DELAY_MIN
15#define TR_OTA_UPGRADE_QUERY_DELAY_MIN 5
18#ifndef TR_OTA_UPGRADE_MAX_DATA_SIZE
19#define TR_OTA_UPGRADE_MAX_DATA_SIZE 64
55#if defined(TR_OVER_THE_AIR_BOOTLOADING_CLIENT_PLUGIN_PRINT_ENABLE) && \
56 (TR_OVER_THE_AIR_BOOTLOADING_CLIENT_PLUGIN_PRINT_ENABLE == 1)
57#define tr_ota_upgrade_client_printf(...) tr_zcl_printf(__VA_ARGS__)
58#define tr_ota_upgrade_client_println(...) tr_zcl_println(__VA_ARGS__)
60#define tr_ota_upgrade_client_printf(...)
61#define tr_ota_upgrade_client_println(...)
77 zb_uint32_t *fw_version,
79 zb_uint16_t *image_type,
80 zb_uint16_t *hw_version);
86 zb_uint32_t image_size);
104 zb_uint16_t image_type,
void zb_zcl_ota_upgrade_pause_client(void)
API to pause the OTA upgrade client.
void zb_zcl_ota_upgrade_stop_client(void)
API to stop the OTA upgrade client.
tr_ota_server_info_t * tr_ota_upgrade_client_get_server_info(void)
API to get the OTA server info.
tr_ota_client_info_t * tr_ota_upgrade_client_get_client_info(void)
API to get the OTA client info.
void tr_over_the_air_bootloading_client_version_cb(zb_uint8_t endpoint, zb_uint32_t *fw_version, zb_uint16_t *mfg_id, zb_uint16_t *image_type, zb_uint16_t *hw_version)
Callback fires to allow app to provide information for a query next image request.
zb_bool_t tr_over_the_air_bootloading_client_upgrade_end_resp_cb(void)
Callback fires to allow app.
zb_bool_t tr_over_the_air_bootloading_client_image_notify_cb(void)
Callback fires when an OTA upgrade image notifiy is received.
void tr_over_the_air_bootloading_client_server_not_found_cb(void)
Callback fires to alert app that an OTA upgrade server was not found.
void tr_over_the_air_bootloading_client_upgrade_start_cb(zb_uint32_t image_version, zb_uint32_t image_size)
Callback fires to notify app that OTA download is about to start.
zb_bool_t tr_over_the_air_bootloading_client_query_next_image_resp_cb(zb_uint32_t fw_version, zb_uint16_t image_type, zb_uint16_t mfg_id)
Callback fires to allow app to decide if an image should be downloaded.
void tr_over_the_air_bootloading_client_init_cb(void)
Callback fires when the OTA upgrade client is initialized.
Definition tr_over_the_air_bootloading_client.h:39
zb_uint8_t img_block_req_sent
Definition tr_over_the_air_bootloading_client.h:47
zb_uint8_t pending_img_block_resp
Definition tr_over_the_air_bootloading_client.h:48
zb_uint16_t hw_version
Definition tr_over_the_air_bootloading_client.h:45
zb_uint16_t image_type
Definition tr_over_the_air_bootloading_client.h:43
zb_uint8_t max_data_size
Definition tr_over_the_air_bootloading_client.h:49
zb_uint32_t fw_version
Definition tr_over_the_air_bootloading_client.h:40
zb_uint8_t query_delay
Definition tr_over_the_air_bootloading_client.h:46
zb_uint32_t offset_at_last_attr_save
Definition tr_over_the_air_bootloading_client.h:42
zb_uint16_t mfg_id
Definition tr_over_the_air_bootloading_client.h:44
zb_uint32_t download_file_size
Definition tr_over_the_air_bootloading_client.h:41
Definition tr_over_the_air_bootloading_client.h:30
zb_uint8_t endpoint
Definition tr_over_the_air_bootloading_client.h:31
zb_uint16_t short_addr
Definition tr_over_the_air_bootloading_client.h:32
zb_uint32_t fw_version
Definition tr_over_the_air_bootloading_client.h:35
zb_uint8_t param
Definition tr_over_the_air_bootloading_client.h:34
zb_uint32_t image_size
Definition tr_over_the_air_bootloading_client.h:33
tr_conn_state_e
Definition tr_af.h:18
zb_uint8_t endpoint
Definition tr_nvram_attr.h:23
void tr_ota_init(zb_uint8_t param)
tr_ota_upgrade_client_state_t
Definition tr_over_the_air_bootloading_client.h:23
@ TR_OTA_UPGRADE_STATE_RESUME
Definition tr_over_the_air_bootloading_client.h:26
@ TR_OTA_UPGRADE_STATE_IN_PROGRESS
Definition tr_over_the_air_bootloading_client.h:25
@ TR_OTA_UPGRADE_STATE_IDLE
Definition tr_over_the_air_bootloading_client.h:24
void tr_over_the_air_bootloading_client_init(void)
void tr_over_the_air_bootloading_client_connection_state_cb(tr_conn_state_e conn_state)