OpenCPN Partial API docs
Loading...
Searching...
No Matches
plugin_comm.h File Reference

Tools to send data to plugins. More...

#include <wx/event.h>
#include <wx/jsonval.h>
#include <wx/string.h>
#include "ocpn-nlohmann/json.hpp"
#include "model/ocpn_types.h"

Go to the source code of this file.

Functions

void SendMessageToAllPlugins (const std::string &message_id, const std::string &message_body)
void SendJsonMessageToAllPlugins (const std::string &message_id, const nlohmann::json &v)
void SendAISSentenceToAllPlugIns (const wxString &sentence)
void SendPositionFixToAllPlugIns (GenericPosDatEx *ppos)
void SendActiveLegInfoToAllPlugIns (const ActiveLegDat *leg_info)
bool SendMouseEventToPlugins (wxMouseEvent &event)
bool SendKeyEventToPlugins (wxKeyEvent &event)
void SendPreShutdownHookToPlugins ()
void SendCursorLatLonToAllPlugIns (double lat, double lon)
void SendNMEASentenceToAllPlugIns (const wxString &sentence)
 Distribute a NMEA 0183 sentence to all plugins that have registered interest by setting the WANTS_NMEA_SENTENCES capability flag.
int GetJSONMessageTargetCount ()
void SendVectorChartObjectInfo (const wxString &chart, const wxString &feature, const wxString &objname, double &lat, double &lon, double &scale, int &nativescale)

Detailed Description

Tools to send data to plugins.

Definition in file plugin_comm.h.

Function Documentation

◆ GetJSONMessageTargetCount()

int GetJSONMessageTargetCount ( )

Definition at line 427 of file plugin_comm.cpp.

◆ SendActiveLegInfoToAllPlugIns()

void SendActiveLegInfoToAllPlugIns ( const ActiveLegDat * leg_info)

Definition at line 238 of file plugin_comm.cpp.

◆ SendAISSentenceToAllPlugIns()

void SendAISSentenceToAllPlugIns ( const wxString & sentence)

Definition at line 156 of file plugin_comm.cpp.

◆ SendCursorLatLonToAllPlugIns()

void SendCursorLatLonToAllPlugIns ( double lat,
double lon )

Definition at line 364 of file plugin_comm.cpp.

◆ SendJsonMessageToAllPlugins()

void SendJsonMessageToAllPlugins ( const std::string & message_id,
const nlohmann::json & v )

Definition at line 147 of file plugin_comm.cpp.

◆ SendKeyEventToPlugins()

bool SendKeyEventToPlugins ( wxKeyEvent & event)

Definition at line 309 of file plugin_comm.cpp.

◆ SendMessageToAllPlugins()

void SendMessageToAllPlugins ( const std::string & message_id,
const std::string & message_body )

Definition at line 95 of file plugin_comm.cpp.

◆ SendMouseEventToPlugins()

bool SendMouseEventToPlugins ( wxMouseEvent & event)

Definition at line 278 of file plugin_comm.cpp.

◆ SendNMEASentenceToAllPlugIns()

void SendNMEASentenceToAllPlugIns ( const wxString & sentence)

Distribute a NMEA 0183 sentence to all plugins that have registered interest by setting the WANTS_NMEA_SENTENCES capability flag.

The sentence will only be sent to plugins that:

  • Are enabled
  • Have been initialized
  • Have declared WANTS_NMEA_SENTENCES in their Init() return flags
Parameters
sentenceA complete NMEA 0183 sentence including delimiters and checksum.
Note
For handling NMEA/SignalK messages, a newer recommended message API is available: Plugin Message API Documentation

Definition at line 378 of file plugin_comm.cpp.

◆ SendPositionFixToAllPlugIns()

void SendPositionFixToAllPlugIns ( GenericPosDatEx * ppos)

Definition at line 172 of file plugin_comm.cpp.

◆ SendPreShutdownHookToPlugins()

void SendPreShutdownHookToPlugins ( )

Definition at line 342 of file plugin_comm.cpp.

◆ SendVectorChartObjectInfo()

void SendVectorChartObjectInfo ( const wxString & chart,
const wxString & feature,
const wxString & objname,
double & lat,
double & lon,
double & scale,
int & nativescale )

Definition at line 439 of file plugin_comm.cpp.