| helics 3.6.1

Public Member Functions | Protected Attributes | List of all members
helics::ForwardingTimeCoordinator Class Reference

`#include <ForwardingTimeCoordinator.hpp>`

Inheritance diagram for helics::ForwardingTimeCoordinator:

## Public Member Functions
virtual bool | updateTimeFactors () override
virtual TimeProcessingResult | processTimeMessage (const ActionMessage &cmd) override
virtual MessageProcessingResult | checkExecEntry (GlobalFederateId triggerFed=GlobalFederateId{}) override
virtual std::string | printTimeStatus () const override
virtual void | generateDebuggingTimeInfo (nlohmann::json &base) const override
virtual Time | getNextTime () const override
Public Member Functions inherited from helics::BaseTimeCoordinator
| BaseTimeCoordinator (std::function< void(const ActionMessage &)> userSendMessageFunction)
void | setMessageSender (std::function< void(const ActionMessage &)> userSendMessageFunction)
void | setRestrictivePolicy (bool policy)
std::vector< GlobalFederateId > | getDependencies () const
std::vector< GlobalFederateId > | getDependents () const
Time | getLastGrant (GlobalFederateId fedId) const
void | setSourceId (GlobalFederateId sourceId)
GlobalFederateId | sourceId () const
const DependencyInfo * | getDependencyInfo (GlobalFederateId ofed) const
bool | isDependency (GlobalFederateId ofed) const
bool | empty () const
void | processDependencyUpdateMessage (const ActionMessage &cmd)
virtual bool | addDependency (GlobalFederateId fedID)
virtual bool | addDependent (GlobalFederateId fedID)
virtual void | removeDependency (GlobalFederateId fedID)
virtual void | removeDependent (GlobalFederateId fedID)
virtual void | resetDependency (GlobalFederateId fedID)
void | setAsChild (GlobalFederateId fedID)
void | setAsParent (GlobalFederateId fedID)
void | setVersion (GlobalFederateId fedID, std::int8_t version)
GlobalFederateId | getParent () const
void | disconnect ()
virtual void | enteringExecMode (IterationRequest mode=IterationRequest::NO_ITERATIONS)
bool | hasActiveTimeDependencies () const
int | dependencyCount () const
GlobalFederateId | getMinDependency () const
nlohmann::json | grantTimeoutCheck (const ActionMessage &cmd)

## Protected Attributes
bool | iterating {false}
| flag indicating that the min dependency is iterating
bool | ignoreMinFed {false}
| flag indicating that minFed Controls should not be used
std::int32_t | sequenceModifier {0}
Protected Attributes inherited from helics::BaseTimeCoordinator
TimeDependencies | dependencies
std::function< void(const ActionMessage &)> | sendMessageFunction
| callback used to send the messages
GlobalFederateId | mSourceId {0}
| the identifier for inserting into the source id field of any generated messages;
std::int32_t | sequenceCounter {0}
| storage for sequence counter
bool | noParent {true}
| indicator that the coordinator does not have parents
bool | federatesOnly {false}
| indicator that the forwarder only operates with federates
bool | checkingExec {false}
bool | executionMode {false}
bool | restrictive_time_policy {false}
| flag indicating that a restrictive time policy should be used
bool | nonGranting {false}
bool | delayedTiming {false}
bool | disconnected {false}

## Additional Inherited Members
Static Public Attributes inherited from helics::BaseTimeCoordinator
static constexpr std::int32_t | TIME_COORDINATOR_VERSION {1}
Protected Member Functions inherited from helics::BaseTimeCoordinator
ActionMessage | generateTimeRequest (const TimeData &dep, GlobalFederateId fed, std::int32_t responseCode) const
void | sendTimingInfo ()

## Detailed Description

class managing the coordination of time in HELICS for forwarding object (cores, brokers) the time coordinator manages dependencies and computes whether time can advance or enter execution mode

## Member Function Documentation

## ◆ checkExecEntry()

MessageProcessingResult helics::ForwardingTimeCoordinator::checkExecEntry | ( | GlobalFederateId | triggerFed = `GlobalFederateId{}` | ) |
| override virtual

check if entry to the executing state can be granted

Implements helics::BaseTimeCoordinator.

References helics::TimeDependencies::checkIfReadyForExecEntry(), helics::CONTINUE_PROCESSING, and helics::BaseTimeCoordinator::dependencies.

## ◆ generateDebuggingTimeInfo()

void helics::ForwardingTimeCoordinator::generateDebuggingTimeInfo | ( | nlohmann::json & | base | ) | const
| override virtual

generate debugging time information

Reimplemented from helics::BaseTimeCoordinator.

References helics::BaseTimeCoordinator::generateDebuggingTimeInfo().

## ◆ getNextTime()

virtual Time helics::ForwardingTimeCoordinator::getNextTime | ( |  | ) | const
| inline override virtual

get the current next time

Implements helics::BaseTimeCoordinator.

References helics::TimeData::next.

## ◆ printTimeStatus()

std::string helics::ForwardingTimeCoordinator::printTimeStatus | ( |  | ) | const
| override virtual

generate a string with the current time status

Implements helics::BaseTimeCoordinator.

References helics::TimeData::minDe, helics::TimeData::next, and helics::TimeData::Te.

## ◆ processTimeMessage()

TimeProcessingResult helics::ForwardingTimeCoordinator::processTimeMessage | ( | const ActionMessage & | cmd | ) |
| override virtual

process a message related to time

Returns
  a TimeProcessingResult if it did anything

Reimplemented from helics::BaseTimeCoordinator.

References helics::PROCESSED_NEW_REQUEST, helics::BaseTimeCoordinator::processTimeMessage(), helics::BaseTimeCoordinator::sequenceCounter, and helics::TimeData::sequenceCounter.

## ◆ updateTimeFactors()

bool helics::ForwardingTimeCoordinator::updateTimeFactors | ( |  | ) |
| override virtual

compute updates to time values and send an update if needed

Implements helics::BaseTimeCoordinator.

References helics::BaseTimeCoordinator::dependencies, helics::BaseTimeCoordinator::mSourceId, helics::BaseTimeCoordinator::noParent, helics::BaseTimeCoordinator::restrictive_time_policy, and helics::BaseTimeCoordinator::sequenceCounter.

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

- ForwardingTimeCoordinator.hpp
- ForwardingTimeCoordinator.cpp