クラス rcsc::CoachAgent

abstract coach agent class [詳細]

#include <coach_agent.h>

rcsc::CoachAgentに対する継承グラフ

rcsc::SoccerAgent すべてのメンバ一覧

Public メソッド

 CoachAgent ()
 init member variables
virtual ~CoachAgent ()
 delete dynamic allocated memory
const CoachConfigconfig () const
 get configuration set
const GlobalWorldModelworld () const
 get field status
const GlobalVisualSensorvisualSensor () const
 get visual sensor.
const CoachAudioSensoraudioSensor () const
 get audio sensor
const std::set< TeamGraphic::Index > & teamGraphicOKSet () const
 get team_graphic ok flags
void finalize ()
 finalize program process
bool doCheckBall ()
 send check_ball command
bool doLook ()
 send look command
bool doTeamNames ()
 send team_name command
bool doEye (bool on)
 send eye command on if true, send (eye on), else (eye off)
bool doChangePlayerType (const int unum, const int type)
 send change_player_type command
bool doChangePlayerTypes (const std::vector< std::pair< int, int > > &types)
 send change_player_types command
bool doSayFreeform (const std::string &msg)
 send freeform message by say command
bool doTeamGraphic (const int x, const int y, const TeamGraphic &team_graphic)
 send team_graphic command

Protected メソッド

virtual bool initImpl (CmdLineParser &cmd_parser)
 analyze command line options
virtual bool handleStart ()
 handle start event
virtual void handleMessage ()
 handle server message event
virtual void handleTimeout (const int timeout_count, const int waited_msec)
 handle timeout event
virtual void handleExit ()
 handle exit event
void addSayMessageParser (boost::shared_ptr< SayMessageParser > parser)
 register new say message parser object
void removeSayMessageParser (const char header)
 remove registered parser object
virtual void actionImpl ()=0
 pure virtual method. register decision.

Protected 変数

CoachConfig M_config
 configuration parameter set
GlobalWorldModel M_worldmodel
 internal memory of field status

説明

abstract coach agent class


関数

const CoachConfig& rcsc::CoachAgent::config (  )  const [inline]

get configuration set

戻り値:
const reference to the configuration class object

const GlobalWorldModel& rcsc::CoachAgent::world (  )  const [inline]

get field status

戻り値:
const reference to the worldmodel instance

const GlobalVisualSensor & rcsc::CoachAgent::visualSensor (  )  const

get visual sensor.

戻り値:
const reference to the visual sensor instance.

const CoachAudioSensor & rcsc::CoachAgent::audioSensor (  )  const

get audio sensor

戻り値:
const reference to the audio sensor instance

const std::set< TeamGraphic::Index >& rcsc::CoachAgent::teamGraphicOKSet (  )  const [inline]

get team_graphic ok flags

戻り値:
const reference to the flag container

bool rcsc::CoachAgent::initImpl ( CmdLineParser cmd_parser  )  [protected, virtual]

analyze command line options

引数:
cmd_parser command lien parser object
戻り値:
only if "help" option is given, false is returned.
This method is called from SoccerAgent::init( argc, argv ) SoccerAgent::init(argc,argv) should be called in main(). Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

bool rcsc::CoachAgent::handleStart (  )  [protected, virtual]

handle start event

戻り値:
status of start procedure.
This method is called on the top of BasicClient::run() method. The concrete agent must connect to the server and send init command. Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

void rcsc::CoachAgent::handleMessage (  )  [protected, virtual]

handle server message event

Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

void rcsc::CoachAgent::handleTimeout ( const int  timeout_count,
const int  waited_msec 
) [protected, virtual]

handle timeout event

引数:
timeout_count count of timeout without sensory message.
waited_msec elapsed milli seconds sinc last sensory message.
This method is called when select() timeout occurs Do NOT call this method by yourself!

rcsc::SoccerAgentを実装しています。

void rcsc::CoachAgent::addSayMessageParser ( boost::shared_ptr< SayMessageParser parser  )  [protected]

register new say message parser object

引数:
parser pointer to the say mesage parser.

void rcsc::CoachAgent::removeSayMessageParser ( const char  header  )  [protected]

remove registered parser object

引数:
header say message header character

bool rcsc::CoachAgent::doCheckBall (  ) 

send check_ball command

戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doLook (  ) 

send look command

戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doTeamNames (  ) 

send team_name command

戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doEye ( bool  on  ) 

send eye command on if true, send (eye on), else (eye off)

戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doChangePlayerType ( const int  unum,
const int  type 
)

send change_player_type command

引数:
unum target player's uniform number
type new player type Id
戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doChangePlayerTypes ( const std::vector< std::pair< int, int > > &  types  ) 

send change_player_types command

引数:
types player change pair list
戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doSayFreeform ( const std::string &  msg  ) 

send freeform message by say command

戻り値:
true if command is generated and sent

bool rcsc::CoachAgent::doTeamGraphic ( const int  x,
const int  y,
const TeamGraphic team_graphic 
)

send team_graphic command

戻り値:
true if command is generated and sent

virtual void rcsc::CoachAgent::actionImpl (  )  [protected, pure virtual]

pure virtual method. register decision.

This method is used to set coach's action. This method is called from action(). So, do *NOT* call this method by yourself.


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:24 2008に生成されました。  doxygen 1.5.0