⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serverparam.h

📁 在LINUX下运行的仿真机器人服务器源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
    int    getRawSynchOffset() const    {        return synch_offset / slow_down_factor;    }    void    setSynchMode( bool value ); public:    void    clear(); private:    void    setSlowDownFactor( int value )    {        // undo the effect of the last slow_down_factor        sim_st /= slow_down_factor;        sb_step /= slow_down_factor;        sv_st /= slow_down_factor;        send_st /= slow_down_factor;        synch_offset /= slow_down_factor;        // set the slow_down_factor        slow_down_factor = value;        // apply the slow_down_factor to all the depandant varaibles        sim_st *= slow_down_factor;        sb_step *= slow_down_factor;        sv_st *= slow_down_factor;        send_st *= slow_down_factor;        synch_offset *= slow_down_factor;        lcm_st = lcm( sim_st,                       lcm( send_st,                            lcm( recv_st,                                 lcm( sb_step,                                     lcm( sv_st,                                          ( synch_mode ? synch_offset : 1 ) ) ) ) ) );            }public:    int    simStep() const    { return sim_st; }    int    senseBodyStep() const    { return sb_step; }    int    coachVisualStep() const    { return sv_st; }    int    sendStep() const    { return send_st; }    int    lcmStep() const    { return lcm_st; }		int recv_st ;					/* udp recv step interval msec */		int cban_cycle ;				/* goalie catch ban cycle */		int slow_down_factor ;                          /* factor to slow down simulator and send intervals */		bool useoffside ;				/* flag for using off side rule */		bool kickoffoffside ;			/* flag for permit kick off offside */		Value offside_kick_margin ;		/* offside kick margin */		Value audio_dist ;				/* audio cut off distance */		Value dist_qstep ;				/* quantize step of distance */		Value land_qstep ;				/* quantize step of distance for landmark */#ifdef NEW_QSTEP		Value dir_qstep ;				/* quantize step of direction */private:		Value dist_qstep_l ;			/* team right quantize step of distance */		Value dist_qstep_r ;			/* team left quantize step of distance */		Value land_qstep_l ;			/* team right quantize step of distance for landmark */		Value land_qstep_r ;			/* team left quantize step of distance for landmark */		Value dir_qstep_l ;				/* team left quantize step of direction */		Value dir_qstep_r ;				/* team right quantize step of direction */public:    Value    distQStepL() const    {         if( !defined_qstep_l )            return = dist_qstep;        else            return dist_qstep_l;    }    Value    distQStepR() const    {         if( !defined_qstep_r )            return = dist_qstep;        else            return dist_qstep_r;    }    Value    landQStepL() const    {         if( !defined_qstep_l_l )            return = land_qstep;        else            return land_qstep_l;    }    Value    landQStepR() const    {         if( !defined_qstep_r_l )            return = land_qstep;        else            return land_qstep_r;    }    Value    dirQStepL() const    {         if( !defined_qstep_dir_l )            return = dir_qstep;        else            return dir_qstep_l;    }    Value    dirQStepR() const    {         if( !defined_qstep_dir_r )            return = dir_qstep;        else            return dir_qstep_r;    }#endif			bool	verbose ;					/* flag for verbose mode */		//    char logfile[MAX_FILE_LEN] ;	/* server log file name */		//   char recfile[MAX_FILE_LEN] ;	/* log file name for recording */		//  int  rec_ver ;					/* version for recording */		//  int  rec_log ;					/* flag for log recording */		//  int  rec_msg_mode ;				/* flag for whether to record msg_mode structures */		//   int  send_log ;					/* flag for log sending */		// th 6.3.00		//  int  log_times ;				/* flag for logging server cycle times in the log file */		////  		string replay ;		/* log file name for replay */		bool CoachMode ;				/* coach mode */		bool CwRMode ;					/* coach with referee mode */		bool old_hear ;					/* old format for hear command (coach) */		bool synch_mode;                               /* pfr:SYNCH whether to run in synchronized mode */    bool timer_loaded;private:		int synch_offset;                        /* pfr:SYNCH the offset from the start of the cycle to tell players to run */public:    int    synchOffset() const    { return synch_offset * slow_down_factor; }		int synch_micro_sleep;                   /* pfr:SYNCH the # of microseconds to sleep while waiting for players */		int start_goal_l;                           /* The starting score of the left team */		int start_goal_r;                           /* The starting score of the right team */		bool fullstate_l;                             /* flag to send fullstate messages to left team; supresses visual info */		bool fullstate_r;                             /* flag to send fullstate messages to right team; supresses visual info */		double slowness_on_top_for_left_team; /* Kinda self explanatory */		double slowness_on_top_for_right_team; /* ditto */private:		std::string landmark_file;		bool send_comms;		bool text_logging;		bool game_logging;		int game_log_version;		std::string text_log_dir;		std::string game_log_dir;		std::string text_log_fixed_name;		std::string game_log_fixed_name;		bool text_log_fixed;		bool game_log_fixed;		bool text_log_dated;		bool game_log_dated;		std::string log_date_format;		bool log_times;		bool record_messages;		int text_log_compression;		int game_log_compression;		bool M_profile;  bool kaway_logging;  std::string kaway_log_dir;  std::string kaway_log_fixed_name;  bool kaway_log_fixed;  bool kaway_log_dated;  int kaway_start;    void    setTextLogDir( const std::string& str )    {        text_log_dir = tildeExpand( str );    }    void    setGameLogDir( const std::string& str )    {        game_log_dir = tildeExpand( str );    }    void    setKAwayLogDir( const std::string& str )    {        kaway_log_dir = tildeExpand( str );    }  int M_point_to_ban;  int M_point_to_duration;  int M_say_msg_size;			/* string size of say message */  int M_hear_max;					/* player hear_capacity_max */  int M_hear_inc;					/* player hear_capacity_inc */  int M_hear_decay;				/* player hear_capacity_decay */  double M_tackle_dist;  double M_tackle_back_dist;  double M_tackle_width;  double M_tackle_exponent;  int M_tackle_cycles;  double M_tackle_power_rate;  int M_freeform_wait_period;  int M_freeform_send_period;  bool M_free_kick_faults;  bool M_back_passes;  bool M_proper_goal_kicks;  double M_stopped_ball_vel;  int M_max_goal_kicks;  int M_clang_del_win;  int M_clang_rule_win;  bool M_auto_mode;  int M_kick_off_wait;  int M_connect_wait;  int M_game_over_wait;  std::string M_team_l_start;  std::string M_team_r_start;  static const char LANDMARK_FILE[];  static const char SERVER_CONF[];  static const char OLD_SERVER_CONF[];  static const int SEND_COMMS;  static const int TEXT_LOGGING;  static const int GAME_LOGGING;  static const int GAME_LOG_VERSION;  static const char TEXT_LOG_DIR[];  static const char GAME_LOG_DIR[];  static const char TEXT_LOG_FIXED_NAME[];  static const char GAME_LOG_FIXED_NAME[];  static const int TEXT_LOG_FIXED;  static const int GAME_LOG_FIXED;  static const int TEXT_LOG_DATED;  static const int GAME_LOG_DATED;  static const char LOG_DATE_FORMAT[];  static const int LOG_TIMES;  static const int RECORD_MESSAGES;  static const int TEXT_LOG_COMPRESSION;  static const int GAME_LOG_COMPRESSION;  static const bool PROFILE;  static const int KAWAY_LOGGING;  static const char KAWAY_LOG_DIR[];  static const char KAWAY_LOG_FIXED_NAME[];  static const int KAWAY_LOG_FIXED;  static const int KAWAY_LOG_DATED;  static const int KAWAY_START;  static const int POINT_TO_BAN;  static const int POINT_TO_DURATION;  static const unsigned int SAY_MSG_SIZE;  static const unsigned int HEAR_MAX;  static const unsigned int HEAR_INC;  static const unsigned int HEAR_DECAY;  static const double TACKLE_DIST;  static const double TACKLE_BACK_DIST;  static const double TACKLE_WIDTH;  static const double TACKLE_EXPONENT;  static const unsigned int TACKLE_CYCLES;  static const double TACKLE_POWER_RATE;  static const int NR_NORMAL_HALFS;  static const int NR_EXTRA_HALFS;  static const bool PENALTY_SHOOT_OUTS;  static const int    PEN_BEFORE_SETUP_WAIT;  static const int    PEN_SETUP_WAIT;  static const int    PEN_READY_WAIT;  static const int    PEN_TAKEN_WAIT;  static const int    PEN_NR_KICKS;  static const int    PEN_MAX_EXTRA_KICKS;  static const bool   PEN_RANDOM_WINNER;  static const double PEN_DIST_X;  static const double PEN_MAX_GOALIE_DIST_X;  static const bool   PEN_ALLOW_MULT_KICKS;  static const bool   PEN_COACH_MOVES_PLAYERS;  static const unsigned int FREEFORM_WAIT_PERIOD;  static const unsigned int FREEFORM_SEND_PERIOD;  static const bool FREE_KICK_FAULTS;  static const bool BACK_PASSES;  static const bool PROPER_GOAL_KICKS;  static const double STOPPED_BALL_VEL;  static const int MAX_GOAL_KICKS;  static const int CLANG_DEL_WIN;  static const int CLANG_RULE_WIN;  static const bool S_AUTO_MODE;  static const int S_KICK_OFF_WAIT;  static const int S_CONNECT_WAIT;  static const int S_GAME_OVER_WAIT;  static const char S_TEAM_L_START[];  static const char S_TEAM_R_START[];    static const char S_MODULE_DIR[];public:    std::string     landmarkFile () const { return landmark_file; }		int sendComms () const { return send_comms; }		int textLogging () const { return text_logging; }		int gameLogging () const { return game_logging; }		int gameLogVersion () const { return game_log_version; }		std::string textLogDir () const { return tildeExpand( text_log_dir ); }		std::string gameLogDir () const { return tildeExpand( game_log_dir ); }		std::string textLogFixedName () const { return text_log_fixed_name; }		std::string gameLogFixedName () const { return game_log_fixed_name; }		int textLogFixed () const { return text_log_fixed; }		int gameLogFixed () const { return game_log_fixed; }		int textLogDated () const { return text_log_dated; }		int gameLogDated () const { return game_log_dated; }		std::string logDateFormat () const { return log_date_format; }		int logTimes () const { return log_times; }		int recordMessages () const { return record_messages; }			int textLogCompression () const { return text_log_compression; }		int gameLogCompression () const { return game_log_compression; }		bool profile () const { return M_profile; }  int kawayLogging () const { return kaway_logging; }  std::string kawayLogDir () const { return tildeExpand( kaway_log_dir ); }  std::string kawayLogFixedName () const { return kaway_log_fixed_name; }  int kawayLogFixed () const { return kaway_log_fixed; }  int kawayLogDated () const { return kaway_log_dated; }    int kawayStart () const { return kaway_start; }  unsigned int   pointToBan () const   { return (unsigned int)M_point_to_ban; }    unsigned int   pointToDuration () const   { return (unsigned int)M_point_to_duration; }  unsigned int  sayMsgSize() const  { return (unsigned int)M_say_msg_size; }  unsigned int  hearMax() const  { return (unsigned int)M_hear_max; }  unsigned int  hearInc() const  { return (unsigned int)M_hear_inc; }  unsigned int  hearDecay() const

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -