ManagedIceObjectImpl.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ManagedIceObject.h"
4 
5 #include <string>
6 #include <condition_variable>
7 #include <mutex>
8 
9 namespace armarx
10 {
12  {
13  /**
14  * Name of object. Corresponds to name of Ice well-known object.
15  */
16  std::string name;
17 
18  /**
19  * Component manager instance. The manager can be used to add and remove
20  * components dynamically.
21  */
23 
24  /**
25  * The Ice manager used for adapter registration, proxy retrieval topic
26  * and session management.
27  */
29 
30  /**
31  * The Ice manager used for adapter registration, proxy retrieval topic
32  * and session management.
33  */
35 
36  /**
37  * State of the ManagedIceObject.
38  */
39  ManagedIceObjectState objectState;
40  std::mutex objectStateMutex;
41 
42  /**
43  * Proxy of this object needed for storm topic subscriptions.
44  */
45  Ice::ObjectPrx proxy;
46 
47  /**
48  * Component object adapter.
49  */
51 
52  /**
53  * connectivity.
54  */
55  ManagedIceObjectConnectivity connectivity;
56  std::map<std::string, bool> orderedTopicPublishing;
57 
58  /**
59  * Mutex for connectivity.
60  */
61  std::mutex connectivityMutex;
62 
63  /**
64  * @brief startedCondition is used to signal waiting threads, that
65  * this object is started (i.e. onConnectComponent() was called)
66  *
67  * @see onConnectComponent(), waitForObjectStart()
68  */
69  std::condition_variable stateCondition;
70 
71  /**
72  * Holds an instance of armarx::Profiler wich can be accessed via ManagedIceObject::getProfiler().
73  * Enable or disable the profiler via ManagedIceObject::enable().
74  */
76 
77  /**
78  * @brief enableProfilerFunction is used to defer the creation of the IceLoggingStrategy topic proxy
79  *
80  * This function pointer normally executes MangedIceObject::Noop() and is called in ManagedIceObject::init() after the IceManager is set.
81  *
82  * In case ManagedIceObject::enableProfiler() is called before ManagedIceObject::init() the creation of the the IceLoggingStrategy
83  * is put into this function object and executed when Ice is available.
84  */
86 
87  std::mutex metaInfoMapMutex;
89 
90  std::map<std::string, PeriodicTaskPtr> periodicTasks;
91  };
92 }
armarx::ManagedIceObject::Impl::metaInfoMapMutex
std::mutex metaInfoMapMutex
Definition: ManagedIceObjectImpl.h:87
armarx::ManagedIceObject::Impl::armarXManager
ArmarXManagerPtr armarXManager
Component manager instance.
Definition: ManagedIceObjectImpl.h:22
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
armarx::ManagedIceObject::Impl::objectAdapter
Ice::ObjectAdapterPtr objectAdapter
Component object adapter.
Definition: ManagedIceObjectImpl.h:50
armarx::ManagedIceObject::Impl::orderedTopicPublishing
std::map< std::string, bool > orderedTopicPublishing
Definition: ManagedIceObjectImpl.h:56
armarx::ManagedIceObject::Impl::connectivity
ManagedIceObjectConnectivity connectivity
connectivity.
Definition: ManagedIceObjectImpl.h:55
armarx::ManagedIceObject::Impl::enableProfilerFunction
void(* enableProfilerFunction)(ManagedIceObject *object)
enableProfilerFunction is used to defer the creation of the IceLoggingStrategy topic proxy
Definition: ManagedIceObjectImpl.h:85
armarx::ManagedIceObject::Impl::metaInfoMap
StringVariantBaseMap metaInfoMap
Definition: ManagedIceObjectImpl.h:88
armarx::ManagedIceObject::Impl::objectStateMutex
std::mutex objectStateMutex
Definition: ManagedIceObjectImpl.h:40
armarx::ManagedIceObject::Impl::connectivityMutex
std::mutex connectivityMutex
Mutex for connectivity.
Definition: ManagedIceObjectImpl.h:61
IceInternal::Handle< ::Ice::ObjectAdapter >
armarx::ManagedIceObject::Impl::objectScheduler
ArmarXObjectSchedulerPtr objectScheduler
The Ice manager used for adapter registration, proxy retrieval topic and session management.
Definition: ManagedIceObjectImpl.h:34
armarx::ManagedIceObject::Impl::objectState
ManagedIceObjectState objectState
State of the ManagedIceObject.
Definition: ManagedIceObjectImpl.h:39
ManagedIceObject.h
armarx::ManagedIceObject::Impl
Definition: ManagedIceObjectImpl.h:11
armarx::ManagedIceObject::Impl::profiler
Profiler::ProfilerPtr profiler
Holds an instance of armarx::Profiler wich can be accessed via ManagedIceObject::getProfiler().
Definition: ManagedIceObjectImpl.h:75
armarx::ManagedIceObject::Impl::name
std::string name
Name of object.
Definition: ManagedIceObjectImpl.h:16
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
IceUtil::Handle< ArmarXManager >
armarx::Profiler::ProfilerPtr
std::shared_ptr< Profiler > ProfilerPtr
Definition: ManagedIceObject.h:75
armarx::ManagedIceObject::Impl::proxy
Ice::ObjectPrx proxy
Proxy of this object needed for storm topic subscriptions.
Definition: ManagedIceObjectImpl.h:45
armarx::ManagedIceObject::Impl::periodicTasks
std::map< std::string, PeriodicTaskPtr > periodicTasks
Definition: ManagedIceObjectImpl.h:90
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::ManagedIceObject::Impl::iceManager
IceManagerPtr iceManager
The Ice manager used for adapter registration, proxy retrieval topic and session management.
Definition: ManagedIceObjectImpl.h:28
armarx::ManagedIceObject::Impl::stateCondition
std::condition_variable stateCondition
startedCondition is used to signal waiting threads, that this object is started (i....
Definition: ManagedIceObjectImpl.h:69