MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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. 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< DtResponseDtResponseQueue
 
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
 
DtStateObserverControllermyController
 
bool myActivateObserverFlag
 
- Protected Attributes inherited from MAKLogger::DtLgrCommandHandler
DtRuntimeCommandFactorymyRuntimeCommandFactory
 
DtLgrCommandHandlerMap myCommandMap
 
DtCommandDispatcherSP myDispatcher
 
DtResponseQueue myResponseQueue
 
DtString myName
 
DtString myInfo
 
DtMutex myMutex
 
CommandThreadMap myRunningCommandThreads
 Running command threads. More...
 

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 Fri May 31 15:45:35 EDT 2024 from SVN revision 266500
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)