![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
The GWServerConnector allows the BeeeOn Gateway to communicate with the BeeeOn Server using WebSocket. It automatically connects and registers the gateway after start or connection loss. More...
#include <GWServerConnector.h>
Public Types | |
|
typedef Poco::SharedPtr < GWServerConnector > | Ptr |
Public Types inherited from BeeeOn::StoppableLoop | |
|
typedef Poco::SharedPtr < StoppableLoop > | Ptr |
Public Member Functions | |
| void | start () override |
| void | stop () override |
| void | setHost (const std::string &host) |
| void | setPort (int port) |
| void | setPollTimeout (const Poco::Timespan &timeout) |
| void | setReceiveTimeout (const Poco::Timespan &timeout) |
| void | setSendTimeout (const Poco::Timespan &timeout) |
| void | setRetryConnectTimeout (const Poco::Timespan &timeout) |
| void | setBusySleep (const Poco::Timespan &timeout) |
| void | setResendTimeout (const Poco::Timespan &timeout) |
| void | setMaxMessageSize (int size) |
| void | setGatewayInfo (Poco::SharedPtr< GatewayInfo > info) |
| void | setSSLConfig (Poco::SharedPtr< SSLClient > config) |
| void | setInactiveMultiplier (int multiplier) |
| bool | accept (const Command::Ptr cmd) override |
| void | handle (Command::Ptr cmd, Answer::Ptr answer) override |
| bool | ship (const SensorData &data) override |
Public Member Functions inherited from BeeeOn::CommandSender | |
| void | setCommandDispatcher (CommandDispatcher *dispatcher) |
| void | dispatch (Poco::AutoPtr< Command > cmd, Poco::AutoPtr< Answer > answer) |
| void | dispatch (Poco::AutoPtr< Command > cmd) |
| AnswerQueue & | answerQueue () |
Additional Inherited Members | |
Protected Member Functions inherited from BeeeOn::Loggable | |
| void | setupLogger (Poco::Logger *logger=0) const |
| Poco::Logger & | logger () const |
| Loggable (const ClassInfo &info) | |
| Loggable (const std::type_info &info) | |
Static Protected Member Functions inherited from BeeeOn::Loggable | |
| static Poco::Logger & | forMethod (const char *name) |
| static Poco::Logger & | forClass (const ClassInfo &info) |
| static Poco::Logger & | forClass (const std::type_info &info) |
| template<typename T > | |
| static Poco::Logger & | forInstance (const T *i) |
| static void | configureSimple (Poco::Logger &logger, const std::string &level) |
| static void | logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line) |
The GWServerConnector allows the BeeeOn Gateway to communicate with the BeeeOn Server using WebSocket. It automatically connects and registers the gateway after start or connection loss.
There are 2 threads: sender and receiver. Sender's responsibility is reconnecting to server and sending messages. Receiver's responsibility is to to receive messages from server and handling them.
|
overridevirtual |
Ensures export data in best effort to target destination
| Poco::IOException | when a serious issue caused the Exporter to deny its service. |
Implements BeeeOn::Exporter.
|
overridevirtual |
Starts the loop to process in an internally managed thread.
Implements BeeeOn::StoppableLoop.
|
overridevirtual |
Stop the loop and wait until finished.
Implements BeeeOn::StoppableLoop.
1.8.5