Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
goby::zenoh::detail Namespace Reference

Classes

struct  InterModuleTag
 ImplementationTag for zenoh intermodule transporters. More...
 
struct  InterProcessTag
 ImplementationTag for zenoh interprocess transporters. More...
 

Functions

bool is_reserved (char c)
 Characters that cannot appear in a key expression chunk.
 
std::string escape_chunk (const std::string &chunk)
 Percent-encode the characters a key expression chunk cannot carry.
 
std::string unescape_chunk (const std::string &chunk)
 Invert escape_chunk(). A trailing or malformed escape is passed through unchanged.
 
std::vector< std::string > split_identifier (const std::string &identifier)
 Split a Goby interprocess identifier into its '/'-delimited components.
 
std::string join_identifier (const std::vector< std::string > &components)
 Rebuild a Goby identifier from key expression chunks, with the trailing delimiter Goby expects.
 
std::string identifier_to_key (const std::string &root, const std::string &identifier, bool wildcard_suffix)
 Map a Goby identifier onto a key expression below root.
 
std::string key_to_identifier (const std::string &root, const std::string &key)
 Invert identifier_to_key() for a received sample, whose key is always fully qualified.
 

Variables

constexpr const char * empty_chunk = "%"
 The chunk standing for an empty identifier component, which Zenoh would reject.
 

Function Documentation

◆ escape_chunk()

std::string goby::zenoh::detail::escape_chunk ( const std::string &  chunk)
inline

Percent-encode the characters a key expression chunk cannot carry.

Definition at line 55 of file key_expression.h.

◆ identifier_to_key()

std::string goby::zenoh::detail::identifier_to_key ( const std::string &  root,
const std::string &  identifier,
bool  wildcard_suffix 
)
inline

Map a Goby identifier onto a key expression below root.

Parameters
rootleading chunks shared by every key on this layer, without a trailing '/'
identifierGoby identifier, fully qualified or wildcarded
wildcard_suffixappend "/&zwj;**" so that a subscription made with a wildcarded identifier matches the process and thread chunks a publication carries

Definition at line 172 of file key_expression.h.

◆ is_reserved()

bool goby::zenoh::detail::is_reserved ( char  c)
inline

Characters that cannot appear in a key expression chunk.

Zenoh rejects '*', '?', '#' and '$' outright; '/' would silently introduce a new chunk. A chunk starting with '@' is verbatim, which '*' and '**' never match, so a wildcard subscription would miss it. '' joins them because it introduces an escape sequence here.

Definition at line 44 of file key_expression.h.

◆ join_identifier()

std::string goby::zenoh::detail::join_identifier ( const std::vector< std::string > &  components)
inline

Rebuild a Goby identifier from key expression chunks, with the trailing delimiter Goby expects.

Definition at line 153 of file key_expression.h.

◆ key_to_identifier()

std::string goby::zenoh::detail::key_to_identifier ( const std::string &  root,
const std::string &  key 
)
inline

Invert identifier_to_key() for a received sample, whose key is always fully qualified.

Returns
the Goby identifier, or an empty string if the key does not lie below root

Definition at line 189 of file key_expression.h.

◆ split_identifier()

std::vector< std::string > goby::zenoh::detail::split_identifier ( const std::string &  identifier)
inline

Split a Goby interprocess identifier into its '/'-delimited components.

Handles both the fully qualified form (group, scheme, type, process, thread) and the wildcard forms used to subscribe, which stop early. The leading and trailing delimiters frame the components rather than separate them, so an empty component is kept. Anything from the end delimiter onward is ignored.

Definition at line 121 of file key_expression.h.

◆ unescape_chunk()

std::string goby::zenoh::detail::unescape_chunk ( const std::string &  chunk)
inline

Invert escape_chunk(). A trailing or malformed escape is passed through unchanged.

Definition at line 80 of file key_expression.h.

Variable Documentation

◆ empty_chunk

constexpr const char* goby::zenoh::detail::empty_chunk = "%"
constexpr

The chunk standing for an empty identifier component, which Zenoh would reject.

Every escape sequence carries two hex digits, so no non-empty component escapes to this.

Definition at line 52 of file key_expression.h.