Enum PeriodicConditionPolicy
Defined in File periodic.hpp
-
enum class holoscan::PeriodicConditionPolicy
Condition class to support periodic execution of operators.
The recess (pause) period indicates the minimum amount of time that must elapse before the
compute()
method can be executed again. The period is specified as a string containing a number and an (optional) unit. If no unit is given the value is assumed to be in nanoseconds. Supported units are: ms, s, hz (case insensitive)For example: “10000000”, “10ms”, “1s”, “50Hz”.
Using
std::string
as the first parameter ofmake_condition<T>
is only available throughArg
.For example:
Arg("recess_period") = "1s"
orArg("recess_period", "1s")
.The recess (pause) period can also be specified as an integer value (type
int64_t
) in nanoseconds or as a value of typestd::chrono::duration<Rep, Period>
(see https://en.cppreference.com/w/cpp/chrono/duration).Example:
1000
(1000 nanoseconds == 1 microsecond)5ns
,10us
,1ms
,0.5s
,1min
,0.5h
, etc.requires
#include <chrono>
andusing namespace std::chrono_literals;
std::chrono::milliseconds(10)
std::chrono::duration<double, std::milli>(10)
std::chrono::duration<double, std::ratio<1, 1000>>(10)
This class wraps GXF SchedulingTerm(
nvidia::gxf::PeriodicSchedulingTerm
).==Parameters==
recess_period (std::string): The recess (pause) period value used by the condition. The period is specified as a string containing a number and an (optional) unit. If no unit is given the value is assumed to be in nanoseconds. Supported units are: ms, s, hz (case insensitive). Constructors are also provided that allow specifying this period using an integer value (type
int64_t
) in nanoseconds. Alternatively, astd::chrono::duration
can be used (see example above).
Values:
-
enumerator kCatchUpMissedTicks
-
enumerator kMinTimeBetweenTicks
-
enumerator kNoCatchUpMissedTicks