23 #ifndef __TOOL_WORLDINFO_VIEWER_BACKEND_THREAD_H_
24 #define __TOOL_WORLDINFO_VIEWER_BACKEND_THREAD_H_
26 #include <netcomm/worldinfo/handler.h>
27 #include <netcomm/utils/resolver.h>
28 #include <netcomm/dns-sd/avahi_thread.h>
29 #include <core/threading/thread.h>
35 class WorldInfoTransceiver;
36 class WorldInfoDataContainer;
45 const char* addr,
unsigned short port,
46 const char* key,
const char* iv );
57 virtual void pose_rcvd(
const char *from_host,
58 float x,
float y,
float theta,
61 virtual void velocity_rcvd(
const char *from_host,
float vel_x,
62 float vel_y,
float vel_theta,
float *covariance );
65 bool visible,
int visibility_history,
66 float dist,
float pitch,
float yaw,
70 bool visible,
int visibility_history,
71 float x,
float y,
float z,
75 float vel_x,
float vel_y,
float vel_z,
79 float vel_x,
float vel_y,
float vel_z,
83 float distance,
float angle,
84 float *covarianceconst );
89 unsigned int game_state,
91 unsigned int score_cyan,
unsigned int score_magenta,
97 unsigned int player,
unsigned int penalty,
98 unsigned int seconds_remaining);
104 Glib::Dispatcher m_signal_new_worldinfo_data;
105 Glib::Dispatcher m_signal_new_gamestate_data;
108 unsigned short m_port;
virtual void global_ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
Ball velocity information received.
Data container to store and exchange worldinfo data.
WorldInfoViewerBackendThread(fawkes::WorldInfoDataContainer *data_container, const char *addr, unsigned short port, const char *key, const char *iv)
Constructor.
Glib::Dispatcher & new_worldinfo_data()
Access the dispatcher that is emitted whenever new data has arrived.
virtual void pose_rcvd(const char *from_host, float x, float y, float theta, float *covariance)
Pose information received.
Class to send and receive world information.
Thread class encapsulation of pthreads.
Glib::Dispatcher & new_gamestate_data()
Access the dispatcher that is emitted whenever new game state data has arrived.
virtual void global_ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float x, float y, float z, float *covariance)
Global ball position information received.
worldinfo_gamestate_half_t
Game time half.
virtual void gamestate_rcvd(const char *from_host, unsigned int game_state, fawkes::worldinfo_gamestate_team_t state_team, unsigned int score_cyan, unsigned int score_magenta, fawkes::worldinfo_gamestate_team_t our_team, fawkes::worldinfo_gamestate_goalcolor_t our_goal_color, fawkes::worldinfo_gamestate_half_t half)
Gamestate information received.
void loop()
Code to execute in the thread.
virtual ~WorldInfoViewerBackendThread()
Destructor.
virtual void opponent_pose_rcvd(const char *from_host, unsigned int uid, float distance, float angle, float *covarianceconst)
Opponent information received.
Network name and address resolver.
virtual void ball_velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_z, float *covariance)
Ball velocity information received.
worldinfo_gamestate_team_t
Team.
virtual void velocity_rcvd(const char *from_host, float vel_x, float vel_y, float vel_theta, float *covariance)
Robot velocity information received.
virtual void ball_pos_rcvd(const char *from_host, bool visible, int visibility_history, float dist, float pitch, float yaw, float *covariance)
Ball position information received.
virtual void opponent_disapp_rcvd(const char *from_host, unsigned int uid)
Opponent disappeared.
virtual void penalty_rcvd(const char *from_host, unsigned int player, unsigned int penalty, unsigned int seconds_remaining)
Penalty info received.
The backend thread of the worldinfo viewer application.
worldinfo_gamestate_goalcolor_t
Goal color.