|
LRAUV
revA
|
The SyncHandler and ControlThread are a bit of a strange arrangement. More...
#include <SyncHandler.h>


Public Member Functions | |
| SyncHandler (class ControlThread &controlThread, Logger &logger) | |
| virtual | ~SyncHandler () |
| Destructor. More... | |
| virtual void | run () |
| Run the component itself. More... | |
Public Member Functions inherited from MultiHandler | |
| virtual | ~MultiHandler () |
| Destructor. More... | |
| virtual void | runAll () |
| Run all items in the list of components. More... | |
| virtual void | runNext () |
| Run next item in the list of components. More... | |
| virtual bool | isRunning () |
| Indicates whether the component is running. More... | |
| virtual void | allowRuns () |
| Allow runs. More... | |
| virtual void | stopRuns () |
| Stop the runs, if they are in progress, and disallow future runs. More... | |
| const bool | isRunnable () |
| is the handler (and contained thread) runnable_? More... | |
| virtual void | shutdown (void) |
| Stop the handler (and uninit the component) More... | |
| bool | addComponent (SyncComponent *component) |
| Put a component in the control thread's control. More... | |
| bool | removeComponent (SyncComponent *component) |
| Remove a component from the control thread's control. More... | |
| void | clearComponentList (void) |
| Empty the lists (doesn't actually delete the components) More... | |
| void | syslogComponentOrder (Logger &logger) |
| Dumps information about the components in the list to the given Logger. More... | |
| Component * | getRunningComponent (void) |
| Returns the component that is currently running. More... | |
Public Member Functions inherited from Handler | |
| Handler (Component &inComponent, const Str &name, bool idleThread=false) | |
| Constructor. More... | |
| virtual | ~Handler () |
| Destructor. More... | |
| virtual bool | continueLoop (void) |
| Supplemental end conditions. More... | |
| virtual void | runOnce (void) |
| Virtual function run only on first iteration of handler. More... | |
| virtual void | runBetween (void) |
| Virtual function run after the first iteration of the handler. More... | |
| const Str & | getName () |
| void | setAsLogHandler (bool logHandler) |
| void | setAsControlLoopHandler (bool controlLoopHandler) |
Additional Inherited Members | |
Public Types inherited from MultiHandler | |
| typedef FastMap< SyncComponent::CycleOrder, SyncComponent * > | OrderedComponents |
Static Public Member Functions inherited from Handler | |
| static bool | IsFastSimAllowed () |
Protected Member Functions inherited from MultiHandler | |
| MultiHandler (Component &owner, const Str &name) | |
| Protected Constructor. More... | |
Protected Attributes inherited from MultiHandler | |
| OrderedComponents | components_ |
| unsigned int | runNextIndex_ |
| bool | runnable_ |
| bool | running_ |
| SyncComponent * | runningComponent_ |
Protected Attributes inherited from Handler | |
| Component & | component_ |
| The "handled" Component. More... | |
| Timestamp | componentStartTime_ |
| Keep track of when the component is supposed to start next. More... | |
| Logger | logger_ |
| PCaller * | pCaller_ |
| Used for making protected calls. More... | |
| bool | running_ |
Static Protected Attributes inherited from Handler | |
| static const Timespan | SMALL_INTERVAL = Timespan::FromMicros( 800 ) |
The SyncHandler and ControlThread are a bit of a strange arrangement.
ControlThread is a Component, which is a "thin wrapper" around the SyncHandler. The SyncHandler, in turn is a container for all of the Components "owned" by the ControlThread. This maintains the handler->component->handler->component relationship. Specifically:
ThreadHandler->ControlThread->SyncHandler->(components)
There's a bit of a balance of power between the two, though most of the "smarts" are in the SyncHandler.
| SyncHandler::SyncHandler | ( | class ControlThread & | controlThread, |
| Logger & | logger | ||
| ) |
|
virtual |
Destructor.
|
inlinevirtual |
Run the component itself.
Implements MultiHandler.
References MultiHandler::runAll().
Referenced by ControlThread::run().