35#include "nlohmann/json.hpp"
36#include "observable/observable.h"
47 m_listener(listener) {
48 this->attributes[
"commPort"] =
"internal";
49 this->attributes[
"protocol"] =
"internal";
50 this->attributes[
"ioDirection"] =
"OUT";
54 std::shared_ptr<const NavAddr> addr) {
55 auto plugin_msg = std::dynamic_pointer_cast<const PluginMsg>(msg);
57 WARNING_LOG <<
"SendMessage(): Illegal message type";
62 root = nlohmann::json::parse(plugin_msg->message);
63 }
catch (nlohmann::json::exception& e) {
64 WARNING_LOG <<
"SendMessage(): cannot parse json: "
65 << std::string(e.what()).substr(0, 30);
68 m_listener.
Notify(plugin_msg);
Common interface for all drivers.
bool SendMessage(std::shared_ptr< const NavMsg > msg, std::shared_ptr< const NavAddr > addr) override
Send a message to all plugins and core on internal bus.
Interface for handling incoming messages.
virtual void Notify(std::shared_ptr< const NavMsg > message)=0
Handle a received message.
Where messages are sent to or received from.
Plugin ABI encapsulation.
Internal send-only driver sending to plugins.
Driver registration container, a singleton.
Raw messages layer, supports sending and recieving navmsg messages.
Enhanced logging interface on top of wx/log.h.
Tools to send data to plugins.