00001 /** 00002 * @file RobotStateSymbols.h 00003 * 00004 * Declaration of class RobotStateSymbols. 00005 * 00006 * @author Matthias Jüngel 00007 */ 00008 00009 #ifndef __RobotStateSymbols_h_ 00010 #define __RobotStateSymbols_h_ 00011 00012 #include "../BehaviorControl.h" 00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h" 00014 00015 /** 00016 * The Xabsl2 symbols that are defined in "robot-state-symbols.xml" 00017 * 00018 * @author Matthias Jüngel 00019 */ 00020 class RobotStateSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces 00021 { 00022 public: 00023 /* 00024 * Constructor. 00025 * @param interfaces The paramters of the BehaviorControl module. 00026 */ 00027 RobotStateSymbols(const BehaviorControlInterfaces& interfaces); 00028 00029 /** registers the symbols at an engine */ 00030 void registerSymbols(Xabsl2Engine& engine); 00031 00032 /** updates the symbols */ 00033 void update(); 00034 00035 enum DisplayWLANStatus { 00036 wlanHide = 0, 00037 wlanShow 00038 }; 00039 00040 DisplayWLANStatus WLANSignalStrenghShownByFaceLEDs; 00041 //!@name Input symbols 00042 //!@{ 00043 bool getAnyBackButtonPressedForOneSecond(); 00044 bool getAnyBackButtonPressedShortAndReleased(); 00045 bool getForeBackButtonPressedShortAndReleased(); 00046 bool getMiddleBackButtonPressedShortAndReleased(); 00047 bool getHindBackButtonPressedShortAndReleased(); 00048 bool getForeBackButtonPressedShort(); 00049 bool getMiddleBackButtonPressedShort(); 00050 bool getHindBackButtonPressedShort(); 00051 bool getHeadButtonPressedForThreeSeconds(); 00052 bool getHeadButtonPressedShortAndReleased(); 00053 bool getHeadButtonPressedShort(); 00054 bool getChinButtonPressedForThreeSeconds(); 00055 int getMouthState(); /*!< A function for the symbol "self.mouth-state" */ 00056 bool getBallUnderHead(); /*!< A function for the symbol "self.ball-under-head" */ 00057 bool getSomethingInFrontOfChest(); /*!< A function for the symbol "robot-state.something-in-front-of-chest" */ 00058 double getTimeSinceSomethingWasInFrontOfChest(); /*!< A function for the symbol "robot-state.time-since-something-was-in-front-of-chest" */ 00059 double getDistanceToSIFOC(); /*!< A function for the symbol "robot-state.distance-to-sifoc" */ 00060 double getSwitchesPressedTime(); /*!< A function for the symbol "self.switches.pressed-time" */ 00061 double getCurrentSystemTime(); /*!< A function for the symbol "robot-state.system-time" */ 00062 double getRemainingCapacity(); /*!< A function for the symbol "robot-state.remaining-capacity" */ 00063 //!@} 00064 bool getConnectedToWLAN(); 00065 //!@} 00066 double getWLANLink(); 00067 double getWLANSignal(); 00068 double getWLANNoise(); 00069 00070 double getFilteredWLANLink(); 00071 double getFilteredWLANSignal(); 00072 double getFilteredWLANNoise(); 00073 00074 double filteredWLANLink; 00075 double filteredWLANSignal; 00076 double filteredWLANNoise; 00077 }; 00078 00079 00080 #endif // __RobotStateSymbols_h_ 00081
1.3.6