Modifier and Type | Class and Description |
---|---|
static class |
ImcSystem.IMCAuthorityState |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACOUSTIC_SYSTEMS |
protected boolean |
active |
protected PlanType |
activePlan |
protected long |
attitudeTimeMillis |
protected ImcSystem.IMCAuthorityState |
authorityState |
protected CommMean |
commsInfo |
static java.lang.String |
COURSE_KEY |
protected java.lang.String |
emergencyPlanId |
protected java.lang.String |
emergencyStatusStr |
static java.lang.String |
FUEL_LEVEL_KEY |
static java.lang.String |
GROUND_SPEED_KEY |
static java.lang.String |
HEADING_KEY |
protected ImcId16 |
id |
static java.lang.String |
INDICATED_SPEED_KEY |
protected long |
lastAnnounceStateReceived |
protected long |
lastErrorStateReceived |
protected long |
lastIdErrorStateReceived |
protected java.lang.String |
lastUid |
static java.lang.String |
LBL_CONFIG_KEY |
protected CoordinateSystem |
location |
protected long |
locationTimeMillis |
protected java.lang.String |
name |
protected boolean |
onAnnounceState |
protected boolean |
onErrorState |
protected java.lang.String |
onErrorStateStr |
protected boolean |
onIdErrorState |
protected PlanDBControl |
planDBControl |
static java.lang.String |
RPM_MAP_ENTITY_KEY |
static java.lang.String |
TRUE_SPEED_KEY |
protected VehicleType.SystemTypeEnum |
type |
protected VehicleType.VehicleTypeEnum |
typeVehicle |
static java.lang.String |
VERTICAL_SPEED_KEY |
static java.lang.String |
WEB_UPDATED_KEY |
Constructor and Description |
---|
ImcSystem(ImcId16 id) |
ImcSystem(ImcId16 id,
CommMean commMean) |
ImcSystem(java.lang.String name,
ImcId16 id) |
ImcSystem(java.lang.String name,
ImcId16 id,
CommMean commMean) |
ImcSystem(VehicleType vehicle) |
Modifier and Type | Method and Description |
---|---|
void |
clearStoredData() |
int |
compareTo(ImcSystem o) |
boolean |
containsData(java.lang.String key) |
boolean |
containsData(java.lang.String key,
long ageMillis) |
static CommMean |
createCommMean(java.lang.String hostAddress,
int port,
int portTCP,
ImcId16 imcId,
boolean udpOn,
boolean tcpOn) |
PlanType |
getActivePlan() |
long |
getAttitudeTimeMillis() |
ImcSystem.IMCAuthorityState |
getAuthorityState() |
CommMean |
getCommsInfo() |
java.util.Collection<java.lang.String> |
getDataStorageKeys() |
java.lang.String |
getEmergencyPlanId() |
java.lang.String |
getEmergencyStatusStr() |
java.lang.String |
getHostAddress() |
ImcId16 |
getId() |
java.net.InetSocketAddress |
getInetSocketAddress() |
long |
getLastAnnounceStateReceived() |
long |
getLastErrorStateReceived() |
long |
getLastIdErrorStateReceived() |
java.lang.String |
getLastUid() |
LocationType |
getLocation() |
long |
getLocationTimeMillis() |
java.lang.String |
getName() |
java.lang.String |
getOnErrorStateStr() |
double |
getPitchDegrees() |
PlanDBControl |
getPlanDBControl() |
int |
getRemoteTCPPort() |
int |
getRemoteUDPPort() |
double |
getRollDegrees() |
java.util.Vector<java.net.URI> |
getServiceProvided(java.lang.String name) |
java.util.Vector<java.net.URI> |
getServiceProvided(java.lang.String scheme,
java.lang.String name) |
java.lang.String |
getServicesProvided()
/*
|
VehicleType.SystemTypeEnum |
getType() |
VehicleType.VehicleTypeEnum |
getTypeVehicle() |
VehicleType |
getVehicle()
Tries to get a corresponding vehicle in case the type of this system is VEHICLE
|
double |
getYawDegrees() |
int |
hashCode() |
boolean |
isActive() |
boolean |
isOnAnnounceState() |
boolean |
isOnErrorState() |
boolean |
isOnIdErrorState() |
boolean |
isServiceProvided(java.lang.String name) |
boolean |
isServiceProvided(java.lang.String scheme,
java.lang.String name) |
boolean |
isSimulated()
Checks if there is a "SimulatedState" message in the
dataStorage with age less than a minute. |
boolean |
isTCPOn() |
boolean |
isUDPOn() |
boolean |
isWithAuthority() |
static void |
main(java.lang.String[] args) |
static java.net.InetSocketAddress |
parseInetSocketAddress(java.lang.String inetSocketAddress) |
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. |
long |
retrieveDataTimeMillis(java.lang.String key) |
void |
setActive(boolean active) |
void |
setActivePlan(PlanType activePlan) |
void |
setAttitudeDegrees(double yawDegrees) |
void |
setAttitudeDegrees(double rollDegrees,
double pitchDegrees,
double yawDegrees) |
void |
setAttitudeDegrees(double rollDegrees,
double pitchDegrees,
double yawDegrees,
long locationTimeMillis) |
void |
setAttitudeDegrees(double yawDegrees,
long locationTimeMillis) |
void |
setAttitudeTimeMillis(long attitudeTimeMillis) |
void |
setAuthorityState(ImcSystem.IMCAuthorityState authorityState) |
void |
setCommsInfo(CommMean commsInfo) |
void |
setEmergencyPlanId(java.lang.String emergencyPlanId) |
void |
setEmergencyStatusStr(java.lang.String emergencyStatusStr) |
boolean |
setHostAddress(java.lang.String hostAddress)
Remember that
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside. |
void |
setId(ImcId16 id) |
void |
setLastAnnounceStateReceived(long lastAnnounceStateReceived) |
void |
setLastUid(java.lang.String lastUid) |
void |
setLocation(LocationType location) |
void |
setLocation(LocationType location,
long locationTimeMillis) |
void |
setLocationTimeMillis(long locationTimeMillis) |
void |
setName(java.lang.String name) |
void |
setOnAnnounceState(boolean onAnnounceState) |
void |
setOnErrorState(boolean onErrorState) |
void |
setOnErrorStateStr(java.lang.String onErrorStateStr) |
void |
setOnIdErrorState(boolean onIdErrorState) |
boolean |
setRemoteTCPPort(int port)
Remember that
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside. |
boolean |
setRemoteUDPPort(int port)
Remember that
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside. |
void |
setServicesProvided(java.lang.String servicesProvided) |
boolean |
setTCPOn(boolean on)
Remember that
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside. |
void |
setType(VehicleType.SystemTypeEnum type) |
void |
setTypeVehicle(VehicleType.VehicleTypeEnum typeVehicle) |
boolean |
setUDPOn(boolean on)
Remember that
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside. |
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() |
static VehicleType.SystemTypeEnum |
translateSystemTypeFromMessage(java.lang.String type) |
static VehicleType.VehicleTypeEnum |
translateVehicleTypeFromMessage(java.lang.String type) |
public static final java.lang.String GROUND_SPEED_KEY
public static final java.lang.String VERTICAL_SPEED_KEY
public static final java.lang.String TRUE_SPEED_KEY
public static final java.lang.String INDICATED_SPEED_KEY
public static final java.lang.String RPM_MAP_ENTITY_KEY
public static final java.lang.String COURSE_KEY
public static final java.lang.String HEADING_KEY
public static final java.lang.String FUEL_LEVEL_KEY
public static final java.lang.String WEB_UPDATED_KEY
public static final java.lang.String LBL_CONFIG_KEY
public static final java.lang.String ACOUSTIC_SYSTEMS
protected java.lang.String name
protected ImcId16 id
protected VehicleType.SystemTypeEnum type
protected VehicleType.VehicleTypeEnum typeVehicle
protected CommMean commsInfo
protected boolean active
protected PlanType activePlan
protected final CoordinateSystem location
protected long locationTimeMillis
protected long attitudeTimeMillis
protected java.lang.String emergencyPlanId
protected java.lang.String emergencyStatusStr
protected boolean onErrorState
protected java.lang.String onErrorStateStr
protected long lastErrorStateReceived
protected boolean onIdErrorState
protected long lastIdErrorStateReceived
protected java.lang.String lastUid
protected boolean onAnnounceState
protected long lastAnnounceStateReceived
protected final PlanDBControl planDBControl
protected ImcSystem.IMCAuthorityState authorityState
public ImcSystem(VehicleType vehicle)
vehicle
- public ImcSystem(ImcId16 id)
id
- public ImcSystem(java.lang.String name, ImcId16 id)
name
- id
- public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic ImcId16 getId()
public void setId(ImcId16 id)
id
- the id to setpublic LocationType getLocation()
public void setLocation(LocationType location)
location
- the location to setpublic void setLocation(LocationType location, long locationTimeMillis)
public void setAttitudeDegrees(double rollDegrees, double pitchDegrees, double yawDegrees)
public void setAttitudeDegrees(double rollDegrees, double pitchDegrees, double yawDegrees, long locationTimeMillis)
public void setAttitudeDegrees(double yawDegrees)
public void setAttitudeDegrees(double yawDegrees, long 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 VehicleType getVehicle()
public PlanDBControl getPlanDBControl()
public boolean isWithAuthority()
public ImcSystem.IMCAuthorityState getAuthorityState()
public void setAuthorityState(ImcSystem.IMCAuthorityState authorityState)
authorityState
- the authorityState to setpublic CommMean getCommsInfo()
public void setCommsInfo(CommMean commsInfo)
commsInfo
- the commsInfo to setpublic java.lang.String getHostAddress()
public boolean setHostAddress(java.lang.String hostAddress)
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside.hostAddress
- public boolean isUDPOn()
public boolean setUDPOn(boolean on)
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside.public boolean isTCPOn()
public boolean setTCPOn(boolean on)
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside.public int getRemoteUDPPort()
public boolean setRemoteUDPPort(int port)
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside.port
- public int getRemoteTCPPort()
public boolean setRemoteTCPPort(int port)
#createCommMean(String, int, ImcId16, boolean, boolean)
should be called first to create it first or call setCommsInfo(CommMean)
if it is already created from outside.port
- public java.net.InetSocketAddress getInetSocketAddress()
public java.lang.String toString()
toString
in class java.lang.Object
public static CommMean createCommMean(java.lang.String hostAddress, int port, int portTCP, ImcId16 imcId, boolean udpOn, boolean tcpOn)
hostAddress
- port
- imcId
- rtpsOn
- udpOn
- public static java.net.InetSocketAddress parseInetSocketAddress(java.lang.String inetSocketAddress)
public int compareTo(ImcSystem o)
compareTo
in interface java.lang.Comparable<ImcSystem>
public boolean isActive()
public void setActive(boolean active)
active
- the active to setpublic PlanType getActivePlan()
public void setActivePlan(PlanType activePlan)
activePlan
- the activePlan to setpublic java.lang.String getEmergencyPlanId()
public void setEmergencyPlanId(java.lang.String emergencyPlanId)
emergencyPlanId
- the emergencyPlanId to setpublic java.lang.String getEmergencyStatusStr()
public void setEmergencyStatusStr(java.lang.String emergencyStatusStr)
emergencyStatusStr
- the emergencyStatusStr to setpublic java.lang.String getServicesProvided()
public void setServicesProvided(java.lang.String servicesProvided)
servicesProvided
- the servicesProvided to setpublic boolean isServiceProvided(java.lang.String name)
public boolean isServiceProvided(java.lang.String scheme, java.lang.String name)
public java.util.Vector<java.net.URI> getServiceProvided(java.lang.String name)
public java.util.Vector<java.net.URI> getServiceProvided(java.lang.String scheme, java.lang.String name)
public boolean isOnErrorState()
public void setOnErrorState(boolean onErrorState)
onErrorState
- the onErrorState to setpublic java.lang.String getOnErrorStateStr()
public void setOnErrorStateStr(java.lang.String onErrorStateStr)
onErrorStateStr
- the onErrorStateStr to setpublic long getLastErrorStateReceived()
public boolean isOnIdErrorState()
public void setOnIdErrorState(boolean onIdErrorState)
onIdErrorState
- the onIdErrorState to setpublic long getLastIdErrorStateReceived()
public java.lang.String getLastUid()
public void setLastUid(java.lang.String lastUid)
lastUid
- the lastUid to setpublic boolean isOnAnnounceState()
public void setOnAnnounceState(boolean onAnnounceState)
onAnnounceState
- the onAnnounceState to setpublic long getLastAnnounceStateReceived()
public void setLastAnnounceStateReceived(long lastAnnounceStateReceived)
lastAnnounceStateReceived
- the lastAnnounceStateReceived to setpublic 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)
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)
public boolean isSimulated()
dataStorage
with age less than a minute.public void clearStoredData()
public int hashCode()
hashCode
in class java.lang.Object
public static VehicleType.SystemTypeEnum translateSystemTypeFromMessage(java.lang.String type)
type
- public static VehicleType.VehicleTypeEnum translateVehicleTypeFromMessage(java.lang.String type)
public static void main(java.lang.String[] args)
args
- Copyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.