Goby3
3.1.5a
2024.05.23
|
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS, "channel" in LCM, or "variable" in MOOS. More...
#include <goby/middleware/group.h>
Public Member Functions | |
constexpr | Group (const char *c, std::uint32_t i=invalid_numeric_group) |
Construct a group with a (C-style) string and possibly a numeric value (when this Group will be used on intervehicle and outer layers). More... | |
constexpr | Group (std::uint32_t i=invalid_numeric_group) |
Construct a group with only a numeric value. More... | |
constexpr std::uint32_t | numeric () const |
Access the group's numeric value. More... | |
constexpr const char * | c_str () const |
Access the group's string value as a C string. More... | |
operator std::string () const | |
Access the group's string value as a C++ string. More... | |
Static Public Attributes | |
static constexpr std::uint32_t | broadcast_group {0} |
Special group number representing the broadcast group (used when no grouping is required for a given type) More... | |
static constexpr std::uint32_t | invalid_numeric_group {std::numeric_limits<std::uint32_t>::max()} |
Special group number representing an invalid numeric group (unsuitable for intervehicle and outer layers) More... | |
static constexpr std::uint32_t | maximum_valid_group |
Protected Member Functions | |
void | set_c_str (const char *c) |
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS, "channel" in LCM, or "variable" in MOOS.
A Group is defined by a string and possibly also an integer value (when used on intervehicle and outer layers). For interprocess and inner layers, the string value is used (and the integer value is optional). For intervehicle and outer layers, the integer value is used to minimizing wire size over these restricted links.
Group is intended to instantiated as a compile-time constant (constexpr
), e.g.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inlineprotected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |