ark::pipeline::PeriodicProducerStage
Defined in header “ark/pipeline/testing/producer_stage.hh”.
A stage that periodically publishes the given object from the specified list at a fixed rate. This can be used to help pump messages through your stage to test it.
Methods
-
PeriodicProducerStage(std::vector< ObjectType > objects, std::chrono::nanoseconds rate, std::string channel_name, std::string name, PeriodicProducerTriggerType trigger_type)
Constructor. Initialize with a list of objects you wish to produce, and the rate you wish to produce them at. Ther flag limit_events_to_objects_list defaults to true, which limits the trigger of the timer which produces the objects configured. The trigger_type set to TriggerConstantRate will enable this stage to be triggered indefinitely at the configured rate. -
void initialize(pipeline::StageInterface & interface)
Called from the executor when we are initialized.