Holoscan SDK v4.2.0

Class SubscriberAvailableCondition

Base Type

class SubscriberAvailableCondition : public holoscan::Condition

Native condition that gates execution on pub/sub subscriber match readiness.

This condition is ready when the configured transmitter has at least min_subscriber_count matched subscribers.

==Parameters==

  • transmitter (std::shared_ptr<holoscan::Transmitter>, required): The transmitter to monitor. In most applications this is provided as an output port name (for example Arg("transmitter", "out")) and resolved by the framework.

  • min_subscriber_count (uint64_t, optional, default 1): Minimum number of matched subscribers required for READY state.

  • require_pubsub_connector (bool, optional, default true): If true, the transmitter must resolve to a PubSubTransmitter, otherwise initialization throws.

  • poll_period_ms (int64_t, optional, default 100): Polling interval used while waiting for matched subscribers. The condition returns WAIT_TIME until the next poll.

  • stabilization_ms (int64_t, optional, default 0): Optional post-match stabilization delay. When greater than zero, the condition waits for the match criterion to remain satisfied for this duration before transitioning to READY.

  • latch_ready (bool, optional, default false): If true, once the condition becomes ready it remains ready for the lifetime of the condition rather than returning to wait on later disconnects.

  • ready_on_shutdown (bool, optional, default false): Reserved policy flag for future coordinated-shutdown behavior.

Public Functions

HOLOSCAN_CONDITION_FORWARD_ARGS (SubscriberAvailableCondition) SubscriberAvailableCondition()=default
virtual void setup(ComponentSpec &spec) override

Define the condition specification.

Parameters

spec – The reference to the component specification.

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.

virtual void update_state(int64_t timestamp) override

Checks if the state of the condition can be updated and updates it.

Parameters

timestamp – The current timestamp

virtual void check(int64_t timestamp, SchedulingStatusType *status_type, int64_t *target_timestamp) const override

Check the condition status before allowing execution.

If the condition is waiting for a time event ‘target_timestamp’ will contain the target timestamp.

Parameters
  • timestamp – The current timestamp

  • status_type – The status of the condition

  • target_timestamp – The target timestamp (used if the term is waiting for a time event).

virtual void on_execute(int64_t timestamp) override

Called each time after the entity of this term was executed.

Parameters

timestamp – The current timestamp

Previous Class Subgraph
Next Class SyntheticClock
© Copyright 2022-2026, NVIDIA. Last updated on May 11, 2026