Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IDEA::MetaTimingService Class Reference

The meta timing service orhestrates multiple timing services to run in sync. More...

#include <MetaTimingService.hh>

Inheritance diagram for IDEA::MetaTimingService:

IDEA::Singleton< MetaTimingService > List of all members.

Public Methods

bool activate (int tscale, bool warp, const std::string &poolName)
 Activates the invoking meta timing service. Returns true if activated, returns false if already activated.

void deActivate ()
 De-activates the invoking timing service if activated.

 ~MetaTimingService ()
 Destructor.

void registerTimingService (const std::string &name)
 Registers a timing-service instance by the name name.

Time getWarpTime () const
 Returns the time we can warp to (which is the minimum warp to time of the individual registered timing services). If there is at least one timing service which can not warp to a time in the future this method returns Time::zero.

bool canWarp () const
 Returns true if all registered timing-service instances can warp, otherwise returns false.

void canWarpTo (const std::string &name, const Time &time)
 Notifies the invoking meta timing service the timing service by the name name can warp to time time.

void warp (const Time &at, const Time &warpTo, double timescale) const
 Warp all timing-service instances at time at to have pivot-date pivot with timescale timescale.

void setDeltaBeforeWarp (const Time &delta)
const TimegetDeltaBeforeWarp () const
void registerCommunicationLayer (MetaCommunicationRelay *layer, bool deleteInstance)
 Register a MetaCommunicationRelay instance to use for communicating, if deleteInstance is true the invoking class takes over the lifecycle of layer.


Static Public Methods

MetaTimingService * instance ()

Static Protected Methods

MetaTimingService *& getInstance ()
 The instance.

void release ()

Private Types

typedef std::map< std::string,
Time
String2TimeMap

Private Methods

 MetaTimingService ()
 Constructor.


Private Attributes

StringVector m_RegisteredTimingServices
 Vector of registered timing-services.

String2TimeMap m_WarpCandidates
 Stores all the timing-services that can warp together with the time they can warp to.

SharedTimingServicem_SharedTimingService
 The meta timing service needs to have a notion of time also, this member variable takes care of that.

MetaCommunicationRelay * m_CommunicationLayer
 Layer responsible for communicating with all the registered timingservices.

bool m_DeleteCommunicationLayer
 Boolean indicating if the attribute m_CommunicationLayer needs to be deleted at the end of the lifecycle of the class instance.

Time m_DeltaBeforeWarp
 This is the time we schedule to warp in advance, for example if we decide to warp we schedule at 'NOW' + m_DeltaBeforeWarp to warp. The m_DeltaBeforeWarp should cover any communication latency to get the message out to the registered timing-services.

bool m_Activated
 Boolean indicating if the meta timing service has been activated.


Detailed Description

The meta timing service orhestrates multiple timing services to run in sync.

class MetaTimingService


Member Typedef Documentation

typedef std::map< std::string, Time > IDEA::MetaTimingService::String2TimeMap [private]
 


Constructor & Destructor Documentation

IDEA::MetaTimingService::~MetaTimingService  
 

Destructor.

IDEA::MetaTimingService::MetaTimingService   [private]
 

Constructor.


Member Function Documentation

bool IDEA::MetaTimingService::activate int    tscale,
bool    warp,
const std::string &    poolName
 

Activates the invoking meta timing service. Returns true if activated, returns false if already activated.

bool IDEA::MetaTimingService::canWarp  
 

Returns true if all registered timing-service instances can warp, otherwise returns false.

void IDEA::MetaTimingService::canWarpTo const std::string &    name,
const Time   time
 

Notifies the invoking meta timing service the timing service by the name name can warp to time time.

void IDEA::MetaTimingService::deActivate  
 

De-activates the invoking timing service if activated.

const Time & IDEA::MetaTimingService::getDeltaBeforeWarp  
 

MetaTimingService*& IDEA::Singleton< MetaTimingService >::getInstance   [inline, static, protected, inherited]
 

The instance.

This pattern is used to prevent "static initialization order fiasco" (Google this for better understanding)

Time IDEA::MetaTimingService::getWarpTime  
 

Returns the time we can warp to (which is the minimum warp to time of the individual registered timing services). If there is at least one timing service which can not warp to a time in the future this method returns Time::zero.

MetaTimingService* IDEA::Singleton< MetaTimingService >::instance   [inline, static, inherited]
 

void IDEA::MetaTimingService::registerCommunicationLayer MetaCommunicationRelay *    layer,
bool    deleteInstance
 

Register a MetaCommunicationRelay instance to use for communicating, if deleteInstance is true the invoking class takes over the lifecycle of layer.

void IDEA::MetaTimingService::registerTimingService const std::string &    name
 

Registers a timing-service instance by the name name.

void IDEA::Singleton< MetaTimingService >::release   [inline, static, protected, inherited]
 

void IDEA::MetaTimingService::setDeltaBeforeWarp const Time   delta
 

void IDEA::MetaTimingService::warp const Time   at,
const Time   warpTo,
double    timescale
const
 

Warp all timing-service instances at time at to have pivot-date pivot with timescale timescale.


Member Data Documentation

bool IDEA::MetaTimingService::m_Activated [private]
 

Boolean indicating if the meta timing service has been activated.

MetaCommunicationRelay* IDEA::MetaTimingService::m_CommunicationLayer [private]
 

Layer responsible for communicating with all the registered timingservices.

bool IDEA::MetaTimingService::m_DeleteCommunicationLayer [private]
 

Boolean indicating if the attribute m_CommunicationLayer needs to be deleted at the end of the lifecycle of the class instance.

Time IDEA::MetaTimingService::m_DeltaBeforeWarp [private]
 

This is the time we schedule to warp in advance, for example if we decide to warp we schedule at 'NOW' + m_DeltaBeforeWarp to warp. The m_DeltaBeforeWarp should cover any communication latency to get the message out to the registered timing-services.

StringVector IDEA::MetaTimingService::m_RegisteredTimingServices [private]
 

Vector of registered timing-services.

SharedTimingService* IDEA::MetaTimingService::m_SharedTimingService [private]
 

The meta timing service needs to have a notion of time also, this member variable takes care of that.

String2TimeMap IDEA::MetaTimingService::m_WarpCandidates [private]
 

Stores all the timing-services that can warp together with the time they can warp to.


Contact information
© IDEA
Generated on Fri Feb 3 17:09:45 2006 for IDEA.