* Update CMake infrastructure for repository to be self-sufficient for building targets
* Update GitHub CI workflow to only use build infrastructure of the repository
* Fix resend unacked Publish tests
* Add assertion on return value of MQTT_PublishToResend on the packet ID validity
* Hygiene improvement to use resumePersistentSession in PUBLISH resend tests
* Separate out variables for lightweight and managed MQTT sources
* Update all MQTT demos' CMakeLists.txt to build MQTT sources along with their demo binaries
* Update CMakeLists.txt of unit and integration tests for updates to mqttFilePaths.cmake
* Add code examples for MQTT_PublishToResend, MQTT_MatchTopic, and MQTT_GetSubAckStatusCodes
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Add utility for MQTT topic filter and topic matching to library (#1119)
* Add topic matching utility to MQTT API
* Add thorough unit tests for topic matching utility
* Fix failing ExactMatch unit test
* Add topic matching parameter names to mqtt/lexicon.txt
* Fixes caught in code review
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
* Remove problematic assert in matchWildcardsSpecialCases and make hygiene parameter re-ordering changes
* Add another param name to mqtt/lexicon.txt
* Update topic matching to support corner case of matching topic filter ending with "/#" with topic name ending with "/"
* Remove duplicate word entry in mqtt/lexicon.txt
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
* Fix bugs in topic matching algorithm that allowed matching when wildcards are not preceding with '/'
* Slight style change for improved readability to matchWildcards function
* Re-add param names to mqtt/lexicon.txt that were removed in merge conflict resolution
* Rename private function for better expressivity
* Revert "Rename private function for better expressivity"
This reverts commit fe22642a4d723342dbb4c37f2df28c7aea9df0ca.
* Hygiene changes for better readability
* Add more cases to unit tests
* Hygiene changes for invoking matchEndWildcardsSpecialCases function
* More hygiene refactors from review comments
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
* Separate Match and no-match test case sets for # willdcard
* Remove extraneous param docstring for private function
* Add note to MatchTopic API about assumption and behavior of function
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
* Upgrade MQTT integration test to use mutual auth, and update its build setup to use CMake cache variables for credentials
* Fix build warning from logging
* Remove references to test.mosquitto.org from demos
* Add option to turn off downloading of certificates and create demos/certificates directory
* Remove Mosquitto certificate from list of certs to download
* Address PR comments
* Add CMake command line options to use for configuring demos
* Update README.md to contain extra flag for ROOT_CA_CERT_PATH
* Set prefix to PWD if any path flags are relative
* Update proof templates, add proof flag --pointer-primitive-check
* Fix overflow in MQTT_SerializeSubscribe, MQTT_SerializeUnsubscribe, MQTT_SerializePublish, and MQTT_SerializePublishHeader.
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
* Add new API in lightweight MQTT for extracting payload from SUBACK packet
* Add parameter names of new API to lexicon.txt
* Minor updates
* Update readSubackStatus in lightweight file to use named constants
* Address hygiene comments from review
* Move new API for SUBACK decoding from lightweight to managed layer
* Make minor changes suggested in review comments
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
* Rename API for customer usability and update doc
* Remove new QoS and SUBACK failure macros from lightweight API; Add a new enum for SUBACK status in managed API
* Fix CI build issues
* Adding another word to lexicon.txt for spell check
* Address MISRA violation of type promotion in subtraction logic
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>