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 
30 #include <ArmarXCore/core/logging/Logging.h> // for Logging
31 #include <ArmarXCore/interface/core/ArmarXManagerInterface.h>
32 #include <ArmarXCore/interface/core/BasicTypes.h>
33 #include <ArmarXCore/interface/core/MiceManagerInsightProvider.h>
34 //#include <ArmarXCore/interface/core/ManagedIceObjectDefinitions.h>
35 
36 #include <condition_variable>
37 #include <cstddef> // for size_t
38 #include <map> // for map, map<>::value_compare
39 #include <mutex>
40 #include <string> // for string
41 #include <vector> // for vector
42 
43 #include <Ice/BuiltinSequences.h> // for StringSeq
44 #include <Ice/CommunicatorF.h> // for CommunicatorPtr
45 #include <Ice/Current.h> // for Current
46 #include <Ice/Metrics.h>
47 #include <Ice/ObjectAdapterF.h> // for ObjectAdapterPtr
48 #include <Ice/Properties.h>
49 #include <IceUtil/Handle.h> // for Handle
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  */
97  class ArmarXManager :
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,
126  int port = 4061,
127  std::string host = "localhost",
128  std::string locatorName = "IceGrid/Locator",
129  Ice::StringSeq args = Ice::StringSeq());
130 
131  /**
132  * Constructs an ArmarXManager by passing a communicator. This can be used if communicator has already
133  * been constructed e.g in Ice::Application.
134  *
135  * @param applicationName name of the application used for registering the manager to Ice and for logging
136  * @param communicator configured Ice::Communicator
137  */
138  ArmarXManager(std::string applicationName, const Ice::CommunicatorPtr& communicator);
139 
140  ~ArmarXManager() override;
141 
142  bool checkIceConnection(bool printHint = true) const;
143  static bool CheckIceConnection(const Ice::CommunicatorPtr& communicator, bool printHint);
144 
145  /**
146  * Enable or disable logging
147  *
148  * @param enable whether to enable logging
149  */
150  void enableLogging(bool enable);
151 
152  /**
153  * Enable or disable profiling of CPU Usage
154  */
155  void enableProfiling(bool enable);
156 
157  /**
158  * Set minimum logging level to output in log stream.
159  *
160  * @param applicationName name of the application used for registering the manager to Ice and for logging
161  * @param communicator configured Ice::Communicator
162  */
164 
165  /**
166  * Set data paths used to search for datafiles
167  *
168  * @param dataPaths semicolon seperated list of paths
169  */
170  void setDataPaths(std::string dataPaths);
171 
172  /**
173  * Add a ManagedIceObject to the manager. Takes care of the IceManagedObject
174  * lifcycle using and ArmarXObjectScheduler. addObject is
175  * thread-safe and can be called from any method in order to dynamically
176  * add ManagedIceObjects (as e.g. required for GUI).
177  *
178  * @param object object to add
179  * @param addWithOwnAdapter If true this object will have it's own adapter
180  * @param objectName Name that the object should have. if not empty overrides the currently set name.
181  */
182  void addObject(const ManagedIceObjectPtr& object,
183  bool addWithOwnAdapter = true,
184  const std::string& objectName = "",
185  bool useOwnScheduleThread = true) override;
186  virtual void addObject(const ManagedIceObjectPtr& object,
187  const std::string& objectName,
188  bool addWithOwnAdapter = true,
189  bool useOwnScheduleThread = true);
190 
191  virtual void addObject(const ManagedIceObjectPtr& object,
192  Ice::ObjectAdapterPtr objectAdapterToAddTo,
193  const std::string& objectName = "",
194  bool useOwnScheduleThread = true);
195 
196  virtual void addObjectAsync(const ManagedIceObjectPtr& object,
197  const std::string& objectName,
198  bool addWithOwnAdapter = true,
199  bool useOwnScheduleThread = true);
200 
201  /**
202  * Removes an object from the manager.
203  *
204  * This version waits until all calls to this component are finished and
205  * the has been completely removed.
206  *
207  * @param object object to remove
208  */
209  void removeObjectBlocking(const ManagedIceObjectPtr& object) override;
210 
211  /**
212  * Removes an object from the manager.
213  *
214  * This version waits until all calls to this component are finished and
215  * the has been completely removed.
216  *
217  * @param objectName name of the object to remove
218  */
219  void removeObjectBlocking(const std::string& objectName) override;
220 
221  /**
222  * Removes an object from the manager.
223  *
224  * This version returns immediatly and does <b>not</b> wait for all call to this
225  * to finish.
226  *
227  * @param object object to remove
228  */
229  void removeObjectNonBlocking(const ManagedIceObjectPtr& object) override;
230 
231  /**
232  * Removes an object from the manager.
233  *
234  * This version returns immediatly and does <b>not</b> wait for all call to this
235  * to finish.
236  *
237  * @param objectName name of the object to remove
238  */
239  void removeObjectNonBlocking(const std::string& objectName) override;
240 
241  /**
242  * Wait for shutdown. Shutdown is initialized once shutdown() is called on ArmarXManager e.g. from a signal handler.
243  */
244  void waitForShutdown();
245 
246  /**
247  * Shuts down the ArmarXManager. If a thread is waiting in waitForShutdown, the thread is activated after shutdown has been completed.
248  */
249  void shutdown();
250 
251  /**
252  * @brief Calls shutdown() after a timeout.
253  * @param timeoutMs The timeout to wait. (unit ms)
254  */
255  void asyncShutdown(std::size_t timeoutMs = 0);
256 
257  /**
258  * Whether ArmarXManager shutdown has been finished.
259  *
260  * @return shutdown finished
261  */
262  bool isShutdown();
263 
264  /**
265  * Retrieve pointers to all ManagedIceObject.
266  *
267  * @return vector of pointers
268  */
269  std::vector<ManagedIceObjectPtr> getManagedObjects() override;
270 
271  /**
272  * Retrieve state of a ManagedIceObject. Part of the Ice interface.
273  *
274  * @param objectName name of the object
275  * @param c Ice context
276  *
277  * @return state of the ManagedIceObject
278  */
279  ManagedIceObjectState getObjectState(const std::string& objectName,
280  const Ice::Current& c = Ice::emptyCurrent) override;
281 
282  /**
283  * Retrieve connectivity of a ManagedIceObject. Part of the Ice interface.
284  *
285  * @param objectName name of the object
286  * @param c Ice context
287  *
288  * @return connectivity of the ManagedIceObject
289  */
290  ManagedIceObjectConnectivity
291  getObjectConnectivity(const std::string& objectName,
292  const Ice::Current& c = Ice::emptyCurrent) override;
293 
294  /**
295  * Retrieve connectivity of a ManagedIceObject. Part of the Ice MiceManagerInsightProvider interface.
296  *
297  * @param objectName name of the object
298  * @param c Ice context
299  *
300  * @return connectivity of the ManagedIceObject
301  */
302  mice::MiceObjectConnectivity
303  getMiceObjectConnectivity(const std::string& objectName,
304  const Ice::Current& c = Ice::emptyCurrent) override;
305 
306  /**
307  * @brief getObjectProperties is used to retrieve the properties of an object
308  * @return
309  */
310  ::armarx::StringStringDictionary
311  getObjectProperties(const ::std::string& objectName,
312  const ::Ice::Current& = Ice::emptyCurrent) override;
313  ObjectPropertyInfos getObjectPropertyInfos(const ::std::string& objectName,
314  const ::Ice::Current&) override;
315  ObjectPropertyInfos getApplicationPropertyInfos(const ::Ice::Current&) override;
316 
317 
318  Ice::PropertiesAdminPrx
319  getPropertiesAdmin(const Ice::Current& = Ice::emptyCurrent) override;
320 
321  IceMX::MetricsAdminPrx getMetricsAdmin(const Ice::Current& = Ice::emptyCurrent) override;
322 
323  /**
324  * Calls Component::setIceProperties() on all components
325  * assigend to this ArmarXManager Instance.
326  */
327  void setComponentIceProperties(const Ice::PropertiesPtr& properties);
328 
329  void updateComponentIceProperties(const Ice::PropertyDict& properties);
330 
331  /**
332  * Retrieve the names of all ManagedIceObject. Part of the Ice interface.
333  *
334  * @param c Ice context
335  *
336  * @return vector of names
337  */
338  Ice::StringSeq getManagedObjectNames(const Ice::Current& c = Ice::emptyCurrent) override;
339 
340  /**
341  * Retrieve the names of all ManagedIceObject. Part of the Ice MiceManagerInsightProvider interface.
342  *
343  * @param c Ice context
344  *
345  * @return vector of names
346  */
347  Ice::StringSeq getObjectNames(const Ice::Current& c = Ice::emptyCurrent) override;
348 
349 
350  /**
351  * Gets the hostname of the host running the manager. Part of the Ice MiceManagerInsightProvider interface.
352  *
353  * @param c Ice context
354  *
355  * @return hostname
356  */
357  std::string getHostname(const Ice::Current& c = Ice::emptyCurrent) override;
358 
359  /**
360  * @brief Retrieve the instance of the icemanager
361  * @return Pointer to the iceManager
362  * @see ManagedIceObject::getIceManager()
363  */
364  const IceManagerPtr& getIceManager() const;
365  const Ice::CommunicatorPtr& getCommunicator() const;
366 
367  /**
368  * @brief Registers all object factories that are known with Ice.
369  *
370  * Object factories are automatically preregistered when their library
371  * is linked. Function is idempotent.
372  * This function is called in init() of ArmarXManager and needs only be called, if
373  * no ArmarXManager is used or libraries are loaded at runtime.
374  * @see FactoryCollectionBase
375  */
377 
378  /**
379  * @brief non static convenience version of ArmarXManager::RegisterKnownObjectFactoriesWithIce()
380  * @see RegisterKnownObjectFactoriesWithIce()
381  */
383 
384  const Ice::ObjectAdapterPtr& getAdapter() const;
385 
386  const std::shared_ptr<SharedRemoteHandleState>& getSharedRemoteHandleState() const;
387 
388  /**
389  * @brief increased the number of single threaded schedulers. Decrease is not possible,
390  * since the link to objects is fixed.
391  * @param increasyBy Increases the number of single threaded schedulers by this amount.
392  */
393  void increaseSchedulers(int increaseBy);
394 
395  template <class Function, class Data>
398  Data d,
399  const std::string& id = "",
400  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3),
401  IceUtil::Time orphantDeletionDelay = IceUtil::Time::seconds(6),
402  long heartBeatMs = 1000)
403  {
406  id,
407  std::forward<decltype(f)>(f),
408  std::forward<decltype(d)>(d),
409  deletionDelay,
410  orphantDeletionDelay,
411  heartBeatMs);
412  remoteReferenceCountControlBlockManager->add(ptr);
413  return ptr;
414  }
415 
416  template <class Function>
419  const std::string& id = "",
420  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3),
421  IceUtil::Time orphantDeletionDelay = IceUtil::Time::seconds(6),
422  long heartBeatMs = 1000)
423  {
426  id,
427  std::forward<decltype(f)>(f),
428  deletionDelay,
429  orphantDeletionDelay,
430  heartBeatMs);
431  remoteReferenceCountControlBlockManager->add(ptr);
432  return ptr;
433  }
434 
435  template <class Function, class Data>
438  Data d,
439  const std::string& id = "",
440  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3))
441  {
444  this,
445  id,
446  std::forward<decltype(f)>(f),
447  std::forward<decltype(d)>(d),
448  deletionDelay);
449  remoteReferenceCountControlBlockManager->add(ptr);
450  return ptr;
451  }
452 
453  template <class Function>
456  const std::string& id = "",
457  IceUtil::Time deletionDelay = IceUtil::Time::seconds(3))
458  {
461  this, id, std::forward<decltype(f)>(f), deletionDelay);
462  remoteReferenceCountControlBlockManager->add(ptr);
463  return ptr;
464  }
465 
466  StringVariantBaseMap getMetaInfo(const std::string&, const Ice::Current&) override;
467 
468 
469  // bool loadLibFromPath(const std::string& path);
470  // bool loadLibFromPackage(const std::string& package, const std::string& lib);
471  private:
472  // typedefs
473  using ObjectSchedulerMap = std::map<std::string, ArmarXObjectSchedulerPtr>;
474  using ObjectSchedulerList = std::vector<ArmarXObjectSchedulerPtr>;
475 
476  // internal init used by both constructors
477  void init(std::string applicationName, const Ice::CommunicatorPtr& communicator);
478 
479  // thread method to cleanup terminated schedulers
480  void cleanupSchedulers();
481 
482  /**
483  * @brief Disconnects all objects that dependent on the given object.
484  * @param object name of the object of which all dependees should be removed
485  */
486  void disconnectDependees(const std::string& object);
487  void disconnectAllObjects();
488  std::vector<std::string> getDependendees(const std::string& removedObject);
489 
490  /**
491  * @brief Schedulers which are waiting for dependencies are checking the
492  * dependencies in a fix interval. Call this function to wake them up and
493  * perform the check immediatly.
494  */
495  void wakeupWaitingSchedulers();
496 
497  // remove all managed objects
498  void removeAllObjects(bool blocking);
499 
500  // remove specific managed objects
501  bool removeObject(const ArmarXObjectSchedulerPtr& objectScheduler, bool blocking);
502 
503  ArmarXObjectSchedulerPtr findObjectScheduler(const std::string& objectName) const;
504 
505  void checkDependencies();
506 
507  // synchronization
508  // Ugly: Returing a smart pointer to a lock is just frigging insanity
509  // Why do we even have this weird pattern?
510  using ScopedRecursiveLockPtr = std::unique_ptr<std::scoped_lock<std::recursive_mutex>>;
511  ScopedRecursiveLockPtr acquireManagedObjectsMutex();
512 
513  /**
514  * @brief installProcessFacet creates a new Ice::Process facet to handle graceful application shutdown when run via IceGrid
515  * @param armarXManager the ApplicationProcessFacet requires an ArmarXManager instance.
516  *
517  * This requires the following Ice property to be set to prevent raceconditions
518  * \code Ice.Admin.DelayCreation=1 \endcode
519  *
520  * for further detail take a look at: https://doc.zeroc.com/display/Ice34/The+Process+Facet
521  */
522  void installProcessFacet();
523 
524  // name of the application
525  std::string applicationName;
526 
527  // state of the manager
528  ArmarXManagerState managerState;
529  std::mutex managerStateMutex;
530 
531  // ice manager
532  IceManagerPtr iceManager;
533 
534  ArmarXObjectObserverPtr objObserver;
535 
536  // object scheduler registry
537  ObjectSchedulerMap managedObjects;
538  ObjectSchedulerList terminatingObjects;
539  mutable std::recursive_mutex managedObjectsMutex;
540  std::mutex terminatingObjectsMutex;
541 
542  std::mutex schedulerListMutex;
543  std::vector<ArmarXMultipleObjectsSchedulerPtr> singleThreadedSchedulers;
544 
545  // shutdown handling
546  std::mutex shutdownMutex;
547  std::condition_variable shutdownCondition;
548 
549  // cleanup task
550  IceUtil::Handle<PeriodicTask<ArmarXManager>> cleanupSchedulersTask;
551 
552  IceUtil::Handle<PeriodicTask<ArmarXManager>> checkDependencyStatusTask;
553  Ice::ObjectAdapterPtr armarxManagerAdapter;
554 
555  //remotehandles
556  std::shared_ptr<SharedRemoteHandleState> sharedRemoteHandleState;
557  std::shared_ptr<RemoteReferenceCountControlBlockManager>
558  remoteReferenceCountControlBlockManager;
559  };
560 } // namespace armarx
armarx::ArmarXManager::setComponentIceProperties
void setComponentIceProperties(const Ice::PropertiesPtr &properties)
Calls Component::setIceProperties() on all components assigend to this ArmarXManager Instance.
Definition: ArmarXManager.cpp:778
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:749
armarx::ArmarXManager::addObjectAsync
virtual void addObjectAsync(const ManagedIceObjectPtr &object, const std::string &objectName, bool addWithOwnAdapter=true, bool useOwnScheduleThread=true)
Definition: ArmarXManager.cpp:351
armarx::ArmarXManager::getObjectPropertyInfos
ObjectPropertyInfos getObjectPropertyInfos(const ::std::string &objectName, const ::Ice::Current &) override
Definition: ArmarXManager.cpp:721
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:279
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:110
armarx::ArmarXManager::waitForShutdown
void waitForShutdown()
Wait for shutdown.
Definition: ArmarXManager.cpp:440
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:102
armarx::SharedRemoteHandleState
This holds the shared state of all RemoteHandleControlBlocks for one armarx manager.
Definition: RemoteHandleControlBlock.h:51
armarx::ArmarXManager::enableProfiling
void enableProfiling(bool enable)
Enable or disable profiling of CPU Usage.
Definition: ArmarXManager.cpp:225
armarx::ArmarXManager::getAdapter
const Ice::ObjectAdapterPtr & getAdapter() const
Definition: ArmarXManager.cpp:1313
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:437
armarx::ArmarXManager::CheckIceConnection
static bool CheckIceConnection(const Ice::CommunicatorPtr &communicator, bool printHint)
Definition: ArmarXManager.cpp:141
armarx::ArmarXManager::increaseSchedulers
void increaseSchedulers(int increaseBy)
increased the number of single threaded schedulers.
Definition: ArmarXManager.cpp:1325
armarx::ArmarXManager::getMetricsAdmin
IceMX::MetricsAdminPrx getMetricsAdmin(const Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXManager.cpp:644
armarx::ArmarXManager::isShutdown
bool isShutdown()
Whether ArmarXManager shutdown has been finished.
Definition: ArmarXManager.cpp:563
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
armarx::ArmarXManager::createSimpleRemoteReferenceCount
SimpleRemoteReferenceCountControlBlockPtr< Function > createSimpleRemoteReferenceCount(Function f, const std::string &id="", IceUtil::Time deletionDelay=IceUtil::Time::seconds(3))
Definition: ArmarXManager.h:455
armarx::ArmarXManager::getMetaInfo
StringVariantBaseMap getMetaInfo(const std::string &, const Ice::Current &) override
Definition: ArmarXManager.cpp:1412
ArmarXObjectObserver.h
armarx::ArmarXManager::getManagedObjects
std::vector< ManagedIceObjectPtr > getManagedObjects() override
Retrieve pointers to all ManagedIceObject.
Definition: ArmarXManager.cpp:586
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:613
armarx::ArmarXManager::getSharedRemoteHandleState
const std::shared_ptr< SharedRemoteHandleState > & getSharedRemoteHandleState() const
Definition: ArmarXManager.cpp:1319
armarx::ArmarXManager::updateComponentIceProperties
void updateComponentIceProperties(const Ice::PropertyDict &properties)
Definition: ArmarXManager.cpp:791
armarx::ArmarXManager::getPropertiesAdmin
Ice::PropertiesAdminPrx getPropertiesAdmin(const Ice::Current &=Ice::emptyCurrent) override
Definition: ArmarXManager.cpp:769
armarx::ArmarXManager::removeObjectNonBlocking
void removeObjectNonBlocking(const ManagedIceObjectPtr &object) override
Removes an object from the manager.
Definition: ArmarXManager.cpp:431
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:248
armarx::SimpleRemoteReferenceCountControlBlock
Definition: RemoteReferenceCount.h:253
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:219
armarx::RemoteReferenceCountControlBlock
Definition: RemoteReferenceCount.h:180
armarx::ArmarXManager::checkIceConnection
bool checkIceConnection(bool printHint=true) const
Definition: ArmarXManager.cpp:135
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:655
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:621
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:698
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:627
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:239
armarx::ArmarXManager::setDataPaths
void setDataPaths(std::string dataPaths)
Set data paths used to search for datafiles.
Definition: ArmarXManager.cpp:237
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:418
armarx::ArmarXManager::getObjectConnectivity
ManagedIceObjectConnectivity getObjectConnectivity(const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
Retrieve connectivity of a ManagedIceObject.
Definition: ArmarXManager.cpp:676
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:804
ManagedIceObjectRegistryInterface.h
armarx::ArmarXManager::removeObjectBlocking
void removeObjectBlocking(const ManagedIceObjectPtr &object) override
Removes an object from the manager.
Definition: ArmarXManager.cpp:425
armarx::ArmarXManager::registerKnownObjectFactoriesWithIce
void registerKnownObjectFactoriesWithIce()
non static convenience version of ArmarXManager::RegisterKnownObjectFactoriesWithIce()
Definition: ArmarXManager.cpp:1307
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:397
Logging.h
armarx::ArmarXManager::shutdown
void shutdown()
Shuts down the ArmarXManager.
Definition: ArmarXManager.cpp:459
armarx::ScopedRecursiveLockPtr
std::shared_ptr< ScopedRecursiveLock > ScopedRecursiveLockPtr
Definition: Synchronization.h:161
armarx::ArmarXManager::~ArmarXManager
~ArmarXManager() override
Definition: ArmarXManager.cpp:128
armarx::ArmarXManager::getCommunicator
const Ice::CommunicatorPtr & getCommunicator() const
Definition: ArmarXManager.cpp:580
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:27
armarx::ArmarXManager::RegisterKnownObjectFactoriesWithIce
static void RegisterKnownObjectFactoriesWithIce(const Ice::CommunicatorPtr &ic)
Registers all object factories that are known with Ice.
Definition: ArmarXManager.cpp:1287
armarx::ArmarXManager::asyncShutdown
void asyncShutdown(std::size_t timeoutMs=0)
Calls shutdown() after a timeout.
Definition: ArmarXManager.cpp:552
armarx::ArmarXManager::setGlobalMinimumLoggingLevel
void setGlobalMinimumLoggingLevel(MessageTypeT minimumLoggingLevel)
Set minimum logging level to output in log stream.
Definition: ArmarXManager.cpp:231
armarx::ArmarXManager::getIceManager
const IceManagerPtr & getIceManager() const
Retrieve the instance of the icemanager.
Definition: ArmarXManager.cpp:574