 |
helics
3.0.1
|
9 #include "../application_api/MessageFederate.hpp"
10 #include "helicsApp.hpp"
26 class HELICS_CXX_EXPORT
Echo:
public App {
33 explicit Echo(std::vector<std::string> args);
38 Echo(
int argc,
char* argv[]);
49 Echo(
const std::string& name,
const std::shared_ptr<Core>& core,
const FederateInfo& fi);
60 Echo(
const std::string& name,
const std::string& jsonString);
65 Echo& operator=(
Echo&& other_echo) noexcept;
70 virtual void runTo(
Time stopTime_input)
override;
76 void addEndpoint(
const std::string& endpointName,
const std::string& endpointType =
"");
83 void setEchoDelay(
Time delay);
90 virtual void loadJsonFile(
const std::string& jsonFile)
override;
97 std::vector<Endpoint> endpoints;
99 size_t echoCounter = 0;
100 std::mutex delayTimeLock;
constexpr Time timeZero
Definition: helicsTime.hpp:31
App & operator=(App &&app)=default
auto echoCount() const
Definition: Echo.hpp:79
virtual void runTo(Time stopTime_input) override
Definition: Echo.cpp:83
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
Definition: Endpoints.hpp:21
Definition: helicsCLI11.hpp:41
std::string masterFileName
the name of the master file used to do the construction
Definition: helicsApp.hpp:129
void loadJsonFileConfiguration(const std::string &appName, const std::string &jsonString)
Definition: helicsApp.cpp:159
void addEndpoint(const std::string &endpointName, const std::string &endpointType="")
Definition: Echo.cpp:116
Definition: FederateInfo.hpp:20
std::unique_ptr< Message > getMessage() const
Definition: Endpoints.cpp:149
@ HELICS_FLAG_EVENT_TRIGGERED
Definition: helics_enums.h:137
auto endpointCount() const
Definition: Echo.hpp:86
Echo & operator=(Echo &&other_echo) noexcept
Definition: Echo.cpp:73
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
void sendToAt(const data_view &data, std::string_view dest, Time sendTime) const
Definition: Endpoints.hpp:114
virtual void initialize()
Definition: helicsApp.cpp:197
std::shared_ptr< CombinationFederate > fed
the federate created for the Player
Definition: helicsApp.hpp:127
Definition: helicsApp.hpp:28
void loadFile(const std::string &filename)
Definition: helicsApp.cpp:124
void setEchoDelay(Time delay)
Definition: Echo.cpp:100