KNX IoT
KNX IoT Point API stack implementation
|
software update More...
#include <stddef.h>
Go to the source code of this file.
Typedefs | |
typedef 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. More... | |
Enumerations | |
enum | oc_swu_result_t { OC_SWU_RESULT_INIT , OC_SWU_RESULT_SUCCESS , OC_SWU_RESULT_ERR_FLASH , OC_SWU_RESULT_ERR_RAM , OC_SWU_RESULT_ERR_CONN , OC_SWU_RESULT_ERR_ICF , OC_SWU_RESULT_ERR_UPT , OC_SWU_RESULT_ERR_URL , OC_SWU_RESULT_ERR_SUF , OC_SWU_RESULT_ERR_UP } |
The software result states. More... | |
enum | oc_swu_state_t { OC_SWU_STATE_IDLE = 0 , OC_SWU_STATE_DOWNLOADING , OC_SWU_STATE_DOWNLOADED } |
The software update states. More... | |
Functions | |
void | oc_create_knx_swu_resources (size_t device) |
Creation of the KNX software update resources. More... | |
void | oc_set_swu_cb (oc_swu_cb_t cb, void *data) |
Set the software update callback. More... | |
void | oc_swu_set_last_update (char *time) |
set the current last update time More... | |
void | oc_swu_set_package_bytes (int package_bytes) |
set the current amount of the bytes written More... | |
void | oc_swu_set_package_name (char *name) |
set the current firmware package name More... | |
void | oc_swu_set_package_version (int major, int minor, int minor2) |
Sets the current package version. More... | |
void | oc_swu_set_qurl (char *qurl) |
sets the url to be queried for downloading More... | |
void | oc_swu_set_result (oc_swu_result_t result) |
sets the result of the download procedure More... | |
void | oc_swu_set_state (oc_swu_state_t state) |
sets the current download state More... | |
software update
Definition in file oc_knx_swu.h.
typedef 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.
[in] | device | the device index |
[in] | response | the instance of an internal struct that is used to track the state of the separate response |
[in] | binary_size | the full size of the binary |
[in] | block_offset | the offset (in the file) |
[in] | block_data | the block data |
[in] | block_len | the size of the block_data |
[in] | data | the user supplied data |
Definition at line 132 of file oc_knx_swu.h.
enum oc_swu_result_t |
The software result states.
Definition at line 44 of file oc_knx_swu.h.
enum oc_swu_state_t |
The software update states.
Enumerator | |
---|---|
OC_SWU_STATE_IDLE | state is idle |
OC_SWU_STATE_DOWNLOADING | state is downloading |
OC_SWU_STATE_DOWNLOADED | state is downloaded |
Definition at line 34 of file oc_knx_swu.h.
void oc_create_knx_swu_resources | ( | size_t | device | ) |
Creation of the KNX software update resources.
device | index of the device to which the resources are to be created |
void oc_set_swu_cb | ( | oc_swu_cb_t | cb, |
void * | data | ||
) |
Set the software update callback.
The host name callback is called by the stack when the software update is performed
[in] | cb | oc_swu_cb_t function pointer to be called |
[in] | data | context pointer that is passed to the oc_restart_cb_t the pointer must be a valid pointer till after oc_main_init() call completes. |
void oc_swu_set_last_update | ( | char * | time | ) |
set the current last update time
time | the update time in IETF RFC 3339 |
void oc_swu_set_package_bytes | ( | int | package_bytes | ) |
set the current amount of the bytes written
package_bytes | the amount of bytes written |
void oc_swu_set_package_name | ( | char * | name | ) |
set the current firmware package name
name | the name of the firmware package |
void oc_swu_set_package_version | ( | int | major, |
int | minor, | ||
int | minor2 | ||
) |
Sets the current package version.
major | the major number e.g. 1 of [1, 2, 3] |
minor | the minor number e.g. 2 of [1, 2, 3] |
minor2 | the minor2 number e.g. 3 of [1, 2, 3] |
void oc_swu_set_qurl | ( | char * | qurl | ) |
sets the url to be queried for downloading
qurl | the url |
void oc_swu_set_result | ( | oc_swu_result_t | result | ) |
sets the result of the download procedure
result | the result, including possible errors |
void oc_swu_set_state | ( | oc_swu_state_t | state | ) |
sets the current download state
state | the download state |