Skip to main content

Constructor

Signature

Methods

getLatestMessage()

Signature
Return the most recent message from the subscription queue. Blocks for up to one second waiting for a message. Returns: The raw payload bytes of the latest message, or None if no message was received within the timeout.

get_image()

Signature

msg_cb()

Signature
Handle an incoming Zenoh sample by storing its payload in the queue.
required
The Zenoh sample received from the subscription.

process_latest_msg()

Signature
Process the latest message from the queue. Override in subclasses.

publish()

Signature
Publish data to the topic.
required
Raw bytes to publish on the configured topic.

publish_image()

Signature
Publish an image to the topic.
required
Image data as numpy array
default:"'rgb8'"
Image encoding (e.g., “rgb8”, “32FC1”)
default:"True"
Whether to use compressed image format (default: True)
default:"'jpeg'"
Compression format (“jpeg” or “png”), only used if compressed=True
default:"85"
JPEG quality (0-100), only used for JPEG compression

run()

Signature
Start the client by declaring a subscriber or publisher on the session.

stop()

Signature
Undeclare the subscriber and close the owned Zenoh session if any.