00001 #ifndef QG_H_
00002 #define QG_H_
00003
00004 #include <TriggerOutput.h>
00005 #include <TriggerOR.h>
00006 #include <ObjectsManager.h>
00007 #include <DebugStream.h>
00008 #include "ObjectMode.h"
00009 #include "A2D.h"
00010 #include "QG_SK.h"
00011
00013 class QG:
00014 public QG_SK
00015 {
00016 public:
00017 QG( unsigned int num, const std::string& qname, ObjectsManager* master, xmlNode* node );
00018 ~QG();
00019
00020 virtual char* getName();
00021
00022 ObjectsManager* master;
00023 bool getState();
00024 bool isProtection();
00025 bool isOnMode();
00026
00027 bool getRealState();
00029 inline ObjectMode getMode(){ return (ObjectMode)in_state_as; }
00030
00031 friend std::ostream& operator<<(std::ostream& os, QG& am );
00032 friend std::ostream& operator<<(std::ostream& os, QG* am );
00033
00034 inline unsigned int getNumber(){ return num; }
00035
00036 static DebugStream dlog;
00037 static void init_dlog( DebugStream& dlog );
00038
00039 protected:
00040 QG();
00041
00042 virtual void step();
00043 virtual void sensorInfo( UniSetTypes::SensorMessage *sm );
00044 virtual void askSensors( UniversalIO::UIOCommand cmd );
00045
00046 private:
00047 unsigned int num;
00048 UniSetTypes::uniset_mutex smutex;
00049 A2D a2d;
00050 };
00051
00052 #endif // QG_H_