aws / aws-iot-core-mqtt-file-streams-embedded-c

MIT License
2 stars 6 forks source link

Removing MQTT wrapper from mqtt file streams library. #3

Closed manvensh closed 1 year ago

manvensh commented 1 year ago

Issue #, if available:

Description of changes: Removing mqtt operations like subscribe/publish from the library. Moving forward this library will be used to create topics and get data block requests. It will also process the incoming data blocks and decode them.

Testing Ran the OTA demo successfully.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

kstribrnAmzn commented 1 year ago

Have the unit tests from https://github.com/FreeRTOS/Labs-Project-ota-example-for-aws-iot-core/tree/main/lib/iot-core-mqtt-file-downloader not been copied over? You should copy them over and modify the corresponding tests.

kstribrnAmzn commented 1 year ago

Also can't mqttDownloader_init now be removed?

manvensh commented 1 year ago

Have the unit tests from https://github.com/FreeRTOS/Labs-Project-ota-example-for-aws-iot-core/tree/main/lib/iot-core-mqtt-file-downloader not been copied over? You should copy them over and modify the corresponding tests.

The unit tests have been copied here. I first wanted to finalize the API's and then I though to modify the corresponding tests. I will create a separate PR for the modified unit tests.

manvensh commented 1 year ago

Also can't mqttDownloader_init now be removed?

No, it can't be removed. During init, we are creating all the MQTT topics needed for file streams. If we remove the init, then we need to create the topic every time we need to request a new file block. To avoid repetitive steps, mqttDownloader_init was created in the first place.

kstribrnAmzn commented 1 year ago

Have the unit tests from https://github.com/FreeRTOS/Labs-Project-ota-example-for-aws-iot-core/tree/main/lib/iot-core-mqtt-file-downloader not been copied over? You should copy them over and modify the corresponding tests.

The unit tests have been copied here. I first wanted to finalize the API's and then I though to modify the corresponding tests. I will create a separate PR for the modified unit tests.

I don't necessarily love that but I understand. If you are going to split the unit tests into a separate PR, can you do 1 PR for the copy over and another for the actual tweaks? Should make things easier to review