Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::WorldInfoHandler Class Referenceabstract

World info handler. More...

#include <netcomm/worldinfo/handler.h>

Inheritance diagram for fawkes::WorldInfoHandler:

Public Member Functions

virtual ~WorldInfoHandler ()
 Virtual empty destructor. More...
 
virtual void pose_rcvd (const char *from_host, float x, float y, float theta, float *covariance)=0
 Pose information received. More...
 
virtual void velocity_rcvd (const char *from_host, float vel_x, float vel_y, float vel_theta, float *covariance)=0
 Robot velocity information received. More...
 
virtual void ball_pos_rcvd (const char *from_host, bool visible, int visibility_history, float dist, float bearing, float slope, float *covariance)=0
 Ball position information received. More...
 
virtual void global_ball_pos_rcvd (const char *from_host, bool visible, int visibility_history, float x, float y, float z, float *covariance)=0
 Global ball position information received. More...
 
virtual void ball_velocity_rcvd (const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)=0
 Ball velocity information received. More...
 
virtual void global_ball_velocity_rcvd (const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)=0
 Ball velocity information received. More...
 
virtual void opponent_pose_rcvd (const char *from_host, unsigned int uid, float distance, float bearing, float *covariance)=0
 Opponent information received. More...
 
virtual void opponent_disapp_rcvd (const char *from_host, unsigned int uid)=0
 Opponent disappeared. More...
 
virtual void gamestate_rcvd (const char *from_host, unsigned int game_state, worldinfo_gamestate_team_t state_team, unsigned int score_cyan, unsigned int score_magenta, worldinfo_gamestate_team_t our_team, worldinfo_gamestate_goalcolor_t our_goal_color, worldinfo_gamestate_half_t half)=0
 Gamestate information received. More...
 
virtual void penalty_rcvd (const char *from_host, unsigned int player, unsigned int penalty, unsigned int seconds_remaining)=0
 Penalty info received. More...
 

Detailed Description

World info handler.

This interface defines methods called by WorldInfoTransceiver for incoming information.

Author
Tim Niemueller

Definition at line 31 of file handler.h.

Constructor & Destructor Documentation

fawkes::WorldInfoHandler::~WorldInfoHandler ( )
virtual

Virtual empty destructor.

Definition at line 148 of file handler.cpp.

Member Function Documentation

void fawkes::WorldInfoHandler::ball_pos_rcvd ( const char *  from_host,
bool  visible,
int  visibility_history,
float  dist,
float  bearing,
float  slope,
float *  covariance 
)
pure virtual

Ball position information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
visibletrue if ball is visible, false otherwise. If the ball is not visible the given position is the last known position and may be invalid. Use visibility history to decide whether you expect useful data.
visibility_historyBall visibility history.
distdistance to ball in meters
bearingbearing angle to ball
slopeslope angle to ball
covariancecovariance matrix with 9 entries, ordered as three concatenated rows (first row, three floats, second row, three floats, third row, three floats).
See Also
WorldInfoTransceiver::set_ball_pos()
WorldInfoTransceiver::set_ball_visible()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::ball_velocity_rcvd ( const char *  from_host,
float  vel_x,
float  vel_y,
float  vel_z,
float *  covariance 
)
pure virtual

Ball velocity information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
vel_xvelocity in x direction
vel_yvelocity in y direction
vel_zvelocity in z direction
covariancecovariance matrix with 9 entries, ordered as three concatenated rows (first row, three floats, second row, three floats, third row, three floats).
See Also
WorldInfoTransceiver::set_ball_velocity()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::gamestate_rcvd ( const char *  from_host,
unsigned int  game_state,
worldinfo_gamestate_team_t  state_team,
unsigned int  score_cyan,
unsigned int  score_magenta,
worldinfo_gamestate_team_t  our_team,
worldinfo_gamestate_goalcolor_t  our_goal_color,
worldinfo_gamestate_half_t  half 
)
pure virtual

Gamestate information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
game_statecurrent gamestate
state_teamteam related to the game state
score_cyancurrent score of team cyan
score_magentacurrent score of team magenta
our_teamour team color
our_goal_colorour goal color
halfcurrent half of the game, first or second
See Also
WorldInfoTransceiver::set_gamestate()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::global_ball_pos_rcvd ( const char *  from_host,
bool  visible,
int  visibility_history,
float  x,
float  y,
float  z,
float *  covariance 
)
pure virtual

Global ball position information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
visibletrue if ball is visible, false otherwise. If the ball is not visible the given position is the last known position and may be invalid. Use visibility history to decide whether you expect useful data.
visibility_historyBall visibility history.
xglobal x-coordinates of the ball
yglobal y-coordinates of the ball
zglobal z-coordinates of the ball
covariancecovariance matrix with 9 entries, ordered as three concatenated rows (first row, three floats, second row, three floats, third row, three floats).
See Also
WorldInfoTransceiver::set_ball_pos()
WorldInfoTransceiver::set_ball_visible()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::global_ball_velocity_rcvd ( const char *  from_host,
float  vel_x,
float  vel_y,
float  vel_z,
float *  covariance 
)
pure virtual

Ball velocity information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
vel_xvelocity in x direction
vel_yvelocity in y direction
vel_zvelocity in z direction
covariancecovariance matrix with 9 entries, ordered as three concatenated rows (first row, three floats, second row, three floats, third row, three floats).
See Also
WorldInfoTransceiver::set_ball_velocity()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::opponent_disapp_rcvd ( const char *  from_host,
unsigned int  uid 
)
pure virtual

Opponent disappeared.

Parameters
from_hosttransmitting host of this information, if available symbolic name
uidunique ID of the opponent

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::opponent_pose_rcvd ( const char *  from_host,
unsigned int  uid,
float  distance,
float  bearing,
float *  covariance 
)
pure virtual

Opponent information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
uidunique ID of the opponent
distanceto opponent
bearingbearing to opponent (angle is zero if opponent is in front of robot, positive if right of robot, negative if left of robot).
covariancecovariance matrix with 4 entries, ordered as two concatenated rows (first row, two floats, second row, two floats)
See Also
WorldInfoTransceiver::add_opponent()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::penalty_rcvd ( const char *  from_host,
unsigned int  player,
unsigned int  penalty,
unsigned int  seconds_remaining 
)
pure virtual

Penalty info received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
playerplayer number for penalty info
penaltypenalty code
seconds_remainingtime in seconds when penalty is expected to be lifted

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::pose_rcvd ( const char *  from_host,
float  x,
float  y,
float  theta,
float *  covariance 
)
pure virtual

Pose information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
xx position
yy position
thetarotation of the robot
covariancecovariance matrix, line-wise float array

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.

void fawkes::WorldInfoHandler::velocity_rcvd ( const char *  from_host,
float  vel_x,
float  vel_y,
float  vel_theta,
float *  covariance 
)
pure virtual

Robot velocity information received.

Parameters
from_hosttransmitting host of this information, if available symbolic name
vel_xvelocity in x direction
vel_yvelocity in y direction
vel_thetarotational velocity, positive velocity means clockwise rotation, negative velocity means counter-clockwise.
covariancecovariance matrix with 9 entries, ordered as three concatenated rows (first row, three floats, second row, three floats, third row, three floats).
See Also
WorldInfoTransceiver::set_velocity()

Implemented in WorldModelNetworkThread, and WorldInfoViewerBackendThread.


The documentation for this class was generated from the following files: