Class OutgoingMessage
Utility class for forming the data that is sent to the SideChannel.
Implements
Inherited Members
Namespace: Unity.MLAgents.SideChannels
Assembly: Unity.ML-Agents.dll
Syntax
public class OutgoingMessage : IDisposable
Constructors
OutgoingMessage()
Create a new empty OutgoingMessage.
Declaration
public OutgoingMessage()
Methods
Dispose()
Clean up the internal storage.
Declaration
public void Dispose()
SetRawBytes(byte[])
Overwrite the message with a specific byte array.
Declaration
public void SetRawBytes(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | Data |
WriteBoolean(bool)
Write a boolean value to the message.
Declaration
public void WriteBoolean(bool b)
Parameters
Type | Name | Description |
---|---|---|
bool | b | Boolean value |
WriteFloat32(float)
Write a float values to the message.
Declaration
public void WriteFloat32(float f)
Parameters
Type | Name | Description |
---|---|---|
float | f | Float value |
WriteFloatList(IList<float>)
Write a list or array of floats to the message.
Declaration
public void WriteFloatList(IList<float> floatList)
Parameters
WriteInt32(int)
Write an integer value to the message.
Declaration
public void WriteInt32(int i)
Parameters
Type | Name | Description |
---|---|---|
int | i | Integer value |
WriteString(string)
Write a string value to the message.
Declaration
public void WriteString(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s | String value |