UniSet  2.6.0
SMonitor.h
00001 /*
00002  * Copyright (c) 2015 Pavel Vainerman.
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU Lesser General Public License as
00006  * published by the Free Software Foundation, version 2.1.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00011  * Lesser General Lesser Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00015  */
00016 // -----------------------------------------------------------------------------
00017 #ifndef SMonitor_H_
00018 #define SMonitor_H_
00019 // -----------------------------------------------------------------------------
00020 #include <list>
00021 #include <UniSetObject.h>
00022 #include "UniSetTypes.h"
00023 // -----------------------------------------------------------------------------
00024 namespace uniset
00025 {
00026 
00027 class SMonitor:
00028     public UniSetObject
00029 {
00030     public:
00031 
00032         SMonitor( uniset::ObjectId id );
00033         ~SMonitor();
00034 
00035         // -----
00036     protected:
00037         virtual void sysCommand( const uniset::SystemMessage* sm ) override;
00038         virtual void sensorInfo( const uniset::SensorMessage* si ) override;
00039         virtual void timerInfo( const uniset::TimerMessage* tm ) override;
00040         virtual void sigterm( int signo ) override;
00041         SMonitor();
00042 
00043     private:
00044         typedef std::list<uniset::ParamSInfo> MyIDList;
00045         MyIDList lst;
00046         std::string script;
00047 };
00048 // -------------------------------------------------------------------------
00049 } // end of uniset namespace
00050 // -----------------------------------------------------------------------------
00051 #endif
00052 // -----------------------------------------------------------------------------