Go to the documentation of this file.
26 #include <condition_variable>
30 #include <Ice/Handle.h>
31 #include <Ice/ObjectAdapterF.h>
32 #include <Ice/ObjectF.h>
33 #include <IceUtil/Handle.h>
34 #include <IceUtil/Shared.h>
39 #include <ArmarXCore/interface/core/ManagedIceObjectDefinitions.h>
55 class ArmarXObjectScheduler;
88 bool startSchedulingObject =
true);
99 bool dependsOn(
const std::string& objectName);
120 const long timeoutMs = -1)
const;
134 const long timeoutMs = -1)
const;
167 setInteruptConditionVariable(std::shared_ptr<std::condition_variable> interruptCondition,
168 std::shared_ptr<bool> interruptConditionVariable);
170 void scheduleObject();
172 void waitForInterrupt();
182 void disconnectObject();
194 std::mutex interruptMutex;
195 std::shared_ptr<std::condition_variable> interruptCondition;
196 std::shared_ptr<bool> interruptConditionVariable;
197 std::mutex dependencyWaitMutex;
198 std::condition_variable dependencyWaitCondition;
199 bool dependencyWaitConditionVariable;
200 bool terminateRequested;
201 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.