Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide actual MQTT implementation behind trait+newtype #42

Merged
merged 9 commits into from
Nov 30, 2023

Conversation

DennisOSRM
Copy link
Owner

@DennisOSRM DennisOSRM commented Nov 26, 2023

  • run cargo clippy and fix all issues
  • run cargo fmt to format all source files
  • manual check with live HMS device

What does this PR do?

The main change is the actually MQTT client implementation is abstracted away by introducing pub trait MqttWrapper which provides an interface to publish and subscribe to the message queue. The actual implementation is then wrapped in struct RumqttcWrapper. In an embedded implementation this wrap another client, but doesn't require any changes on the library side.

@DennisOSRM DennisOSRM added the enhancement New feature or request label Nov 29, 2023
@DennisOSRM DennisOSRM merged commit b233e54 into main Nov 30, 2023
1 check passed
@DennisOSRM DennisOSRM deleted the abstract_mqtt_implementation branch November 30, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant