Public Member Functions

fawkes::WorldInfoHandler Class Reference
[Fawkes Network Communication]

World info handler. More...

#include <netcomm/worldinfo/handler.h>

Inheritance diagram for fawkes::WorldInfoHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~WorldInfoHandler ()
 Virtual empty destructor.
virtual void pose_rcvd (const char *from_host, float x, float y, float theta, float *covariance)=0
 Pose information received.
virtual void velocity_rcvd (const char *from_host, float vel_x, float vel_y, float vel_theta, float *covariance)=0
 Robot velocity information received.
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.
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.
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.
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.
virtual void opponent_pose_rcvd (const char *from_host, unsigned int uid, float distance, float bearing, float *covariance)=0
 Opponent information received.
virtual void opponent_disapp_rcvd (const char *from_host, unsigned int uid)=0
 Opponent disappeared.
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.
virtual void penalty_rcvd (const char *from_host, unsigned int player, unsigned int penalty, unsigned int seconds_remaining)=0
 Penalty info received.

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_host transmitting host of this information, if available symbolic name
visible true 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_history Ball visibility history.
dist distance to ball in meters
bearing bearing angle to ball
slope slope angle to ball
covariance covariance 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_host transmitting host of this information, if available symbolic name
vel_x velocity in x direction
vel_y velocity in y direction
vel_z velocity in z direction
covariance covariance 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_host transmitting host of this information, if available symbolic name
game_state current gamestate
state_team team related to the game state
score_cyan current score of team cyan
score_magenta current score of team magenta
our_team our team color
our_goal_color our goal color
half current 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_host transmitting host of this information, if available symbolic name
visible true 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_history Ball visibility history.
x global x-coordinates of the ball
y global y-coordinates of the ball
z global z-coordinates of the ball
covariance covariance 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_host transmitting host of this information, if available symbolic name
vel_x velocity in x direction
vel_y velocity in y direction
vel_z velocity in z direction
covariance covariance 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_host transmitting host of this information, if available symbolic name
uid unique 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_host transmitting host of this information, if available symbolic name
uid unique ID of the opponent
distance to opponent
bearing bearing to opponent (angle is zero if opponent is in front of robot, positive if right of robot, negative if left of robot).
covariance covariance 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_host transmitting host of this information, if available symbolic name
player player number for penalty info
penalty penalty code
seconds_remaining time 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_host transmitting host of this information, if available symbolic name
x x position
y y position
theta rotation of the robot
covariance covariance 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_host transmitting host of this information, if available symbolic name
vel_x velocity in x direction
vel_y velocity in y direction
vel_theta rotational velocity, positive velocity means clockwise rotation, negative velocity means counter-clockwise.
covariance covariance 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: