Go to the documentation of this file.
27 #include <ArmarXCore/interface/core/ManagedIceObjectDefinitions.h>
28 #include <Ice/Handle.h>
29 #include <Ice/ObjectAdapterF.h>
30 #include <Ice/ObjectF.h>
31 #include <IceUtil/Handle.h>
32 #include <IceUtil/Shared.h>
34 #include <condition_variable>
55 class ArmarXObjectScheduler;
75 public IceUtil::Shared,
97 bool dependsOn(
const std::string& objectName);
118 bool waitForObjectState(ManagedIceObjectState stateToWaitFor,
const long timeoutMs = -1)
const;
162 void setInteruptConditionVariable(std::shared_ptr<std::condition_variable> interruptCondition, std::shared_ptr<bool> interruptConditionVariable);
164 void scheduleObject();
166 void waitForInterrupt();
179 void disconnectObject();
191 std::mutex interruptMutex;
192 std::shared_ptr<std::condition_variable> interruptCondition;
193 std::shared_ptr<bool> interruptConditionVariable;
194 std::mutex dependencyWaitMutex;
195 std::condition_variable dependencyWaitCondition;
196 bool dependencyWaitConditionVariable;
197 bool terminateRequested;
198 bool objectedInitialized;
IceUtil::Handle< IceManager > IceManagerPtr
IceManager smart pointer.
bool isTerminated() const
Check whether the Scheduler is terminated.
~ArmarXObjectScheduler() override
void wakeupDependencyCheck()
IceUtil::Handle< ArmarXManager > ArmarXManagerPtr
void terminate()
Terminates the ManagedIceObject.
ArmarXObjectScheduler(const ArmarXManagerPtr &armarXManager, const IceManagerPtr &iceManager, const armarx::ManagedIceObjectPtr &object, Ice::ObjectAdapterPtr objectAdapterToAddTo, bool startSchedulingObject=true)
Constructs an ArmarXObjectScheduler.
ManagedIceObjectState getObjectState() const
bool checkDependenciesResolvement()
bool checkDependenciesStatus() const
Takes care of the lifecycle management of ManagedIceObjects.
bool waitForObjectState(ManagedIceObjectState stateToWaitFor, const long timeoutMs=-1) const
waitForObjectStart waits (thread sleeps) until the object reached a specific state.
IceInternal::Handle< ManagedIceObject > ManagedIceObjectPtr
bool isTerminationRequested() const
void waitForDependencies(int timeoutMs=-1)
waits until all depenencies are resolved.
IceUtil::Handle< ArmarXObjectScheduler > ArmarXObjectSchedulerPtr
const armarx::ManagedIceObjectPtr & getObject() const
Retrieve pointer to scheduled ManagedIceObject.
Base Class for all Logging classes.
void disconnected(bool reconnect)
bool dependsOn(const std::string &objectName)
void waitForTermination()
Waits until scheduler has been terminated.
bool waitForObjectStateMinimum(ManagedIceObjectState minimumStateToWaitFor, const long timeoutMs=-1) const
waitForObjectStart waits (thread sleeps) until the object reached a specific state (or higher/later).
This file offers overloads of toIce() and fromIce() functions for STL container types.