00001
00002 #ifndef UnionGroups_H_
00003 #define UnionGroups_H_
00004
00005 #include <list>
00006 #include <UniXML.h>
00007 #include <DebugStream.h>
00008 #include "SEESGroup.h"
00009
00010 class UnionGroups;
00011 typedef std::list<UnionGroups*> GroupList;
00012
00017 class UnionGroups
00018 {
00019 public:
00020
00021 UnionGroups( xmlNode* cnode );
00022 UnionGroups( int gnum );
00023 ~UnionGroups();
00024
00025 UniSetTypes::ObjectId noReserv_s;
00026 UniSetTypes::ObjectId readyForLoading_s;
00029 UniSetTypes::ObjectId P_as;
00030 UniSetTypes::ObjectId U_as;
00031 UniSetTypes::ObjectId f_as;
00032 UniSetTypes::ObjectId fdev_c;
00033 UniSetTypes::ObjectId Udev_c;
00034 UniSetTypes::ObjectId ReservPower_as;
00035 UniSetTypes::ObjectId requiredReserv_s;
00037 void addGroup( UnionGroups* gr );
00038 void clearGroup();
00039 void clear();
00040 void updateP(UniversalInterface* ui);
00041 void updateU(UniversalInterface* ui);
00042 void updateF(UniversalInterface* ui);
00043 void updateFdev(UniversalInterface* ui);
00044 void updateUdev(UniversalInterface* ui);
00045 void updateReservPower(UniversalInterface* ui);
00046 void updateNoReserv(UniversalInterface* ui);
00047 void updateReadyForLoading(UniversalInterface* uin);
00049 void step( UniversalInterface* uin );
00050 void update( UniversalInterface* uin );
00051 SEESGroup* gr;
00052
00053 void sensorInfo( UniSetTypes::SensorMessage *sm );
00054 void askSensors( UniversalInterface* uin, UniversalIO::UIOCommand cmd );
00055 inline bool isRequiredReserv(){ return in_requiredReserv_s; }
00056
00057 static DebugStream dlog;
00058 static void init_dlog( DebugStream& dlog );
00059
00060 protected:
00061
00062
00063
00064
00065 GroupList glst;
00066
00067 std::string myname;
00068 bool in_requiredReserv_s;
00070 friend std::ostream& operator<<(std::ostream& os, const GroupList& l );
00071 friend std::ostream& operator<<(std::ostream& os, GroupList* l );
00072 };
00073
00074 #endif // UnionGroups_H_