Class SensorStreamer<TClient, TMsg>
Base class that every sensor has to implement
Sensor streams readings to the server defined in RosConnection singleton instance
Inheritance
System.Object
SensorStreamer<TClient, TMsg>
Assembly: cs.temp.dll.dll
Syntax
public abstract class SensorStreamer<TClient, TMsg> : MonoBehaviour where TClient : ClientBase where TMsg : IMessage
Type Parameters
Name |
Description |
TClient |
|
TMsg |
|
Fields
_vehicle
Declaration
protected Transform _vehicle
Field Value
Type |
Description |
Transform |
|
address
Declaration
Field Value
Type |
Description |
System.String |
|
UpdateFrequency
Declaration
public float UpdateFrequency
Field Value
Type |
Description |
System.Single |
|
Properties
_streamWriter
Used to write sensor reading messages
Declaration
protected IClientStreamWriter<TMsg> _streamWriter { get; }
Property Value
Type |
Description |
IClientStreamWriter<TMsg> |
|
streamingClient
A client instance used for streaming sensor readings
Declaration
protected TClient streamingClient { get; }
Property Value
vehicle
Declaration
public Transform vehicle { get; }
Property Value
Type |
Description |
Transform |
|
Methods
FixedUpdate()
Declaration
protected void FixedUpdate()
SendMessage()
Declaration
protected abstract void SendMessage()
Declaration
protected void StreamSensor(SensorBase sensor, Func<Grpc.Core.Metadata, DateTime?, CancellationToken, AsyncClientStreamingCall<TMsg, Std.Empty>> streamingFn)
Parameters
Type |
Name |
Description |
SensorBase |
sensor |
|
Func<Grpc.Core.Metadata, System.Nullable<System.DateTime>, System.Threading.CancellationToken, AsyncClientStreamingCall<TMsg, Std.Empty>> |
streamingFn |
|
TrySendMessage()
Declaration
protected void TrySendMessage()
Update()
Declaration
UpdateVehicle()
Declaration
public void UpdateVehicle()