1
0
mirror of https://github.com/FreeRTOS/coreMQTT synced 2025-05-17 07:42:05 +08:00

36 Commits

Author SHA1 Message Date
Muneeb Ahmed
73eee0bd11
Update Doxygen to version 1.9.2 (#148) 2021-08-24 12:10:36 -07:00
Muneeb Ahmed
51c8067bff
Update version and add C++ guards (#168)
* Update version numbers

* Update CHANGELOG.md

* Add guards for C++ linkage

* Link to Memory estimates markdown from README

* Make possible to override CMake C Standard for tests
2021-07-22 16:49:59 -07:00
Muneeb Ahmed
b6c4ae8b27
Change http links to https (#155) 2021-03-02 12:25:58 -08:00
Archit Aggarwal
363a2fbca2
Update CHANGELOG and file versioning for upcoming release (#153) 2021-02-25 13:56:58 -08:00
Archit Gupta
81f265d6a5
Add workflow to generate doxygen size tables (#151)
* Add manual workflow for generating size table
* Add memory statistics PR check
2021-01-22 13:40:27 -08:00
leegeth
221687abfc
Update memory numbers in Doxygen to be in sync with FreeRTOS.org (#143) 2020-12-22 18:11:47 -08:00
Archit Aggarwal
843cf9924f
Update timeout section in doxygen manual to match API behavior in v1.1.0 (#142)
Update the sub-section of the Design page of the library API reference to provide detailed information about the role of runtime timeout and compile-time timeout configurations in the behavior of MQTT_Connect, MQTT_ProcessLoop and MQTT_ReceiveLoop functions.
2020-12-17 14:53:46 -08:00
leegeth
82eea34765
Update timeout doc (#138)
Co-authored-by: Archit Aggarwal <architag@amazon.com>
2020-12-10 17:40:05 -08:00
SarenaAWS
d96960ec8d
Update v1.0.1 to v1.1.0 and 202011.00 to 202012.00 for memory estimates link. (#131) 2020-12-09 11:33:30 -08:00
leegeth
ecf9b73e1e
Add timeouts in doxygen docs (#133)
Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
2020-12-09 10:30:02 -08:00
Archit Aggarwal
0a2172b896
Fixes in internal logic of sending packets (#124)
* Fix issue of data recv being interrupted

* Rename elapsedTimeMs variable to its express its new meaning

* Use configuration const for recvExact timeout

* Remove timeout check from discardPacket and address CI check failures

* Fix more CI check failures

* Remove another unused local variable

* Re-instate timeout in discard to reduce scope of changes

* Remove unused variable again

* Fix failing unit test

* Rename new config macro, and attempt to fix CBMC failures

* Doc: Improvement suggestions from code review

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Fix quality check failures

* Add test case to check partial network reads with zero timeout duration for ProcessLoop

* style: Improving naming

* Address complexity failure

* Address comments

* Doc: Add blocking time equation of Receive/ProcessLoop functions in their API doc

* Improvement in API doc

* Set MQTT_RECV_POLLING_TIMEOUT_MS so that recvExact runs in one iteration always for cbmc.

* doc: Add information about zero return value for Transport_Recv_t

* fix: prevent possibility of infinite loop in timeout logic of ProcessLoop

* style: Minor changes

* hygiene: minor name fix

* fix: Possibility of infinite loop in sendPacket

* Add the new configuration to doxygen

* test: Add mock transport send function that always returns zero

* fix: Issues in sendPacket and sendPublish

* test: add test for sendPacket timeout

* Update Timer Overflow test

* test: temporarily comment out unused variable

* test: fix the timer overflow test

* Address review comments

* style: make log messages concise

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Sarena Meas <sarem@amazon.com>
2020-12-07 10:37:26 -08:00
Archit Aggarwal
b581fc4172
Bugfix: Fix interrupted network read operation (#120)
### Problem

The `MQTT_ProcessLoop` and `MQTT_ReceiveLoop` read incoming MQTT packet payload over the network by calling the `recvExact` function. The `recvExact` function can be called multiple times to read the expected number of bytes for the MQTT packet but it also implements a timeout functionality of receiving the expected number of payload within the timeout value passed to the function.
This causes problems when the `Transport_Recv` call returns less than requested number of bytes, and there is a timeout (for example, when calling `MQTT_ProcessLoop` with 0ms duration) which causes the function to assume failure instead of reading the remaining payload of the MQTT packet by calling `Transport_Recv` again. Thus, in such cases, the MQTT connection is severed prematurely even though there is a high probability of receiving the remaining bytes of the MQTT packet over the network.

### Solution
Instead of implementing a timeout on the entire duration of receiving the expected number of remaining MQTT packet bytes in `recvExact`, the use of timeout is being changed to be relevant only on the total time of receiving 0 bytes over the network over multiple calls to `Transport_Recv`.
As this modified meaning of the timeout duration is now unrelated to the timeout duration that the `MQTT_ProcessLoop` or `MQTT_ReceiveLoop` functions are called, a new configuration constant for the `recvExact` timeout value, `MQTT_RECV_POLLING_TIMEOUT_MS`, has been added to the library which will carry a default value of 10ms. 

Co-authored-by: Sarena Meas <sarem@amazon.com>
2020-12-04 19:49:40 -08:00
SarenaAWS
4b8674a806
Update all references from master to main. (#110) 2020-11-18 12:27:01 -08:00
Sukhmani Minhas
7c2361792c
Update memory estimates for the coreMQTT source code using the ARM GCC toolchain. (#101) 2020-11-03 12:16:50 -08:00
SarenaAWS
66a35e4213
Update version v1.0.0 to v1.0.1. (#97) 2020-11-02 12:11:10 -08:00
SarenaAWS
93c15bdab8
Move transport_interface.h from portable/ to interface/ (#91)
* Move transport_interface.h to interface/ folder.

* Replace all paths to portable with interface.
2020-10-28 14:53:06 -07:00
Oscar Michael Abrina
7f0478d13a
Remove const qualifier from send/recv in transport interface (#86)
This follows changes from FreeRTOS/FreeRTOS@398abba. The const qualifier is removed from send/recv because there are transport implementations that require a member of the network context to be modified such as in the case of mbedtls.
2020-10-21 11:12:28 -07:00
SarenaAWS
651832c359
Delete irrelevant comment about memory estimation. (#65)
* Delete irrelevant comment about memory estimation.

* Update the library name and the version to uppercase V.

* Update config.doxyfile
2020-09-16 11:40:19 -07:00
Oscar Michael Abrina
8a2f465e00
Update code sizes in documentation (#54)
* Update code sizes after adding verison number

* Round as much as possible when multiplying by 1024

* Add code size when no optimisation is used

* Update totals

* Change MQTT RC1 to coreMQTT

* Add link to gcc arm toolchain

* Update link

* Use english spellings

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-09-14 19:54:08 -07:00
Archit Aggarwal
28a0d090e3
Update MQTT 3.1.1 compliance text in doxygen and change log (#57)
* Update wording about 3.1.1 compliance

* Address review comments
2020-09-14 15:40:28 -07:00
Oscar Michael Abrina
ff2725df6f
Change file extension (#58) 2020-09-14 13:53:53 -07:00
Muneeb Ahmed
78f83cbfae
Use MQTT specific anchors for generic targets (#50)
* Use MQTT specific anchors for porting guide

* Add mqtt specific anchors for log sections
2020-09-11 14:07:50 -07:00
Muneeb Ahmed
c45f7606b8
Add some MQTT design documentation (#26)
* Add some sections for MQTT design

* Add design diagrams

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2020-09-11 10:27:39 -07:00
Muneeb Ahmed
a59b6dd3e0
Add porting guide (#6)
* Add porting guide

Co-authored-by: Sarena Meas <sarem@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2020-09-11 00:20:54 -07:00
SarenaAWS
4f2473671d
Add mqtt anchor for reference to mainpage in the hub. (#47) 2020-09-11 00:14:54 -07:00
SarenaAWS
e8f8c5394c
Update the transport_interface for multiple page and section definition warnings in the CSDK hub (#46) 2020-09-10 16:31:37 -07:00
SarenaAWS
76cd50a135
Add documentation for MQTT_DO_NOT_USE_CUSTOM_CONFIG (#42)
Co-authored-by: Archit Aggarwal <architag@amazon.com>
2020-09-09 13:22:02 -07:00
SarenaAWS
87856e007f
Generate a doxygen tag for the hub repo to use. (#32) 2020-09-08 15:40:52 -07:00
Archit Aggarwal
3b0958bb4d
Hygiene changes in doxygen configuration (#38)
* Replace mqtt_config with core_mqtt_config in CBMC comments

* Update doxygen to generate configurations page with core_mqtt_config page name
2020-09-08 13:59:33 -07:00
SarenaAWS
6631dde60d
Add doxygen docs to transport_interface.h (#40) 2020-09-08 12:49:53 -07:00
Archit Aggarwal
d355bfa259
Re-brand lightweight MQTT as MQTT serializer (#29)
Rename all instance of "lightweight" MQTT with "serializer" in files and documentation
2020-09-03 14:56:32 -07:00
Nathan Glimsdale
b591004ba5
Add formatting checks. (#30)
* Add formatting checks.

Co-authored-by: Sarena Meas <sarem@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
2020-09-03 14:40:28 -07:00
Muneeb Ahmed
f0a8b3c1b3
Fix doxygen build due to renamed files (#20)
* Fix doxygen build due to renamed files

* ci: combine doxygen stderr into stdout
2020-09-01 12:25:24 -07:00
Muneeb Ahmed
54b54e78ad
Add define guards and change spellings (#15)
* Add checks for definition of false and true

* Prefer American spellings for optimize and acknowledgment
2020-08-31 14:51:21 -07:00
Archit Aggarwal
e5a761608c
Enable doxygen build (#4)
Update file path in config.doxygen file to enable doxygen build
2020-08-27 16:42:57 -07:00
Archit Aggarwal
f2581e5da5
Re-structure files (#3)
* Relocate library, test and doc files

* Add transport interface from C-SDK

* Update file path in mqttFilePaths.cmake
2020-08-27 16:29:26 -07:00