|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.InfoMessage
cz.cuni.amis.pogamut.usar2004.communication.messages.GBEvent
cz.cuni.amis.pogamut.usar2004.communication.messages.usarinfomessages.StateMessage
public class StateMessage
A State message is the message class that reports the robot or mission package’s state. State message reports the robot's actual state. Please note that the robot state message parameters depend on the type of robot that you are driving. For example, a robot of type “GroundVehicle” will not have the same state message as a robot of type “AerialVehicle.” A robot state message looks like (for a ground vehicle): STA {Type string} {Time float} {FrontSteer float} {RearSteer float}{LightToggle bool} {LightIntensity int} {Battery int} Corresponding GameBots message is STA.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class cz.cuni.amis.pogamut.usar2004.communication.messages.GBEvent |
|---|
getSimTime, getWorldEvent |
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
|---|
toJsonLiteral |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent |
|---|
getSimTime |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent |
|---|
getSimTime |
| Field Detail |
|---|
public 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
protected Map<String,String> PartsValues
| Constructor Detail |
|---|
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()
| Method Detail |
|---|
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||