Interface IMessageDeserializer
Deserializes IMessage data from a transport-specific binary format.
Namespace: Unity.SimulationPro.Foundation
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
public interface IMessageDeserializer
Remarks
The UseRos2Schema flag selects between ROS 1 and ROS 2 wire formats where the message structure differs between the two versions.
Properties
UseRos2Schema
Gets a value indicating whether messages should be deserialized using the ROS 2 wire schema rather than the ROS 1 schema.
Declaration
bool UseRos2Schema { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
BeginMessage(string[])
Begins deserialization of a new message, providing the ordered field name list.
Declaration
void BeginMessage(string[] fieldNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | fieldNames | The ordered names of the message fields. |
EndMessage()
Finalizes deserialization of the current message.
Declaration
void EndMessage()
Read(out bool)
Reads a single bool value.
Declaration
void Read(out bool data)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | data | The deserialized value. |
Read(out bool[])
Reads a variable-length array of bool values.
Declaration
void Read(out bool[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| bool[] | data | The deserialized array. |
Read(out bool[], int)
Reads a fixed-length array of bool values.
Declaration
void Read(out bool[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| bool[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out byte)
Reads a single byte value.
Declaration
void Read(out byte data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | data | The deserialized value. |
Read(out byte[])
Reads a variable-length array of byte values.
Declaration
void Read(out byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The deserialized array. |
Read(out byte[], int)
Reads a fixed-length array of byte values.
Declaration
void Read(out byte[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out double)
Reads a single double value.
Declaration
void Read(out double data)
Parameters
| Type | Name | Description |
|---|---|---|
| double | data | The deserialized value. |
Read(out double[])
Reads a variable-length array of double values.
Declaration
void Read(out double[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | data | The deserialized array. |
Read(out double[], int)
Reads a fixed-length array of double values.
Declaration
void Read(out double[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out short)
Reads a single short value.
Declaration
void Read(out short data)
Parameters
| Type | Name | Description |
|---|---|---|
| short | data | The deserialized value. |
Read(out short[])
Reads a variable-length array of short values.
Declaration
void Read(out short[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | data | The deserialized array. |
Read(out short[], int)
Reads a fixed-length array of short values.
Declaration
void Read(out short[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out int)
Reads a single int value.
Declaration
void Read(out int data)
Parameters
| Type | Name | Description |
|---|---|---|
| int | data | The deserialized value. |
Read(out int[])
Reads a variable-length array of int values.
Declaration
void Read(out int[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | data | The deserialized array. |
Read(out int[], int)
Reads a fixed-length array of int values.
Declaration
void Read(out int[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out long)
Reads a single long value.
Declaration
void Read(out long data)
Parameters
| Type | Name | Description |
|---|---|---|
| long | data | The deserialized value. |
Read(out long[])
Reads a variable-length array of long values.
Declaration
void Read(out long[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| long[] | data | The deserialized array. |
Read(out long[], int)
Reads a fixed-length array of long values.
Declaration
void Read(out long[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| long[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out sbyte)
Reads a single sbyte value.
Declaration
void Read(out sbyte data)
Parameters
| Type | Name | Description |
|---|---|---|
| sbyte | data | The deserialized value. |
Read(out sbyte[])
Reads a variable-length array of sbyte values.
Declaration
void Read(out sbyte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| sbyte[] | data | The deserialized array. |
Read(out sbyte[], int)
Reads a fixed-length array of sbyte values.
Declaration
void Read(out sbyte[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| sbyte[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out float)
Reads a single float value.
Declaration
void Read(out float data)
Parameters
| Type | Name | Description |
|---|---|---|
| float | data | The deserialized value. |
Read(out float[])
Reads a variable-length array of float values.
Declaration
void Read(out float[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | data | The deserialized array. |
Read(out float[], int)
Reads a fixed-length array of float values.
Declaration
void Read(out float[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out string)
Reads a single string value.
Declaration
void Read(out string data)
Parameters
| Type | Name | Description |
|---|---|---|
| string | data | The deserialized value. |
Read(out string[])
Reads a variable-length array of string values.
Declaration
void Read(out string[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | data | The deserialized array. |
Read(out string[], int)
Reads a fixed-length array of string values.
Declaration
void Read(out string[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out ushort)
Reads a single ushort value.
Declaration
void Read(out ushort data)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | data | The deserialized value. |
Read(out ushort[])
Reads a variable-length array of ushort values.
Declaration
void Read(out ushort[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort[] | data | The deserialized array. |
Read(out ushort[], int)
Reads a fixed-length array of ushort values.
Declaration
void Read(out ushort[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out uint)
Reads a single uint value.
Declaration
void Read(out uint data)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | data | The deserialized value. |
Read(out uint[])
Reads a variable-length array of uint values.
Declaration
void Read(out uint[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | data | The deserialized array. |
Read(out uint[], int)
Reads a fixed-length array of uint values.
Declaration
void Read(out uint[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read(out ulong)
Reads a single ulong value.
Declaration
void Read(out ulong data)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | data | The deserialized value. |
Read(out ulong[])
Reads a variable-length array of ulong values.
Declaration
void Read(out ulong[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong[] | data | The deserialized array. |
Read(out ulong[], int)
Reads a fixed-length array of ulong values.
Declaration
void Read(out ulong[] data, int fixedLength)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Read<T>(out T)
Reads a single nested IMessage value.
Declaration
void Read<T>(out T data) where T : IMessage
Parameters
| Type | Name | Description |
|---|---|---|
| T | data | The deserialized message. |
Type Parameters
| Name | Description |
|---|---|
| T | The message type to read. |
Read<T>(out T[])
Reads a variable-length array of nested IMessage values.
Declaration
void Read<T>(out T[] data) where T : IMessage
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | data | The deserialized array. |
Type Parameters
| Name | Description |
|---|---|
| T | The message element type. |
Read<T>(out T[], int)
Reads a fixed-length array of nested IMessage values.
Declaration
void Read<T>(out T[] data, int fixedLength) where T : IMessage
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | data | The deserialized array. |
| int | fixedLength | The expected fixed length of the array. |
Type Parameters
| Name | Description |
|---|---|
| T | The message element type. |