Table of Contents

Class DataTracker

Namespace
NominalSystems.Messages
Assembly
NominalSystems.Messages.dll

This component is able to track data from messages and properties and export to a range of data formats.

public class DataTracker : Component
Inheritance
DataTracker
Inherited Members

Constructors

DataTracker()

Default constructor

public DataTracker()

Fields

DatabaseDirectory

[-] The full path to the database directory path. If the directory is empty, it will use the current working directory.

public string DatabaseDirectory

Field Value

string

Interval

[s] The interval between storing data on the messages

public double Interval

Field Value

double

Methods

Deregister(Message)

Deregisters a message that is being tracked by the component.

public bool Deregister(Message message)

Parameters

message Message

[-] The message to deregister

Returns

bool

A successful message deregistration

IsRegistered(Message)

Returns whether a particular message has already been registered.

public bool IsRegistered(Message message)

Parameters

message Message

[-] The message to check

Returns

bool

A flag if the message is registered

OnFinish(double)

Called when the 'Component' is finishing

protected override void OnFinish(double time)

Parameters

time double

current time (seconds)

OnUpdate(double, double)

Called when the 'Component' should update

protected override void OnUpdate(double time, double step)

Parameters

time double

current time (seconds)

step double

the time step (seconds)

Register(Message)

Registers a message to be tracked by the component to be saved to a database.

public bool Register(Message message)

Parameters

message Message

[-] The message to register

Returns

bool

A successful message register

RemoveAll()

Removes all messages that are being tracked by the component.

public void RemoveAll()

Request(Message, string)

Requests a dictionary mapping of time (in seconds) to the value within the property of a particular message.

public Dictionary<double, string> Request(Message message, string property)

Parameters

message Message

The message to request data from

property string

The property to check

Returns

Dictionary<double, string>

A dictionary mapping

WriteAllToCSV(string, string)

Writes all current data registered to individual CSV files.

public bool WriteAllToCSV(string directory, string delimiter = "|")

Parameters

directory string

The directory to save the data

delimiter string

The CSV seperator character

Returns

bool

A successful write flag

WriteToCSV(Message, string, string)

Writes the data from a particular message to a CSV file with a particular path.

public bool WriteToCSV(Message message, string path, string delimiter = "|")

Parameters

message Message

The message to save

path string

The path name of the file to save

delimiter string

The CSV seperator character

Returns

bool

A successful write flag