TimeManagement Class Reference

#include <TimeManagement.hh>

Inheritance diagram for TimeManagement:

Inheritance graph
[legend]

List of all members.

Public Types

enum  {
  NO_TICK, TICK_BLOCKING, TICK_NEXT, TICK_CALLBACK,
  TICK_RETURN
}

Public Member Functions

 TimeManagement (Communications *, Queues *, FederationManagement *, DeclarationManagement *, ObjectManagement *, OwnershipManagement *)
 Constructor.
void nextEventRequest (FederationTime heure_logique, TypeException &e)
void nextEventRequestAvailable (FederationTime heure_logique, TypeException &e)
bool tick (TypeException &e)
void timeAdvanceRequest (FederationTime heure_logique, TypeException &e)
void timeAdvanceRequestAvailable (FederationTime heure_logique, TypeException &e)
bool testValidTime (FederationTime theTime)
void setLookahead (FederationTimeDelta lookahead, TypeException &e)
void setTimeConstrained (bool etat, TypeException &e)
void setTimeRegulating (bool etat, FederationTime heure_logique, FederationTimeDelta lookahead, TypeException &e)
void StopperAvanceTemps ()
FederationTime requestFederationTime ()
FederationTime requestFederateTime ()
FederationTimeDelta requestLookahead ()
FederationTime requestMinNextEventTime ()
 Return the min of LBTS and the time stamp of the next TSO message.
FederationTime requestLBTS ()
bool requestContraintState ()
bool requestRegulateurState ()

Public Attributes

enum
certi::rtia::TimeManagement:: { ... }  
_tick_state
bool _tick_multiple
bool _tick_result
RTI::TickTime _tick_timeout
RTI::TickTime _tick_stop_time
bool _asynchronous_delivery

Private Member Functions

void advance (bool &msg_restant, TypeException &e)
void timeAdvance (bool &msg_restant, TypeException &e)
void nextEventAdvance (bool &msg_restant, TypeException &e)
void timeAdvanceGrant (FederationTime, TypeException &)
void flushQueueRequest (FederationTime, TypeException &)
 Not implemented.
bool executeFederateService (NetworkMessage &msg)
 Deliver TSO messages to federate (UAV, ReceiveInteraction, etc...).
void sendNullMessage (FederationTime heure_logique)
 Send a null message to RTIG containing Local Time + Lookahead.
void timeRegulationEnabled (FederationTime, TypeException &e)
void timeConstrainedEnabled (FederationTime, TypeException &e)

Private Attributes

Communicationscomm
Queuesqueues
FederationManagementfm
DeclarationManagementdm
ObjectManagementom
OwnershipManagementowm
FederationTime lastNullMessageDate
 Federate State.
TypeAvancee _avancee_en_cours
 Type/date from last request (timeAdvance, nextEvent, flushQueue).
FederationTime date_avancee
TypeGrantedState _type_granted_state
FederationTime _heure_courante
FederationTimeDelta _lookahead_courant
bool _est_regulateur
bool _est_contraint


Detailed Description

Definition at line 73 of file TimeManagement.hh.


Member Enumeration Documentation

anonymous enum

Enumerator:
NO_TICK 
TICK_BLOCKING 
TICK_NEXT 
TICK_CALLBACK 
TICK_RETURN 

Definition at line 111 of file TimeManagement.hh.


Constructor & Destructor Documentation


Member Function Documentation

void nextEventRequest ( FederationTime  heure_logique,
TypeException e 
)

void nextEventRequestAvailable ( FederationTime  heure_logique,
TypeException e 
)

bool tick ( TypeException e  ) 

Federate calls either nextEventRequest or timeAdvanceRequest to determine which time to attain. It then calls tick() until a timeAdvanceGrant is made.

Definition at line 761 of file TimeManagement.cc.

References TimeManagement::_asynchronous_delivery, TimeManagement::_avancee_en_cours, TimeManagement::_est_contraint, TimeManagement::advance(), certi::rtia::D, TimeManagement::executeFederateService(), certi::rtia::G, Queues::giveCommandMessage(), Queues::giveFifoMessage(), PrettyDebug::Out(), certi::rtia::PAS_D_AVANCEE, pdDebug, pdGendoc, and TimeManagement::queues.

Referenced by RTIA::processOngoingTick().

Here is the call graph for this function:

void timeAdvanceRequest ( FederationTime  logical_time,
TypeException e 
)

void timeAdvanceRequestAvailable ( FederationTime  heure_logique,
TypeException e 
)

bool testValidTime ( FederationTime  theTime  ) 

void setLookahead ( FederationTimeDelta  lookahead,
TypeException e 
)

void setTimeConstrained ( bool  etat,
TypeException e 
)

void setTimeRegulating ( bool  etat,
FederationTime  heure_logique,
FederationTimeDelta  lookahead,
TypeException e 
)

void StopperAvanceTemps (  )  [inline]

FederationTime requestFederationTime (  ) 

Definition at line 551 of file TimeManagement.cc.

References LBTS::_LBTS.

FederationTime requestFederateTime (  )  [inline]

FederationTimeDelta requestLookahead (  ) 

FederationTime requestMinNextEventTime (  ) 

Return the min of LBTS and the time stamp of the next TSO message.

Definition at line 565 of file TimeManagement.cc.

References LBTS::_LBTS, certi::rtia::D, FedTime::getTime(), Queues::nextTsoDate(), PrettyDebug::Out(), pdRegister, and TimeManagement::queues.

Referenced by RTIA::chooseFederateProcessing().

Here is the call graph for this function:

FederationTime requestLBTS (  )  [inline]

Definition at line 106 of file TimeManagement.hh.

References LBTS::_LBTS.

Referenced by RTIA::chooseFederateProcessing().

bool requestContraintState (  )  [inline]

Definition at line 107 of file TimeManagement.hh.

References TimeManagement::_est_contraint.

Referenced by RTIA::processNetworkMessage().

bool requestRegulateurState (  )  [inline]

void advance ( bool &  msg_restant,
TypeException e 
) [private]

This method is called by tick(). Calls are dispatched between timeAdvance and nextEventAdvance.

Definition at line 45 of file TimeManagement.cc.

References TimeManagement::_avancee_en_cours, certi::rtia::D, certi::rtia::NER, certi::rtia::NERA, TimeManagement::nextEventAdvance(), PrettyDebug::Out(), pdTrace, certi::rtia::TAR, certi::rtia::TARA, and TimeManagement::timeAdvance().

Referenced by TimeManagement::tick().

Here is the call graph for this function:

void timeAdvance ( bool &  msg_restant,
TypeException e 
) [private]

timeAdvance is called by advance which is called by tick. This call is done only if request type does correspond. It delivers TSO messages to federate and if no messages are available, delivers a TimeAdvanceGrant.

Definition at line 824 of file TimeManagement.cc.

References TimeManagement::_avancee_en_cours, TimeManagement::_est_contraint, LBTS::_LBTS, TimeManagement::_lookahead_courant, certi::rtia::D, TimeManagement::date_avancee, certi::e_NO_EXCEPTION, TimeManagement::executeFederateService(), certi::rtia::G, FedTime::getTime(), Queues::giveTsoMessage(), PrettyDebug::Out(), certi::rtia::PAS_D_AVANCEE, pdDebug, pdGendoc, TimeManagement::queues, certi::rtia::TARA, and TimeManagement::timeAdvanceGrant().

Referenced by TimeManagement::advance().

Here is the call graph for this function:

void nextEventAdvance ( bool &  msg_restant,
TypeException e 
) [private]

nextEventAdvance is called by advance which is called by tick. This call is done only if request type does correspond. It delivers TSO messages to federate and if no messages are available, delivers a TimeAdvanceGrant.

Definition at line 413 of file TimeManagement.cc.

References TimeManagement::_avancee_en_cours, TimeManagement::_est_contraint, TimeManagement::_est_regulateur, LBTS::_LBTS, TimeManagement::date_avancee, TimeManagement::executeFederateService(), certi::rtia::G, Queues::giveTsoMessage(), Queues::nextTsoDate(), PrettyDebug::Out(), certi::rtia::PAS_D_AVANCEE, pdGendoc, TimeManagement::queues, TimeManagement::sendNullMessage(), and TimeManagement::timeAdvanceGrant().

Referenced by TimeManagement::advance().

Here is the call graph for this function:

void timeAdvanceGrant ( FederationTime  logical_time,
TypeException e 
) [private]

void flushQueueRequest ( FederationTime  heure_logique,
TypeException e 
) [private]

bool executeFederateService ( NetworkMessage msg  )  [private]

Deliver TSO messages to federate (UAV, ReceiveInteraction, etc...).

Definition at line 124 of file TimeManagement.cc.

References TimeManagement::_tick_state, NetworkMessage::ANNOUNCE_SYNCHRONIZATION_POINT, FederationManagement::announceSynchronizationPoint(), NetworkMessage::ATTRIBUTE_IS_NOT_OWNED, NetworkMessage::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION, NetworkMessage::ATTRIBUTE_OWNERSHIP_UNAVAILABLE, OwnershipManagement::attributeIsNotOwned(), OwnershipManagement::attributeOwnershipAcquisitionNotification(), OwnershipManagement::attributeOwnershipDivestitureNotification(), OwnershipManagement::attributeOwnershipUnavailable(), NetworkMessage::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION, OwnershipManagement::confirmAttributeOwnershipAcquisitionCancellation(), certi::rtia::D, NetworkMessage::DISCOVER_OBJECT, ObjectManagement::discoverObject(), TimeManagement::dm, NetworkMessage::eventRetraction, NetworkMessage::federate, NetworkMessage::FEDERATION_NOT_RESTORED, NetworkMessage::FEDERATION_NOT_SAVED, NetworkMessage::FEDERATION_RESTORE_BEGUN, NetworkMessage::FEDERATION_RESTORED, NetworkMessage::FEDERATION_SAVED, NetworkMessage::FEDERATION_SYNCHRONIZED, FederationManagement::federationRestoreBegun(), FederationManagement::federationRestoredStatus(), FederationManagement::federationSavedStatus(), FederationManagement::federationSynchronized(), TimeManagement::fm, certi::rtia::G, NetworkMessage::getAttribValueArray(), NetworkMessage::getDate(), NetworkMessage::getLabel(), NetworkMessage::getName(), NetworkMessage::getParamValueArray(), NetworkMessage::getTag(), NetworkMessage::getType(), NetworkMessage::handleArray, NetworkMessage::handleArraySize, NetworkMessage::INFORM_ATTRIBUTE_OWNERSHIP, OwnershipManagement::informAttributeOwnership(), NetworkMessage::INITIATE_FEDERATE_RESTORE, NetworkMessage::INITIATE_FEDERATE_SAVE, FederationManagement::initiateFederateRestore(), FederationManagement::initiateFederateSave(), NetworkMessage::interactionClass, NetworkMessage::isDated(), NetworkMessage::object, NetworkMessage::objectClass, TimeManagement::om, PrettyDebug::Out(), TimeManagement::owm, pdExcept, pdGendoc, pdInit, pdRequest, NetworkMessage::PROVIDE_ATTRIBUTE_VALUE_UPDATE, ObjectManagement::provideAttributeValueUpdate(), NetworkMessage::RECEIVE_INTERACTION, ObjectManagement::receiveInteraction(), NetworkMessage::REFLECT_ATTRIBUTE_VALUES, ObjectManagement::reflectAttributeValues(), NetworkMessage::REMOVE_OBJECT, ObjectManagement::removeObject(), NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION, NetworkMessage::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE, NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED, NetworkMessage::REQUEST_FEDERATION_RESTORE_SUCCEEDED, OwnershipManagement::requestAttributeOwnershipAssumption(), OwnershipManagement::requestAttributeOwnershipRelease(), FederationManagement::requestFederationRestoreStatus(), NetworkMessage::START_REGISTRATION_FOR_OBJECT_CLASS, DeclarationManagement::startRegistrationForObjectClass(), NetworkMessage::SYNCHRONIZATION_POINT_REGISTRATION_SUCCEEDED, FederationManagement::synchronizationPointRegistrationSucceeded(), TimeManagement::TICK_NEXT, NetworkMessage::TIME_CONSTRAINED_ENABLED, NetworkMessage::TIME_REGULATION_ENABLED, TimeManagement::timeConstrainedEnabled(), and TimeManagement::timeRegulationEnabled().

Referenced by TimeManagement::nextEventAdvance(), TimeManagement::tick(), and TimeManagement::timeAdvance().

Here is the call graph for this function:

void sendNullMessage ( FederationTime  heure_logique  )  [private]

void timeRegulationEnabled ( FederationTime  theTime,
TypeException e 
) [private]

void timeConstrainedEnabled ( FederationTime  theTime,
TypeException e 
) [private]


Member Data Documentation

enum { ... } _tick_state

Definition at line 118 of file TimeManagement.hh.

Referenced by RTIA::chooseFederateProcessing(), and RTIA::processOngoingTick().

Definition at line 119 of file TimeManagement.hh.

Referenced by RTIA::chooseFederateProcessing(), and RTIA::processOngoingTick().

Definition at line 120 of file TimeManagement.hh.

Referenced by RTIA::chooseFederateProcessing(), and RTIA::execute().

Definition at line 121 of file TimeManagement.hh.

Referenced by RTIA::chooseFederateProcessing(), and RTIA::processOngoingTick().

Communications* comm [private]

Queues* queues [private]

ObjectManagement* om [private]

Federate State.

Definition at line 145 of file TimeManagement.hh.

Referenced by TimeManagement::sendNullMessage(), and TimeManagement::TimeManagement().

bool _est_regulateur [private]

bool _est_contraint [private]


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

Generated on Thu Apr 30 16:00:18 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5