UniSet 2.32.1
SViewer.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//--------------------------------------------------------------------------------
21//--------------------------------------------------------------------------------
22#ifndef _SVIEWER_H
23#define _SVIEWER_H
24//--------------------------------------------------------------------------------
25#include <string>
26#include <memory>
27#include "IOController_i.hh"
28#include "ObjectRepository.h"
29#include "UInterface.h"
30#include "PassiveTimer.h"
31//--------------------------------------------------------------------------------
32namespace uniset
33{
34
35 class SViewer
36 {
37 public:
38
39 explicit SViewer(const std::string& ControllersSection, bool isShortName = true);
40 virtual ~SViewer();
41
42 void view();
43 void monitor( timeout_t msec = 500 );
44
45 protected:
46 void readSection(const std::string& sec, const std::string& secRoot);
47 void getInfo(uniset::ObjectId id);
48
49 virtual void updateSensors( IOController_i::SensorInfoSeq_var& amap, uniset::ObjectId oid );
50 virtual void updateThresholds( IONotifyController_i::ThresholdsListSeq_var& tlst, uniset::ObjectId oid );
51
52 const std::string csec;
53
54 void printInfo(uniset::ObjectId id,
55 const std::string& sname,
56 long value,
57 const std::string& supplier,
58 const std::string& txtname, const std::string& iotype);
59
60 std::shared_ptr<UInterface> ui;
61
62 private:
64 bool isShortName = { true };
65
66 };
67 // -------------------------------------------------------------------------
68} // end of uniset namespace
69// --------------------------------------------------------------------------
70#endif
71// --------------------------------------------------------------------------
Definition ObjectRepository.h:46
Definition SViewer.h:36
Definition Calibration.h:27
long ObjectId
Definition UniSetTypes_i.idl:30