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

Propagate return values of Paho's original client methods #131

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

flbraun
Copy link

@flbraun flbraun commented Jul 10, 2023

Propagate return values of Paho's original Client.publish and Client.subscribe methods back to the caller of MqttClient. This allows writing code on MqttUser instances as if one was dealing with the original client, e.g.

class MyUser(MqttUser):
    @task
    def report_battery_level(self):
        msginfo = self.client.publish('reporting/battery', b'soc=99')
        msginfo.wait_for_publish()

…ient.subscribe` methods back to the caller of `MqttClient`. This allows writing code on `MqttUser` instances as if one was dealing with the original client.
@cyberw
Copy link
Collaborator

cyberw commented Jul 10, 2023

Nice.

@cyberw cyberw merged commit 203e049 into SvenskaSpel:master Jul 11, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants