Skip to main content

Roboflex Transport Zenoh Library

Project description

roboflex.transport.zenoh

Roboflex transport nodes powered by Zenoh. Zenoh gives us pub/sub plus automatic discovery, so we can move roboflex messages across threads, processes, and machines without needing to manage a broker manually.

any node -> ZenohPublisher ==THE_NETWORK==> ZenohSubscriber -> any node

Status

This transport mirrors the ZMQ/MQTT bindings but uses zenoh-c under the hood, with Zenoh discovery/scouting enabled by default. Nodes:

  • ZenohPublisher: publishes raw roboflex messages to a Zenoh key expression.
  • ZenohSubscriber: subscribes to a key expression and signals incoming messages. It runs its own thread (call start()).

Build (C++)

mkdir build && cd build
cmake ..
make

Example

See examples/pub_sub_0_cpp.cpp for a simple publisher/subscriber wiring:

auto session = transportzenoh::MakeZenohSession();
transportzenoh::ZenohPublisher pub(session, "roboflex/demo");
transportzenoh::ZenohSubscriber sub(session, "roboflex/demo");
sub.start();

examples/pub_sub_config_cpp.cpp shows a more explicit setup: setting mode/explicit endpoints, turning off multicast scouting, using express/priority publisher settings, and allowing any origin on the subscriber.

Python

Python bindings mirror the C++ API (ZenohSession, ZenohPublisher, ZenohSubscriber). Build via pip install . from the repo root after building the C++ library, like the other transport packages.

Configuration knobs

  • ZenohSession: accepts an optional config_json (JSON/JSON5 matching the Zenoh config schema), explicit mode (peer, client, router), connect_endpoints, listen_endpoints, and enable_multicast_scouting toggle.
  • ZenohPublisher: opts for express (no batching), priority, and allowed_destination (see zc_locality_t).
  • ZenohSubscriber: accepts allowed_origin (also zc_locality_t).
  • Key expressions follow Zenoh’s rules and support wildcards; see Zenoh key expressions.

System Dependencies

None beyond what the build pulls automatically: roboflex_core and zenoh-c are fetched via CMake FetchContent.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roboflex_transport_zenoh-0.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roboflex_transport_zenoh-0.1.2-cp311-cp311-macosx_15_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file roboflex_transport_zenoh-0.1.2.tar.gz.

File metadata

  • Download URL: roboflex_transport_zenoh-0.1.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for roboflex_transport_zenoh-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c4e1e38e0b241b8843aac9b63cc978d06c8e49dcddb38ec85a5cf5fcb580de1e
MD5 fd29d445bda0c9d4182abc3d940266d6
BLAKE2b-256 8142a341a1c6ceb9db0a8f51d7cc1e3704db5de616bbff3cb44c5601eb22eaed

See more details on using hashes here.

File details

Details for the file roboflex_transport_zenoh-0.1.2-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for roboflex_transport_zenoh-0.1.2-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9220946c8923c09daf2d96547c3066b311e36d0f6c90d4c999766880d4873cec
MD5 6c6b3b77890b3ce08ccb67c57a146eda
BLAKE2b-256 d799a2e7ac472e6d1584f93ad7e212b165508b12c94c2bfc18cf59fb0a293d62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page