Class ReplayStateReceiverBackend
Receives .holo file state.
Inherited Members
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.StateReceivers.dll
Syntax
public sealed class ReplayStateReceiverBackend : StateReceiverBackend, INotifyPropertyChanged, ISensorSelection, INotifyPropertyChanged
Properties
AvailableSensors
Declaration
public IReadOnlyList<string> AvailableSensors { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<><string> |
ConnectionState
Declaration
public SensorConnectionState ConnectionState { get; }
Property Value
| Type | Description |
|---|---|
| SensorConnectionState |
InterpolationFrameSize
Gets or sets the interpolation frame size controls the delay data is presented at, where this delay window is used to interpolate underlying data, to ensure it is played back at the same rate the underlying records represent. Disabling interpolation by setting it to zero may result in rubber-banding.
The window size is specified in seconds.
Declaration
public float InterpolationFrameSize { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
IsConnected
Declaration
public bool IsConnected { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsPaused
Gets or sets a value indicating whether playback of the underlying data is paused. This differs from disabling and re-enabling this component in that it will not reset the playback state, but resume playback where it was previously paused.
Declaration
public bool IsPaused { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Loop
Gets or sets a value indicating whether the playback of the underlying recording should loop.
Note that playback is stopped by disabling this component. Setting this to true will not automatically enable this component.
Declaration
public bool Loop { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Replay
Gets or sets the underlying replay that is currently used for playback. Setting this to a new value will cause playback to be re-started.
Declaration
public Replay Replay { get; set; }
Property Value
| Type | Description |
|---|---|
| Replay |
Route
Gets or sets the current route set in the replay.
Declaration
public override IRoute Route { get; protected set; }
Property Value
| Type | Description |
|---|---|
| IRoute |
Overrides
SelectedSensor
Declaration
public string SelectedSensor { get; }
Property Value
| Type | Description |
|---|---|
| string |
TravelInformationState
Gets the travel information based on the current position along the Route.
Declaration
public override TravelInformationState TravelInformationState { get; }
Property Value
| Type | Description |
|---|---|
| TravelInformationState |
Overrides
VehicleSensorState
Gets or sets the most recently received state.
This may be updated from worker threads, so when using the value in conditionals it is recommended to store the value in a local variable.
Declaration
public override VehicleSensorState VehicleSensorState { get; protected set; }
Property Value
| Type | Description |
|---|---|
| VehicleSensorState |
Overrides
Methods
Connect()
Declaration
public void Connect()
Disable()
Declaration
public override void Disable()
Overrides
Disconnect()
Declaration
public void Disconnect()
Enable()
Declaration
public override void Enable()
Overrides
OnApplicationResume()
Declaration
public override void OnApplicationResume()
Overrides
OnDestroy()
Declaration
protected override void OnDestroy()
Overrides
Pair()
Initiates the pairing process for the selected sensor. This should typically be called after the PairingRequired event is fired and the user has confirmed that the device is in pairing mode.
Declaration
public void Pair()
ScanSensors()
Declaration
public void ScanSensors()
Seek(float)
Declaration
public void Seek(float deltaInSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| float | deltaInSeconds |
Seek(TimeSpan)
Tries to seek by the specified amount of seconds. Advances playback by the specified amount of time if the specified number is positive, rewinds playback for negative values. This will fire OnVehicleLocalizationReset(). Note that this will cause the player position to interpolate towards the position after the seek. Also note that this does not cause generation state to be re-evaluated. For content generation, a seek is originally just a potentially large jump in player position. In particular when rewinding it is strongly suggested to manually stop and restart generation to avoid unexpected results.
Declaration
public void Seek(TimeSpan delta)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | delta | The time delta to apply, in seconds. |
SelectSensor(string)
Declaration
public void SelectSensor(string sensorName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sensorName |
Update()
Declaration
public override void Update()
Overrides
Events
PairingRequired
Occurs when the selected sensor requires pairing before a connection can be established. The developer can hook into this callback to show a UI prompt instructing the user to put the device in pairing mode before calling Pair().
Declaration
public event System.Action PairingRequired
Event Type
| Type | Description |
|---|---|
| Action |