public class CcsdsTime extends Object implements Comparable<CcsdsTime>
| Modifier and Type | Field and Description |
|---|---|
static int |
MS_IN_DAY |
static int |
SEC_IN_DAY |
| Constructor and Description |
|---|
CcsdsTime(int numDays,
long picosecInDay) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CcsdsTime o) |
static CcsdsTime |
fromCcsds(byte[] ds)
P-field is implicit (not present, defaulted to 41 hex)
|
static CcsdsTime |
fromCcsdsPico(byte[] ds)
P-field is implicit (not present, defaulted to 42 hex)
|
static CcsdsTime |
fromJavaMillisec(long javaTime)
Converts a java time in milliseconds
|
static CcsdsTime |
fromSle(ConditionalTime time) |
static CcsdsTime |
fromSle(Time time)
Gets the time from the SLE time class
|
static CcsdsTime |
fromUnix(long unixSeconds,
int nanosec)
Converts a UNIX time in seconds since 1970, nanoseconds in second (such as returned by gettitmeofday)
|
byte[] |
getDaySegmented()
P-field is implicit (not present, defaulted to 41 hex)
|
byte[] |
getDaySegmentedPico()
T-field:
2 octets: number of days since 1958/01/01 00:00:00
4 octets: number of milliseconds of the day
4 octets: number of picoseconds of the millisecond
(set to 0 if not used)
|
int |
getNumDays() |
long |
getPicosecInDay() |
static CcsdsTime |
now()
Gets the current time
|
long |
toJavaMillisec()
Converts to java milliseconds.
|
static Time |
toSle(CcsdsTime time,
int sleVersion) |
Time |
toSle(int sleVersion) |
static ConditionalTime |
toSleConditional(CcsdsTime time,
int sleVersion) |
String |
toString()
Formats the time with up to nanosecond resolution
|
String |
toStringPico()
Converts to ISO8860 string with 12 digits picoseconds after dot
|
public static final int SEC_IN_DAY
public static final int MS_IN_DAY
public static CcsdsTime fromCcsds(byte[] ds)
T-field:
ds - public static CcsdsTime fromCcsdsPico(byte[] ds)
T-field:
ds - public static CcsdsTime now()
public static CcsdsTime fromJavaMillisec(long javaTime)
javaTime - public static CcsdsTime fromUnix(long unixSeconds, int nanosec)
unixSeconds - seconds since 1-Jan-1970 00:00:00 (without leap seconds)nanosec - nanoseconds in secondpublic byte[] getDaySegmented()
T-field:
public byte[] getDaySegmentedPico()
T-field:
public long getPicosecInDay()
public int getNumDays()
public Time toSle(int sleVersion)
public static CcsdsTime fromSle(Time time)
time - public static CcsdsTime fromSle(ConditionalTime time)
public static ConditionalTime toSleConditional(CcsdsTime time, int sleVersion)
public long toJavaMillisec()
public int compareTo(CcsdsTime o)
compareTo in interface Comparable<CcsdsTime>public String toString()
public String toStringPico()
Copyright © 2020 Space Applications Services. All rights reserved.