Template Class TestHarnessSinkOp
Defined in File test_harness.hpp
Base Type
public holoscan::Operator(Class Operator)
-
template<typename T>
class TestHarnessSinkOp : public holoscan::Operator Simple validation sink operator.
This operator receives data from the test operator and validates it against a set of provided validation functions. It is used to test operators that produce data to be consumed by another operator. For operators with N output ports, the test application should create N sink operators.
- Template Parameters
T – The type of the data to receive
Public Functions
- HOLOSCAN_OPERATOR_FORWARD_ARGS (TestHarnessSinkOp) TestHarnessSinkOp()=default
-
inline virtual void setup(holoscan::OperatorSpec &spec) override
Define the operator specification.
- Parameters
spec – The reference to the operator specification.
-
inline virtual void compute(holoscan::InputContext &op_input, holoscan::OutputContext&, holoscan::ExecutionContext&) override
Implement the compute method.
This method is called by the runtime multiple times. The runtime calls this method until the operator is stopped.
- Parameters
op_input – The input context of the operator.
op_output – The output context of the operator.
context – The execution context of the operator.
-
inline void set_validator(std::function<void(const T&)> validator)
-
inline void set_validators(const std::vector<std::function<void(const T&)>> &validators)
-
inline size_t get_received_count() const