UniSet 2.32.1
PassiveObject.h
1/*
2 * Copyright (c) 2015 Pavel Vainerman.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation, version 2.1.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Lesser Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16// --------------------------------------------------------------------------
20// -------------------------------------------------------------------------
21#ifndef PassiveObject_H_
22#define PassiveObject_H_
23// -------------------------------------------------------------------------
24
25#include <string>
26#include "UniSetTypes.h"
27#include "MessageType.h"
28#include "ProxyManager.h"
29// -------------------------------------------------------------------------
30namespace uniset
31{
32
42 {
43 public:
47 virtual ~PassiveObject();
48
49 virtual void processingMessage( const uniset::VoidMessage* msg );
50
51 void setID( uniset::ObjectId id );
52 void init(ProxyManager* mngr);
53
54 inline uniset::ObjectId getId() const
55 {
56 return id;
57 }
58 inline std::string getName() const
59 {
60 return myname;
61 }
62
63 protected:
64 virtual void sysCommand( const uniset::SystemMessage* sm );
65 virtual void askSensors( UniversalIO::UIOCommand cmd ) {}
66 virtual void timerInfo( const uniset::TimerMessage* tm ) {}
67 virtual void sensorInfo( const uniset::SensorMessage* sm ) {}
68
69 std::string myname = { "" };
70 ProxyManager* mngr = { nullptr };
71
72 private:
74 };
75 // -------------------------------------------------------------------------
76} // end of uniset namespace
77// -------------------------------------------------------------------------
78#endif // PassiveObject_H_
79// -------------------------------------------------------------------------
Definition PassiveObject.h:42
Definition ProxyManager.h:46
Definition MessageType.h:127
Definition MessageType.h:171
Definition MessageType.h:214
Definition MessageType.h:91
Definition Calibration.h:27
const ObjectId DefaultObjectId
Definition UniSetTypes.h:71
long ObjectId
Definition UniSetTypes_i.idl:30