Interface IMessageBuilder
Interface for a message builder class. A message builder is used to convert data inherited from IMessageProducer and convert it to a message.
Namespace: UnityEngine.Perception.GroundTruth.DataModel
Syntax
public interface IMessageBuilder
Methods
AddBool(String, Boolean)
Add a key/value pair to the message.
Declaration
void AddBool(string key, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Boolean | value | The value to add |
AddBoolArray(String, Boolean[])
Add a key/value array pair to the message.
Declaration
void AddBoolArray(string key, bool[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Boolean[] | value | The array of values to add |
AddByte(String, Byte)
Add a key/value pair to the message.
Declaration
void AddByte(string key, byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Byte | value | The value to add |
AddByteArray(String, Byte[])
Add a key/value array pair to the message.
Declaration
void AddByteArray(string key, byte[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Byte[] | value | The array of values to add |
AddChar(String, Char)
Add a key/value pair to the message.
Declaration
void AddChar(string key, char value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Char | value | The value to add |
AddDouble(String, Double)
Add a key/value pair to the message.
Declaration
void AddDouble(string key, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Double | value | The value to add |
AddDoubleArray(String, Double[])
Add a key/value array pair to the message.
Declaration
void AddDoubleArray(string key, double[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Double[] | value | The array of values to add |
AddFloat(String, Single)
Add a key/value pair to the message.
Declaration
void AddFloat(string key, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Single | value | The value to add |
AddFloatArray(String, Single[])
Add a key/value array pair to the message.
Declaration
void AddFloatArray(string key, float[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Single[] | value | The array of values to add |
AddInt(String, Int32)
Add a key/value pair to the message.
Declaration
void AddInt(string key, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Int32 | value | The value to add |
AddIntArray(String, Int32[])
Add a key/value array pair to the message.
Declaration
void AddIntArray(string key, int[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Int32[] | value | The array of values to add |
AddLong(String, Int64)
Add a key/value pair to the message.
Declaration
void AddLong(string key, long value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Int64 | value | The value to add |
AddLongArray(String, Int64[])
Add a key/value array pair to the message.
Declaration
void AddLongArray(string key, long[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Int64[] | value | The array of values to add |
AddNestedMessage(String)
Adds a nested message to the message. A nested message is a new nested hierarchy inside of the message. This method returns a new builder set to write at the new level.
Declaration
IMessageBuilder AddNestedMessage(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key of the new nested message element |
Returns
| Type | Description |
|---|---|
| IMessageBuilder | The builder used to build the nested messages |
AddNestedMessageToVector(String)
Retrieves the builder for a nested message that takes in more than one value.
Declaration
IMessageBuilder AddNestedMessageToVector(string arrayKey)
Parameters
| Type | Name | Description |
|---|---|---|
| String | arrayKey | The key of the nested element |
Returns
| Type | Description |
|---|---|
| IMessageBuilder | The builder of the nested elment |
AddString(String, String)
Add a key/value pair to the message.
Declaration
void AddString(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| String | value | The value to add |
AddStringArray(String, String[])
Add a key/value array pair to the message.
Declaration
void AddStringArray(string key, string[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| String[] | value | The array of values to add |
AddTensor(String, Tensor)
Add a key/tensor value pair to the message.
Declaration
void AddTensor(string key, Tensor tensor)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| Tensor | tensor | The tensor value to add |
AddUInt(String, UInt32)
Add a key/value pair to the message.
Declaration
void AddUInt(string key, uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| UInt32 | value | The value to add |
AddUintArray(String, UInt32[])
Add a key/value array pair to the message.
Declaration
void AddUintArray(string key, uint[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key to add |
| UInt32[] | value | The array of values to add |