Class TriangleListPrimitiveChannel¶
Defined in File schemas.hpp
Class Documentation¶
-
class TriangleListPrimitiveChannel¶
A channel for logging TriangleListPrimitive messages to a topic.
Note
While channels are fully thread-safe, the TriangleListPrimitive struct is not thread-safe. Avoid modifying it concurrently or during a log operation.
Public Functions
-
FoxgloveError log(const TriangleListPrimitive &msg, std::optional<uint64_t> log_time = std::nullopt) noexcept¶
Log a message to the channel.
- Parameters:
msg – The TriangleListPrimitive message to log.
log_time – The timestamp of the message. If omitted, the current time is used.
-
uint64_t id() const noexcept¶
Uniquely identifies a channel in the context of this program.
- Returns:
The ID of the channel.
-
TriangleListPrimitiveChannel(const TriangleListPrimitiveChannel &other) noexcept = delete¶
-
TriangleListPrimitiveChannel &operator=(const TriangleListPrimitiveChannel &other) noexcept = delete¶
-
TriangleListPrimitiveChannel(TriangleListPrimitiveChannel &&other) noexcept = default¶
Default move constructor.
-
TriangleListPrimitiveChannel &operator=(TriangleListPrimitiveChannel &&other) noexcept = default¶
Default move assignment.
-
~TriangleListPrimitiveChannel() = default¶
Default destructor.
Public Static Functions
-
static FoxgloveResult<TriangleListPrimitiveChannel> create(const std::string_view &topic, const Context &context = Context())¶
Create a new channel.
- Parameters:
topic – The topic name. You should choose a unique topic name per channel for compatibility with the Foxglove app.
context – The context which associates logs to a sink. If omitted, the default context is used.
-
FoxgloveError log(const TriangleListPrimitive &msg, std::optional<uint64_t> log_time = std::nullopt) noexcept¶