Class MessageAvailableCondition
Defined in File message_available.hpp
Base Type
public holoscan::gxf::GXFCondition
(Class GXFCondition)
-
class MessageAvailableCondition : public holoscan::gxf::GXFCondition
Condition class that allows an operator to execute only when one or more messages are available on a given input port.
This condition applies to a specific input port of the operator as determined by setting the “receiver” argument.
This condition can also be set via the
Operator::setup
method usingIOSpec::condition
withConditionType::kMessageAvailable
. In that case, the receiver is already known from the port corresponding to theIOSpec
object, so the “receiver” argument is unnecessary.==Parameters==
min_size (uint64_t): The minimum number of messages that must be available on the input port before the operator will be considered READY.
front_stage_max_size (size_t): If set, the condition will only allow execution if the number of messages in the front stage of the receiver’s double-buffer queue does not exceed this count. In most cases, this parameter does not need to be set.
receiver (std::string): The receiver whose message queue will be checked. This should be specified by the name of the Operator’s input port the condition will apply to. The Holoscan SDK will then automatically replace the port name with the actual receiver object at application run time.
Public Functions
-
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Condition, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>
inline explicit MessageAvailableCondition(ArgT &&arg, ArgsT&&... args)
-
MessageAvailableCondition() = default
-
inline explicit MessageAvailableCondition(size_t min_size)
-
inline MessageAvailableCondition(size_t min_size, size_t front_stage_max_size)
-
inline virtual const char *gxf_typename() const override
-
inline std::shared_ptr<Receiver> receiver()
-
void min_size(uint64_t min_size)
-
inline uint64_t min_size()
-
void front_stage_max_size(size_t front_stage_max_size)
-
inline size_t front_stage_max_size()
-
virtual void setup(ComponentSpec &spec) override
Define the condition specification.
- Parameters
spec – The reference to the component specification.
-
inline virtual void initialize() override
Initialize the component.
This method is called only once when the component is created for the first time, and use of light-weight initialization.
-
nvidia::gxf::MessageAvailableSchedulingTerm *get() const