 |
helics
2.8.1
|
9 #include "../application_api/Endpoints.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: helics-time.hpp:31
App & operator=(App &&app)=default
auto echoCount() const
Definition: Echo.hpp:79
auto getMessage() const
Definition: Endpoints.hpp:174
helics::Time loadJsonTime(const Json::Value &timeElement, time_units defaultUnits=time_units::sec)
Definition: JsonProcessingFunctions.cpp:64
virtual void runTo(Time stopTime_input) override
Definition: Echo.cpp:83
@ helics_flag_event_triggered
Definition: helics_enums.h:124
TimeRepresentation< count_time< 9 > > Time
Definition: helics-time.hpp:27
Definition: Endpoints.hpp:18
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
Json::Value loadJson(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:24
@ startup
when created the federate is in startup state
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
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 send(const std::string &dest, const char *data, size_t data_size) const
Definition: Endpoints.hpp:89
@ finalize
the federate has finished executing normally final values may be retrieved
void loadFile(const std::string &filename)
Definition: helicsApp.cpp:124
void setEchoDelay(Time delay)
Definition: Echo.cpp:100
@ executing
entered after the enterExectuationState call has returned