pub struct SysTime(/* private fields */);Expand description
A wrapper around CFE_TIME_SysTime_t representing a specific time.
Implementations§
Source§impl SysTime
impl SysTime
Sourcepub fn subseconds(&self) -> u32
pub fn subseconds(&self) -> u32
Returns the subseconds component of the time. The unit is 1/2^32 seconds.
Sourcepub fn now() -> Self
pub fn now() -> Self
Returns the current spacecraft time in the mission-defined default format (TAI or UTC). This is the most common time function to use.
Sourcepub fn now_tai() -> Self
pub fn now_tai() -> Self
Returns the current TAI (International Atomic Time).
Not portable to all missions. TAI maintenance in flight is
not guaranteed — prefer now when possible.
Sourcepub fn now_utc() -> Self
pub fn now_utc() -> Self
Returns the current UTC (Coordinated Universal Time).
Not portable to all missions. UTC can jump backward on
leap second events — prefer now when
possible.
Sourcepub fn now_stcf() -> SysTime
pub fn now_stcf() -> SysTime
Returns the current value of the spacecraft time correction factor (STCF).
Sourcepub fn to_ccsds(self) -> [u8; 6]
pub fn to_ccsds(self) -> [u8; 6]
Converts a CFE SysTime into the 6-byte CCSDS Day Segmented time format.
This is a crucial utility function for creating telemetry.
Format:
- Bytes 0-3: Seconds since epoch (Big Endian)
- Bytes 4-5: Subseconds, representing fractions of a second in 1/2^16 increments (Big Endian)