MAK Data Logger API Documentation for DIS
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
MAKLogger::DtStateObserverModel Class Reference

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.
virtual ~DtStateObserverModel ()
 DTOR.
void connect (MAKLogger::DtMessageState *)
 Connect to a state object.
int totalObjects () const
 Get the total number of objects.
int totalAliveObjects () const
 Get the total 'alive' objects being published.
int totalDeadObjects () const
 Get the total 'dead' objects being published.
int entityCount () const
 Get the current entity publisher count.
int aggregateCount () const
 Get the current aggregate publisher count.
int envProcCount () const
 Get the environmental process publisher count.
virtual void tick ()
 Tick the driver, cause it to do anything on a regular basis.
virtual bool releasePipeline ()
 Attempt to release the pipeline.
virtual bool getPipeline ()
 Attempt to acquire the pipeline.
virtual bool hasPipeline () const
 Does this object own the pipeline.
virtual DtResponse handleUpdateRequest (const DtCommand &)
 Handle update response commands.
virtual void enableObservers ()
 Activate the observer functions.
virtual void disableObservers ()
 Deactivate the observer functions.
- 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.
virtual ~DtLgrCommandHandler ()
 DTOR.
void lock ()
 Locks the Command Handler.
void unlock ()
 Unlocks the Command Handler.
DtCommandDispatcherSP dispatcher ()
 Get the dispatcher the command handler is connected to.
virtual const DtString & driverName () const
 Get the name of the driver.
virtual const DtString & driverInfo ()
 Get the name of the driver.
virtual void processCommand (const DtCommand &command)
 Process a specific command.

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< DtResponseDtResponseQueue

Protected Member Functions

virtual void updateState (const MAKLogger::DtMessageState &)
 Function to observer update state events.
virtual void activate (const MAKLogger::DtMessageState &)
 Function to observer activate state event.
virtual void deactivate (const MAKLogger::DtMessageState &)
 Function to observer deactivate state event.
virtual void endDiff (const MAKLogger::DtMessageState &state)
 Function to obser the state after an endDiff.
- 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.
void removeCommandHandler (const DtCommandDefinition &commandDef)
 Remove a commandHandler, this is typically not called but necessary for replacing a command handler.
virtual void sendResponse (DtResponse response)
 Send a response, for functions that have multiple responses make this call.
virtual void queueResponse (DtResponse response)
 Queue a response for future sending.
virtual void sendQueuedResponses ()
 Sends all queued responses and clears the queue.
virtual void emptyResponseQueue ()
 Empty the response queue (deleting any unsent responses).

Static Protected Member Functions

static bool equals (const MAKLogger::DtStateObject *object, DtU64 id)
 Test function to compare an object to an id.

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
DtStateObserverControllermyController
bool myActivateObserverFlag
- Protected Attributes inherited from MAKLogger::DtLgrCommandHandler
DtRuntimeCommandFactorymyRuntimeCommandFactory
DtLgrCommandHandlerMap myCommandMap
DtCommandDispatcherSP myDispatcher
DtResponseQueue myResponseQueue
DtString myName
DtString myInfo
DtMutex myMutex

Detailed Description

The implementation of the system logic of the State Observer.

DtStateObserverModel represents the model in a Model-View-Controller pattern.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtStateObserverModel::DtStateObserverModel ( DtStateObserverController ,
MAKLogger::DtLgrSystemDriver driver 
)

CTOR.

virtual MAKLogger::DtStateObserverModel::~DtStateObserverModel ( )
virtual

DTOR.

Member Function Documentation

virtual void MAKLogger::DtStateObserverModel::activate ( const MAKLogger::DtMessageState )
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.

virtual void MAKLogger::DtStateObserverModel::deactivate ( const MAKLogger::DtMessageState )
protectedvirtual

Function to observer deactivate state event.

virtual void MAKLogger::DtStateObserverModel::disableObservers ( )
virtual

Deactivate the observer functions.

virtual void MAKLogger::DtStateObserverModel::enableObservers ( )
virtual

Activate the observer functions.

virtual void MAKLogger::DtStateObserverModel::endDiff ( const MAKLogger::DtMessageState state)
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.

static bool MAKLogger::DtStateObserverModel::equals ( const MAKLogger::DtStateObject object,
DtU64  id 
)
staticprotected

Test function to compare an object to an id.

virtual bool MAKLogger::DtStateObserverModel::getPipeline ( )
virtual

Attempt to acquire the pipeline.

Return values
trueThe pipeline has been acquired.
falseThe pipeline has not been acquired.

Implements MAKLogger::DtLgrCommandHandler.

virtual DtResponse MAKLogger::DtStateObserverModel::handleUpdateRequest ( const DtCommand )
virtual

Handle update response commands.

virtual bool MAKLogger::DtStateObserverModel::hasPipeline ( ) const
virtual

Does this object own the pipeline.

Return values
trueThe pipeline is owned.
falseThe pipeline is not owned.

Implements MAKLogger::DtLgrCommandHandler.

virtual bool MAKLogger::DtStateObserverModel::releasePipeline ( )
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.

Return values
trueThe pipeline has been released.
falseThe pipeline has not been released.

Implements MAKLogger::DtLgrCommandHandler.

virtual void MAKLogger::DtStateObserverModel::tick ( )
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.

virtual void MAKLogger::DtStateObserverModel::updateState ( const MAKLogger::DtMessageState )
protectedvirtual

Function to observer update state events.

Member Data Documentation

MessageStateObserverFunctor MAKLogger::DtStateObserverModel::myActivateObserver
protected
bool MAKLogger::DtStateObserverModel::myActivateObserverFlag
protected
std::set<DtU64> MAKLogger::DtStateObserverModel::myActiveObjects
protected
int MAKLogger::DtStateObserverModel::myAggregateCount
protected
DtStateObserverController* MAKLogger::DtStateObserverModel::myController
protected
MessageStateObserverFunctor MAKLogger::DtStateObserverModel::myDeactivateObserver
protected
MessageStateObserverFunctor MAKLogger::DtStateObserverModel::myEndDiffObserver
protected
int MAKLogger::DtStateObserverModel::myEntityCount
protected
int MAKLogger::DtStateObserverModel::myEnvProcCount
protected
MessageStateObserverFunctor MAKLogger::DtStateObserverModel::myPostUpdateObserver
protected
int MAKLogger::DtStateObserverModel::myTotalAliveCount
protected
int MAKLogger::DtStateObserverModel::myTotalCount
protected
int MAKLogger::DtStateObserverModel::myTotalDeadCount
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)