helics  3.3.0
Public Member Functions | List of all members
helics::TimeDependencies Class Reference

#include <TimeDependencies.hpp>

Public Member Functions

 TimeDependencies ()=default
 
bool isDependency (GlobalFederateId ofed) const
 
bool isDependent (GlobalFederateId ofed) const
 
bool addDependency (GlobalFederateId id)
 
void removeDependency (GlobalFederateId id)
 
bool addDependent (GlobalFederateId id)
 
void removeDependent (GlobalFederateId id)
 
void removeInterdependence (GlobalFederateId id)
 
DependencyProcessingResult updateTime (const ActionMessage &m)
 
auto size () const
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
auto cbegin () const
 
auto cend () const
 
bool empty () const
 
const DependencyInfogetDependencyInfo (GlobalFederateId id) const
 
DependencyInfogetDependencyInfo (GlobalFederateId id)
 
bool checkIfReadyForExecEntry (bool iterating, bool waiting) const
 
bool checkAllPastExec (bool iterating) const
 
bool checkIfReadyForTimeGrant (bool iterating, Time desiredGrantTime, GrantDelayMode delayMode) const
 
void resetIteratingExecRequests ()
 
void resetIteratingTimeRequests (Time requestTime)
 
void resetDependentEvents (Time grantTime)
 
bool hasActiveTimeDependencies () const
 
bool verifySequenceCounter (Time tmin, std::int32_t sq)
 
int activeDependencyCount () const
 
GlobalFederateId getMinDependency () const
 
void setDependencyVector (const std::vector< DependencyInfo > &deps)
 
std::pair< int, std::string > checkForIssues (bool waiting) const
 
bool hasDelayedDependency () const
 
GlobalFederateId delayedDependency () const
 

Detailed Description

class for managing a set of dependencies

Constructor & Destructor Documentation

◆ TimeDependencies()

helics::TimeDependencies::TimeDependencies ( )
default

default constructor

Member Function Documentation

◆ activeDependencyCount()

int helics::TimeDependencies::activeDependencyCount ( ) const

get a count of the active dependencies

Referenced by helics::BaseTimeCoordinator::dependencyCount().

◆ addDependency()

bool helics::TimeDependencies::addDependency ( GlobalFederateId  id)

insert a dependency into the structure

Returns
true if the dependency was added, false if it existed already

Referenced by helics::BaseTimeCoordinator::addDependency().

◆ addDependent()

bool helics::TimeDependencies::addDependent ( GlobalFederateId  id)

update the info about a dependency based on a message

Referenced by helics::BaseTimeCoordinator::addDependent().

◆ begin() [1/2]

auto helics::TimeDependencies::begin ( )
inline

iterator to first dependency

Referenced by helics::BaseTimeCoordinator::disconnect(), and helics::TimeCoordinator::localError().

◆ begin() [2/2]

auto helics::TimeDependencies::begin ( ) const
inline

const iterator to first dependency

◆ cbegin()

auto helics::TimeDependencies::cbegin ( ) const
inline

const iterator to first dependency

◆ cend()

auto helics::TimeDependencies::cend ( ) const
inline

const iterator to first dependency

◆ checkAllPastExec()

bool helics::TimeDependencies::checkAllPastExec ( bool  iterating) const

check if all dependencies have passed exec mode and are requesting time

Referenced by helics::TimeCoordinator::checkExecEntry().

◆ checkForIssues()

std::pair< int, std::string > helics::TimeDependencies::checkForIssues ( bool  waiting) const

check the dependency set for any issues

Returns
an error code and string containing an error description

Referenced by helics::BaseTimeCoordinator::enteringExecMode(), and helics::TimeCoordinator::enteringExecMode().

◆ checkIfReadyForExecEntry()

bool helics::TimeDependencies::checkIfReadyForExecEntry ( bool  iterating,
bool  waiting 
) const

◆ checkIfReadyForTimeGrant()

bool helics::TimeDependencies::checkIfReadyForTimeGrant ( bool  iterating,
Time  desiredGrantTime,
GrantDelayMode  delayMode 
) const

check if the dependencies would allow a grant of the time

Parameters
iteratingtrue if the object is iterating
desiredGrantTimethe time to check for granting
Returns
true if the object is ready

References helics::cBigTime.

Referenced by helics::TimeCoordinator::checkTimeGrant().

◆ empty()

bool helics::TimeDependencies::empty ( ) const
inline

◆ end() [1/2]

auto helics::TimeDependencies::end ( )
inline

iterator to end point

◆ end() [2/2]

auto helics::TimeDependencies::end ( ) const
inline

const iterator to end point

◆ getDependencyInfo() [1/2]

DependencyInfo * helics::TimeDependencies::getDependencyInfo ( GlobalFederateId  id)

get a pointer to the dependency information for a particular object

◆ getDependencyInfo() [2/2]

const DependencyInfo * helics::TimeDependencies::getDependencyInfo ( GlobalFederateId  id) const

◆ getMinDependency()

GlobalFederateId helics::TimeDependencies::getMinDependency ( ) const

get a count of the active dependencies

References helics::cBigTime.

Referenced by helics::BaseTimeCoordinator::getMinDependency().

◆ hasActiveTimeDependencies()

bool helics::TimeDependencies::hasActiveTimeDependencies ( ) const

check if there are active dependencies

Referenced by helics::BaseTimeCoordinator::hasActiveTimeDependencies().

◆ isDependency()

bool helics::TimeDependencies::isDependency ( GlobalFederateId  ofed) const

return true if the given federate is already a dependency

Referenced by helics::BaseTimeCoordinator::isDependency().

◆ isDependent()

bool helics::TimeDependencies::isDependent ( GlobalFederateId  ofed) const

return true if the given federate is already a dependent

◆ removeDependency()

void helics::TimeDependencies::removeDependency ( GlobalFederateId  id)

remove dependency from consideration

Referenced by helics::BaseTimeCoordinator::removeDependency(), and helics::TimeCoordinator::removeDependency().

◆ removeDependent()

void helics::TimeDependencies::removeDependent ( GlobalFederateId  id)

remove dependent from consideration

Referenced by helics::BaseTimeCoordinator::removeDependent(), and helics::TimeCoordinator::removeDependent().

◆ removeInterdependence()

void helics::TimeDependencies::removeInterdependence ( GlobalFederateId  id)

remove an interdependency from consideration

◆ resetDependentEvents()

void helics::TimeDependencies::resetDependentEvents ( helics::Time  grantTime)

reset the tdeMin

Referenced by helics::TimeCoordinator::timeRequest().

◆ resetIteratingExecRequests()

void helics::TimeDependencies::resetIteratingExecRequests ( )

reset the iterative exec requests to prepare for the next iteration

◆ resetIteratingTimeRequests()

void helics::TimeDependencies::resetIteratingTimeRequests ( helics::Time  requestTime)

reset iterative time requests to prepare for next iteration

Parameters
requestTimethe time that is being iterated

◆ size()

auto helics::TimeDependencies::size ( ) const
inline

◆ updateTime()

DependencyProcessingResult helics::TimeDependencies::updateTime ( const ActionMessage m)

◆ verifySequenceCounter()

bool helics::TimeDependencies::verifySequenceCounter ( Time  tmin,
std::int32_t  sq 
)

verify that all the sequence Counters match

Referenced by helics::GlobalTimeCoordinator::updateTimeFactors().


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