{"id":16405554,"url":"https://github.com/flexrobotics/roboflex_transport_mqtt","last_synced_at":"2026-04-11T20:37:52.918Z","repository":{"id":201797006,"uuid":"707418301","full_name":"flexrobotics/roboflex_transport_mqtt","owner":"flexrobotics","description":"Roboflex transport nodes using MQTT.","archived":false,"fork":false,"pushed_at":"2023-12-05T23:30:06.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T11:42:46.187Z","etag":null,"topics":["mqtt","roboflex"],"latest_commit_sha":null,"homepage":"https://github.com/flexrobotics/roboflex_transport_mqtt","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexrobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-19T21:22:58.000Z","updated_at":"2023-10-27T00:36:39.000Z","dependencies_parsed_at":"2023-12-06T00:30:37.822Z","dependency_job_id":"4710bb94-b267-4a1d-b50d-12547f30a2bc","html_url":"https://github.com/flexrobotics/roboflex_transport_mqtt","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"ee9dede5b323547b9ac78a2fb7b9827e554bf8bb"},"previous_names":["flexrobotics/roboflex_transport_mqtt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_transport_mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexrobotics","download_url":"https://codeload.github.com/flexrobotics/roboflex_transport_mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240366016,"owners_count":19790009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mqtt","roboflex"],"created_at":"2024-10-11T06:06:18.081Z","updated_at":"2025-10-17T23:35:31.681Z","avatar_url":"https://github.com/flexrobotics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# roboflex.transport.mqtt\n\nRooboflex support for the MQTT transport.\n\nSee https://mqtt.org/ for details.\n\nUsing MQTT, nodes can connect to other nodes, even running on different computers. You must run your own MQTT broker - broker functionality is not wrapped in any way.\n\nany node -\u003e MQTTPublisher ==MQTT BROKER==\u003e MQTTSubscriber -\u003e any node\n\n## Contents\n\n* [Install](#install)\n* [Import](#import)\n* [Classes](#classes)\n    * [MQTTContext](#mqttontext)\n    * [MQTTNodeBase](#mqttnodebase)\n    * [MQTTPublisher](#mqttpublisher)\n    * [MQTTSubscriber](#mqttsubscriber)\n\n\n## System Dependencies\n\n    apt-get install mosquitto\n    apt-get install libmosquitto-dev\n\n    ... or on mac ...\n    brew install mosquitto\n\n## Build\n\n    mkdir build \u0026\u0026 cd build\n    cmake ..\n    make\n\n## Run Examples (see [examples](examples))\n\n    pub_sub_0_cpp\n    python pub_sub_0_py\n\n## Import\n\n    import roboflex.transport.mqtt as rtm\n\n# Classes\n\nRoboflex's support for MQTT is embodied in four classes:\n\n1. MQTTContext, which you just have to instantiate somewhere\n2. MQTTNodeBase, a base class which you don't use\n3. MQTTPublisher, which can publish to an mqtt topic somewhere\n4. MQTTSubscriber, which can subscribe to an mqtt topic somewhere\n\n\n## MQTTContext\n\nIn order to use the other MQTT classes, you must instantiate an MQTTContext, and its lifetime must be \u003e= the lifetime of all other MQTT node classes. You must pass an instance of this class to the constructors\nof both MQTTPublisher and MQTTSubscriber.\n\n    # instantiate like so:\n    mqtt_context = rtm.MQTTContext()\n\n## MQTTNodeBase\n\nDo not instantiate directly. This is the base class for MQTTPublisher and MQTTSubscriber, and holds common functionality and properties.\n\n    # the address of the broker\n    mqtt_node.broker_address -\u003e str\n\n    # the port number of the broker\n    mqtt_node.broker_port -\u003e int\n\n    # the number of seconds between keepalive messages\n    mqtt_node.keepalive_seconds -\u003e int\n\n    # the topic to publish or subscribe to\n    mqtt_node.topic_name -\u003e str\n\n    # the mqtt quality-of-service\n    mqtt_node.qos -\u003e int\n\n    # whether to print out debug messages\n    mqtt_node.debug -\u003e bool\n\n## MQTTPublisher\n\n_**(inherits MQTTNodeBase)**_\n\nPublishes any messages it receives to some topic, on some broker. When it receives an message, it publishes the binary representation on the given topic, and then propagages the message verbatim.\n\n    mqtt_publisher = rtm.MQTTPublisher(\n        mqtt_context: rtm.MQTTContext,\n        broker_address: str,\n        broker_port: int,\n        keepalive_seconds: int,\n        topic_name: str,\n\n        # optional...\n        name: str = \"MQTTPublisher\",\n        qos: int = 0,\n        retained: bool = false,\n        debug: bool = false,\n    )\n\n    # additional properties:\n\n    # See the MQTT documentation for what the retained feature does:\n    # https://www.hivemq.com/blog/mqtt-essentials-part-8-retained-messages/\n    mqtt_publisher.retained -\u003e bool\n\n    # If you have some message 'in hand' in some other function,\n    # you can just use an MQTTPublisher to publish the message\n    # directly. This is just an alias for 'signal_self' on core::Node.\n    mqtt_publisher.publish({\"key1\": 32})\n\n\n## MQTTSubscriber\n\n_**(inherits MQTTNodeBase)**_\n\nSuscribes to some topic from some broker. Expects only Roboflex encoded messages.\n\n    mqtt_subscriber = rtm.MQTTSubscriber(\n        mqtt_context: rtm.MQTTContext,\n        broker_address: str,\n        broker_port: int,\n        keepalive_seconds: int,\n        topic_name: str,\n\n        # optional...\n        name: str = \"MQTTSubscriber\",\n        qos: int = 0,\n        loop_timeout_milliseconds: int = 100,\n        debug: bool = false,\n    )\n\n    # additional properties:\n\n    # number of milliseconds, max, to wait in the mqtt message loop,\n    # before checking whether to continue or not.\n    mqtt_subscriber.loop_timeout_milliseconds -\u003e int\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_transport_mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexrobotics%2Froboflex_transport_mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_transport_mqtt/lists"}