 |
helics
3.3.0
|
9 #include "../application_api/MessageFederate.hpp"
10 #include "helicsApp.hpp"
27 class HELICS_CXX_EXPORT
Echo:
public App {
34 explicit Echo(std::vector<std::string> args);
39 Echo(
int argc,
char* argv[]);
50 Echo(std::string_view name,
const std::shared_ptr<Core>& core,
const FederateInfo& fi);
61 Echo(std::string_view name,
const std::string& jsonString);
66 Echo& operator=(
Echo&& other_echo) noexcept;
71 virtual void runTo(
Time stopTime_input)
override;
77 void addEndpoint(std::string_view endpointName, std::string_view endpointType =
"");
84 void setEchoDelay(
Time delay);
91 virtual void loadJsonFile(
const std::string& jsonFile)
override;
98 std::deque<Endpoint> endpoints;
100 size_t echoCounter = 0;
101 std::mutex delayTimeLock;
constexpr Time timeZero
Definition: helicsTime.hpp:31
App & operator=(App &&app)=default
auto echoCount() const
Definition: Echo.hpp:80
virtual void runTo(Time stopTime_input) override
Definition: Echo.cpp:89
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27
Definition: Endpoints.hpp:21
Definition: helicsCLI11.hpp:42
std::string masterFileName
the name of the master file used to do the construction
Definition: helicsApp.hpp:132
void loadJsonFileConfiguration(const std::string &appName, const std::string &jsonString)
Definition: helicsApp.cpp:158
Definition: FederateInfo.hpp:24
std::unique_ptr< Message > getMessage() const
Definition: Endpoints.cpp:138
@ HELICS_FLAG_EVENT_TRIGGERED
Definition: helics_enums.h:140
auto endpointCount() const
Definition: Echo.hpp:87
void addEndpoint(std::string_view endpointName, std::string_view endpointType="")
Definition: Echo.cpp:122
Echo & operator=(Echo &&other_echo) noexcept
Definition: Echo.cpp:79
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:196
std::shared_ptr< CombinationFederate > fed
the federate created for the Player
Definition: helicsApp.hpp:130
Definition: helicsApp.hpp:29
void loadFile(const std::string &filename)
Definition: helicsApp.cpp:123
void setEchoDelay(Time delay)
Definition: Echo.cpp:106