Skip to content

Commit

Permalink
Add multi-block support (#53)
Browse files Browse the repository at this point in the history
This change adds support for multiple block
requests and receives. A sequence of up to
NUM_OF_BLOCKS_REQUESTED will be requested
which are sequential in block number if
still needed. Upon receiving the OTA agent
will determine if the block is needed.
  • Loading branch information
kstribrnAmzn authored Jun 25, 2024
1 parent c2fac60 commit 24c5856
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 283 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ FetchContent_Declare(
FetchContent_Declare(
iot-core-mqtt-file-downloader
GIT_REPOSITORY https://github.com/aws/aws-iot-core-mqtt-file-streams-embedded-c/
GIT_TAG 7264c7115de5b02aacf5430554cc2c7428b43d24)
GIT_TAG 690fb2bd10020da916fe54f3e8c59f1e3f925e44)
FetchContent_Declare(
jobs
GIT_REPOSITORY https://github.com/aws/Jobs-for-AWS-IoT-embedded-sdk.git
Expand Down Expand Up @@ -125,7 +125,8 @@ target_compile_options(iot-core-mqtt-file-downloader PRIVATE -std=c99 -pedantic)
target_link_libraries(iot-core-mqtt-file-downloader
PUBLIC coreJSON coreMQTT mqtt_wrapper tinycbor)
target_include_directories(iot-core-mqtt-file-downloader
PUBLIC ${MQTT_FILE_DOWNLOADER_INCLUDES})
PUBLIC ${MQTT_FILE_DOWNLOADER_INCLUDES}
"${CMAKE_CURRENT_LIST_DIR}/cfg/MqttStreams")

add_executable(
coreOTA_Demo
Expand Down
17 changes: 17 additions & 0 deletions cfg/MqttStreams/MQTTFileDownloader_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Amazon.com, Inc. and its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License. See the LICENSE accompanying this file
* for the specific language governing permissions and limitations under
* the License.
*/

#ifndef MQTT_FILE_DOWNLOADER_CONFIG_H
#define MQTT_FILE_DOWNLOADER_CONFIG_H

#include <stdint.h>

#define mqttFileDownloader_CONFIG_BLOCK_SIZE 256U

#endif /* #ifndef MQTT_FILE_DOWNLOADER_CONFIG_H */
Loading

0 comments on commit 24c5856

Please sign in to comment.