![]() |
Leosac
0.8.0
Open Source Access Control
|
Implementation class, for use by the Mqtt module only. More...
#include <MqttExternalServer.hpp>
Collaboration diagram for Leosac::Module::Mqtt::MqttExternalServer:Public Member Functions | |
| MqttExternalServer (zmqpp::context &ctx, std::shared_ptr< const MqttServerConfig > config, const std::vector< std::shared_ptr< const MqttExternalMessage >> &topics) | |
| void | register_sockets (zmqpp::reactor *reactor) |
| void | connect () |
| void | disconnect () |
| void | handle_topic_request (const std::string &topic_name) |
| Request received on the topic specific socket. More... | |
| void | handle_mqtt_msg (mqtt::const_message_ptr msg) |
| Message received from mqtt. More... | |
| void | handle_request () |
| Someone sent a request. More... | |
| std::shared_ptr< const MqttServerConfig > | config () const |
| const std::vector< std::shared_ptr< const MqttExternalMessage > > & | topics () const |
| const std::string & | name () const |
Private Attributes | |
| zmqpp::socket | sock_ |
| REP socket to receive command on. More... | |
| zmqpp::socket | bus_push_ |
| Socket to write to the message bus. More... | |
| std::map< std::string, zmqpp::socket > | topic_socks_ |
| REP socket to receive command on for topics. More... | |
| std::shared_ptr< mqtt::async_client > | client_ |
| The MQTT client. More... | |
| std::shared_ptr< const MqttServerConfig > | config_ |
| std::vector< std::shared_ptr< const MqttExternalMessage > > | topics_ |
Implementation class, for use by the Mqtt module only.
Definition at line 38 of file MqttExternalServer.hpp.
| MqttExternalServer::MqttExternalServer | ( | zmqpp::context & | ctx, |
| std::shared_ptr< const MqttServerConfig > | config, | ||
| const std::vector< std::shared_ptr< const MqttExternalMessage >> & | topics | ||
| ) |
| ctx | ZMQ context |
| config | configuration of the server. |
Definition at line 118 of file MqttExternalServer.cpp.
| std::shared_ptr< const MqttServerConfig > MqttExternalServer::config | ( | ) | const |
Definition at line 354 of file MqttExternalServer.cpp.
| void MqttExternalServer::connect | ( | ) |
Definition at line 158 of file MqttExternalServer.cpp.
| void MqttExternalServer::disconnect | ( | ) |
Definition at line 187 of file MqttExternalServer.cpp.
| void MqttExternalServer::handle_mqtt_msg | ( | mqtt::const_message_ptr | msg | ) |
Message received from mqtt.
Definition at line 253 of file MqttExternalServer.cpp.
| void MqttExternalServer::handle_request | ( | ) |
Someone sent a request.
Definition at line 306 of file MqttExternalServer.cpp.
| void MqttExternalServer::handle_topic_request | ( | const std::string & | topic_name | ) |
Request received on the topic specific socket.
Definition at line 192 of file MqttExternalServer.cpp.
| const std::string & MqttExternalServer::name | ( | ) | const |
Definition at line 344 of file MqttExternalServer.cpp.
| void MqttExternalServer::register_sockets | ( | zmqpp::reactor * | reactor | ) |
Definition at line 147 of file MqttExternalServer.cpp.
| const std::vector< std::shared_ptr< const MqttExternalMessage > > & MqttExternalServer::topics | ( | ) | const |
Definition at line 349 of file MqttExternalServer.cpp.
|
private |
Socket to write to the message bus.
Definition at line 85 of file MqttExternalServer.hpp.
|
private |
The MQTT client.
Definition at line 95 of file MqttExternalServer.hpp.
|
private |
Definition at line 97 of file MqttExternalServer.hpp.
|
private |
REP socket to receive command on.
Definition at line 80 of file MqttExternalServer.hpp.
|
private |
REP socket to receive command on for topics.
Definition at line 90 of file MqttExternalServer.hpp.
|
private |
Definition at line 99 of file MqttExternalServer.hpp.