| helics 3.6.1

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

`#include <GlobalTimeCoordinator.hpp>`

Inheritance diagram for helics::GlobalTimeCoordinator:

## 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 | mNewRequest
| flag indicating a new request has been received since the last sequence Update More...
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 implementing a global time coordination in a non distributed fashion

## Member Function Documentation

## ◆ checkExecEntry()

MessageProcessingResult helics::GlobalTimeCoordinator::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, helics::BaseTimeCoordinator::dependencies, helics::ActionMessage::dest_id, HELICS_LOG_LEVEL_WARNING, helics::ActionMessage::messageID, helics::BaseTimeCoordinator::mSourceId, helics::BaseTimeCoordinator::sendMessageFunction, and helics::ActionMessage::source_id.

## ◆ generateDebuggingTimeInfo()

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

generate debugging time information

Reimplemented from helics::BaseTimeCoordinator.

References helics::BaseTimeCoordinator::executionMode, and helics::BaseTimeCoordinator::generateDebuggingTimeInfo().

## ◆ getNextTime()

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

get the current next time

Implements helics::BaseTimeCoordinator.

## ◆ printTimeStatus()

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

generate a string with the current time status

Implements helics::BaseTimeCoordinator.

## ◆ processTimeMessage()

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

process a message related to time

Returns
  a TimeProcessingResult if it did anything

Reimplemented from helics::BaseTimeCoordinator.

References mNewRequest, helics::PROCESSED_NEW_REQUEST, and helics::BaseTimeCoordinator::processTimeMessage().

## ◆ updateTimeFactors()

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

compute updates to time values and send an update if needed

Implements helics::BaseTimeCoordinator.

References helics::ActionMessage::actionTime, helics::cBigTime, helics::ActionMessage::counter, helics::BaseTimeCoordinator::dependencies, helics::ActionMessage::dest_id, mNewRequest, helics::BaseTimeCoordinator::mSourceId, helics::BaseTimeCoordinator::sendMessageFunction, helics::BaseTimeCoordinator::sequenceCounter, helics::ActionMessage::setExtraDestData(), helics::ActionMessage::Tdemin, helics::ActionMessage::Te, and helics::TimeDependencies::verifySequenceCounter().

## Member Data Documentation

## ◆ mNewRequest

bool helics::GlobalTimeCoordinator::mNewRequest
| protected

Initial value:
{
true}

flag indicating a new request has been received since the last sequence Update

Referenced by processTimeMessage(), and updateTimeFactors().

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

- GlobalTimeCoordinator.hpp
- GlobalTimeCoordinator.cpp