Table of Contents

Class EpochMessage

Namespace
NominalSystems.Messages
Assembly
NominalSystems.Messages.dll

[Nominal] The "Epoch" message

public class EpochMessage : Message<EpochPayload>
Inheritance
Message<EpochPayload>
EpochMessage
Inherited Members
Message<EpochPayload>.Payload
Message<EpochPayload>.ToString()
Message<EpochPayload>.PayloadType
Message<EpochPayload>.PayloadObject

Constructors

EpochMessage()

Default constructor

public EpochMessage()

EpochMessage(NsDateTime)

Constructor with a datetime parameter

public EpochMessage(NsDateTime dateTime)

Parameters

dateTime NsDateTime

Properties

Day

Day

public int Day { get; set; }

Property Value

int

Elapsed

Seconds Elapsed since beginning of simulation

public double Elapsed { get; set; }

Property Value

double

Hours

Hours

public int Hours { get; set; }

Property Value

int

Minutes

Minutes

public int Minutes { get; set; }

Property Value

int

Month

Month

public int Month { get; set; }

Property Value

int

Seconds

Seconds

public double Seconds { get; set; }

Property Value

double

Year

Year

public int Year { get; set; }

Property Value

int

Methods

GetDateTime()

Returns the Datatime format of the Epoch

public NsDateTime GetDateTime()

Returns

NsDateTime

The epoch format

GetDayOfYear()

Gets the current day of the year

public int GetDayOfYear()

Returns

int

The current day of the year

GetDaysInYear()

Returns the number of days in the current calendar year

public int GetDaysInYear()

Returns

int

The number of days in the year

GetDecimalYear()

Returns the year as a decimal place with the decimal being the fraction within the year.

public double GetDecimalYear()

Returns

double

The decimal year

GetMilliseconds()

Returns the Milliseconds of the current seconds

public int GetMilliseconds()

Returns

int

The number of milliseconds

GetSecondsOfDay()

Returns the number of seconds in the day that has elapsed

public double GetSecondsOfDay()

Returns

double

The number of seconds in the day

IsLeapYear()

Determins if a year is a leap year and has 366 days

public bool IsLeapYear()

Returns

bool

A flag for if the year is a leap year

SetFromDateTime(NsDateTime)

Sets the message from a DateTime structure

public void SetFromDateTime(NsDateTime dateTime)

Parameters

dateTime NsDateTime

The datetime to set from