ark::pipeline::SimMailbox

Defined in header “ark/pipeline/sim_mailbox.hh”.


This class will intercept all messages coming from different sources and organize them onto a timeline. Messages can then be injected into the simulated pipeline at the appropriate times.

Methods

  • void deliver(const SubscriberBasePtr & subscriber, AbstractEnvelopeCPtr envelope)
    Delivers the given message onto the specified publisher channels. Uses the envelopes publisher time to organize the messages.

  • void tick(std::chrono::steady_clock::time_point new_time)
    Marks that the clock has advanced to the given time. All messages at this timestamp (or before it) will be pushed onto their subscribers.

  • std::optional< std::chrono::nanoseconds > get_time_remaining_until_limit(const std::chrono::steady_clock::time_point & now)
    Returns the amount of time we can move forward before the next message should be published.