Package org.yamcs.simulator.pus
Class PusTime
java.lang.Object
org.yamcs.simulator.pus.PusTime
- All Implemented Interfaces:
Comparable<PusTime>
PUS time used by the simulator is 1 byte for the pfield, 4 bytes seconds and 3 bytes sub-second.
The seconds are counted from the Unix epoch (1970-01-01), so the value is a real on-board time that the ground can
interpret directly (preprocessor timeEncoding: {epoch: UNIX}) without needing time correlation. It advances
with a small constant drift relative to the host clock to keep the correlation demo in the pus-frames example
meaningful.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongdeltaMillis(PusTime other) voidencode(ByteBuffer bb) booleaninthashCode()booleanbooleanstatic PusTimenow()static PusTimeread(ByteBuffer bb) shiftByMillis(int timeShiftMillis) toString()
-
Field Details
-
LENGTH_BYTES
public static final int LENGTH_BYTES- See Also:
-
-
Constructor Details
-
PusTime
public PusTime(int seconds, long fractionalTime)
-
-
Method Details