Class GatewayNode

Inheritance Relationships

Base Type

  • public rclcpp::Node

Class Documentation

class GatewayNode : public rclcpp::Node

Public Functions

explicit GatewayNode(const rclcpp::NodeOptions &options = rclcpp::NodeOptions{})
~GatewayNode() override
GatewayNode(const GatewayNode&) = delete
GatewayNode &operator=(const GatewayNode&) = delete
GatewayNode(GatewayNode&&) = delete
GatewayNode &operator=(GatewayNode&&) = delete
const ThreadSafeEntityCache &get_thread_safe_cache() const

Get the thread-safe entity cache with O(1) lookups.

Returns:

Reference to ThreadSafeEntityCache

DataAccessManager *get_data_access_manager() const

Get the DataAccessManager instance.

Note

The returned pointer is valid as long as the GatewayNode exists. REST server is stopped before GatewayNode destruction to ensure safe access.

Returns:

Raw pointer to DataAccessManager (valid for lifetime of GatewayNode)

OperationManager *get_operation_manager() const

Get the OperationManager instance.

Returns:

Raw pointer to OperationManager (valid for lifetime of GatewayNode)

DiscoveryManager *get_discovery_manager() const

Get the DiscoveryManager instance.

Returns:

Raw pointer to DiscoveryManager (valid for lifetime of GatewayNode)

ConfigurationManager *get_configuration_manager() const

Get the ConfigurationManager instance.

Returns:

Raw pointer to ConfigurationManager (valid for lifetime of GatewayNode)

FaultManager *get_fault_manager() const

Get the FaultManager instance.

Returns:

Raw pointer to FaultManager (valid for lifetime of GatewayNode)

BulkDataStore *get_bulk_data_store() const

Get the BulkDataStore instance.

Returns:

Raw pointer to BulkDataStore (valid for lifetime of GatewayNode)

LogManager *get_log_manager() const

Get the LogManager instance.

Returns:

Raw pointer to LogManager (valid for lifetime of GatewayNode)

SubscriptionManager *get_subscription_manager() const

Get the SubscriptionManager instance.

Returns:

Raw pointer to SubscriptionManager (valid for lifetime of GatewayNode)

UpdateManager *get_update_manager() const

Get the UpdateManager instance.

Returns:

Raw pointer to UpdateManager (valid for lifetime of GatewayNode), or nullptr if disabled

LockManager *get_lock_manager() const

Get the LockManager instance.

Returns:

Raw pointer to LockManager (valid for lifetime of GatewayNode), or nullptr if locking disabled

ScriptManager *get_script_manager() const

Get the ScriptManager instance.

Returns:

Raw pointer to ScriptManager (valid for lifetime of GatewayNode), or nullptr if not initialized

PluginManager *get_plugin_manager() const

Get the PluginManager instance.

Returns:

Raw pointer to PluginManager (valid for lifetime of GatewayNode)

ResourceSamplerRegistry *get_sampler_registry() const

Get the ResourceSamplerRegistry instance.

Returns:

Raw pointer to ResourceSamplerRegistry (valid for lifetime of GatewayNode)

TransportRegistry *get_transport_registry() const

Get the TransportRegistry instance.

Returns:

Raw pointer to TransportRegistry (valid for lifetime of GatewayNode)

std::shared_ptr<SSEClientTracker> get_sse_client_tracker() const

Get the SSEClientTracker instance.

Returns:

Shared pointer to SSEClientTracker

ResourceChangeNotifier *get_resource_change_notifier() const

Get the ResourceChangeNotifier instance.

Returns:

Raw pointer to ResourceChangeNotifier (valid for lifetime of GatewayNode)

TriggerManager *get_trigger_manager() const

Get the TriggerManager instance.

Returns:

Raw pointer to TriggerManager (valid for lifetime of GatewayNode), or nullptr if disabled

ConditionRegistry *get_condition_registry() const

Get the ConditionRegistry instance.

Returns:

Raw pointer to ConditionRegistry (valid for lifetime of GatewayNode)

AggregationManager *get_aggregation_manager() const

Get the AggregationManager instance.

Returns:

Raw pointer to AggregationManager (valid for lifetime of GatewayNode), or nullptr if disabled

void handle_entity_change_notification(const EntityChangeScope &scope)

Handle a plugin’s PluginContext::notify_entities_changed request.

Runs a single refresh_cache() pass synchronously. The scope hint is accepted and logged but the current implementation ignores it and always does a full refresh - future work may limit the rediscovery to the indicated area / component. The entry point is safe to call from any thread: refresh passes triggered by plugin notifications, the periodic refresh timer, and startup are serialized by an internal mutex inside refresh_cache() because refresh touches discovery state (e.g., HybridDiscoveryStrategy::refresh()) that itself assumes single-threaded execution - ThreadSafeEntityCache’s own mutex is not sufficient.

void trigger_reentrant_notification_for_testing(const EntityChangeScope &scope)

Test hook: simulate a plugin calling notify_entities_changed from within its own IntrospectionProvider::introspect() callback.

Sets the per-thread in-refresh flag (the same flag the real refresh path uses) and invokes handle_entity_change_notification(scope). The gateway is expected to short-circuit the call with a warning log and return without reloading the manifest.

Exists purely to let unit tests exercise the reentrancy guard without spinning up a full plugin with a real IntrospectionProvider. Do NOT call this from production code.