|
uniset-algorithms 0.2
|
00001 00002 // -------------------------------------------------------------------------- 00003 /* 00004 DO NOT EDIT THIS FILE. IT IS AUTOGENERATED FILE. 00005 ALL YOUR CHANGES WILL BE LOST. 00006 00007 НЕ РЕДАКТИРУЙТЕ ЭТОТ ФАЙЛ. ЭТОТ ФАЙЛ СОЗДАН АВТОМАТИЧЕСКИ. 00008 ВСЕ ВАШИ ИЗМЕНЕНИЯ БУДУТ ПОТЕРЯНЫ. 00009 */ 00010 // -------------------------------------------------------------------------- 00011 // generate timestamp: 2013-01-24 00012 // ----------------------------------------------------------------------------- 00013 #ifndef SEESControl_SK_H_ 00014 #define SEESControl_SK_H_ 00015 // ----------------------------------------------------------------------------- 00016 #include "ObjectsManager.h" 00017 #include "LT_Object.h" 00018 #include "UniXML.h" 00019 #include "Trigger.h" 00020 // ----------------------------------------------------------------------------- 00021 class SEESControl_SK: 00022 public ObjectsManager, 00023 public LT_Object 00024 { 00025 public: 00026 SEESControl_SK( UniSetTypes::ObjectId id, xmlNode* node=UniSetTypes::conf->getNode("SEESControl") ); 00027 SEESControl_SK(); 00028 virtual ~SEESControl_SK(); 00029 00030 00031 00032 bool alarm( UniSetTypes::ObjectId sid, bool state ); 00033 bool getState( UniSetTypes::ObjectId sid ); 00034 bool getValue( UniSetTypes::ObjectId sid ); 00035 void setValue( UniSetTypes::ObjectId sid, long value ); 00036 void setState( UniSetTypes::ObjectId sid, bool state ); 00037 void askState( UniSetTypes::ObjectId sid, UniversalIO::UIOCommand, UniSetTypes::ObjectId node = UniSetTypes::conf->getLocalNode() ); 00038 void askValue( UniSetTypes::ObjectId sid, UniversalIO::UIOCommand, UniSetTypes::ObjectId node = UniSetTypes::conf->getLocalNode() ); 00039 void updateValues(); 00040 void setMsg( UniSetTypes::ObjectId code, bool state ); 00041 00042 00043 // Используемые идентификаторы 00044 const UniSetTypes::ObjectId needResetProtection_f; 00045 UniSetTypes::ObjectId node_needResetProtection_f; 00046 const UniSetTypes::ObjectId QG_RemoteControl_S; 00047 UniSetTypes::ObjectId node_QG_RemoteControl_S; 00048 const UniSetTypes::ObjectId QG_LocalControlLamp_C; 00049 UniSetTypes::ObjectId node_QG_LocalControlLamp_C; 00050 00051 00052 // Используемые идентификаторы сообщений 00053 00054 const UniSetTypes::ObjectId mid_ProtectionNotReset_Att; 00055 UniSetTypes::ObjectId node_mid_ProtectionNotReset_Att; 00056 bool m_mid_ProtectionNotReset_Att; 00057 bool prev_m_mid_ProtectionNotReset_Att; 00060 // Текущее значение и предыдущее значение 00061 bool out_needResetProtection_f; 00062 bool prev_out_needResetProtection_f; 00063 bool in_QG_RemoteControl_S; 00064 bool prev_in_QG_RemoteControl_S; 00065 long out_QG_LocalControlLamp_C; 00066 long prev_out_QG_LocalControlLamp_C; 00067 00068 00069 // --- public variables --- 00070 00071 00072 // --- end of public variables --- 00073 00074 protected: 00075 // --- protected variables --- 00076 00077 00078 // ---- end of protected variables ---- 00079 00080 00081 virtual void callback(); 00082 virtual void processingMessage( UniSetTypes::VoidMessage* msg ); 00083 virtual void sysCommand( UniSetTypes::SystemMessage* sm ); 00084 virtual void askSensors( UniversalIO::UIOCommand cmd ){} 00085 virtual void sensorInfo( UniSetTypes::SensorMessage* sm ){} 00086 virtual void timerInfo( UniSetTypes::TimerMessage* tm ){} 00087 virtual void sigterm( int signo ); 00088 virtual bool activateObject(); 00089 virtual void testMode( bool state ); 00090 void updatePreviousValues(); 00091 void checkSensors(); 00092 void updateOutputs( bool force ); 00093 00094 void preAskSensors( UniversalIO::UIOCommand cmd ); 00095 void preSensorInfo( UniSetTypes::SensorMessage* sm ); 00096 void preTimerInfo( UniSetTypes::TimerMessage* tm ); 00097 void waitSM( int wait_msec, UniSetTypes::ObjectId testID = UniSetTypes::DefaultObjectId ); 00098 00099 void resetMsg(); 00100 Trigger trResetMsg; 00101 PassiveTimer ptResetMsg; 00102 int resetMsgTime; 00103 00104 // Выполнение очередного шага программы 00105 virtual void step()=0; 00106 00107 int sleep_msec; 00108 bool active; 00109 00110 UniSetTypes::ObjectId smTestID; 00112 // управление датчиком "сердцебиения" 00113 PassiveTimer ptHeartBeat; 00114 UniSetTypes::ObjectId idHeartBeat; 00115 int maxHeartBeat; 00117 xmlNode* confnode; 00119 int getIntProp(const std::string name) { return UniSetTypes::conf->getIntProp(confnode, name); } 00121 inline const std::string getProp(const std::string name) { return UniSetTypes::conf->getProp(confnode, name); } 00122 00123 int smReadyTimeout; 00124 bool activated; 00125 int activateTimeout; 00126 PassiveTimer ptStartUpTimeout; 00127 int askPause; 00129 IOController_i::SensorInfo si; 00130 00131 00132 private: 00133 00134 // --- private variables --- 00135 // --- end of private variables --- 00136 00137 00138 00139 bool end_private; // вспомогательное поле (для внутреннего использования при генерировании кода) 00140 }; 00141 00142 // ----------------------------------------------------------------------------- 00143 #endif // SEESControl_SK_H_
1.7.4