Class RESTServer
Defined in File rest_server.hpp
Class Documentation
-
class RESTServer
REST API server for ROS 2 Medkit Gateway.
Provides a RESTful interface to ROS 2 functionality including:
Discovery (areas, components)
Data access (topic read/write)
Operations (service calls, action goals)
Configuration (parameter management)
Fault management
Authentication (OAuth2-like flow)
The server delegates request handling to specialized handler classes organized by domain (health, areas, components, operations, config, faults, auth).
Public Functions
-
RESTServer(GatewayNode *node, const std::string &host, int port, const CorsConfig &cors_config, const AuthConfig &auth_config, const RateLimitConfig &rate_limit_config, const TlsConfig &tls_config = TlsConfig{})
-
~RESTServer()
-
void start()
-
void stop()
-
void set_trigger_handlers(TriggerManager &trigger_mgr)
Set trigger handlers (called by GatewayNode after TriggerManager is created). Creates TriggerHandlers using the existing handler context and SSE client tracker.
-
void set_aggregation_manager(AggregationManager *mgr)
Set aggregation manager on the handler context (called by GatewayNode when aggregation is enabled). Must be called before start() so handlers can forward requests to peers.
-
inline bool is_tls_enabled() const
Check if TLS/HTTPS is enabled.