21 #ifndef OC_KNX_SWU_INTERNAL_H
22 #define OC_KNX_SWU_INTERNAL_H
133 size_t binary_size,
size_t block_offset,
134 uint8_t *block_data,
size_t block_len,
void *data);
void oc_swu_set_package_bytes(int package_bytes)
set the current amount of the bytes written
void oc_swu_set_state(oc_swu_state_t state)
sets the current download state
void oc_swu_set_last_update(char *time)
set the current last update time
void oc_swu_set_package_name(char *name)
set the current firmware package name
void oc_create_knx_swu_resources(size_t device)
Creation of the KNX software update resources.
void oc_swu_set_qurl(char *qurl)
sets the url to be queried for downloading
void oc_swu_set_package_version(int major, int minor, int minor2)
Sets the current package version.
void oc_set_swu_cb(oc_swu_cb_t cb, void *data)
Set the software update callback.
void oc_swu_set_result(oc_swu_result_t result)
sets the result of the download procedure
oc_swu_state_t
The software update states.
@ OC_SWU_STATE_DOWNLOADING
state is downloading
@ OC_SWU_STATE_IDLE
state is idle
@ OC_SWU_STATE_DOWNLOADED
state is downloaded
oc_swu_result_t
The software result states.
@ OC_SWU_RESULT_INIT
0 Initial value.
@ OC_SWU_RESULT_ERR_FLASH
2 Not enough flash memory for the new software package.
@ OC_SWU_RESULT_ERR_CONN
4 Connection lost during downloading process.
@ OC_SWU_RESULT_ERR_SUF
8 Software update failed.
@ OC_SWU_RESULT_ERR_ICF
5 Integrity check failure for new downloaded package.
@ OC_SWU_RESULT_SUCCESS
1 Software updated successfully.
@ OC_SWU_RESULT_ERR_RAM
3 Out of RAM during downloading process
@ OC_SWU_RESULT_ERR_UP
9 Unsupported protocol.
@ OC_SWU_RESULT_ERR_URL
7 Invalid URL.
@ OC_SWU_RESULT_ERR_UPT
6 Unsupported package type.
void(* oc_swu_cb_t)(size_t device, oc_separate_response_t *response, size_t binary_size, size_t block_offset, uint8_t *block_data, size_t block_len, void *data)
Callback invoked by the stack to set the software.
struct oc_separate_response_s oc_separate_response_t
separate response type