docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class InMemoryMessageBuilder

    Creates messageQueue immediately in memory. Later it can be converted to any message with IMessageBuilder

    Inheritance
    object
    InMemoryMessageBuilder
    Implements
    IMessageBuilder
    IMessageProducer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    public class InMemoryMessageBuilder : IMessageBuilder, IMessageProducer

    Methods

    AddBool(string, bool)

    Add a key/value pair to the message.

    Declaration
    public void AddBool(string key, bool value)
    Parameters
    Type Name Description
    string key

    The key to add

    bool value

    The value to add

    AddBoolArray(string, IEnumerable<bool>)

    Add a key/value array pair to the message.

    Declaration
    public void AddBoolArray(string key, IEnumerable<bool> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<bool> value

    The array of values to add

    AddByte(string, byte)

    Add a key/value pair to the message.

    Declaration
    public void AddByte(string key, byte value)
    Parameters
    Type Name Description
    string key

    The key to add

    byte value

    The value to add

    AddByteArray(string, IEnumerable<byte>)

    Add a key/value array pair to the message.

    Declaration
    public void AddByteArray(string key, IEnumerable<byte> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<byte> value

    The array of values to add

    Remarks

    This method is obsolete, using AddEncodedImage(string, string, byte[]) instead

    AddChar(string, char)

    Add a key/value pair to the message.

    Declaration
    public 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
    public void AddDouble(string key, double value)
    Parameters
    Type Name Description
    string key

    The key to add

    double value

    The value to add

    AddDoubleArray(string, IEnumerable<double>)

    Add a key/value array pair to the message.

    Declaration
    public void AddDoubleArray(string key, IEnumerable<double> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<double> value

    The array of values to add

    AddEncodedImage(string, string, byte[])

    Add an encoded byte array image to the message as a key/value pair.

    Declaration
    public void AddEncodedImage(string key, string extension, byte[] value)
    Parameters
    Type Name Description
    string key

    The key to add

    string extension

    Image extension for the image type, for example a PNG image would be "png"

    byte[] value

    The array of values to add

    AddFloat(string, float)

    Add a key/value pair to the message.

    Declaration
    public void AddFloat(string key, float value)
    Parameters
    Type Name Description
    string key

    The key to add

    float value

    The value to add

    AddFloatArray(string, IEnumerable<float>)

    Add a key/value array pair to the message.

    Declaration
    public void AddFloatArray(string key, IEnumerable<float> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<float> value

    The array of values to add

    AddInt(string, int)

    Add a key/value pair to the message.

    Declaration
    public void AddInt(string key, int value)
    Parameters
    Type Name Description
    string key

    The key to add

    int value

    The value to add

    AddIntArray(string, IEnumerable<int>)

    Add a key/value array pair to the message.

    Declaration
    public void AddIntArray(string key, IEnumerable<int> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<int> value

    The array of values to add

    AddLong(string, long)

    Add a key/value pair to the message.

    Declaration
    public void AddLong(string key, long value)
    Parameters
    Type Name Description
    string key

    The key to add

    long value

    The value to add

    AddLongArray(string, IEnumerable<long>)

    Add a key/value array pair to the message.

    Declaration
    public void AddLongArray(string key, IEnumerable<long> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<long> 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
    public 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
    public 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
    public void AddString(string key, string value)
    Parameters
    Type Name Description
    string key

    The key to add

    string value

    The value to add

    AddStringArray(string, IEnumerable<string>)

    Add a key/value array pair to the message.

    Declaration
    public void AddStringArray(string key, IEnumerable<string> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<string> value

    The array of values to add

    AddTensor(string, Tensor)

    Add a key/tensor value pair to the message.

    Declaration
    public 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, uint)

    Add a key/value pair to the message.

    Declaration
    public void AddUInt(string key, uint value)
    Parameters
    Type Name Description
    string key

    The key to add

    uint value

    The value to add

    AddUIntArray(string, IEnumerable<uint>)

    Add a key/value array pair to the message.

    Declaration
    public void AddUIntArray(string key, IEnumerable<uint> value)
    Parameters
    Type Name Description
    string key

    The key to add

    IEnumerable<uint> value

    The array of values to add

    ToMessage(IMessageBuilder)

    Convert contents int a message.

    Declaration
    public void ToMessage(IMessageBuilder builder)
    Parameters
    Type Name Description
    IMessageBuilder builder

    The message builder that will convert the class's contents into a message

    Implements

    IMessageBuilder
    IMessageProducer
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)