RenderState
type RenderState = object;
RenderState is the information passed to your panel's onRender function.
To receive updates for a particular part of RenderState, you must first call
watch with the field name. For example, call
watch("currentTime")
to receive updates for currentTime
.
If a field is missing from RenderState, either the value has not changed since the last call to
onRender
, or you did not watch
the field.
Properties
currentFrame?
optional currentFrame: MessageEvent[];
The latest messages for the current render frame. These are new messages since the last render frame.
didSeek?
optional didSeek: boolean;
True if the data source performed a seek. This indicates that some data may have been skipped
(never appeared in the currentFrame
), so panels should clear out any stale state to avoid
displaying incorrect data.
allFrames?
optional allFrames: MessageEvent[];
All available messages. Best-effort list of all available messages.
Deprecated
Please use PanelExtensionContext.subscribeMessageRange instead.
parameters?
optional parameters: Map<string, ParameterValue>;
Map of current parameter values. Parameters are key/value pairs associated with the data source, and may not be available for all data sources. For example, ROS 1 live connections support parameters through the Parameter Server http://wiki.ros.org/Parameter%20Server.
sharedPanelState?
optional sharedPanelState: Record<string, unknown>;
Transient panel state shared between panels of the same type. This can be any data a panel author wishes to share between panels.
variables?
optional variables: Map<string, VariableValue>;
Map of current Studio variables. Variables are key/value pairs that are globally accessible to panels and scripts in the current layout. See https://docs.foxglove.dev/docs/visualization/variables for more information.
topics?
optional topics: Topic[];
List of available topics. This list includes subscribed and unsubscribed topics.
currentTime?
optional currentTime: Time;
A timestamp value indicating the current playback time.
startTime?
optional startTime: Time;
The start timestamp of the playback range for the current data source. For offline files it is expected to be present. For live connections, the start time may or may not be present depending on the data source.
endTime?
optional endTime: Time;
The end timestamp of the playback range for the current data source. For offline files it is expected to be present. For live connections, the end time may or may not be present depending on the data source.
previewTime?
optional previewTime: number;
A seconds value indicating a preview time. The preview time is set when a user hovers over the seek bar or when a panel sets the preview time explicitly. The preview time is a seconds value within the playback range.
i.e. A plot panel may set the preview time when a user is hovering over the plot to signal to other panels where the user is currently hovering and allow them to render accordingly.
colorScheme?
optional colorScheme: "dark" | "light";
The color scheme currently in use throughout the app.
appSettings?
optional appSettings: Map<string, AppSettingValue>;
Application settings. This will only contain keys/values that were subscribed to using @PanelExtensionContext.subscribeAppSettings