public class ExternalSystem extends java.lang.Object implements java.lang.Comparable<ExternalSystem>
Modifier and Type | Class and Description |
---|---|
static class |
ExternalSystem.ExternalTypeEnum |
Modifier and Type | Field and Description |
---|---|
protected boolean |
active |
protected long |
attitudeTimeMillis |
protected java.util.Map<java.lang.String,java.lang.Object> |
dataStorage |
protected java.util.Map<java.lang.String,java.lang.Long> |
dataStorageTime |
protected java.lang.String |
id |
protected CoordinateSystem |
location |
protected long |
locationTimeMillis |
protected VehicleType.SystemTypeEnum |
type |
protected ExternalSystem.ExternalTypeEnum |
typeExternal |
protected VehicleType.VehicleTypeEnum |
typeVehicle |
Constructor and Description |
---|
ExternalSystem(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ExternalSystem o) |
boolean |
containsData(java.lang.String key) |
boolean |
containsData(java.lang.String key,
long ageMillis) |
long |
getAttitudeTimeMillis() |
java.util.Collection<java.lang.String> |
getDataStorageKeys() |
java.lang.String |
getId() |
LocationType |
getLocation() |
long |
getLocationTimeMillis() |
java.lang.String |
getName() |
double |
getPitchDegrees() |
double |
getRollDegrees() |
VehicleType.SystemTypeEnum |
getType() |
ExternalSystem.ExternalTypeEnum |
getTypeExternal() |
VehicleType.VehicleTypeEnum |
getTypeVehicle() |
double |
getYawDegrees() |
boolean |
isActive() |
boolean |
removeData(java.lang.String key) |
java.lang.Object |
retrieveData(java.lang.String key)
This will retrieve the data stored or
null if not found. |
java.lang.Object |
retrieveData(java.lang.String key,
long ageMillis)
This will retrieve the data stored or
null if not found. |
long |
retrieveDataTimeMillis(java.lang.String key) |
void |
setActive(boolean active) |
void |
setAttitudeDegrees(double yawDegrees) |
void |
setAttitudeDegrees(double rollDegrees,
double pitchDegrees,
double yawDegrees) |
boolean |
setAttitudeDegrees(double rollDegrees,
double pitchDegrees,
double yawDegrees,
long attitudeTimeMillis)
Only is override if attitudeTimeMillis is newer than already there.
|
boolean |
setAttitudeDegrees(double yawDegrees,
long attitudeTimeMillis)
Only is override if attitudeTimeMillis is newer than already there.
|
void |
setAttitudeTimeMillis(long attitudeTimeMillis) |
void |
setLocation(LocationType location) |
boolean |
setLocation(LocationType location,
long locationTimeMillis)
Only is override if locationTimeMillis is newer than already there.
|
void |
setLocationTimeMillis(long locationTimeMillis) |
void |
setType(VehicleType.SystemTypeEnum type) |
void |
setTypeExternal(ExternalSystem.ExternalTypeEnum typeExternal) |
void |
setTypeVehicle(VehicleType.VehicleTypeEnum typeVehicle) |
boolean |
storeData(java.lang.String key,
java.lang.Object data)
This will store some data with a
String key. |
boolean |
storeData(java.lang.String key,
java.lang.Object data,
long timeMillis,
boolean keepNewest) |
java.lang.String |
toString() |
protected java.lang.String id
protected VehicleType.SystemTypeEnum type
protected VehicleType.VehicleTypeEnum typeVehicle
protected ExternalSystem.ExternalTypeEnum typeExternal
protected boolean active
protected final CoordinateSystem location
protected long locationTimeMillis
protected long attitudeTimeMillis
protected final java.util.Map<java.lang.String,java.lang.Object> dataStorage
protected final java.util.Map<java.lang.String,java.lang.Long> dataStorageTime
public java.lang.String getId()
public java.lang.String getName()
public boolean isActive()
public void setActive(boolean active)
active
- the active to setpublic LocationType getLocation()
public void setLocation(LocationType location)
location
- the location to setpublic boolean setLocation(LocationType location, long locationTimeMillis)
location
- locationTimeMillis
- public void setAttitudeDegrees(double rollDegrees, double pitchDegrees, double yawDegrees)
public boolean setAttitudeDegrees(double rollDegrees, double pitchDegrees, double yawDegrees, long attitudeTimeMillis)
rollDegrees
- pitchDegrees
- yawDegrees
- locationTimeMillis
- public void setAttitudeDegrees(double yawDegrees)
public boolean setAttitudeDegrees(double yawDegrees, long attitudeTimeMillis)
yawDegrees
- locationTimeMillis
- public double getRollDegrees()
public double getPitchDegrees()
public double getYawDegrees()
public long getLocationTimeMillis()
public void setLocationTimeMillis(long locationTimeMillis)
locationTimeMillis
- the locationTimeMillis to setpublic long getAttitudeTimeMillis()
public void setAttitudeTimeMillis(long attitudeTimeMillis)
attitudeTimeMillis
- the attitudeTimeMillis to setpublic VehicleType.SystemTypeEnum getType()
public void setType(VehicleType.SystemTypeEnum type)
type
- the type to setpublic VehicleType.VehicleTypeEnum getTypeVehicle()
public void setTypeVehicle(VehicleType.VehicleTypeEnum typeVehicle)
typeVehicle
- the typeVehicle to setpublic ExternalSystem.ExternalTypeEnum getTypeExternal()
public void setTypeExternal(ExternalSystem.ExternalTypeEnum typeExternal)
typeExternal
- the typeExternal to setpublic int compareTo(ExternalSystem o)
compareTo
in interface java.lang.Comparable<ExternalSystem>
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection<java.lang.String> getDataStorageKeys()
public boolean containsData(java.lang.String key)
key
- public boolean containsData(java.lang.String key, long ageMillis)
public java.lang.Object retrieveData(java.lang.String key, long ageMillis)
null
if not found.key
- ageMillis
- public java.lang.Object retrieveData(java.lang.String key)
null
if not found.key
- public long retrieveDataTimeMillis(java.lang.String key)
key
- public boolean storeData(java.lang.String key, java.lang.Object data)
String
key.
The previous data if existed will be overwritten.key
- data
- public boolean storeData(java.lang.String key, java.lang.Object data, long timeMillis, boolean keepNewest)
key
- data
- timeMillis
- public boolean removeData(java.lang.String key)
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.