Entities

The classes which performs the Zenoh network operations

class Publisher : public zenohcxx::Owned<::z_owned_publisher_t>

An owned zenoh publisher. Constructed by Session::declare_publisher method.

Methods

bool put(const zenoh::BytesView &payload, const zenoh::PublisherPutOptions &options, ErrNo &error)

Publish the payload.

Parameters:
Returns:

true if the payload was published, false otherwise

bool put(const zenoh::BytesView &payload, ErrNo &error)

Publish the payload.

Parameters:
Returns:

true if the payload was published, false otherwise

bool put(const zenoh::BytesView &payload, const zenoh::PublisherPutOptions &options)

Publish the payload.

Parameters:
Returns:

true if the payload was published, false otherwise

bool put(const zenoh::BytesView &payload)

Publish the payload.

Parameters:

payloadPayload to publish

Returns:

true if the payload was published, false otherwise

bool delete_resource(const zenoh::PublisherDeleteOptions &options, ErrNo &error)

Undeclare the resource.

Parameters:
Returns:

true if the request was sent, false otherwise

bool delete_resource(ErrNo &error)

Undeclare the resource.

Parameters:

error – the error code zenoh::ErrNo

Returns:

true if the request was sent, false otherwise

bool delete_resource(const zenoh::PublisherDeleteOptions &options)

Undeclare the resource.

Parameters:

optionsPublisherDeleteOptions

Returns:

true if the request was sent, false otherwise

bool delete_resource()

Send a delete request.

Returns:

true if the request was sent, false otherwise

inline zenoh::KeyExpr get_keyexpr() const

Get the key expression of the publisher.

Returns:

zenoh::KeyExpr value

bool put_owned(zenoh::Payload &&payload, const zenoh::PublisherPutOptions &options, ErrNo &error)

Publish the payload got from ShmBuf or from Sample

Parameters:
Returns:

true if the payload was published, false otherwise

Note

zenoh-c only

bool put_owned(zenoh::Payload &&payload, ErrNo &error)

Publish the payload got from ShmBuf or from Sample

Parameters:
Returns:

true if the payload was published, false otherwise

Note

zenoh-c only

bool put_owned(zenoh::Payload &&payload, const zenoh::PublisherPutOptions &options)

Publish the payload got from ShmBuf or from Sample

Parameters:
Returns:

true if the payload was published, false otherwise

Note

zenoh-c only

bool put_owned(zenoh::Payload &&payload)

Publish the payload got from ShmBuf or from Sample

Parameters:

payloadPayload to publish

Returns:

true if the payload was published, false otherwise

Note

zenoh-c only

class Subscriber : public zenohcxx::Owned<::z_owned_subscriber_t>

An owned zenoh subscriber. Destroying subscriber cancels the subscription Constructed by Session::declare_subscriber method

class PullSubscriber : public zenohcxx::Owned<::z_owned_pull_subscriber_t>

An owned zenoh pull subscriber. Destroying the subscriber cancels the subscription. Constructed by Session::declare_pull_subscriber method

Methods

inline bool pull()

Pull the next sample.

Returns:

true if the sample was pulled, false otherwise

inline bool pull(ErrNo &error)

Pull the next sample.

Parameters:

error – the error code

Returns:

true if the sample was pulled, false otherwise

class Queryable : public zenohcxx::Owned<::z_owned_queryable_t>

An owned zenoh queryable. Constructed by Session::declare_queryable method.