 |
helics
3.3.0
|
10 #include "TypedBrokerServer.hpp"
28 explicit WebServer(std::string_view server_name): name_(server_name) {}
31 const std::shared_ptr<TypedBrokerServer>& ptr)
override;
35 virtual void processArgs(std::string_view args)
override;
42 void mainLoop(std::shared_ptr<WebServer> keepAlive);
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: helicsTime.hpp:31
virtual void processArgs(std::string_view args) override
Definition: helicsWebServer.cpp:943
virtual void clearTimeBarrier()=0
std::vector< std::shared_ptr< Broker > > getAllBrokers()
Definition: BrokerFactory.cpp:217
CoreType
Definition: CoreTypes.hpp:36
std::shared_ptr< Broker > getConnectedBroker()
Definition: BrokerFactory.cpp:200
void enableWebSocketServer(bool enabled)
Definition: helicsWebServer.hpp:39
@ DEFAULT
ZMQ if available or UDP.
std::shared_ptr< Broker > create(CoreType type, std::string_view configureString)
Definition: BrokerFactory.cpp:99
virtual std::string query(std::string_view target, std::string_view queryStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST)=0
virtual void sendCommand(std::string_view target, std::string_view commandStr, HelicsSequencingModes mode=HELICS_SEQUENCING_MODE_FAST)=0
std::shared_ptr< Broker > findBroker(std::string_view brokerName)
Definition: BrokerFactory.cpp:183
virtual void setTimeBarrier(Time barrierTime)=0
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
virtual void startServer(const Json::Value *val, const std::shared_ptr< TypedBrokerServer > &ptr) override
Definition: helicsWebServer.cpp:969
Definition: TypedBrokerServer.hpp:24
void enableHttpServer(bool enabled)
Definition: helicsWebServer.hpp:37
virtual void stopServer() override
Definition: helicsWebServer.cpp:994