Struct RemoteAccessGatewayOptions

Struct Documentation

struct RemoteAccessGatewayOptions

Options for creating a remote access gateway.

Public Members

Context context

The logging context for this gateway.

std::string name

The name of the device/server reported in the ServerInfo message.

If empty, the device name from the Foxglove platform is used.

std::string device_token

Device token for Foxglove platform authentication.

If empty, the token is read from the FOXGLOVE_DEVICE_TOKEN environment variable.

RemoteAccessGatewayCallbacks callbacks

Event callbacks.

RemoteAccessGatewayCapabilities capabilities = RemoteAccessGatewayCapabilities::None

Advertised capabilities.

std::vector<std::string> supported_encodings

Supported encodings for client requests.

FetchAssetHandler fetch_asset

A fetch asset handler callback.

SinkChannelFilterFn sink_channel_filter

A sink channel filter callback.

QosClassifierFn qos_classifier

A QoS classifier callback.

If set, this callback is invoked for each channel to determine its quality-of-service profile. If not set, all channels use the default lossy profile.

SuppressVideoTranscodeFn suppress_video_transcode

A video-transcode opt-out callback.

If set, this callback is invoked for each channel; returning true delivers the channel as data instead of transcoding it to video. If not set, all video-capable channels are transcoded.

ParameterHandler parameter_handler

A parameter handler.

When set, this handler takes precedence over the deprecated onGetParameters / onSetParameters callbacks. Registering a handler also automatically advertises the Parameters capability. Subscribe / unsubscribe notifications still go through the onParametersSubscribe / onParametersUnsubscribe callbacks on RemoteAccessGatewayCallbacks; wire those up separately if you want to be notified.

Both ParameterHandler::onGet and ParameterHandler::onSet are required when a handler is supplied; setting only one returns FoxgloveError::ValueError from RemoteAccessGateway::create.

std::optional<std::string> foxglove_api_url = std::nullopt

Override the Foxglove API base URL.

std::optional<uint64_t> foxglove_api_timeout_secs = std::nullopt

Override the Foxglove API timeout (in seconds).

std::optional<size_t> message_backlog_size = std::nullopt

Override the message backlog size.

Each participant gets an independent queue of this size. If a participant’s queue fills up (because it is not reading fast enough), it will be disconnected and asked to reconnect.

By default, each participant gets a queue of 1024 messages.

VideoEncoderBackend video_encoder = VideoEncoderBackend::Auto

Preferred backend for encoding published video tracks.

Defaults to VideoEncoderBackend::Auto, which lets the SDK choose and honors the FOXGLOVE_VIDEO_ENCODER environment variable.

std::optional<size_t> max_data_track_message_size = std::nullopt

Override the maximum lossy data-track message size.

Lossy data-track messages larger than this many bytes are dropped before publishing, with a throttled warning, so one high-bandwidth channel cannot starve the others. Must be at least 1200 bytes (one data-channel packet).

By default, the limit is 102400 bytes (100 KiB).