00001
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifndef RCSC_COACH_GLOBAL_VISUAL_SENSOR_H
00033 #define RCSC_COACH_GLOBAL_VISUAL_SENSOR_H
00034
00035 #include <rcsc/coach/global_object.h>
00036 #include <rcsc/rcg/types.h>
00037 #include <rcsc/game_time.h>
00038
00039 #include <string>
00040 #include <iostream>
00041
00042 namespace rcsc {
00043
00048 class GlobalVisualSensor {
00049 private:
00051 GameTime M_time;
00052
00053 std::string M_team_name_left;
00054 std::string M_team_name_right;
00055
00056 GlobalBallObject M_ball;
00057 std::vector< GlobalPlayerObject > M_players;
00058
00059 public:
00063 GlobalVisualSensor();
00064
00068 ~GlobalVisualSensor();
00069
00074 const
00075 GameTime & time() const
00076 {
00077 return M_time;
00078 }
00079
00084 const
00085 std::string & teamNameLeft() const
00086 {
00087 return M_team_name_left;
00088 }
00089
00094 const
00095 std::string & teamNameRight() const
00096 {
00097 return M_team_name_right;
00098 }
00099
00104 const
00105 GlobalBallObject & ball() const
00106 {
00107 return M_ball;
00108 }
00109
00114 const
00115 std::vector< GlobalPlayerObject > & players() const
00116 {
00117 return M_players;
00118 }
00119
00126 void parse( const char * msg,
00127 const double & version,
00128 const GameTime & current );
00129
00130 private:
00136 void parseV6( const char * msg );
00137
00142 void parseV7( const char * msg );
00143
00144 public:
00145
00151 std::ostream & print( std::ostream & os ) const;
00152
00153 };
00154
00155 }
00156
00157 #endif