public class StateMessage extends GBEvent implements cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
protected int |
Battery |
protected double |
FrontSteer |
protected int |
LightIntensity |
protected boolean |
LightToggle |
protected Map<String,String> |
PartsValues |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected double |
RearSteer |
protected double |
RudderAngle |
protected double |
SternPlaneAngle |
protected double |
Time
Timestamp form the UT since server start in seconds.
|
protected String |
Type
Type describes the vehicle type.
|
protected int |
View |
| Constructor and Description |
|---|
StateMessage()
Used by Yylex to create empty message then to fill it's protected fields
(Yylex is in the same package).
|
StateMessage(StateMessage original)
Cloning constructor.
|
StateMessage(String Type,
double Time,
double FrontSteer,
double RearSteer,
double SternPlaneAngle,
double RudderAngle,
boolean LightToggle,
int LightIntensity,
int Battery) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBattery()
Power state of the battery.
|
double |
getFrontSteer()
Note: parameter only available for robots of “GroundVehicle” type.
|
int |
getLightIntensity()
Light intensity of the headlight.
|
Map<String,String> |
getPartsValues()
Kenaf robot uses these to describe state of its Flippers.
|
double |
getRearSteer()
Note: parameter only available for robots of “GroundVehicle” type.
|
double |
getRudderAngle()
Note: parameter only available for robots of “NauticVehicle” type.
|
double |
getSternPlaneAngle()
Note: parameter only available for robots of “NauticVehicle” type.
|
double |
getTime()
Timestamp form the UT since server start in seconds.
|
String |
getType()
Type will be one of the following values: "GroundVehicle”, “LeggedRobot”,
“NauticVehicle”, or “AerialVehicle”.
|
int |
getView()
This was added for UT2004 version.
|
boolean |
isLightToggle()
Indicate whether the headlight has been turned on.
|
String |
toHtmlString()
Gets all properties and values to create a HTML formated string;
|
String |
toString() |
getSimTime, getWorldEventtoJsonLiteralclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String PROTOTYPE
protected String Type
protected double Time
protected double FrontSteer
protected double RearSteer
protected double SternPlaneAngle
protected double RudderAngle
protected boolean LightToggle
protected int LightIntensity
protected int Battery
protected int View
public StateMessage(String Type, double Time, double FrontSteer, double RearSteer, double SternPlaneAngle, double RudderAngle, boolean LightToggle, int LightIntensity, int Battery)
public StateMessage(StateMessage original)
public StateMessage()
public String getType()
public double getTime()
public double getFrontSteer()
public double getRearSteer()
public double getSternPlaneAngle()
public double getRudderAngle()
public boolean isLightToggle()
public int getLightIntensity()
public int getBattery()
public int getView()
public Map<String,String> getPartsValues()
public String toString()
toString in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessagepublic String toHtmlString()
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.