| helics 3.6.1

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

`#include <AsyncTimeCoordinator.hpp>`

Inheritance diagram for helics::AsyncTimeCoordinator:

## Public Member Functions
virtual bool | updateTimeFactors () 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
virtual TimeProcessingResult | processTimeMessage (const ActionMessage &cmd)
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
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 time coordinator that explicitly allows asynchronous operation of the federates – that is, the federates are not time synchronized and are allowed to operate ahead of others. Potential uses are: 1) the use of an external time coordination mechanism, 2) a purely command driven system, 3) all federates are operated in real time mode, 4) you don't care about the data and just want to see how fast all the federates go on their own.

This time coordinator does only minimal time keeping for entry to execution mode and allows asynchronous operation of the federation

## Member Function Documentation

## ◆ checkExecEntry()

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

check if entry to the executing state can be granted

Implements helics::BaseTimeCoordinator.

References helics::CONTINUE_PROCESSING, helics::BaseTimeCoordinator::executionMode, helics::BaseTimeCoordinator::mSourceId, helics::NEXT_STEP, helics::ActionMessage::source_id, and helics::timeZero.

## ◆ generateDebuggingTimeInfo()

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

generate debugging time information

Reimplemented from helics::BaseTimeCoordinator.

References helics::BaseTimeCoordinator::generateDebuggingTimeInfo().

## ◆ getNextTime()

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

get the current next time

Implements helics::BaseTimeCoordinator.

## ◆ printTimeStatus()

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

generate a string with the current time status

Implements helics::BaseTimeCoordinator.

## ◆ updateTimeFactors()

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

compute updates to time values and send an update if needed

Implements helics::BaseTimeCoordinator.

References helics::BaseTimeCoordinator::dependencies, and helics::BaseTimeCoordinator::mSourceId.

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

- AsyncTimeCoordinator.hpp
- AsyncTimeCoordinator.cpp