 |
helics
2.8.1
|
10 #include "TypedBrokerServer.hpp"
28 explicit WebServer(std::string server_name): name_(std::move(server_name)) {}
30 virtual void startServer(
const Json::Value* val)
override;
34 virtual void processArgs(
const std::string& args)
override;
43 std::atomic<bool> running{
false};
44 std::shared_ptr<IocWrapper> context;
45 std::thread mainLoopThread;
46 std::mutex threadGuard;
48 const Json::Value* config{
nullptr};
49 const std::string name_;
51 std::string httpAddress_{
"127.0.0.1"};
53 std::string websocketAddress_{
"127.0.0.1"};
54 int websocketPort_{8080};
55 bool http_enabled_{
false};
56 bool websocket_enabled_{
false};
57 std::atomic<bool> executing{
false};
constexpr Time timeZero
Definition: helics-time.hpp:31
std::string generateJsonString(const Json::Value &block)
Definition: JsonProcessingFunctions.cpp:97
virtual void clearTimeBarrier()=0
core_type
Definition: core-types.hpp:37
virtual std::string query(const std::string &target, const std::string &queryStr, helics_sequencing_mode mode=helics_sequencing_mode_fast)=0
std::shared_ptr< Broker > getConnectedBroker()
Definition: BrokerFactory.cpp:206
void enableWebSocketServer(bool enabled)
Definition: helicsWebServer.hpp:38
virtual void startServer(const Json::Value *val) override
Definition: helicsWebServer.cpp:920
@ DEFAULT
ZMQ if available or UDP.
std::shared_ptr< Broker > findBroker(const std::string &brokerName)
Definition: BrokerFactory.cpp:185
Json::Value loadJsonStr(const std::string &jsonString)
Definition: JsonProcessingFunctions.cpp:50
std::shared_ptr< Broker > create(core_type type, const std::string &configureString)
Definition: BrokerFactory.cpp:100
virtual void setTimeBarrier(Time barrierTime)=0
@ ok
Definition: helics_definitions.hpp:94
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
Definition: helicsWebServer.hpp:25
virtual void disconnect()=0
Definition: TypedBrokerServer.hpp:24
virtual void processArgs(const std::string &args) override
Definition: helicsWebServer.cpp:894
std::vector< std::shared_ptr< Broker > > getAllBrokers()
Definition: BrokerFactory.cpp:223
void enableHttpServer(bool enabled)
Definition: helicsWebServer.hpp:36
virtual void stopServer() override
Definition: helicsWebServer.cpp:941