NodeObserver.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX 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
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Manfred Kroehnert ( manfred.kroehnert at kit dot edu)
18 * @date 2013
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 #include <IceGrid/Admin.h>
26 
28  public IceGrid::NodeObserver
29 {
30  armarx::IceGridViewer* viewer;
31 public:
33  viewer(viewer)
34  {
35  }
36 
37  void nodeInit(const IceGrid::NodeDynamicInfoSeq& nodes, const ::Ice::Current& = Ice::emptyCurrent) override
38  {
39  viewer->gridNodeListUpdate(nodes);
40  }
41 
42  void nodeUp(const IceGrid::NodeDynamicInfo& node, const ::Ice::Current& = Ice::emptyCurrent) override
43  {
44  viewer->gridNodeListAdd(node);
45  }
46 
47  void nodeDown(const std::string& name, const ::Ice::Current& = Ice::emptyCurrent) override
48  {
49  viewer->gridNodeListRemove(QString::fromStdString(name));
50  }
51 
52  void updateServer(const std::string& node, const IceGrid::ServerDynamicInfo& updatedInfo, const ::Ice::Current& = Ice::emptyCurrent) override
53  {
54  viewer->updateServerInfo(node, updatedInfo);
55  }
56 
57  void updateAdapter(const std::string& node, const IceGrid::AdapterDynamicInfo& updatedInfo, const ::Ice::Current& = Ice::emptyCurrent) override
58  {
59  viewer->updateAdapterInfo(node, updatedInfo);
60  }
61 };
62 
64 
armarx::IceGridViewer::updateServerInfo
void updateServerInfo(const std::string &nodeName, const IceGrid::ServerDynamicInfo &serverUpdateInfo)
Definition: IceGridViewer.cpp:180
QtNodeObserver::QtNodeObserver
QtNodeObserver(armarx::IceGridViewer *viewer)
Definition: NodeObserver.h:32
QtNodeObserver
Definition: NodeObserver.h:27
QtNodeObserver::nodeInit
void nodeInit(const IceGrid::NodeDynamicInfoSeq &nodes, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: NodeObserver.h:37
armarx::IceGridViewer
Definition: IceGridViewer.h:58
QtNodeObserver::updateServer
void updateServer(const std::string &node, const IceGrid::ServerDynamicInfo &updatedInfo, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: NodeObserver.h:52
armarx::IceGridViewer::gridNodeListUpdate
void gridNodeListUpdate(const IceGrid::NodeDynamicInfoSeq &nodeSeq)
Definition: IceGridViewer.cpp:120
QtNodeObserver::updateAdapter
void updateAdapter(const std::string &node, const IceGrid::AdapterDynamicInfo &updatedInfo, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: NodeObserver.h:57
QtNodeObserver::nodeDown
void nodeDown(const std::string &name, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: NodeObserver.h:47
QtNodeObserver::nodeUp
void nodeUp(const IceGrid::NodeDynamicInfo &node, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: NodeObserver.h:42
armarx::IceGridViewer::gridNodeListAdd
void gridNodeListAdd(const IceGrid::NodeDynamicInfo &node)
Definition: IceGridViewer.cpp:144
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::IceGridViewer::gridNodeListRemove
void gridNodeListRemove(const QString &node)
Definition: IceGridViewer.cpp:154
armarx::IceGridViewer::updateAdapterInfo
void updateAdapterInfo(const std::string &nodeName, const IceGrid::AdapterDynamicInfo &adapterUpdateInfo)
Definition: IceGridViewer.cpp:222