public class HistoryModes
extends CompositeDataset
Constructor and Description |
---|
HistoryModes()
Constructor that creates a History empty
|
Modifier and Type | Method and Description |
---|---|
void |
add(long time,
java.lang.String mode,
java.lang.String command,
long originalTime)
Add a history record
|
void |
addStates(long time,
ModelState states) |
java.lang.String |
get(long time) |
java.lang.String[] |
getAllStates()
Get the name of all states contained in this history
|
java.util.Date[] |
getBoundarieDates()
Get the earlier and latest date contained in this history
|
java.util.Date[] |
getBoundarieDatesForState(java.lang.String modeName)
For a given mode, get all start date and end date of this mode.
|
long |
getCellingTime(long time)
Get the least time greater than or equal to the given time (as long)
|
java.lang.String |
getCommand(long time) |
long |
getFloorTime(long time)
Get the greatest time less than or equal to the given time
|
java.lang.String[] |
getModesBetween(java.util.Date startDate,
java.util.Date endDate)
Get all the modes between two dates
|
long |
getOriginalTime(long time) |
ModelState |
getStates(long time) |
ModelState |
getStatesAt(long time)
Get all the states where the spacecraft was at the given time (as long)
|
long[] |
getTimes()
Get all times (as long) of actions contained in this history
|
void |
putAll(java.util.HashMap<java.lang.Long,java.lang.String> newset,
java.lang.String command,
long originalTime)
Put a group of actions into the history, all originated by the same sequence executed at the same time
|
public void add(long time, java.lang.String mode, java.lang.String command, long originalTime)
time
- time when the action occurred (number of milliseconds since January 1, 1970, 00:00:00 GMT)mode
- mode that the spacecraft goes by this actioncommand
- command that triggered this actionoriginalTime
- original execution time of the command that triggered this actionpublic java.lang.String get(long time)
time
- Time of the action (number of milliseconds since January 1, 1970, 00:00:00 GMT)public java.lang.String getCommand(long time)
time
- Time of the action (number of milliseconds since January 1, 1970, 00:00:00 GMT)public long getOriginalTime(long time)
time
- Time of the action (number of milliseconds since January 1, 1970, 00:00:00 GMT)public void addStates(long time, ModelState states)
time
- Time of the action (number of milliseconds since January 1, 1970, 00:00:00 GMT)states
- The ModelState object with all the states of the spacecraft at this timepublic ModelState getStates(long time)
time
- Time of the action (number of milliseconds since January 1, 1970, 00:00:00 GMT)public void putAll(java.util.HashMap<java.lang.Long,java.lang.String> newset, java.lang.String command, long originalTime)
newset
- Set of times and new modescommand
- Sequence that originates the transitionsoriginalTime
- execution time of the sequencepublic long[] getTimes()
public long getCellingTime(long time)
time
- public long getFloorTime(long time)
time
- public ModelState getStatesAt(long time)
time
- public java.util.Date[] getBoundarieDates()
public java.util.Date[] getBoundarieDatesForState(java.lang.String modeName)
modeName
- public java.lang.String[] getAllStates()
public java.lang.String[] getModesBetween(java.util.Date startDate, java.util.Date endDate)
startDate
- endDate
-