Options

The classes representing the options passed to the API

struct QueryConsolidation : public zenohcxx::Copyable<::z_query_consolidation_t>

Replies consolidation mode to apply on replies of get operation.

Constructors

inline QueryConsolidation()

Create a new default QueryConsolidation value.

inline QueryConsolidation(ConsolidationMode v)

Create a new QueryConsolidation value with the given consolidation mode.

Parameters:

vzenoh::ConsolidationMode value

Methods

inline QueryConsolidation &set_mode(ConsolidationMode v)

Set the consolidation mode.

Parameters:

vzenoh::ConsolidationMode value

inline ConsolidationMode get_mode() const

The consolidation mode.

Returns:

zenoh::ConsolidationMode value

Operators

inline bool operator==(const QueryConsolidation &v) const

Equality operator.

Parameters:

v – the other QueryConsolidation to compare with

Returns:

true if the two values are equal (have the same consolidation mode)

inline bool operator!=(const QueryConsolidation &v) const

Inequality operator.

Parameters:

v – the other QueryConsolidation to compare with

Returns:

true if the two values are not equal (have different consolidation mode)

struct GetOptions : public zenohcxx::Copyable<::z_get_options_t>

Options passed to the get operation.

Constructors

inline GetOptions()

Create a new default GetOptions value.

Methods

inline GetOptions &set_target(QueryTarget v)

Set the target of the get operation.

Parameters:

vzenoh::QueryTarget value

Returns:

reference to the structure itself

inline GetOptions &set_consolidation(zenoh::QueryConsolidation v)

Set the consolidation mode to apply on replies of get operation.

Parameters:

vQueryConsolidation value

Returns:

reference to the structure itself

inline GetOptions &set_value(zenoh::Value v)

Set an optional value to attach to the query.

Parameters:

vValue value

Returns:

reference to the structure itself

inline QueryTarget get_target() const

The target of the get operation.

Returns:

zenoh::QueryTarget value

inline const zenoh::QueryConsolidation &get_consolidation() const

The consolidation mode to apply on replies of get operation.

Returns:

QueryConsolidation value

inline const zenoh::Value &get_value() const

The optional value to attach to the query.

Returns:

Value value

inline GetOptions &set_timeout_ms(uint64_t ms)

Set the timeout for the query operation.

Parameters:

v – timeout in milliseconds. 0 means default query timeout from zenoh configuration.

Returns:

reference to the structure itself

Note

zenoh-c only

inline uint64_t get_timeout_ms() const

The timeout for the query operation.

Returns:

timeout in milliseconds. 0 means default query timeout from zenoh configuration.

Note

zenoh-c only

inline const zenoh::AttachmentView &get_attachment() const

Get the attachment.

Returns:

zenoh::AttachmentView value

inline GetOptions &set_attachment(const zenoh::AttachmentView &a)

Set the attachment.

Parameters:

a – the zenoh::AttachmentView value

Returns:

reference to the structure itself

Operators

inline bool operator==(const GetOptions &v) const

Equality operator.

Parameters:

v – the other GetOptions to compare with

Returns:

true if the two values are equal (have the same target, consolidation mode and optional value)

inline bool operator!=(const GetOptions &v) const

Inequality operator.

Parameters:

v – the other GetOptions to compare with

Returns:

true if the two values are not equal (have different target, consolidation mode or optional value)

struct PutOptions : public zenohcxx::Copyable<::z_put_options_t>

Options passed to the put operation.

Constructors

inline PutOptions()

Create a new default PutOptions value.

Methods

inline const zenoh::Encoding &get_encoding() const

Get the encoding of the payload.

Returns:

zenoh::Encoding value

inline PutOptions &set_encoding(zenoh::Encoding e)

Set the encoding for the payload.

Parameters:

ezenoh::Encoding value

Returns:

reference to the structure itself

inline CongestionControl get_congestion_control() const

Get the congestion control mode.

Returns:

zenoh::CongestionControl value

inline PutOptions &set_congestion_control(CongestionControl v)

Set the congestion control mode.

Parameters:

vzenoh::CongestionControl value

Returns:

reference to the structure itself

inline Priority get_priority() const

Get the priority of the operation.

Returns:

zenoh::Priority value

inline PutOptions &set_priority(Priority v)

Set the priority of the operation.

Parameters:

vzenoh::Priority value

Returns:

reference to the structure itself

inline const zenoh::AttachmentView &get_attachment() const

Get the attachment.

Returns:

zenoh::AttachmentView value

inline PutOptions &set_attachment(const zenoh::AttachmentView &a)

Set the attachment.

Parameters:

a – the zenoh::AttachmentView value

Returns:

reference to the structure itself

Operators

inline bool operator==(const PutOptions &v) const

Equality operator.

Parameters:

v – the other PutOptions to compare with

Returns:

true if the two values are equal (have the same priority, congestion control mode and encoding)

inline bool operator!=(const PutOptions &v) const

Inequality operator.

Parameters:

v – the other PutOptions to compare with

Returns:

true if the two values are not equal (have different priority, congestion control mode or encoding)

struct DeleteOptions : public zenohcxx::Copyable<::z_delete_options_t>

Options passed to the delete operation.

Constructors

inline DeleteOptions()

Create a new default DeleteOptions value.

Methods

inline CongestionControl get_congestion_control() const

Get the congestion control mode.

Returns:

zenoh::CongestionControl value

inline DeleteOptions &set_congestion_control(CongestionControl v)

Set the congestion control mode.

Parameters:

vzenoh::CongestionControl value

Returns:

reference to the structure itself

inline Priority get_priority() const

Get the priority of the operation.

Returns:

zenoh::Priority value

inline DeleteOptions &set_priority(Priority v)

Set the priority of the operation.

Parameters:

vzenoh::Priority value

Returns:

reference to the structure itself

Operators

inline bool operator==(const DeleteOptions &v) const

Equality operator.

Parameters:

v – the other DeleteOptions to compare with

Returns:

true if the two values are equal (have the same priority and congestion control)

inline bool operator!=(const DeleteOptions &v) const

Inequality operator.

Parameters:

v – the other DeleteOptions to compare with

Returns:

true if the two values are not equal (have different priority or congestion control)

struct QueryReplyOptions : public zenohcxx::Copyable<::z_query_reply_options_t>

Options passed to the Query::reply operation.

Constructors

inline QueryReplyOptions()

Create a new default QueryReplyOptions value.

Methods

inline const zenoh::Encoding &get_encoding() const

Get the encoding of the payload.

Returns:

zenoh::Encoding value

inline QueryReplyOptions &set_encoding(zenoh::Encoding e)

Set the encoding for the payload.

Parameters:

ezenoh::Encoding value

Returns:

reference to the structure itself

inline const zenoh::AttachmentView &get_attachment() const

Get the attachment.

Returns:

zenoh::AttachmentView value

inline QueryReplyOptions &set_attachment(const zenoh::AttachmentView &a)

Set the attachment.

Parameters:

a – the zenoh::AttachmentView value

Returns:

reference to the structure itself

Operators

inline bool operator==(const QueryReplyOptions &v) const

Equality operator.

Parameters:

v – the other QueryReplyOptions to compare with

Returns:

true if the two values are equal (have the same encoding)

inline bool operator!=(const QueryReplyOptions &v) const

Inequality operator.

Parameters:

v – the other QueryReplyOptions to compare with

Returns:

true if the two values are not equal (have different encoding)

struct QueryableOptions : public zenohcxx::Copyable<::z_queryable_options_t>

Options to be passed when declaring a Queryable

Constructors

inline QueryableOptions()

Create a new default QueryableOptions value.

Methods

inline bool get_complete() const

Get the completeness of the queryable A queryable is defined as complete if it can serve any query “completely” related to the key expression on which it serves. The querier will not benefit from extra information from any other queryable.

Returns:

true if the queryable is complete

inline QueryableOptions &set_complete(bool v)

Set the completeness of the queryable.

Parameters:

v – true if the queryable is complete

Returns:

reference to the structure itself

Operators

inline bool operator==(const QueryableOptions &v) const

Equality operator.

Parameters:

v – the other QueryableOptions to compare with

Returns:

true if the two values are equal (have the same completeness)

inline bool operator!=(const QueryableOptions &v) const

Inequality operator.

Parameters:

v – the other QueryableOptions to compare with

Returns:

true if the two values are not equal (have different completeness)

struct SubscriberOptions : public zenohcxx::Copyable<::z_subscriber_options_t>

Options to be passed when declaring a 'Subscriber

Constructors

inline SubscriberOptions()

Create a new default SubscriberOptions value.

Methods

inline Reliability get_reliability() const

Get the reliability of the subscriber.

Returns:

zenoh::Reliability value

inline SubscriberOptions &set_reliability(Reliability v)

Set the reliability of the subscriber.

Parameters:

v – the zenoh::Reliability value

Returns:

reference to the structure itself

Operators

inline bool operator==(const SubscriberOptions &v) const

Equality operator.

Parameters:

v – the other SubscriberOptions to compare with

Returns:

true if the two values are equal (have the same reliability)

inline bool operator!=(const SubscriberOptions &v) const

Inequality operator.

Parameters:

v – the other SubscriberOptions to compare with

Returns:

true if the two values are not equal (have different reliability)

struct PullSubscriberOptions : public zenohcxx::Copyable<::z_pull_subscriber_options_t>

Options to be passed when declaring a PullSubscriber

Constructors

inline PullSubscriberOptions()

Create a new default PullSubscriberOptions value.

Methods

inline Reliability get_reliability() const

Get the reliability of the pull subscriber.

Returns:

zenoh::Reliability value

inline PullSubscriberOptions &set_reliability(Reliability v)

Set the reliability of the pull subscriber.

Parameters:

v – the zenoh::Reliability value

Returns:

reference to the structure itself

Operators

inline bool operator==(const PullSubscriberOptions &v) const

Equality operator.

Parameters:

v – the other PullSubscriberOptions to compare with

Returns:

true if the two values are equal (have the same reliability)

inline bool operator!=(const PullSubscriberOptions &v) const

Inequality operator.

Parameters:

v – the other PullSubscriberOptions to compare with

Returns:

true if the two values are not equal (have different reliability)

struct PublisherOptions : public zenohcxx::Copyable<::z_publisher_options_t>

Options to be passed when declaring a Publisher

Constructors

inline PublisherOptions()

Create a new default PublisherOptions value.

Methods

inline CongestionControl get_congestion_control() const

Get the congestion control of the publisher.

Returns:

zenoh::CongestionControl value

inline PublisherOptions &set_congestion_control(CongestionControl v)

Set the congestion control of the publisher.

Parameters:

v – the zenoh::CongestionControl value

Returns:

reference to the structure itself

inline Priority get_priority() const

Get the priority of the publisher.

Returns:

zenoh::Priority value

inline PublisherOptions &set_priority(Priority v)

Set the priority of the publisher.

Parameters:

v – the zenoh::Priority value

Returns:

reference to the structure itself

Operators

inline bool operator==(const PublisherOptions &v) const

Equality operator.

Parameters:

v – the other PublisherOptions to compare with

Returns:

true if the two values are equal (have the same congestion control and priority)

inline bool operator!=(const PublisherOptions &v) const

Inequality operator.

Parameters:

v – the other PublisherOptions to compare with

Returns:

true if the two values are not equal (have different congestion control or priority)

struct PublisherPutOptions : public zenohcxx::Copyable<::z_publisher_put_options_t>

Options to be passed to Publisher::put operation.

Constructors

inline PublisherPutOptions()

Create a new default PublisherPutOptions value.

Methods

inline const zenoh::Encoding &get_encoding() const

Get the encoding of the publisher.

Returns:

zenoh::Encoding value

inline PublisherPutOptions &set_encoding(zenoh::Encoding e)

Set the encoding of the publisher.

Parameters:

e – the zenoh::Encoding value

Returns:

reference to the structure itself

inline const zenoh::AttachmentView &get_attachment() const

Get the attachment.

Returns:

zenoh::AttachmentView value

inline PublisherPutOptions &set_attachment(const zenoh::AttachmentView &a)

Set the attachment.

Parameters:

a – the zenoh::AttachmentView value

Returns:

reference to the structure itself

Operators

inline bool operator==(const PublisherPutOptions &v) const

Equality operator.

Parameters:

v – the other PublisherPutOptions to compare with

Returns:

true if the two values are equal (have the same encoding)

inline bool operator!=(const PublisherPutOptions &v) const

Inequality operator.

Parameters:

v – the other PublisherPutOptions to compare with

Returns:

true if the two values are not equal (have different encoding)

struct PublisherDeleteOptions : public zenohcxx::Copyable<::z_publisher_delete_options_t>

Options to be passed to delete operation of a publisher.

Operators

inline bool operator==(const zenoh::PublisherOptions&) const

Equality operator.

Parameters:

v – the other PublisherDeleteOptions to compare with

Returns:

true if the two values are equal

inline bool operator!=(const zenoh::PublisherOptions &v) const

Inequality operator.

Parameters:

v – the other PublisherDeleteOptions to compare with

Returns:

true if the two values are not equal