36#include "wx/jsonreader.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 int num_errors = json_reader.
Parse(plugin_msg->message, &root);
64 WARNING_LOG <<
"SendMessage(): cannot parse json: "
65 << plugin_msg->message.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.
int Parse(const wxString &doc, wxJSONValue *val)
Parse the JSON document.
The JSON value class implementation.
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.
General observable implementation with several specializations.
Tools to send data to plugins.