00001 /* -*- Mode: C++ -*- 00002 * $Id: Decision.h,v 1.8 2009/12/01 17:15:53 frehe Exp $ 00003 * 00004 * 00005 * COPYRIGHT INFORMATION 00006 * 00007 * This file is part of RoboSoc created by Fredrik Heintz <frehe@ida.liu.se> 00008 * Copyright (C) 1999, 2000 Fredrik Heintz, Linköping University, Sweden 00009 * 00010 * You are allowed to modify and use this code as long as you retain this 00011 * notice. If you make any changes or have any comments I would appreciate 00012 * it if you send me a message. For more information, please see 00013 * http://www.ida.liu.se/~frehe/RoboCup/RoboSoc/ 00014 * 00015 * 00016 * IDENTIFICATION 00017 * 00018 * Filename: Decision.h 00019 * Unitname: BasicSystem 00020 * $Revision: 1.8 $ 00021 * Created by: Fredrik Heintz 1999-xx-xx 00022 * Last modified by $Author: frehe $ $Date: 2009/12/01 17:15:53 $ 00023 * 00024 * 00025 * HISTORY 00026 * 00027 * $Log: Decision.h,v $ 00028 * Revision 1.8 2009/12/01 17:15:53 frehe 00029 * Added an onShutdown event. 00030 * 00031 * Revision 1.7 2004/08/29 13:35:47 frehe 00032 * Added a onVisualCoachSensorData callback. 00033 * 00034 * Revision 1.6 2003/08/20 12:28:04 s02davro 00035 * New count counter, attentiontos etc. 00036 * 00037 * Revision 1.5 2003/07/21 08:53:06 s02davro 00038 * Added callback function when a substitution is noticed 00039 * 00040 * Revision 1.4 2002/09/04 13:25:09 s02davro 00041 * Removed deprecated methods in Controller and Decision 00042 * 00043 * Revision 1.3 2001/10/14 21:21:42 frehe 00044 * Added better support for messages from self and from other players. 00045 * 00046 * Revision 1.2 2001/08/13 16:43:12 frehe 00047 * Made updates to compile with new autotools and RCCParser. 00048 * 00049 * Revision 1.1 2000/09/03 20:41:09 frehe 00050 * Imported the current version of RoboSoc (soon to be v2.5.0) 00051 * 00052 */ 00053 00066 #ifndef DECISION_H 00067 #define DECISION_H 00068 00069 00070 //#include "machine_dependent_types.h" 00071 #include "ServerCommand.h" 00072 00073 00074 RS_BEGIN_NAMESPACE 00075 00076 00077 class ActuatorInterface; 00078 //class ServerCommand; 00079 00080 00093 class Decision { 00094 public: 00095 Decision(ActuatorInterface* const actuator_interface); 00096 virtual ~Decision(); 00097 00098 virtual ServerCommand* initAgent(); 00099 virtual bool init(ActuatorInterface* const actuator_interface); 00100 00101 // Event handlers 00102 virtual void onActuatorSensorData(); 00103 virtual void onAuralSensorData(); 00104 virtual void onAuralCoachSensorData(); 00105 virtual void onAuralRefereeSensorData(); 00106 virtual void onAuralPlayerSensorData(); 00107 virtual void onAuralSelfSensorData(); 00108 virtual void onSubstitution(); 00109 virtual void onInit(); 00110 virtual void onPhysicalSensorData(); 00111 virtual void onSensorError(); 00112 virtual void onVisualCoachSensorData(); 00113 virtual void onVisualSensorData(); 00114 00115 virtual void onBeforeSensorData(); 00116 virtual void onAfterSensorData(); 00117 virtual void onBeforeTick(); 00118 virtual void onAfterTick(); 00119 00120 virtual void onNewCycle(const bool forced); 00121 virtual bool onEstimatedNewCycle(UInt16 estimated_time, UInt16 ticks); 00122 virtual void onCommandWarning(); 00123 virtual void onDelayedActions(); 00124 virtual void onMissingActions(); 00125 00126 virtual void onShutdown(); 00127 00128 protected: 00129 ActuatorInterface* actuatorInterface; 00130 bool initialized; 00131 }; 00132 00133 00134 RS_END_NAMESPACE 00135 00136 00137 /* CONDITIONAL INCLUSION OF INLINE DEFINITIONS 00138 * 00139 * If the compiler and debugger understands the keyword inline then include 00140 * the inline definitions here, otherwise include them in the definition file. 00141 * 00142 * This is controlled by a flag called RS_USE_INLINE, which is usually 00143 * defined. It can be set by the user by giving the compiler an argument 00144 * usually -DRS_USE_INLINE (to define it) or -URS_USE_INLINE (to undefine it). 00145 */ 00146 00147 #ifdef RS_USE_INLINE 00148 # include "Decision.icc" 00149 #endif 00150 00151 00152 #endif // !DECISION_H
1.3-rc3