00001 #ifndef BATTERY_SORT_H
00002 #define BATTERY_SORT_H
00003
00018 #include <math.h>
00019
00020 #include "Observer.h"
00021 #include "PlansysObservation.h"
00022 #include "mainplansys.h"
00023 #include "waypoint.h"
00024 #include "posix_message_config.h"
00025 #include "observations.h"
00026 #include "init.h"
00027
00028
00029 class BatterySort: public Observer {
00030 public:
00031 BatterySort( PlansysObservation * , int theTeamColor );
00032 ~BatterySort();
00033 void Update( Subject *, int typeOfObservation);
00034 int GetPriority();
00035 int AgentGlobalPriority();
00036 int GetAction( controll_struct *ai_controll_struct );
00037 int SetAgentActive( int active );
00038 int StrategyInterrupted();
00039 int GetInterruptAction(interrupt_controll_struct *interrupt_controll);
00040 private:
00045 int agentPriority;
00046 int inAction;
00047 int activeStrategy;
00048 int batteryRelease;
00049 int batteryReleased;
00050 int waitForBatteryReleased;
00051 int lastWaypointReached;
00052 PlansysObservation *_subject;
00053 ai_waypoint ai_waypoint_3d;
00054 ai_waypoint battery_bin_ai_waypoint;
00055 proxy_message my_proxy_message;
00056 cv_observation my_cv_observation;
00057 controll_struct local_controll_struct;
00058 };
00059
00060 #endif