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>.PayloadMessage<EpochPayload>.ToString()Message<EpochPayload>.PayloadTypeMessage<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
Elapsed
Seconds Elapsed since beginning of simulation
public double Elapsed { get; set; }
Property Value
Hours
Hours
public int Hours { get; set; }
Property Value
Minutes
Minutes
public int Minutes { get; set; }
Property Value
Month
Month
public int Month { get; set; }
Property Value
Seconds
Seconds
public double Seconds { get; set; }
Property Value
Year
Year
public int Year { get; set; }
Property Value
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
NsDateTimeThe datetime to set from