|
Unify Framework Lib 1.7.0
|
Functions | |
| void | set_image_cache_size (unsigned long int cache_size) |
| Set the image cache size for download. More... | |
| void | set_image_base_path (const std::string &image_base_path) |
| Set the image base path where image files are saved. More... | |
| void | set_image_available_callback (const uic_ota::image_available_func_t &image_available_cb) |
| Set the callback called for available images. More... | |
| bool | available_info_callback_initialized () |
| Check if available info callback is initialized. More... | |
| void | info_callback (const char *topic, const char *message, const size_t message_length) |
| Callback function to be called when revceiving image files information on info topic. More... | |
| void | get (const std::string &image_key, const std::string &subscribe_topic, const std::string &publish_topic, const uic_ota::image_ready_funct_t &image_ready_cb, uint32_t timeout_s) |
| Function for downloading images. More... | |
| bool ota_download::available_info_callback_initialized | ( | ) |
Check if available info callback is initialized.
| void ota_download::get | ( | const std::string & | image_key, |
| const std::string & | subscribe_topic, | ||
| const std::string & | publish_topic, | ||
| const uic_ota::image_ready_funct_t & | image_ready_cb, | ||
| uint32_t | timeout_s | ||
| ) |
Function for downloading images.
| image_key | unique image key for downloading for this image. |
| subscribe_topic | the data topic to subscribe to where image file is received. |
| publish_topic | topic to publish to telling image provider to provide image file. |
| image_ready_cb | callback for when image is ready for over the air transfer. |
| timeout_s | Timeout in seconds |
| void ota_download::info_callback | ( | const char * | topic, |
| const char * | message, | ||
| const size_t | message_length | ||
| ) |
Callback function to be called when revceiving image files information on info topic.
| topic | info MQTT topic. |
| message | image file contents transferred. |
| message_length | size of image file. |
| void ota_download::set_image_available_callback | ( | const uic_ota::image_available_func_t & | image_available_cb | ) |
Set the callback called for available images.
| image_available_cb | callback which is called when an image is available. |
| void ota_download::set_image_base_path | ( | const std::string & | image_base_path | ) |
Set the image base path where image files are saved.
| image_base_path | path to directory where images should be saved. |
| void ota_download::set_image_cache_size | ( | unsigned long int | cache_size | ) |
Set the image cache size for download.
| cache_size | the cache size input. Maximum is 256 Mb. |