|
|
Takes care of the lifecycle management of ManagedIceObjects. More...
#include <ArmarXCore/core/ArmarXObjectScheduler.h>
Inheritance diagram for ArmarXObjectScheduler:Public Member Functions | |
| ArmarXObjectScheduler (const ArmarXManagerPtr &armarXManager, const IceManagerPtr &iceManager, const armarx::ManagedIceObjectPtr &object, Ice::ObjectAdapterPtr objectAdapterToAddTo, bool startSchedulingObject=true) | |
| Constructs an ArmarXObjectScheduler. | |
| bool | checkDependenciesStatus () const |
| bool | dependsOn (const std::string &objectName) |
| void | disconnected (bool reconnect) |
| const armarx::ManagedIceObjectPtr & | getObject () const |
| Retrieve pointer to scheduled ManagedIceObject. | |
| ManagedIceObjectState | getObjectState () const |
| bool | isTerminated () const |
| Check whether the Scheduler is terminated. | |
| bool | isTerminationRequested () const |
| void | startScheduling () |
| void | terminate () |
| Terminates the ManagedIceObject. | |
| void | waitForDependencies (int timeoutMs=-1) |
| waits until all depenencies are resolved. | |
| bool | waitForObjectState (ManagedIceObjectState stateToWaitFor, const long timeoutMs=-1) const |
| waitForObjectStart waits (thread sleeps) until the object reached a specific state. | |
| bool | waitForObjectStateMinimum (ManagedIceObjectState minimumStateToWaitFor, const long timeoutMs=-1) const |
| waitForObjectStart waits (thread sleeps) until the object reached a specific state (or higher/later). | |
| void | waitForTermination () |
| Waits until scheduler has been terminated. | |
| void | wakeupDependencyCheck () |
| ~ArmarXObjectScheduler () override | |
Public Member Functions inherited from Logging | |
| SpamFilterDataPtr | deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const |
| disables the logging for the current line for the given amount of seconds. | |
| MessageTypeT | getEffectiveLoggingLevel () const |
| Logging () | |
| void | setLocalMinimumLoggingLevel (MessageTypeT level) |
| With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. | |
| void | setTag (const LogTag &tag) |
| void | setTag (const std::string &tagName) |
| virtual | ~Logging () |
Protected Member Functions | |
| bool | checkDependenciesResolvement () |
Protected Member Functions inherited from Logging | |
| bool | checkLogLevel (MessageTypeT level) const |
| const LogSenderPtr & | getLogSender () const |
| Retrieve log sender. | |
| LogSenderPtr | loghelper (const char *file, int line, const char *function) const |
Friends | |
| class | ArmarXMultipleObjectsScheduler |
Additional Inherited Members | |
Protected Attributes inherited from Logging | |
| MessageTypeT | minimumLoggingLevel |
| SpamFilterDataPtr | spamFilter |
| LogTag | tag |
Takes care of the lifecycle management of ManagedIceObjects.
The ArmarXObjectScheduler schedules the lifecycle of a ManagedIceObject in a single thread. According to the current state, the ManagedIceObject framework hooks are called. It provides all necessary functionality for a clean initialisation of ManagedIceObjects as well as dependency-resolution, dependency-monitoring, and exception handling. ArmarXObjectSchedulers are created by the ArmarXManager.
| ArmarXObjectScheduler | ( | const ArmarXManagerPtr & | armarXManager, |
| const IceManagerPtr & | iceManager, | ||
| const armarx::ManagedIceObjectPtr & | object, | ||
| Ice::ObjectAdapterPtr | objectAdapterToAddTo, | ||
| bool | startSchedulingObject = true ) |
Constructs an ArmarXObjectScheduler.
| armarXManager | pointer to the armarXManager |
| iceManager | pointer to the iceManager |
| object | object to schedule |
|
override |
|
protected |
| bool checkDependenciesStatus | ( | ) | const |
| bool dependsOn | ( | const std::string & | objectName | ) |
| void disconnected | ( | bool | reconnect | ) |
| const ManagedIceObjectPtr & getObject | ( | ) | const |
Retrieve pointer to scheduled ManagedIceObject.
| ManagedIceObjectState getObjectState | ( | ) | const |
| bool isTerminated | ( | ) | const |
Check whether the Scheduler is terminated.
| bool isTerminationRequested | ( | ) | const |
| void startScheduling | ( | ) |
| void terminate | ( | ) |
Terminates the ManagedIceObject.
| void waitForDependencies | ( | int | timeoutMs = -1 | ) |
waits until all depenencies are resolved.
| timeoutMs | If set to -1, it waits indefinitely. Otherwise throws exception after waiting the specifed time (given in milliseconds). |
| bool waitForObjectState | ( | ManagedIceObjectState | stateToWaitFor, |
| const long | timeoutMs = -1 ) const |
waitForObjectStart waits (thread sleeps) until the object reached a specific state.
| stateToWaitFor | State for which the calling thread should wait for. |
| timeoutMs | Timeout in miliseconds until this function stops waiting and returns false. Set to -1 for infinite waiting. |
| bool waitForObjectStateMinimum | ( | ManagedIceObjectState | minimumStateToWaitFor, |
| const long | timeoutMs = -1 ) const |
waitForObjectStart waits (thread sleeps) until the object reached a specific state (or higher/later).
| minimumStateToWaitFor | Minimum State for which the calling thread should wait for. |
| timeoutMs | Timeout in miliseconds until this function stops waiting and returns false. Set to -1 for infinite waiting. |
| void waitForTermination | ( | ) |
Waits until scheduler has been terminated.
After termination the lifecycle of the ManagedIceObject has ceased and the thread has joined.
| void wakeupDependencyCheck | ( | ) |
|
friend |