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
PayloadObject
The payload object of the message
public abstract object PayloadObject { get; set; }
Property Value
PayloadType
The payload type of the message
public abstract Type PayloadType { get; }
Property Value
Methods
Clone(Message)
Clones a message from another message
public static Message Clone(Message other)
Parameters
other
MessageThe 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
boolA flag whether to use units
Returns
GetPropertyValues()
Gets all the property values from the message as a string.
public List<string> GetPropertyValues()
Returns
ToJson()
Converts the current message to a JSON string complete with the data.
public string ToJson()
Returns
- string
The JSON string