📄 monitor.h
字号:
// -*-c++-*-/*************************************************************************** monitor.h A class providing the communication interface for remote monitors that connect to the server ------------------- begin : 27-DEC-2001 copyright : (C) 2001 by The RoboCup Soccer Server Maintainance Group. email : sserver-admin@lists.sourceforge.net***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU LGPL as published by the Free Software * * Foundation; either version 2 of the License, or (at your option) any * * later version. * * * ***************************************************************************/#ifndef RCSSSERVER_MONITOR_H#define RCSSSERVER_MONITOR_H#include "remoteclient.h"#include "types.h"#include <string>class Stadium;class XPMHolder;namespace rcss {class InitObserverMonitor;class ObserverMonitor;}class Monitor : public RemoteClient {protected: rcss::InitObserverMonitor * M_init_observer; rcss::ObserverMonitor * M_observer; Stadium & M_stadium; double M_version; PlayMode M_playmode; std::string M_team_l_name; std::string M_team_r_name; int M_team_l_score; int M_team_r_score; int M_team_l_pen_taken; int M_team_r_pen_taken;public: Monitor( Stadium & stadium, const double & version ); ~Monitor(); void disable() { RemoteClient::close(); } void parseMsg( const char * msg, const size_t & len ); bool parseCommand( const char * message ); bool setSenders(); void sendInit(); void sendPlayMode(); void sendScore(); void sendTeamGraphic( const Side side, const unsigned int x, const unsigned int y, const XPMHolder * holder ); void sendShow(); int sendMsg( const BoardType board, const char * msg ); const double & version() const { return M_version; }private: bool dispfoul( const char * command ); bool dispplayer( const char * command ); bool dispdiscard( const char * command ); bool compression( const char * command ); bool coach_change_mode( const char * command ); bool coach_move( const char * command ); bool coach_recover(); bool coach_change_player_type( const char * command ); bool coach_check_ball();};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -