 |
helics
2.8.1
|
9 #include "ActionMessage.hpp"
10 #include "CoreFederateInfo.hpp"
11 #include "TimeDependencies.hpp"
13 #include "json/forwards.h"
35 std::function<void(
const ActionMessage&)> sendMessageFunction;
52 bool federatesOnly{
false};
54 ForwardingTimeCoordinator() =
default;
59 sendMessageFunction = std::move(userSendMessageFunction);
82 void transmitTimingMessagesUpstream(
ActionMessage& msg)
const;
86 ActionMessage generateTimeRequest(
const DependencyInfo& dep, global_federate_id
fed)
const;
111 void setAsChild(global_federate_id fedID);
112 void setAsParent(global_federate_id fedID);
constexpr Time timeZero
Definition: helics-time.hpp:31
Time getNextTime() const
Definition: ForwardingTimeCoordinator.hpp:131
global_federate_id source_id
12 – for federate_id or route_id
Definition: ActionMessage.hpp:36
void removeDependency(global_federate_id id)
Definition: TimeDependencies.cpp:264
bool restrictive_time_policy
flag indicating that a restrictive time policy should be used
Definition: ForwardingTimeCoordinator.hpp:48
bool isDependency(global_federate_id ofed) const
Definition: TimeDependencies.cpp:201
void removeDependency(global_federate_id fedID)
Definition: ForwardingTimeCoordinator.cpp:194
global_federate_id getMinDependency() const
Definition: TimeDependencies.cpp:362
bool addDependency(global_federate_id id)
Definition: TimeDependencies.cpp:239
void updateTimeFactors()
Definition: ForwardingTimeCoordinator.cpp:83
void generateDebuggingTimeInfo(Json::Value &base) const
Definition: ForwardingTimeCoordinator.cpp:130
Definition: TimeDependencies.hpp:75
base helics enumerations for C++ API's, a namespace wrapper for the definitions defined in helics_enu...
Definition: global_federate_id.hpp:68
global_federate_id source_id
the identifier for inserting into the source id field of any generated messages;
Definition: ForwardingTimeCoordinator.hpp:40
global_federate_id fedID
identifier for the dependency
Definition: TimeDependencies.hpp:55
constexpr global_broker_id parent_broker_id
Definition: global_federate_id.hpp:60
bool dependent
indicator the dependency is a dependent object
Definition: TimeDependencies.hpp:60
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
Time Te
the next currently scheduled event
Definition: TimeDependencies.hpp:39
Definition: ActionMessage.hpp:29
@ error
indicator that an error has occurred
bool ignoreMinFed
Definition: ForwardingTimeCoordinator.hpp:46
bool addDependency(global_federate_id fedID)
Definition: ForwardingTimeCoordinator.cpp:168
@ iteration_requested_flag
indicator that an iteration has been requested
Definition: flagOperations.hpp:16
Definition: ForwardingTimeCoordinator.hpp:26
bool processTimeMessage(const ActionMessage &cmd)
Definition: ForwardingTimeCoordinator.cpp:364
int appendMessage(ActionMessage &m, const ActionMessage &newMessage)
Definition: ActionMessage.cpp:939
bool checkActionFlag(uint16_t flags, FlagIndex flag)
Definition: flagOperations.hpp:75
message_processing_result
Definition: core-types.hpp:65
auto size() const
Definition: TimeDependencies.hpp:100
bool executionMode
flag that the coordinator has entered the execution Mode
Definition: ForwardingTimeCoordinator.hpp:44
void processDependencyUpdateMessage(const ActionMessage &cmd)
Definition: ForwardingTimeCoordinator.cpp:380
@ continue_processing
the current loop should continue
constexpr uint16_t child_flag
overload of extra_flag4 indicating a message is from a child object
Definition: flagOperations.hpp:46
global_federate_id getMinDependency() const
Definition: ForwardingTimeCoordinator.cpp:241
Time next
next possible message or value
Definition: TimeDependencies.hpp:38
int activeDependencyCount() const
Definition: TimeDependencies.cpp:355
std::string payload
Definition: ActionMessage.hpp:44
bool empty() const
Definition: ForwardingTimeCoordinator.hpp:79
constexpr base_type baseValue() const
Definition: global_federate_id.hpp:83
int32_t messageID
8 – message ID for a variety of purposes
Definition: ActionMessage.hpp:35
void setMessageSender(std::function< void(const ActionMessage &)> userSendMessageFunction)
Definition: ForwardingTimeCoordinator.hpp:57
auto begin()
Definition: TimeDependencies.hpp:102
void enteringExecMode()
Definition: ForwardingTimeCoordinator.cpp:22
@ fed
special logging command for message coming from a fed
Definition: loggingHelper.hpp:32
std::vector< global_federate_id > getDependencies() const
Definition: ForwardingTimeCoordinator.cpp:209
bool hasActiveTimeDependencies() const
Definition: ForwardingTimeCoordinator.cpp:231
void setActionFlag(FlagContainer &M, FlagIndex flag)
Definition: flagOperations.hpp:67
bool addDependent(global_federate_id id)
Definition: TimeDependencies.cpp:277
Definition: TimeDependencies.hpp:53
bool isDependency(global_federate_id ofed) const
Definition: ForwardingTimeCoordinator.cpp:163
constexpr uint16_t parent_flag
overload of extra_flag3 indicating the message is from a parent object
Definition: flagOperations.hpp:43
message_processing_result checkExecEntry()
Definition: ForwardingTimeCoordinator.cpp:246
void disconnect()
Definition: ForwardingTimeCoordinator.cpp:47
bool hasDelayedTimingFederate
indicator that federate is using delayed timing
Definition: ForwardingTimeCoordinator.hpp:50
bool noParent
indicator that the coordinator does not have parents
Definition: ForwardingTimeCoordinator.hpp:49
bool checkIfReadyForExecEntry(bool iterating) const
Definition: TimeDependencies.cpp:336
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
bool checkingExec
flag indicating that the coordinator is trying to enter the exec mode
Definition: ForwardingTimeCoordinator.hpp:43
const DependencyInfo * getDependencyInfo(global_federate_id ofed) const
Definition: ForwardingTimeCoordinator.cpp:204
bool hasActiveTimeDependencies() const
Definition: TimeDependencies.cpp:348
bool iterating
flag indicating that the min dependency is iterating
Definition: ForwardingTimeCoordinator.hpp:45
bool update(const TimeData &update)
Definition: TimeDependencies.cpp:95
bool addDependent(global_federate_id fedID)
Definition: ForwardingTimeCoordinator.cpp:173
Time minDe
min dependency event time
Definition: TimeDependencies.hpp:40
bool dependency
indicator that the dependency is an actual dependency
Definition: TimeDependencies.hpp:61
void removeDependent(global_federate_id fedID)
Definition: ForwardingTimeCoordinator.cpp:199
int dependencyCount() const
Definition: ForwardingTimeCoordinator.cpp:236
std::vector< global_federate_id > getDependents() const
Definition: ForwardingTimeCoordinator.cpp:220
global_federate_id dest_id
20 fed_id for a targeted message
Definition: ActionMessage.hpp:38
bool empty() const
Definition: TimeDependencies.hpp:115
std::string printTimeStatus() const
Definition: ForwardingTimeCoordinator.cpp:155
@ next_step
indicator that the iterations have completed
global_federate_id minFed
identifier for the min dependency
Definition: TimeDependencies.hpp:42
const DependencyInfo * getDependencyInfo(global_federate_id id) const
Definition: TimeDependencies.cpp:219
void removeDependent(global_federate_id id)
Definition: TimeDependencies.cpp:302