![]() |
MAK Data Logger API Documentation for HLA
|
The implementation of the system logic of the State Observer. More...
Inheritance diagram for MAKLogger::DtStateObserverModel:
Collaboration diagram for MAKLogger::DtStateObserverModel:Public Member Functions | |
| DtStateObserverModel (DtStateObserverController *, MAKLogger::DtLgrSystemDriver &driver) | |
| CTOR. More... | |
| virtual | ~DtStateObserverModel () |
| DTOR. More... | |
| void | connect (MAKLogger::DtMessageState *) |
| Connect to a state object. More... | |
| int | totalObjects () const |
| Get the total number of objects. More... | |
| int | totalAliveObjects () const |
| Get the total 'alive' objects being published. More... | |
| int | totalDeadObjects () const |
| Get the total 'dead' objects being published. More... | |
| int | entityCount () const |
| Get the current entity publisher count. More... | |
| int | aggregateCount () const |
| Get the current aggregate publisher count. More... | |
| int | envProcCount () const |
| Get the environmental process publisher count. More... | |
| virtual void | tick () |
| Tick the driver, cause it to do anything on a regular basis. More... | |
| virtual bool | releasePipeline () |
| Attempt to release the pipeline. More... | |
| virtual bool | getPipeline () |
| Attempt to acquire the pipeline. More... | |
| virtual bool | hasPipeline () const |
| Does this object own the pipeline. More... | |
| virtual DtResponse | handleUpdateRequest (const DtCommand &) |
| Handle update response commands. More... | |
| virtual void | enableObservers () |
| Activate the observer functions. More... | |
| virtual void | disableObservers () |
| Deactivate the observer functions. More... | |
Public Member Functions inherited from MAKLogger::DtLgrCommandHandler | |
| DtLgrCommandHandler (const DtString &name, DtRuntimeCommandFactory *, DtCommandDispatcherSP) | |
| Constructor which provides the name, the runtime factory, and the dispatcher which receives and transmits commands. More... | |
| virtual | ~DtLgrCommandHandler () |
| DTOR. More... | |
| void | lock () |
| Locks the Command Handler. More... | |
| void | unlock () |
| Unlocks the Command Handler. More... | |
| DtCommandDispatcherSP | dispatcher () |
| Get the dispatcher the command handler is connected to. More... | |
| virtual const DtString & | driverName () const |
| Get the name of the driver. More... | |
| virtual const DtString & | driverInfo () |
| Get the name of the driver. More... | |
| virtual void | processCommand (const DtCommand &command) |
| Process a specific command. More... | |
| virtual bool | spawnThread (DtLgrCommandThread *commandThread) |
| Spawn a new thread. More... | |
| virtual void | stopAllThreads () |
| Stop all running threads. More... | |
| virtual void | stopThread (DtLgrCommandThread *commandThread) |
| Stop a thread and deallocate it's resources. More... | |
Protected Types | |
| typedef MAKLogger::DtObserverFunctor < DtStateObserverModel, MAKLogger::DtMessageState > | MessageStateObserverFunctor |
Protected Types inherited from MAKLogger::DtLgrCommandHandler | |
| typedef DtLgrCommandHandler *(* | DriverCreator )(DtCommandDispatcherSP) |
| typedef std::map < DtLgrCommandId, DtCommandFunctorSP > | DtLgrCommandHandlerMap |
| typedef std::map< DtString, DtLgrCommandId > | DtLgrCommandNameMap |
| typedef std::list< DtResponse > | DtResponseQueue |
| typedef std::map < DtLgrCommandThread *, DtThread * > | CommandThreadMap |
| A set of running command threads. More... | |
Protected Member Functions | |
| virtual void | updateState (const MAKLogger::DtMessageState &) |
| Function to observer update state events. More... | |
| virtual void | activate (const MAKLogger::DtMessageState &) |
| Function to observer activate state event. More... | |
| virtual void | deactivate (const MAKLogger::DtMessageState &) |
| Function to observer deactivate state event. More... | |
| virtual void | endDiff (const MAKLogger::DtMessageState &state) |
| Function to obser the state after an endDiff. More... | |
Protected Member Functions inherited from MAKLogger::DtLgrCommandHandler | |
| void | addCommandHandler (const DtCommandDefinition &commandDef, DtCommandFunctorSP commandFunctor) |
| Add a commandHandler, this should not be virtual as it is called in constructors. More... | |
| void | removeCommandHandler (const DtCommandDefinition &commandDef) |
| Remove a commandHandler, this is typically not called but necessary for replacing a command handler. More... | |
| virtual void | sendResponse (DtResponse response) |
| Send a response, for functions that have multiple responses make this call. More... | |
| virtual void | queueResponse (DtResponse response) |
| Queue a response for future sending. More... | |
| virtual void | sendQueuedResponses () |
| Sends all queued responses and clears the queue. More... | |
| virtual void | emptyResponseQueue () |
| Empty the response queue (deleting any unsent responses). More... | |
| DtResponse | finishThread (const DtCommand &command) |
| Finish the thread. More... | |
Static Protected Member Functions | |
| static bool | equals (const MAKLogger::DtStateObject *object, DtU64 id) |
| Test function to compare an object to an id. More... | |
Protected Attributes | |
| MessageStateObserverFunctor | myPostUpdateObserver |
| MessageStateObserverFunctor | myActivateObserver |
| MessageStateObserverFunctor | myDeactivateObserver |
| MessageStateObserverFunctor | myEndDiffObserver |
| std::set< DtU64 > | myActiveObjects |
| int | myTotalCount |
| int | myTotalAliveCount |
| int | myTotalDeadCount |
| int | myEntityCount |
| int | myAggregateCount |
| int | myEnvProcCount |
| DtStateObserverController * | myController |
| bool | myActivateObserverFlag |
Protected Attributes inherited from MAKLogger::DtLgrCommandHandler | |
| DtRuntimeCommandFactory * | myRuntimeCommandFactory |
| DtLgrCommandHandlerMap | myCommandMap |
| DtCommandDispatcherSP | myDispatcher |
| DtResponseQueue | myResponseQueue |
| DtString | myName |
| DtString | myInfo |
| DtMutex | myMutex |
| CommandThreadMap | myRunningCommandThreads |
| Running command threads. More... | |
The implementation of the system logic of the State Observer.
DtStateObserverModel represents the model in a Model-View-Controller pattern.
|
protected |
| MAKLogger::DtStateObserverModel::DtStateObserverModel | ( | DtStateObserverController * | , |
| MAKLogger::DtLgrSystemDriver & | driver | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
protectedvirtual |
Function to observer activate state event.
| int MAKLogger::DtStateObserverModel::aggregateCount | ( | ) | const |
Get the current aggregate publisher count.
| void MAKLogger::DtStateObserverModel::connect | ( | MAKLogger::DtMessageState * | ) |
Connect to a state object.
|
protectedvirtual |
Function to observer deactivate state event.
|
virtual |
Deactivate the observer functions.
|
virtual |
Activate the observer functions.
|
protectedvirtual |
Function to obser the state after an endDiff.
| int MAKLogger::DtStateObserverModel::entityCount | ( | ) | const |
Get the current entity publisher count.
| int MAKLogger::DtStateObserverModel::envProcCount | ( | ) | const |
Get the environmental process publisher count.
|
staticprotected |
Test function to compare an object to an id.
|
virtual |
Attempt to acquire the pipeline.
| true | The pipeline has been acquired. |
| false | The pipeline has not been acquired. |
Implements MAKLogger::DtLgrCommandHandler.
|
virtual |
Handle update response commands.
|
virtual |
Does this object own the pipeline.
| true | The pipeline is owned. |
| false | The pipeline is not owned. |
Implements MAKLogger::DtLgrCommandHandler.
|
virtual |
Attempt to release the pipeline.
This function is called when the pipeline has been requested by a different driver. If the driver can't release the pipeline it will return false. By default this method simply succeeds. If the driver should override this function if it wishes to deny the request.
| true | The pipeline has been released. |
| false | The pipeline has not been released. |
Implements MAKLogger::DtLgrCommandHandler.
|
virtual |
Tick the driver, cause it to do anything on a regular basis.
Implements MAKLogger::DtLgrCommandHandler.
| int MAKLogger::DtStateObserverModel::totalAliveObjects | ( | ) | const |
Get the total 'alive' objects being published.
| int MAKLogger::DtStateObserverModel::totalDeadObjects | ( | ) | const |
Get the total 'dead' objects being published.
| int MAKLogger::DtStateObserverModel::totalObjects | ( | ) | const |
Get the total number of objects.
|
protectedvirtual |
Function to observer update state events.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |