Class RemoteAccessGateway¶
Defined in File remote_access.hpp
Class Documentation¶
-
class RemoteAccessGateway¶
A remote access gateway for live visualization and teleop in Foxglove.
The gateway connects to the Foxglove platform and allows remote clients to subscribe to channels and receive data.
Note
RemoteAccessGateway is fully thread-safe, but RemoteAccessGatewayCallbacks may be invoked concurrently from multiple threads, so you will need to use synchronization in your callbacks.
Public Functions
-
RemoteAccessConnectionStatus connectionStatus() const¶
Get the current connection status.
-
FoxgloveError addService(Service &&service) const noexcept¶
Advertises support for the provided service.
- Parameters:
service – The service to add.
-
FoxgloveError removeService(std::string_view name) const noexcept¶
Removes a service that was previously advertised.
- Parameters:
name – The name of the service to remove.
-
void publishParameterValues(std::vector<Parameter> &¶ms)¶
Publishes parameter values to all subscribed clients.
Requires RemoteAccessGatewayCapabilities::Parameters.
- Parameters:
params – Updated parameters.
-
FoxgloveError publishStatus(RemoteAccessStatusLevel level, std::string_view message, std::optional<std::string_view> id = std::nullopt) const noexcept¶
Publishes a status message to all connected participants.
The caller may optionally provide a message ID, which can be used in a subsequent call to
removeStatus().- Parameters:
level – Status level value.
message – Status message.
id – Optional message ID.
-
FoxgloveError removeStatus(const std::vector<std::string_view> &ids) const¶
Removes status messages from all connected participants.
Previously published status messages are referenced by ID.
- Parameters:
ids – Message IDs.
-
FoxgloveError publishConnectionGraph(const ConnectionGraph &graph) const¶
Publish a connection graph to all subscribed clients.
Requires RemoteAccessGatewayCapabilities::ConnectionGraph.
- Parameters:
graph – The connection graph to publish.
-
FoxgloveError stop()¶
Gracefully shut down the gateway.
Public Static Functions
-
static FoxgloveResult<RemoteAccessGateway> create(RemoteAccessGatewayOptions &&options)¶
Create and start a gateway with the given options.
-
RemoteAccessConnectionStatus connectionStatus() const¶