Table of Contents

Class Message

Namespace
NominalSystems.Core
Assembly
NominalSystems.Core.dll

[NominalSystems] Base Simulation message that is overridden by the templated message class.

public abstract class Message
Inheritance
Message

Constructors

Message()

protected Message()

Properties

ID

The object's unique id

public Guid ID { get; }

Property Value

Guid

PayloadObject

The payload object of the message

public abstract object PayloadObject { get; set; }

Property Value

object

PayloadType

The payload type of the message

public abstract Type PayloadType { get; }

Property Value

Type

Methods

Clone(Message)

Clones a message from another message

public static Message Clone(Message other)

Parameters

other Message

The message to clone

Returns

Message

The cloned message

GetMemoryUsed()

Returns the total amount of memory used by this particular message.

public int GetMemoryUsed()

Returns

int

[bytes] The total number of bytes used

GetPropertyNames(bool)

Gets all the properties from the string along with their units, formatted like 'Property [unit]'.

public List<string> GetPropertyNames(bool units = true)

Parameters

units bool

A flag whether to use units

Returns

List<string>

An array of all properties with the format

GetPropertyValues()

Gets all the property values from the message as a string.

public List<string> GetPropertyValues()

Returns

List<string>

An array of all properties with the format

ToJson()

Converts the current message to a JSON string complete with the data.

public string ToJson()

Returns

string

The JSON string