ManagedIceObject.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 (welke at kit dot edu)
20 * @author Jan Issac (jan dot issac at gmx dot de)
21 * @date 2011
22 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
23 * GNU General Public License
24 */
25 
26 #pragma once
27 
28 #include <ArmarXCore/core/system/ImportExport.h> // for ARMARXCORE_IMPORT_EXPORT
29 #include <ArmarXCore/core/exceptions/local/ExpressionException.h> // for ARMARX_CHECK_EXPRESSION
30 #include <ArmarXCore/core/exceptions/LocalException.h> // for LocalException
31 #include <ArmarXCore/core/logging/Logging.h> // for Logging
32 #include <ArmarXCore/core/ArmarXFwd.h> // for ArmarXManagerPtr, etc
33 #include <ArmarXCore/core/IceManager.h> // for IceManagerPtr
35 
36 #include <Ice/Handle.h> // for Handle
37 #include <Ice/Object.h> // for Object
38 #include <Ice/ProxyF.h> // for ObjectPrx
39 #include <IceUtil/Handle.h> // for HandleBase
40 
41 #include <type_traits>
42 #include <typeindex>
43 #include <string> // for string
44 #include <vector> // for vector
45 #include <memory> // for unique_ptr
46 
47 // Forward declarations
49 {
50  inline namespace fundamentals_v2
51  {
52  template <typename T>
53  class observer_ptr;
54 
55  template<typename _Tp>
57  make_observer(_Tp* __p) noexcept;
58  }
59 }
60 
61 namespace Ice
62 {
63 
64  class Communicator;
66 
67  class ObjectAdapter;
69 
70 }
71 
73 {
74  class Profiler;
75  using ProfilerPtr = std::shared_ptr<Profiler>;
76 }
77 namespace armarx
78 {
79  template<class> class SimplePeriodicTask;
80 #define TYPEDEF_PTRS_SHARED(T) \
81  class T; \
82  using T##Ptr = ::std::shared_ptr<T>; \
83  using Const##T##Ptr = ::std::shared_ptr<const T>
84 
85 #define TYPEDEF_PTRS_HANDLE(T) \
86  class T; \
87  using T##Ptr = IceUtil::Handle<T>
88 
89  template<class T, class...Args>
90  auto make_shared(Args&& ...args)
91  {
92  if constexpr(
93  std::is_base_of_v<IceUtil::Shared, T> ||
94  std::is_base_of_v<IceUtil::SimpleShared, T>
95  )
96  {
97  return IceUtil::Handle<T>(
98  new T(std::forward<Args>(args)...)
99  );
100  }
101  else
102  {
103  return std::make_shared<T>(std::forward<Args>(args)...);
104  }
105  }
106 }
107 namespace armarx
108 {
109  class VariantBase;
110  typedef ::IceInternal::Handle<::armarx::VariantBase> VariantBasePtr;
111  using StringVariantBaseMap = std::map<std::string, VariantBasePtr>;
112 
113  /**
114  * ManagedIceObject shared pointer for convenience
115  */
116  class ManagedIceObject;
117 
118  struct ManagedIceObjectConnectivity;
119 
120 
122 
124 
125  /**
126  * @class ManagedIceObject
127  * @ingroup DistributedProcessingGrp
128  * @brief The ManagedIceObject is the base class for all ArmarX objects.
129  *
130  * ManagedIceObject are the ArmarX equivalent to well-known Ice objects.
131  * A defined lifecycle is guaranteed which and state dependent interface
132  * is provided by the following framework hooks:
133  * @li ManagedIceObjects::onInitComponent()
134  * @li ManagedIceObjects::onConnectComponent()
135  * @li ManagedIceObjects::onExitComponent()
136  *
137  * @image html Lifecycle-UML.svg Lifecyle of a ManagedIceObject managed by the ArmarXObjectScheduler
138  * Every subclass of ManagedIceObject can specify dependent proxies and topics
139  * as well as offered topics in ManagedIceObjects::onInitComponent().
140  * These connectivity parameters are specified through the following methods:
141  * @li MangedIceObject::usingProxy()
142  * @li MangedIceObject::usingTopic()
143  * @li MangedIceObject::offeringTopic()
144  *
145  * These dependencies are resolved at runtime and can be visualized.
146  * Additionally it is possible to handle the case of crashed dependencies.
147  \code
148  MyManagedIceObject::onInitComponent()
149  {
150  // component depends on proxy "MyDataProvider"
151  usingProxy("MyDataProvider");
152 
153  // component wants to subscribe to topic "News"
154  usingTopic("News");
155 
156  // component will offer topic "FilteredNews"
157  offeringTopic("FilteredNews");
158  }
159  \endcode
160 
161  @see ArmarXObjectScheduler
162  */
164  virtual public Ice::Object,
165  virtual public Logging
166 
167  {
168  private:
169  friend class Component;
171  std::map<std::pair<std::type_index, std::string>, std::unique_ptr<ManagedIceObjectPlugin>> _plugins;
172 
173  void foreach_plugin(std::function<void(std::type_index, std::string const&, ManagedIceObjectPlugin*)> const& f,
174  int line, const char* file, const char* function);
175 
176  protected:
177 
178  std::unique_ptr<ManagedIceObjectPlugin>& getPluginPointer(std::type_info const& type, std::string const& prefix);
179 
180 
181  template <class PluginT, class...ParamsT>
182  PluginT* addPlugin(const std::string prefix = "", ParamsT && ...params)
183  {
184  static_assert(std::is_base_of_v<ManagedIceObjectPlugin, PluginT>);
185  auto& ptr = getPluginPointer(typeid(PluginT), prefix);
186  if (ptr)
187  {
188  auto tptr = dynamic_cast<PluginT*>(ptr.get());
189  ARMARX_CHECK_NOT_NULL(tptr) << "Plugin is of wrong type. This should be impossible!";
190  return tptr;
191  }
192  PluginT* tptr = new PluginT(*this, prefix, std::forward<ParamsT>(params)...);
193  ptr.reset(tptr);
194  return tptr;
195  }
196 
197  template<class PluginT, class...ParamsT>
198  void addPlugin(PluginT*& targ, const std::string prefix = "", ParamsT && ...params)
199  {
200  ARMARX_CHECK_NULL(targ) << "This is an out parameter";
201  targ = addPlugin<PluginT>(prefix, std::forward<ParamsT>(params)...);
202  }
203 
204  template<class PluginT, class...ParamsT>
205  void addPlugin(std::experimental::observer_ptr<PluginT>& targ, const std::string prefix = "", ParamsT && ...params)
206  {
207  ARMARX_CHECK_NULL(targ) << "This is an out parameter";
208  targ = std::experimental::make_observer(addPlugin<PluginT>(prefix, std::forward<ParamsT>(params)...));
209  }
210 
211 
212  private:
213  friend class ArmarXObjectScheduler;
214  friend class ArmarXManager;
215 
216  public:
217  using PeriodicTaskPtr = IceUtil::Handle<SimplePeriodicTask<std::function<void(void)>>>;
218 
219  /**
220  * @brief A nullptr to be used when a const ref to a nullptr is required.
221  */
223 
224  ManagedIceObject(ManagedIceObject const& other);
225 
226 
227  /**
228  * Retrieve name of object. Corresponds to well-known object name.
229  *
230  * @return name
231  */
232  std::string getName() const;
233 
234  /**
235  * @brief Generates a unique name for a sub object from a general name and unique name.
236  * @param superObjectName The name of the super object (has to be unique)
237  * @param subObjectName The sub object's name (has to be unique among the sub objects)
238  * @return
239  */
240  static std::string generateSubObjectName(const std::string& superObjectName, const std::string& subObjectName);
241 
242  /**
243  * @brief Generates a unique name for a sub object from a general name.(given the current object name is unique)
244  * @param subObjectName The sub object's name (has to be unique among the sub objects)
245  * @return The unique sub object name
246  *
247  * Generates a unique name for a sub object from a general name.
248  * E.g.:
249  * Two objects A (object name "A") and B (object name "B") have a DebugDrawer as sub object.
250  * A and B can generate different object names for the debug drawer by calling this function with the same name "DebugDrawer".
251  * Additionally the created name contains the super object's name.
252  */
253  std::string generateSubObjectName(const std::string& subObjectName);
254 
255  /**
256  * @brief Returns the proxy of this object (optionally it waits for the proxy)
257  * @param timeoutMs Timeout in miliseconds until this function stops waiting for the proxy.
258  * Set to -1 for infinite waiting.
259  * @return object's proxy (will be null if the time runs out/no object scheduler was set (e.g. by calling addObject on an ArmarXManager))
260  */
261  Ice::ObjectPrx getProxy(long timeoutMs = 0, bool waitForScheduler = true) const;
262  template<class Prx>
263  Prx getProxy(long timeoutMs = 0, bool waitForScheduler = true) const
264  {
265  return Prx::checkedCast(getProxy(timeoutMs, waitForScheduler));
266  }
267  template<class Prx>
268  void getProxy(Prx& prx, long timeoutMs = 0, bool waitForScheduler = true) const
269  {
270  prx = Prx::checkedCast(getProxy(timeoutMs, waitForScheduler));
271  }
272 
273  /**
274  * Retrieve current state of the ManagedIceObject
275  *
276  * @return state of the ManagedIceObject
277  */
278  int getState() const;
279 
280 
281 
282  ArmarXObjectSchedulerPtr getObjectScheduler() const;
283 
284  /**
285  * Retrieve connectivity of the object (topcis as well as proxies)
286  *
287  * @return connectivity
288  */
289  ManagedIceObjectConnectivity getConnectivity() const;
290 
291  /**
292  * Returns the ArmarX manager used to add and remove components
293  *
294  * @retrun pointer to the armarXManager
295  */
296  ArmarXManagerPtr getArmarXManager() const;
297 
298  /**
299  * Returns the IceManager
300  *
301  * @return pointer to IceManager
302  */
303  IceManagerPtr getIceManager() const;
304 
305  /**
306  * Registers a proxy for retrieval after initialization and adds it to the dependency list.
307  * This ManagedIceObject won't start (onConnectComponent()) until this proxy is avaiable.
308  *
309  * @param name Proxy name
310  * @param endpoints Specific endpoints, e.g. tcp ‑p 10002
311  * @return returns true if new dependency, else false
312  */
313  bool usingProxy(const std::string& name,
314  const std::string& endpoints = "");
315 
316  void waitForProxy(std::string const& name, bool addToDependencies);
317 
318  /**
319  * Retrieves a proxy object.
320  *
321  * @param name Proxy name, e.g. Log
322  * @param addToDependencies If true, this proxy is added to the dependency list and this function won't return until the proxy becomes available.
323  * @param endpoints The endpoints, e.g. tcp ‑p 10002
324  * @param throwOnProxyError If true, throws Exception on any proxy error. If false, just returns zero pointer.
325  * @throw LocalException Throws if proxy is not available, this object is not yet starting or the proxyName is empty.
326  * @return A proxy of the remote instance.
327  */
328  template <class ProxyType>
329  ProxyType getProxy(const std::string& name,
330  bool addToDependencies = false,
331  const std::string& endpoints = "",
332  bool throwOnProxyError = true)
333  {
334  waitForProxy(name, addToDependencies);
335 
336  // return proxy
337  try
338  {
339  return getIceManager()->getProxy<ProxyType>(name, endpoints);
340  }
341  catch (...)
342  {
343  if (throwOnProxyError)
344  {
345  throw;
346  }
347  else
348  {
349  return nullptr;
350  }
351  }
352  }
353 
354  /**
355  * @brief Assigns a proxy to `proxy`.
356  * This method can be called without explicit template argument, as
357  * the proxy type can be inferred from the arguments.
358  * @see getProxy<>()
359  */
360  template <class ProxyTarg, class...Args>
361  void getProxy(IceInternal::ProxyHandle<ProxyTarg>& proxy, const std::string& name, Args&& ...args)
362  {
364  proxy = getProxy<ProxyType>(name, std::forward<Args>(args)...);
365  }
366  template <class ProxyTarg, class...Args>
367  void getProxy(const std::string& name, IceInternal::ProxyHandle<ProxyTarg>& proxy, Args&& ...args)
368  {
370  proxy = getProxy<ProxyType>(name, std::forward<Args>(args)...);
371  }
372  template <class ProxyTarg, class...Args>
373  void getProxy(IceInternal::ProxyHandle<ProxyTarg>& proxy, const char* name, Args&& ...args)
374  {
376  proxy = getProxy<ProxyType>(name, std::forward<Args>(args)...);
377  }
378  template <class ProxyTarg, class...Args>
379  void getProxy(const char* name, IceInternal::ProxyHandle<ProxyTarg>& proxy, Args&& ...args)
380  {
382  proxy = getProxy<ProxyType>(name, std::forward<Args>(args)...);
383  }
384 
385  /// Overload to allow using string literals as name (solve ambiguous overload).
386  template <class ProxyType>
387  inline void getProxy(ProxyType& proxy, const char* name,
388  bool addToDependencies = false,
389  const std::string& endpoints = "",
390  bool throwOnProxyError = true)
391  {
392  getProxy<ProxyType>(proxy, std::string(name), addToDependencies, endpoints, throwOnProxyError);
393  }
394 
395  /**
396  * @brief returns the names of all unresolved dependencies
397  */
398  std::vector<std::string> getUnresolvedDependencies() const;
399 
400  static std::string GetObjectStateAsString(int state);
401 
402  /**
403  * @brief getProfiler returns an instance of armarx::Profiler
404  */
405  Profiler::ProfilerPtr getProfiler() const;
406 
407  /**
408  * @brief setProfiler allows setting ManagedIceObject::profiler to a new instance (if the new instance is actually not a null pointer)
409  */
410  void enableProfiler(bool enable);
411 
412  /**
413  * Returns object's Ice adapter
414  *
415  * @return object's adapter
416  */
417  Ice::ObjectAdapterPtr getObjectAdapter() const;
418 
419  /**
420  * Registers a proxy for subscription after initialization
421  *
422  * @param name Topic name
423  * @see unsubscribeFromTopic()
424  */
425  void usingTopic(const std::string& name, bool orderedPublishing = false);
426 
427  /**
428  * @brief Unsubscribe from a topic
429  * @param name Name of the topic
430  * @return True if the ManagedIceObject was subscribed before, false otherwise.
431  */
432  bool unsubscribeFromTopic(const std::string& name);
433 
434  /**
435  * Registers a topic for retrival after initialization
436  *
437  * @param name Topic name
438  */
439  void offeringTopic(const std::string& name);
440 
441  void preambleGetTopic(std::string const& name);
442 
443  /**
444  * Returns a proxy of the specified topic.
445  *
446  * @param name Topic name
447  *
448  * @return Topic proxy of the type \e TopicProxyType
449  */
450  template <class TopicProxyType>
451  TopicProxyType getTopic(const std::string& name)
452  {
453  preambleGetTopic(name);
454 
455  // retrieve topic
456  return getIceManager()->getTopic<TopicProxyType>(name);
457  }
458 
459  /**
460  * @brief Assigns a proxy of the specified topic to `topicProxy`.
461  * This method can be called without explicit template argument, as
462  * the topic proxy type can be inferred from the arguments.
463  *
464  * @param topicProxy The topic proxy to be assigned.
465  * @param name Topic name
466  *
467  * @see getTopic<>()
468  */
469  template <class TopicProxyType>
470  void getTopic(TopicProxyType& topicProxy, const std::string& name)
471  {
472  topicProxy = getTopic<TopicProxyType>(name);
473  }
474 
475  /**
476  * @brief Waits until the ObjectScheduler could resolve all dependencies.
477  */
478  void waitForObjectScheduler();
479 
480  /**
481  * Retrieve default name of component
482  *
483  * Implement this method in each IceManagedObject. The default name of a
484  * is used if no name is specified in the factory method.
485  *
486  * @return default name of the component (e.g. "KinematicUnit")
487  */
488  virtual std::string getDefaultName() const = 0;
489 
490  /**
491  * @brief Allows to set meta information that can be queried live via Ice interface
492  * on the ArmarXManager.
493  * @param id Id and description of the meta information.
494  * @param value Value to be stored. Should only be basic types and strings.
495  */
496  void setMetaInfo(const std::string& id, const VariantBasePtr& value);
497  VariantBasePtr getMetaInfo(const std::string& id);
498  StringVariantBaseMap getMetaInfoMap() const;
499 
500  void startPeriodicTask(const std::string& uniqueName,
501  std::function<void(void)> f,
502  int periodMs,
503  bool assureMeanInterval = false,
504  bool forceSystemTime = true);
505  bool stopPeriodicTask(const std::string& name);
506  PeriodicTaskPtr getPeriodicTask(const std::string& name);
507  protected:
508  /**
509  * Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
510  */
512  ~ManagedIceObject() override;
513 
514  /**
515  * @brief This function removes the dependency of this object
516  * on the in parameter name specified object.
517  * @param name name of the depedency proxy
518  * @return returns true if depedency was found and removed
519  * false if dependency does not exist
520  */
521  bool removeProxyDependency(const std::string& name);
522 
523 
524  /**
525  * Initiates termination of this IceManagedObject. Returns immediately.
526  */
527  void terminate();
528 
529  /**
530  * Override name of well-known object
531  */
532  void setName(std::string name);
533 
534  /**
535  * Pure virtual hook for the subclass. Is called once initialization of the ManagedIceObject is done.
536  * This hook is called in the implenting class once and never again during the lifecyle of the object. This function is called
537  * as soon as the ManagedIceObject was added to the ArmarXManager. Called in an own thread and not the thread it was created in.
538  *
539  */
540  virtual void onInitComponent() = 0;
541  virtual void preOnInitComponent() {}
542  virtual void postOnInitComponent() {}
543 
544  /**
545  * Pure virtual hook for the subclass. Is called once all dependencies of the object have been resolved and Ice connection is established.
546  * This hook is called whenever the dependencies are found. That means if the a depedency crashes or shuts down, the ManagedIceObject goes
547  * into disconnected state. When the dependencies are found again, this hook is called again.
548  *
549  *
550  * @see onDisconnectComponent()
551  */
552  virtual void onConnectComponent() = 0;
553  virtual void preOnConnectComponent() {}
554  virtual void postOnConnectComponent() {}
555 
556  /**
557  * Hook for subclass. Is called if a dependency of the object got lost (crash, network error, stopped, ...).
558  * This hook should be the inverse to onConnectComponent(). So that onDisconnectComponent() and onConnectComponent() can be called alternatingly
559  * and the ManagedIceObject remains in valid states. *
560  *
561  * @see onConnectComponent
562  */
563  virtual void onDisconnectComponent() {}
564  virtual void preOnDisconnectComponent() {}
565  virtual void postOnDisconnectComponent() {}
566 
567  /**
568  * Hook for subclass. Is called once the component terminates. Use for cleanup. Only called once.
569  */
570  virtual void onExitComponent() {}
571  virtual void preOnExitComponent() {}
572  virtual void postOnExitComponent() {}
573 
574  Ice::CommunicatorPtr getCommunicator() const;
575 
576  private:
577  // init sets members and calls onInitComponent hook
578  void init(IceManagerPtr iceManager);
579  // start sets members and calls onConnectComponent hook
580  void start(Ice::ObjectPrx& proxy, const Ice::ObjectAdapterPtr& objectAdapter);
581  void disconnect();
582  // exit sets members and calls onExitComponent hook
583  void exit();
584 
585  void setObjectState(int newState);
586 
587  private:
588  struct Impl;
589  std::unique_ptr<Impl> impl;
590 
591  /**
592  * @brief Noop function which does nothing (Only to be used as default value for enableProfilerFunction function pointer)
593  * @param object
594  */
595  static void Noop(ManagedIceObject* object);
596 
597  /**
598  * @brief EnableProfilerOn creates an instance of armarx::IceLoggingStrategy and sets it on object->profiler
599  * @param object
600  */
601  static void EnableProfilerOn(ManagedIceObject* object);
602  };
603 
604 }
605 
ManagedIceObjectPlugin.h
std::experimental
Definition: ManagedIceObject.h:48
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::ManagedIceObject::postOnExitComponent
virtual void postOnExitComponent()
Definition: ManagedIceObject.h:572
LocalException.h
armarx::ManagedIceObject::postOnDisconnectComponent
virtual void postOnDisconnectComponent()
Definition: ManagedIceObject.h:565
armarx::VariantBasePtr
::IceInternal::Handle<::armarx::VariantBase > VariantBasePtr
Definition: ManagedIceObject.h:109
armarx::ManagedIceObject::NullPtr
static const ManagedIceObjectPtr NullPtr
A nullptr to be used when a const ref to a nullptr is required.
Definition: ManagedIceObject.h:222
ARMARX_CHECK_NOT_NULL
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Definition: ExpressionException.h:206
armarx::Profiler
Definition: ManagedIceObject.h:72
armarx::ManagedIceObject::getProxy
void getProxy(ProxyType &proxy, const char *name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
Overload to allow using string literals as name (solve ambiguous overload).
Definition: ManagedIceObject.h:387
armarx::ManagedIceObject::postOnInitComponent
virtual void postOnInitComponent()
Definition: ManagedIceObject.h:542
std::experimental::fundamentals_v2::make_observer
observer_ptr< _Tp > make_observer(_Tp *__p) noexcept
armarx::ManagedIceObject::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObject.h:182
armarx::ManagedIceObject::onExitComponent
virtual void onExitComponent()
Hook for subclass.
Definition: ManagedIceObject.h:570
std::experimental::fundamentals_v2::observer_ptr
Definition: ManagedIceObject.h:53
armarx::ManagedIceObject::getProxy
void getProxy(const char *name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&...args)
Definition: ManagedIceObject.h:379
armarx::ManagedIceObject::onDisconnectComponent
virtual void onDisconnectComponent()
Hook for subclass.
Definition: ManagedIceObject.h:563
armarx::ManagedIceObject::preOnExitComponent
virtual void preOnExitComponent()
Definition: ManagedIceObject.h:571
Ice::CommunicatorPtr
::IceInternal::Handle< ::Ice::Communicator > CommunicatorPtr
Definition: IceManager.h:49
armarx::ManagedIceObject::getTopic
void getTopic(TopicProxyType &topicProxy, const std::string &name)
Assigns a proxy of the specified topic to topicProxy.
Definition: ManagedIceObject.h:470
IceInternal::Handle< ::Ice::Communicator >
armarx::ManagedIceObject::getProxy
void getProxy(Prx &prx, long timeoutMs=0, bool waitForScheduler=true) const
Definition: ManagedIceObject.h:268
armarx::ManagedIceObject::postOnConnectComponent
virtual void postOnConnectComponent()
Definition: ManagedIceObject.h:554
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::ManagedIceObject::addPlugin
void addPlugin(std::experimental::observer_ptr< PluginT > &targ, const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObject.h:205
armarx::ManagedIceObject::preOnDisconnectComponent
virtual void preOnDisconnectComponent()
Definition: ManagedIceObject.h:564
armarx::ManagedIceObject::preOnInitComponent
virtual void preOnInitComponent()
Definition: ManagedIceObject.h:541
armarx::ArmarXObjectScheduler
Takes care of the lifecycle management of ManagedIceObjects.
Definition: ArmarXObjectScheduler.h:74
armarx::Profiler::Profiler
The armarx::Profiler::Profiler class can be used for timing executions within the ArmarX framework.
Definition: Profiler.h:88
boost::process::posix::terminate
void terminate(const Process &p)
Definition: terminate.hpp:20
armarx::make_shared
auto make_shared(Args &&...args)
Definition: ManagedIceObject.h:90
armarx::ManagedIceObject::getProxy
ProxyType getProxy(const std::string &name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
Retrieves a proxy object.
Definition: ManagedIceObject.h:329
IceManager.h
armarx::ProxyType
ProxyType
Definition: ProxyPropertyDefinition.h:41
armarx::ManagedIceObject::preOnConnectComponent
virtual void preOnConnectComponent()
Definition: ManagedIceObject.h:553
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
ExpressionException.h
armarx::ManagedIceObject::getProxy
void getProxy(IceInternal::ProxyHandle< ProxyTarg > &proxy, const char *name, Args &&...args)
Definition: ManagedIceObject.h:373
ArmarXFwd.h
Ice
Definition: DBTypes.cpp:64
Ice::ObjectAdapterPtr
::IceInternal::Handle< ::Ice::ObjectAdapter > ObjectAdapterPtr
Definition: IceManager.h:52
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:232
armarx::ManagedIceObject::addPlugin
void addPlugin(PluginT *&targ, const std::string prefix="", ParamsT &&...params)
Definition: ManagedIceObject.h:198
armarx::ManagedIceObject::getTopic
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
Definition: ManagedIceObject.h:451
IceUtil::Handle
Definition: forward_declarations.h:29
IceInternal::ProxyHandle
Definition: ObjectPoseClientWidget.h:39
armarx::Profiler::ProfilerPtr
std::shared_ptr< Profiler > ProfilerPtr
Definition: ManagedIceObject.h:75
ARMARX_CHECK_NULL
#define ARMARX_CHECK_NULL(ptr)
Definition: ExpressionException.h:212
ImportExport.h
armarx::ManagedIceObjectPlugin
Definition: ManagedIceObjectPlugin.h:50
ARMARXCORE_IMPORT_EXPORT
#define ARMARXCORE_IMPORT_EXPORT
Definition: ImportExport.h:38
Logging.h
T
float T
Definition: UnscentedKalmanFilterTest.cpp:35
armarx::ManagedIceObject::getProxy
void getProxy(IceInternal::ProxyHandle< ProxyTarg > &proxy, const std::string &name, Args &&...args)
Assigns a proxy to proxy.
Definition: ManagedIceObject.h:361
armarx::ManagedIceObject::getProxy
void getProxy(const std::string &name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&...args)
Definition: ManagedIceObject.h:367
armarx::ManagedIceObject::getProxy
Prx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Definition: ManagedIceObject.h:263
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::SimplePeriodicTask
Usage:
Definition: ApplicationNetworkStats.h:32