Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Modules/BehaviorControl/CommonXabsl2Symbols/RoboCupGameManagerSymbols.h

Go to the documentation of this file.

    00001 /**
    00002 * @file RoboCupGameManagerSymbols.h
    00003 *
    00004 * Declaration of class RoboCupGameManagerSymbols.
    00005 *
    00006 * @author Matthias Jüngel
    00007 */
    00008
    00009 #ifndef __RoboCupGameManagerSymbols_h_
    00010 #define __RoboCupGameManagerSymbols_h_
    00011
    00012 #include "../BehaviorControl.h"
    00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h"
    00014
    00015
    00016 /**
    00017 * The Xabsl2 symbols that are defined in "robocup-game-manager-symbols.xml"
    00018 *
    00019 * @author Matthias Jüngel
    00020 */
    00021 class RoboCupGameManagerSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces
    00022 {
    00023 public:
    00024 /*
    00025 * Constructor.
    00026 * @param interfaces The paramters of the BehaviorControl module.
    00027   */
    00028   RoboCupGameManagerSymbols(const BehaviorControlInterfaces& interfaces);
    00029
    00030   /** registers the symbols at an engine */
    00031   void registerSymbols(Xabsl2Engine& engine);
    00032
    00033     /** updates the symbols */
    00034   void update();
    00035
    00036   //!@name Input symbols
    00037   //!@{
    00038   int getState(); /*!< A function for the symbol "game.state" */
    00039   int getKickoff(); /*!< A function for the symbol "game.kickoff" */
    00040   int getTeamColor(); /*!< A function for the symbol "game.team-color" */
    00041   bool getOwnTeamScored(); /*!< A function for the symbol "game.own-team-scored"  */
    00042   bool getOpponentTeamScored(); /*!< A function for the symbol "game.opponent-team-scored"  */
    00043   double getOwnScore(); /*!< A function for the symbol "game.own-score" */
    00044   double getOpponentScore(); /*!< A function for the symbol "game.opponent-score" */
    00045   double getTimeSinceLastMessage(); /*!< A function for the symbol "game.time-since-last-message" */
    00046   //!@}
    00047
    00048   /* A function for the output symbol "set-team-color". */
    00049   void setTeamColor(int teamColor);
    00050
    00051 private:
    00052   /** the game control state we received the last time */
    00053   int lastGameControlDataState;
    00054
    00055   /** keeps the recent own score value */
    00056   int lastOwnScore;
    00057
    00058   /** keeps the recent opponent score value */
    00059   int lastOpponentScore;
    00060
    00061   /** keeps the time when the last own goal was shot */
    00062   unsigned long timeWhenOwnTeamScored;
    00063
    00064   /** keeps the time when the last opponent goal was shot */
    00065   unsigned long timeWhenOpponentTeamScored;
    00066
    00067   /** The current game state (set by the behavior)*/
    00068   GameControlData::State currentState;
    00069 };
    00070
    00071
    00072 #endif // __RoboCupGameManagerSymbols_h_
    00073