![]() |
helics
3.0.1
|
#include <ForwardingTimeCoordinator.hpp>
Public Attributes | |
GlobalFederateId | source_id {0} |
the identifier for inserting into the source id field of any generated messages; | |
GlobalFederateId | delayedFederate {} |
bool | checkingExec {false} |
flag indicating that the coordinator is trying to enter the exec mode | |
bool | executionMode {false} |
flag that the coordinator has entered the execution Mode | |
bool | iterating {false} |
flag indicating that the min dependency is iterating | |
bool | ignoreMinFed {false} |
bool | restrictive_time_policy {false} |
flag indicating that a restrictive time policy should be used | |
bool | noParent {false} |
indicator that the coordinator does not have parents | |
bool | hasDelayedTimingFederate {false} |
indicator that federate is using delayed timing | |
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
bool helics::ForwardingTimeCoordinator::addDependency | ( | GlobalFederateId | fedID | ) |
add a federate dependency
References helics::TimeDependencies::addDependency().
Referenced by processDependencyUpdateMessage().
bool helics::ForwardingTimeCoordinator::addDependent | ( | GlobalFederateId | fedID | ) |
add a dependent federate
References helics::TimeDependencies::addDependent().
Referenced by processDependencyUpdateMessage().
MessageProcessingResult helics::ForwardingTimeCoordinator::checkExecEntry | ( | ) |
check if entry to the executing state can be granted
References helics::TimeDependencies::checkIfReadyForExecEntry(), helics::CONTINUE_PROCESSING, helics::ActionMessage::dest_id, helics::ERROR_RESULT, executionMode, hasDelayedTimingFederate, helics::ActionMessage::messageID, helics::TimeData::minDe, helics::TimeData::next, helics::NEXT_STEP, helics::parent_broker_id, helics::ActionMessage::payload, helics::ActionMessage::source_id, source_id, and helics::timeZero.
int helics::ForwardingTimeCoordinator::dependencyCount | ( | ) | const |
get a count of the active dependencies
References helics::TimeDependencies::activeDependencyCount().
void helics::ForwardingTimeCoordinator::disconnect | ( | ) |
|
inline |
check whether a timeCoordinator has any dependencies or dependents
References helics::TimeDependencies::empty().
void helics::ForwardingTimeCoordinator::enteringExecMode | ( | ) |
function to enter the exec Mode
References checkingExec, executionMode, noParent, helics::ActionMessage::source_id, and source_id.
void helics::ForwardingTimeCoordinator::generateDebuggingTimeInfo | ( | Json::Value & | base | ) | const |
generate debugging time information
std::vector< GlobalFederateId > helics::ForwardingTimeCoordinator::getDependencies | ( | ) | const |
get a list of actual dependencies
const DependencyInfo * helics::ForwardingTimeCoordinator::getDependencyInfo | ( | GlobalFederateId | ofed | ) | const |
take a global id and get a pointer to the dependencyInfo for the other fed will be nullptr if it doesn't exist
References helics::TimeDependencies::getDependencyInfo().
std::vector< GlobalFederateId > helics::ForwardingTimeCoordinator::getDependents | ( | ) | const |
get a reference to the dependents vector
GlobalFederateId helics::ForwardingTimeCoordinator::getMinDependency | ( | ) | const |
get a count of the active dependencies
References helics::TimeDependencies::getMinDependency().
|
inline |
get the current next time
References helics::TimeData::next.
bool helics::ForwardingTimeCoordinator::hasActiveTimeDependencies | ( | ) | const |
check if there are any active Time dependencies
References helics::TimeDependencies::hasActiveTimeDependencies().
bool helics::ForwardingTimeCoordinator::isDependency | ( | GlobalFederateId | ofed | ) | const |
check whether a federate is a dependency
References helics::TimeDependencies::isDependency().
std::string helics::ForwardingTimeCoordinator::printTimeStatus | ( | ) | const |
generate a string with the current time status
References helics::TimeData::minDe, helics::TimeData::next, and helics::TimeData::Te.
void helics::ForwardingTimeCoordinator::processDependencyUpdateMessage | ( | const ActionMessage & | cmd | ) |
process a dependency update message
References addDependency(), addDependent(), checkActionFlag(), child_flag, parent_flag, removeDependency(), and removeDependent().
bool helics::ForwardingTimeCoordinator::processTimeMessage | ( | const ActionMessage & | cmd | ) |
process a message related to time
References removeDependent().
Referenced by disconnect().
void helics::ForwardingTimeCoordinator::removeDependency | ( | GlobalFederateId | fedID | ) |
remove a dependency
fedID | the identifier of the federate to remove |
References helics::TimeDependencies::removeDependency().
Referenced by processDependencyUpdateMessage().
void helics::ForwardingTimeCoordinator::removeDependent | ( | GlobalFederateId | fedID | ) |
remove a dependent
fedID | the identifier of the federate to remove |
References helics::TimeDependencies::removeDependent().
Referenced by processDependencyUpdateMessage(), and processTimeMessage().
|
inline |
set the callback function used for the sending messages
void helics::ForwardingTimeCoordinator::updateTimeFactors | ( | ) |
compute updates to time values and send an update if needed
References hasDelayedTimingFederate, helics::TimeData::minDe, helics::TimeData::minFed, helics::TimeData::next, noParent, restrictive_time_policy, source_id, and helics::TimeData::update().
bool helics::ForwardingTimeCoordinator::ignoreMinFed {false} |
flag indicating that minFed Controls should not be used