holoscan::Message
holoscan::Message
Class to define a message.
A message is a data structure that is used to pass data between operators. It wraps a std::any object and provides a type-safe interface to access the data.
This class is used by the holoscan::gxf::GXFWrapper to support the Holoscan native operator. The holoscan::gxf::GXFWrapper will hold the object of this class and delegate the message to the Holoscan native operator.
Constructors
Message
Default
Move
Construct a new Message object.
Methods
set_value
Set the value object.
Template parameters
The type of the value.
Parameters
The value to be wrapped by the message.
value
Get the value object.
Returns: The value wrapped by the message.
as
Get the value object as a shared_ptr to a specific type.
This method can only be used when the std::any value is a shared pointer to the specified type.
Returns: The value wrapped by the message.
Template parameters
The type of the value to be returned in the shared pointer.