Enums
Enum types are C++ - style typedefs for corrresponding enums of zenoh-c / zenoh-pico C API.
-
typedef zenoh::Value zenoh::ErrorMessage
Text error message returned in
std::variant<T, ErrorMessage>
return types. The message is a sting represented aszenoh::Value
object. See alsozenoh::expect
function which eases access to the return value in this variant type.
-
template<typename T>
inline T zenoh::expect(std::variant<T, zenoh::ErrorMessage> &&v) Uility function which either returns the value or throws an exception with the
zenoh::ErrorMessage
value- Parameters:
v – the
std::variant<T, zenoh:ErrorMessage>
value- Throws:
<tt>zenoh::ErrorMessage</tt> – if
std::variant<T, zenoh::ErrorMessage>
value contains it- Returns:
the value of type
T
ifstd::variant<T, zenoh::ErrorMessage>
value contains it
-
typedef int8_t zenoh::ErrNo
Numeric error code value. This is a value < -1 returned by zenoh-c functions.
-
typedef ::z_sample_kind_t zenoh::SampleKind
zenoh::Sample
kind values.Values:
-
typedef ::z_encoding_prefix_t zenoh::EncodingPrefix
Zenoh encoding values for
zenoh::Encoding
These values are based on already existing HTTP MIME types and extended with other relevant encodings.Values:
Z_ENCODING_PREFIX_EMPTY: Encoding not defined.
Z_ENCODING_PREFIX_APP_OCTET_STREAM:
application/octet-stream
. Default value for all other cases. An unknown file type should use this type.Z_ENCODING_PREFIX_APP_CUSTOM: Custom application type. Non IANA standard.
Z_ENCODING_PREFIX_TEXT_PLAIN:
text/plain
. Default value for textual files. A textual file should be human-readable and must not contain binary data.Z_ENCODING_PREFIX_APP_PROPERTIES: Application properties type. Non IANA standard.
Z_ENCODING_PREFIX_APP_JSON:
application/json
. JSON format.Z_ENCODING_PREFIX_APP_SQL: Application sql type. Non IANA standard.
Z_ENCODING_PREFIX_APP_INTEGER: Application integer type. Non IANA standard.
Z_ENCODING_PREFIX_APP_FLOAT: Application float type. Non IANA standard.
Z_ENCODING_PREFIX_APP_XML:
application/xml
. XML.Z_ENCODING_PREFIX_APP_XHTML_XML:
application/xhtml+xml
. XHTML.Z_ENCODING_PREFIX_APP_X_WWW_FORM_URLENCODED:
application/x-www-form-urlencoded
. The keys and values are encoded in key-value tuples separated by ‘&’, with a ‘=’ between the key and the value.Z_ENCODING_PREFIX_TEXT_JSON: Text JSON. Non IANA standard.
Z_ENCODING_PREFIX_TEXT_HTML:
text/html
. HyperText Markup Language (HTML).Z_ENCODING_PREFIX_TEXT_XML:
text/xml
.Application/xml
is recommended as of RFC 7303 (section 4.1), buttext/xml
is still used sometimes.Z_ENCODING_PREFIX_TEXT_CSS:
text/css
. Cascading Style Sheets (CSS).Z_ENCODING_PREFIX_TEXT_CSV:
text/csv
. Comma-separated values (CSV).Z_ENCODING_PREFIX_TEXT_JAVASCRIPT:
text/javascript
. JavaScript.Z_ENCODING_PREFIX_IMAGE_JPEG:
image/jpeg
. JPEG images.Z_ENCODING_PREFIX_IMAGE_PNG:
image/png
. Portable Network Graphics.Z_ENCODING_PREFIX_IMAGE_GIF:
image/gif
. Graphics Interchange Format (GIF).
-
typedef ::z_consolidation_mode_t zenoh::ConsolidationMode
Consolidation mode values.
Values:
Z_CONSOLIDATION_MODE_AUTO: Let Zenoh decide the best consolidation mode depending on the query selector.
Z_CONSOLIDATION_MODE_NONE: No consolidation is applied. Replies may come in any order and any number.
Z_CONSOLIDATION_MODE_MONOTONIC: It guarantees that any reply for a given key expression will be monotonic in time w.r.t. the previous received replies for the same key expression. I.e., for the same key expression multiple replies may be received. It is guaranteed that two replies received at t1 and t2 will have timestamp ts2 > ts1. It optimizes latency.
Z_CONSOLIDATION_MODE_LATEST: It guarantees unicity of replies for the same key expression. It optimizes bandwidth.
-
typedef ::z_reliability_t zenoh::Reliability
Reliability values.
Values:
Z_RELIABILITY_BEST_EFFORT: Defines reliability as “best effort”
Z_RELIABILITY_RELIABLE: Defines reliability as “reliable”
-
typedef ::z_congestion_control_t zenoh::CongestionControl
Congestion control values.
Values:
Z_CONGESTION_CONTROL_BLOCK: Defines congestion control as “block”. Messages are not dropped in case of congestion control
Z_CONGESTION_CONTROL_DROP: Defines congestion control as “drop”. Messages are dropped in case of congestion control
-
typedef ::z_priority_t zenoh::Priority
Priority of Zenoh messages values.
Values:
Z_PRIORITY_REAL_TIME: Priority for “realtime” messages.
Z_PRIORITY_INTERACTIVE_HIGH: Highest priority for “interactive” messages.
Z_PRIORITY_INTERACTIVE_LOW: Lowest priority for “interactive” messages.
Z_PRIORITY_DATA_HIGH: Highest priority for “data” messages.
Z_PRIORITY_DATA: Default priority for “data” messages.
Z_PRIORITY_DATA_LOW: Lowest priority for “data” messages.
Z_PRIORITY_BACKGROUND: Priority for “background traffic” messages.
-
typedef ::z_query_target_t zenoh::QueryTarget
Query target values.
see also:
zenoh::query_target_default
Values:
Z_QUERY_TARGET_BEST_MATCHING: The nearest complete queryable if any else all matching queryables.
Z_QUERY_TARGET_ALL: All matching queryables.
Z_QUERY_TARGET_ALL_COMPLETE: A set of complete queryables.
-
inline zenoh::QueryTarget zenoh::query_target_default()
Constructs a default
zenoh::QueryTarget
- Returns:
a default
zenoh::QueryTarget
-
typedef ::z_whatami_t zenohpico::WhatAmI
Whatami values, defined as a bitmask
Values:
Z_WHATAMI_ROUTER: Bitmask to filter Zenoh routers.
Z_WHATAMI_PEER: Bitmask to filter for Zenoh peers.
Z_WHATAMI_CLIENT: Bitmask to filter for Zenoh clients.
See also
zenoh::as_cstr
Note
zenoh-pico implementation
-
enum zenohc::WhatAmI
Whatami values, defined as a bitmask.
See also
zenoh::as_cstr
Note
zenoh-c implementation
Values:
-
enumerator Z_WHATAMI_ROUTER
Bitmask to filter Zenoh routers.
-
enumerator Z_WHATAMI_PEER
Bitmask to filter for Zenoh peers.
-
enumerator Z_WHATAMI_CLIENT
Bitmask to filter for Zenoh clients.
-
enumerator Z_WHATAMI_ROUTER
-
inline const char *zenoh::as_cstr(zenoh::WhatAmI whatami)
Returns a string representation of the given
zenohc::WhatAmI
(or thezenohpico::WhatAmI
) value.- Parameters:
whatami – the
zenohc::WhatAmI
/zenohpico::WhatAmI
value- Returns:
a string representation of the given value