ArmarXManager.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXCore::core
19  * @author Kai Welke (kai dot welke at kit dot edu)
20  * @date 2012
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
29 #include <ArmarXCore/core/logging/Logging.h> // for Logging
31 #include <ArmarXCore/interface/core/MiceManagerInsightProvider.h>
32 #include <ArmarXCore/interface/core/ArmarXManagerInterface.h>
33 #include <ArmarXCore/interface/core/BasicTypes.h>
34 //#include <ArmarXCore/interface/core/ManagedIceObjectDefinitions.h>
35 
36 #include <Ice/BuiltinSequences.h> // for StringSeq
37 #include <Ice/CommunicatorF.h> // for CommunicatorPtr
38 #include <Ice/Current.h> // for Current
39 #include <Ice/ObjectAdapterF.h> // for ObjectAdapterPtr
40 #include <Ice/Properties.h>
41 #include <Ice/Metrics.h>
42 #include <IceUtil/Handle.h> // for Handle
43 
44 #include <condition_variable>
45 #include <cstddef> // for size_t
46 #include <string> // for string
47 #include <vector> // for vector
48 #include <mutex>
49 #include <map> // for map, map<>::value_compare
50 
51 namespace armarx
52 {
53  // forward declaration
54  class ArmarXObjectScheduler;
55 
57 
58  class IceManager;
59 
61 
62  class ArmarXMultipleObjectsScheduler;
64 
65  /**
66  * IceObjectManager smart pointer type
67  */
68  class ArmarXManager;
69  template <class T>
70  class PeriodicTask;
71 
73 
74 
76 
77  /**
78  * @class ArmarXManager
79  * @brief Main class of an ArmarX process.
80  * @ingroup DistributedProcessingGrp
81  *
82  * The ArmarXManager is the main class for writing distributed
83  * applications in the ArmarX framework.
84  * The ArmarXManager takes care of handling ManagedIceObjects.
85  * ManagedIceObjects are the core elements of ArmarX distributed applications.
86  *
87  * Usually, each process creates one ArmarXManager and adds the
88  * required ManagedIceObjects to this manager.
89  *
90  * The ArmarXManager provides and Ice interface which allows
91  * retrieving the state and network connectivity of all
92  * ManagedIceObject within the Manager.
93  * To provide this functionality it holds one instance of Ice::Communicator
94  *
95  * Finally it also does shutdown handling
96  */
98  virtual public Logging,
99  virtual public ArmarXManagerInterface,
101  {
103  friend class ArmarXObjectObserver;
104 
105  enum ArmarXManagerState
106  {
107  eCreated,
108  eRunning,
109  eShutdownInProgress,
110  eShutdown
111  };
112 
113  public:
114  /**
115  * ArmarXManager constructor. With this constructor, the
116  * ArmarXManager builds its own communicator using the specified port, host and locatorName
117  * (default: --Ice.Default.Locator= IceGrid/Locator:tcp -p 4061 -h localhost)
118  *
119  * @param applicationName name of the application used for registering the manager to Ice and for logging
120  * @param port the port of the Ice locator service
121  * @param host the host of the Ice locator service
122  * @param locatorName the name of the Ice locator service
123  * @param args list of arguments for Ice (e.g. "--Ice.ThreadPool.Server.SizeMax=10")
124  */
125  ArmarXManager(std::string applicationName, int port = 4061, std::string host = "localhost", std::string locatorName = "IceGrid/Locator", Ice::StringSeq args = Ice::StringSeq());
126 
127  /**
128  * Constructs an ArmarXManager by passing a communicator. This can be used if communicator has already
129  * been constructed e.g in Ice::Application.
130  *
131  * @param applicationName name of the application used for registering the manager to Ice and for logging
132  * @param communicator configured Ice::Communicator
133  */
134  ArmarXManager(std::string applicationName, const Ice::CommunicatorPtr& communicator);
135 
136  ~ArmarXManager() override;
137 
138  bool checkIceConnection(bool printHint = true) const;
139  static bool CheckIceConnection(const Ice::CommunicatorPtr& communicator, bool printHint);
140 
141  /**
142  * Enable or disable logging
143  *
144  * @param enable whether to enable logging
145  */
146  void enableLogging(bool enable);
147 
148  /**
149  * Enable or disable profiling of CPU Usage
150  */
151  void enableProfiling(bool enable);
152 
153  /**
154  * Set minimum logging level to output in log stream.
155  *
156  * @param applicationName name of the application used for registering the manager to Ice and for logging
157  * @param communicator configured Ice::Communicator
158  */
160 
161  /**
162  * Set data paths used to search for datafiles
163  *
164  * @param dataPaths semicolon seperated list of paths
165  */
166  void setDataPaths(std::string dataPaths);
167 
168  /**
169  * Add a ManagedIceObject to the manager. Takes care of the IceManagedObject
170  * lifcycle using and ArmarXObjectScheduler. addObject is
171  * thread-safe and can be called from any method in order to dynamically
172  * add ManagedIceObjects (as e.g. required for GUI).
173  *
174  * @param object object to add
175  * @param addWithOwnAdapter If true this object will have it's own adapter
176  * @param objectName Name that the object should have. if not empty overrides the currently set name.
177  */
178  void addObject(const ManagedIceObjectPtr& object, bool addWithOwnAdapter = true, const std::string& objectName = "", bool useOwnScheduleThread = true) override;
179  virtual void addObject(const ManagedIceObjectPtr& object, const std::string& objectName, bool addWithOwnAdapter = true, bool useOwnScheduleThread = true);
180 
181  virtual void addObject(const ManagedIceObjectPtr& object, Ice::ObjectAdapterPtr objectAdapterToAddTo, const std::string& objectName = "", bool useOwnScheduleThread = true);
182 
183  virtual void addObjectAsync(const ManagedIceObjectPtr& object, const std::string& objectName, bool addWithOwnAdapter = true, bool useOwnScheduleThread = true);
184 
185  /**
186  * Removes an object from the manager.
187  *
188  * This version waits until all calls to this component are finished and
189  * the has been completely removed.
190  *
191  * @param object object to remove
192  */
193  void removeObjectBlocking(const ManagedIceObjectPtr& object) override;
194 
195  /**
196  * Removes an object from the manager.
197  *
198  * This version waits until all calls to this component are finished and
199  * the has been completely removed.
200  *
201  * @param objectName name of the object to remove
202  */
203  void removeObjectBlocking(const std::string& objectName) override;
204 
205  /**
206  * Removes an object from the manager.
207  *
208  * This version returns immediatly and does <b>not</b> wait for all call to this
209  * to finish.
210  *
211  * @param object object to remove
212  */
213  void removeObjectNonBlocking(const ManagedIceObjectPtr& object) override;
214 
215  /**
216  * Removes an object from the manager.
217  *
218  * This version returns immediatly and does <b>not</b> wait for all call to this
219  * to finish.
220  *
221  * @param objectName name of the object to remove
222  */
223  void removeObjectNonBlocking(const std::string& objectName) override;
224 
225  /**
226  * Wait for shutdown. Shutdown is initialized once shutdown() is called on ArmarXManager e.g. from a signal handler.
227  */
228  void waitForShutdown();
229 
230  /**
231  * Shuts down the ArmarXManager. If a thread is waiting in waitForShutdown, the thread is activated after shutdown has been completed.
232  */
233  void shutdown();
234 
235  /**
236  * @brief Calls shutdown() after a timeout.
237  * @param timeoutMs The timeout to wait. (unit ms)
238  */
239  void asyncShutdown(std::size_t timeoutMs = 0);
240 
241  /**
242  * Whether ArmarXManager shutdown has been finished.
243  *
244  * @return shutdown finished
245  */
246  bool isShutdown();
247 
248  /**
249  * Retrieve pointers to all ManagedIceObject.
250  *
251  * @return vector of pointers
252  */
253  std::vector<ManagedIceObjectPtr> getManagedObjects() override;
254 
255  /**
256  * Retrieve state of a ManagedIceObject. Part of the Ice interface.
257  *
258  * @param objectName name of the object
259  * @param c Ice context
260  *
261  * @return state of the ManagedIceObject
262  */
263  ManagedIceObjectState getObjectState(const std::string& objectName, const Ice::Current& c = Ice::emptyCurrent) override;
264 
265  /**
266  * Retrieve connectivity of a ManagedIceObject. Part of the Ice interface.
267  *
268  * @param objectName name of the object
269  * @param c Ice context
270  *
271  * @return connectivity of the ManagedIceObject
272  */
273  ManagedIceObjectConnectivity getObjectConnectivity(const std::string& objectName, const Ice::Current& c = Ice::emptyCurrent) override;
274 
275  /**
276  * Retrieve connectivity of a ManagedIceObject. Part of the Ice MiceManagerInsightProvider interface.
277  *
278  * @param objectName name of the object
279  * @param c Ice context
280  *
281  * @return connectivity of the ManagedIceObject
282  */
283  mice::MiceObjectConnectivity getMiceObjectConnectivity(const std::string& objectName, const Ice::Current& c = Ice::emptyCurrent) override;
284 
285  /**
286  * @brief getObjectProperties is used to retrieve the properties of an object
287  * @return
288  */
289  ::armarx::StringStringDictionary getObjectProperties(const ::std::string& objectName, const ::Ice::Current& = Ice::emptyCurrent) override;
290  ObjectPropertyInfos getObjectPropertyInfos(const::std::string& objectName, const::Ice::Current&) override;
291  ObjectPropertyInfos getApplicationPropertyInfos(const::Ice::Current&) override;
292 
293 
294  Ice::PropertiesAdminPrx getPropertiesAdmin(const Ice::Current& = Ice::emptyCurrent) override;
295 
296  IceMX::MetricsAdminPrx getMetricsAdmin(const Ice::Current& = Ice::emptyCurrent) override;
297 
298  /**
299  * Calls Component::setIceProperties() on all components
300  * assigend to this ArmarXManager Instance.
301  */
302  void setComponentIceProperties(const Ice::PropertiesPtr& properties);
303 
304  void updateComponentIceProperties(const Ice::PropertyDict& properties);
305 
306  /**
307  * Retrieve the names of all ManagedIceObject. Part of the Ice interface.
308  *
309  * @param c Ice context
310  *
311  * @return vector of names
312  */
313  Ice::StringSeq getManagedObjectNames(const Ice::Current& c = Ice::emptyCurrent) override;
314 
315  /**
316  * Retrieve the names of all ManagedIceObject. Part of the Ice MiceManagerInsightProvider interface.
317  *
318  * @param c Ice context
319  *
320  * @return vector of names
321  */
322  Ice::StringSeq getObjectNames(const Ice::Current& c = Ice::emptyCurrent) override;
323 
324 
325  /**
326  * Gets the hostname of the host running the manager. Part of the Ice MiceManagerInsightProvider interface.
327  *
328  * @param c Ice context
329  *
330  * @return hostname
331  */
332  std::string getHostname(const Ice::Current& c = Ice::emptyCurrent) override;
333 
334  /**
335  * @brief Retrieve the instance of the icemanager
336  * @return Pointer to the iceManager
337  * @see ManagedIceObject::getIceManager()
338  */
339  const IceManagerPtr& getIceManager() const;
340  const Ice::CommunicatorPtr& getCommunicator() const;
341 
342  /**
343  * @brief Registers all object factories that are known with Ice.
344  *
345  * Object factories are automatically preregistered when their library
346  * is linked. Function is idempotent.
347  * This function is called in init() of ArmarXManager and needs only be called, if
348  * no ArmarXManager is used or libraries are loaded at runtime.
349  * @see FactoryCollectionBase
350  */
352 
353  /**
354  * @brief non static convenience version of ArmarXManager::RegisterKnownObjectFactoriesWithIce()
355  * @see RegisterKnownObjectFactoriesWithIce()
356  */
358 
359  const Ice::ObjectAdapterPtr& getAdapter() const;
360 
361  const std::shared_ptr<SharedRemoteHandleState>& getSharedRemoteHandleState() const;
362 
363  /**
364  * @brief increased the number of single threaded schedulers. Decrease is not possible,
365  * since the link to objects is fixed.
366  * @param increasyBy Increases the number of single threaded schedulers by this amount.
367  */
368  void increaseSchedulers(int increaseBy);
369 
370  template<class Function, class Data>
372  Function f, Data d, const std::string& id = "",
373  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3),
374  IceUtil::Time orphantDeletionDelay = IceUtil::Time::seconds(6),
375  long heartBeatMs = 1000)
376  {
379  (
380  this, id, std::forward<decltype(f)>(f), std::forward<decltype(d)>(d),
381  deletionDelay, orphantDeletionDelay, heartBeatMs
382  );
383  remoteReferenceCountControlBlockManager->add(ptr);
384  return ptr;
385  }
386  template<class Function>
388  Function f, const std::string& id = "",
389  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3),
390  IceUtil::Time orphantDeletionDelay = IceUtil::Time::seconds(6),
391  long heartBeatMs = 1000)
392  {
395  (
396  this, id, std::forward<decltype(f)>(f),
397  deletionDelay, orphantDeletionDelay, heartBeatMs
398  );
399  remoteReferenceCountControlBlockManager->add(ptr);
400  return ptr;
401  }
402 
403  template<class Function, class Data>
406  Function f, Data d, const std::string& id = "", IceUtil::Time deletionDelay = IceUtil::Time::seconds(3))
407  {
410  (
411  this, id, std::forward<decltype(f)>(f), std::forward<decltype(d)>(d), deletionDelay
412  );
413  remoteReferenceCountControlBlockManager->add(ptr);
414  return ptr;
415  }
416  template<class Function>
419  Function f, const std::string& id = "", IceUtil::Time deletionDelay = IceUtil::Time::seconds(3))
420  {
423  (
424  this, id, std::forward<decltype(f)>(f), deletionDelay
425  );
426  remoteReferenceCountControlBlockManager->add(ptr);
427  return ptr;
428  }
429 
430  StringVariantBaseMap getMetaInfo(const std::string&, const Ice::Current&) override;
431 
432 
433 // bool loadLibFromPath(const std::string& path);
434 // bool loadLibFromPackage(const std::string& package, const std::string& lib);
435  private:
436  // typedefs
437  using ObjectSchedulerMap = std::map<std::string, ArmarXObjectSchedulerPtr>;
438  using ObjectSchedulerList = std::vector<ArmarXObjectSchedulerPtr>;
439 
440  // internal init used by both constructors
441  void init(std::string applicationName, const Ice::CommunicatorPtr& communicator);
442 
443  // thread method to cleanup terminated schedulers
444  void cleanupSchedulers();
445 
446  /**
447  * @brief Disconnects all objects that dependent on the given object.
448  * @param object name of the object of which all dependees should be removed
449  */
450  void disconnectDependees(const std::string& object);
451  void disconnectAllObjects();
452  std::vector<std::string> getDependendees(const std::string& removedObject);
453 
454  /**
455  * @brief Schedulers which are waiting for dependencies are checking the
456  * dependencies in a fix interval. Call this function to wake them up and
457  * perform the check immediatly.
458  */
459  void wakeupWaitingSchedulers();
460 
461  // remove all managed objects
462  void removeAllObjects(bool blocking);
463 
464  // remove specific managed objects
465  bool removeObject(const ArmarXObjectSchedulerPtr& objectScheduler, bool blocking);
466 
467  ArmarXObjectSchedulerPtr findObjectScheduler(const std::string& objectName) const;
468 
469  void checkDependencies();
470 
471  // synchronization
472  // Ugly: Returing a smart pointer to a lock is just frigging insanity
473  // Why do we even have this weird pattern?
474  using ScopedRecursiveLockPtr = std::unique_ptr<std::scoped_lock<std::recursive_mutex>>;
475  ScopedRecursiveLockPtr acquireManagedObjectsMutex();
476 
477  /**
478  * @brief installProcessFacet creates a new Ice::Process facet to handle graceful application shutdown when run via IceGrid
479  * @param armarXManager the ApplicationProcessFacet requires an ArmarXManager instance.
480  *
481  * This requires the following Ice property to be set to prevent raceconditions
482  * \code Ice.Admin.DelayCreation=1 \endcode
483  *
484  * for further detail take a look at: https://doc.zeroc.com/display/Ice34/The+Process+Facet
485  */
486  void installProcessFacet();
487 
488  // name of the application
489  std::string applicationName;
490 
491  // state of the manager
492  ArmarXManagerState managerState;
493  std::mutex managerStateMutex;
494 
495  // ice manager
496  IceManagerPtr iceManager;
497 
498  ArmarXObjectObserverPtr objObserver;
499 
500  // object scheduler registry
501  ObjectSchedulerMap managedObjects;
502  ObjectSchedulerList terminatingObjects;
503  mutable std::recursive_mutex managedObjectsMutex;
504  std::mutex terminatingObjectsMutex;
505 
506  std::mutex schedulerListMutex;
507  std::vector<ArmarXMultipleObjectsSchedulerPtr> singleThreadedSchedulers;
508 
509  // shutdown handling
510  std::mutex shutdownMutex;
511  std::condition_variable shutdownCondition;
512 
513  // cleanup task
514  IceUtil::Handle<PeriodicTask<ArmarXManager> > cleanupSchedulersTask;
515 
516  IceUtil::Handle<PeriodicTask<ArmarXManager> > checkDependencyStatusTask;
517  Ice::ObjectAdapterPtr armarxManagerAdapter;
518 
519  //remotehandles
520  std::shared_ptr<SharedRemoteHandleState> sharedRemoteHandleState;
521  std::shared_ptr<RemoteReferenceCountControlBlockManager> remoteReferenceCountControlBlockManager;
522  };
523 }
524 
armarx::ArmarXManager::setComponentIceProperties
void setComponentIceProperties(const Ice::PropertiesPtr &properties)
Calls Component::setIceProperties() on all components assigend to this ArmarXManager Instance.
Definition: ArmarXManager.cpp:720
armarx::IceManagerPtr
IceUtil::Handle< IceManager > IceManagerPtr
IceManager smart pointer.
Definition: ArmarXFwd.h:39
armarx::ArmarXManager::getApplicationPropertyInfos
ObjectPropertyInfos getApplicationPropertyInfos(const ::Ice::Current &) override
Definition: ArmarXManager.cpp:695
armarx::ArmarXManager::addObjectAsync
virtual void addObjectAsync(const ManagedIceObjectPtr &object, const std::string &objectName, bool addWithOwnAdapter=true, bool useOwnScheduleThread=true)
Definition: ArmarXManager.cpp:315
armarx::ArmarXManager::getObjectPropertyInfos
ObjectPropertyInfos getObjectPropertyInfos(const ::std::string &objectName, const ::Ice::Current &) override
Definition: ArmarXManager.cpp:668
armarx::MessageTypeT
MessageTypeT
Definition: LogSender.h:45
cyberglove_with_calib_22dof.ic
ic
Definition: cyberglove_with_calib_22dof.py:22
armarx::Logging::minimumLoggingLevel
MessageTypeT minimumLoggingLevel
Definition: Logging.h:272
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::ArmarXManager::waitForShutdown
void waitForShutdown()
Wait for shutdown.
Definition: ArmarXManager.cpp:400
armarx::ArmarXManager::ArmarXManager
ArmarXManager(std::string applicationName, int port=4061, std::string host="localhost", std::string locatorName="IceGrid/Locator", Ice::StringSeq args=Ice::StringSeq())
ArmarXManager constructor.
Definition: ArmarXManager.cpp:98
armarx::SharedRemoteHandleState
This holds the shared state of all RemoteHandleControlBlocks for one armarx manager.
Definition: RemoteHandleControlBlock.h:52
armarx::ArmarXManager::enableProfiling
void enableProfiling(bool enable)
Enable or disable profiling of CPU Usage.
Definition: ArmarXManager.cpp:212
armarx::ArmarXManager::getAdapter
const Ice::ObjectAdapterPtr & getAdapter() const
Definition: ArmarXManager.cpp:1228
armarx::ArmarXObjectObserver
The ArmarXObjectObserver inherits from IceGrid::ObjectObserver and signals its associated ArmarXManag...
Definition: ArmarXObjectObserver.h:37
armarx::ArmarXManager::createSimpleRemoteReferenceCount
SimpleRemoteReferenceCountControlBlockPtr< Function, Data > createSimpleRemoteReferenceCount(Function f, Data d, const std::string &id="", IceUtil::Time deletionDelay=IceUtil::Time::seconds(3))
Definition: ArmarXManager.h:405
armarx::ArmarXManager::CheckIceConnection
static bool CheckIceConnection(const Ice::CommunicatorPtr &communicator, bool printHint)
Definition: ArmarXManager.cpp:132
armarx::ArmarXManager::increaseSchedulers
void increaseSchedulers(int increaseBy)
increased the number of single threaded schedulers.
Definition: ArmarXManager.cpp:1238
armarx::ArmarXManager::getMetricsAdmin
IceMX::MetricsAdminPrx getMetricsAdmin(const Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXManager.cpp:593
armarx::ArmarXManager::isShutdown
bool isShutdown()
Whether ArmarXManager shutdown has been finished.
Definition: ArmarXManager.cpp:516
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::ArmarXManager::createSimpleRemoteReferenceCount
SimpleRemoteReferenceCountControlBlockPtr< Function > createSimpleRemoteReferenceCount(Function f, const std::string &id="", IceUtil::Time deletionDelay=IceUtil::Time::seconds(3))
Definition: ArmarXManager.h:418
armarx::ArmarXManager::getMetaInfo
StringVariantBaseMap getMetaInfo(const std::string &, const Ice::Current &) override
Definition: ArmarXManager.cpp:1322
ArmarXObjectObserver.h
armarx::ArmarXManager::getManagedObjects
std::vector< ManagedIceObjectPtr > getManagedObjects() override
Retrieve pointers to all ManagedIceObject.
Definition: ArmarXManager.cpp:537
RemoteReferenceCount.h
IceInternal::Handle< ::Ice::Communicator >
armarx::ArmarXManager::getHostname
std::string getHostname(const Ice::Current &c=Ice::emptyCurrent) override
Gets the hostname of the host running the manager.
Definition: ArmarXManager.cpp:565
armarx::ArmarXManager::getSharedRemoteHandleState
const std::shared_ptr< SharedRemoteHandleState > & getSharedRemoteHandleState() const
Definition: ArmarXManager.cpp:1233
armarx::ArmarXManager::updateComponentIceProperties
void updateComponentIceProperties(const Ice::PropertyDict &properties)
Definition: ArmarXManager.cpp:732
armarx::ArmarXManager::getPropertiesAdmin
Ice::PropertiesAdminPrx getPropertiesAdmin(const Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXManager.cpp:712
armarx::ArmarXManager::removeObjectNonBlocking
void removeObjectNonBlocking(const ManagedIceObjectPtr &object) override
Removes an object from the manager.
Definition: ArmarXManager.cpp:392
armarx::ArmarXManager::addObject
void addObject(const ManagedIceObjectPtr &object, bool addWithOwnAdapter=true, const std::string &objectName="", bool useOwnScheduleThread=true) override
Add a ManagedIceObject to the manager.
Definition: ArmarXManager.cpp:233
armarx::SimpleRemoteReferenceCountControlBlock
Definition: RemoteReferenceCount.h:210
armarx::ManagedIceObjectRegistryInterface
The registery interface is implemented by ArmarXManagers.
Definition: ManagedIceObjectRegistryInterface.h:48
armarx::ArmarXManager::enableLogging
void enableLogging(bool enable)
Enable or disable logging.
Definition: ArmarXManager.cpp:206
armarx::RemoteReferenceCountControlBlock
Definition: RemoteReferenceCount.h:162
armarx::ArmarXManager::checkIceConnection
bool checkIceConnection(bool printHint=true) const
Definition: ArmarXManager.cpp:127
armarx::ArmarXObjectSchedulerPtr
IceUtil::Handle< ArmarXObjectScheduler > ArmarXObjectSchedulerPtr
Definition: ArmarXFwd.h:33
armarx::ArmarXManager::getObjectState
ManagedIceObjectState getObjectState(const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
Retrieve state of a ManagedIceObject.
Definition: ArmarXManager.cpp:605
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::ArmarXManager::getObjectNames
Ice::StringSeq getObjectNames(const Ice::Current &c=Ice::emptyCurrent) override
Retrieve the names of all ManagedIceObject.
Definition: ArmarXManager.cpp:572
armarx::ArmarXManager::getObjectProperties
::armarx::StringStringDictionary getObjectProperties(const ::std::string &objectName, const ::Ice::Current &=Ice::emptyCurrent) override
getObjectProperties is used to retrieve the properties of an object
Definition: ArmarXManager.cpp:647
armarx::ArmarXManager::getMiceObjectConnectivity
mice::MiceObjectConnectivity getMiceObjectConnectivity(const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
Retrieve connectivity of a ManagedIceObject.
Definition: ArmarXManager.cpp:577
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:232
armarx::ArmarXManager::setDataPaths
void setDataPaths(std::string dataPaths)
Set data paths used to search for datafiles.
Definition: ArmarXManager.cpp:223
armarx::ArmarXManager::createRemoteReferenceCount
RemoteReferenceCountControlBlockPtr< Function > createRemoteReferenceCount(Function f, const std::string &id="", IceUtil::Time deletionDelay=IceUtil::Time::seconds(3), IceUtil::Time orphantDeletionDelay=IceUtil::Time::seconds(6), long heartBeatMs=1000)
Definition: ArmarXManager.h:387
armarx::ArmarXManager::getObjectConnectivity
ManagedIceObjectConnectivity getObjectConnectivity(const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
Retrieve connectivity of a ManagedIceObject.
Definition: ArmarXManager.cpp:625
IceUtil::Handle< ArmarXObjectScheduler >
armarx::ArmarXManager::getManagedObjectNames
Ice::StringSeq getManagedObjectNames(const Ice::Current &c=Ice::emptyCurrent) override
Retrieve the names of all ManagedIceObject.
Definition: ArmarXManager.cpp:745
ManagedIceObjectRegistryInterface.h
armarx::ArmarXManager::removeObjectBlocking
void removeObjectBlocking(const ManagedIceObjectPtr &object) override
Removes an object from the manager.
Definition: ArmarXManager.cpp:387
armarx::ArmarXManager::registerKnownObjectFactoriesWithIce
void registerKnownObjectFactoriesWithIce()
non static convenience version of ArmarXManager::RegisterKnownObjectFactoriesWithIce()
Definition: ArmarXManager.cpp:1223
armarx::PeriodicTask
Definition: ArmarXManager.h:70
armarx::ArmarXManager::createRemoteReferenceCount
RemoteReferenceCountControlBlockPtr< Function, Data > createRemoteReferenceCount(Function f, Data d, const std::string &id="", IceUtil::Time deletionDelay=IceUtil::Time::seconds(3), IceUtil::Time orphantDeletionDelay=IceUtil::Time::seconds(6), long heartBeatMs=1000)
Definition: ArmarXManager.h:371
Logging.h
armarx::ArmarXManager::shutdown
void shutdown()
Shuts down the ArmarXManager.
Definition: ArmarXManager.cpp:418
armarx::ScopedRecursiveLockPtr
std::shared_ptr< ScopedRecursiveLock > ScopedRecursiveLockPtr
Definition: Synchronization.h:143
armarx::ArmarXManager::~ArmarXManager
~ArmarXManager() override
Definition: ArmarXManager.cpp:121
armarx::ArmarXManager::getCommunicator
const Ice::CommunicatorPtr & getCommunicator() const
Definition: ArmarXManager.cpp:532
armarx::ArmarXManager
Main class of an ArmarX process.
Definition: ArmarXManager.h:97
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::ArmarXManager::RegisterKnownObjectFactoriesWithIce
static void RegisterKnownObjectFactoriesWithIce(const Ice::CommunicatorPtr &ic)
Registers all object factories that are known with Ice.
Definition: ArmarXManager.cpp:1204
armarx::ArmarXManager::asyncShutdown
void asyncShutdown(std::size_t timeoutMs=0)
Calls shutdown() after a timeout.
Definition: ArmarXManager.cpp:507
armarx::ArmarXManager::setGlobalMinimumLoggingLevel
void setGlobalMinimumLoggingLevel(MessageTypeT minimumLoggingLevel)
Set minimum logging level to output in log stream.
Definition: ArmarXManager.cpp:218
armarx::ArmarXManager::getIceManager
const IceManagerPtr & getIceManager() const
Retrieve the instance of the icemanager.
Definition: ArmarXManager.cpp:527