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 "model/ocpn_types.h"

Go to the source code of this file.

Functions

void SendMessageToAllPlugins (const wxString &message_id, const wxString &message_body)
 
void SendJSONMessageToAllPlugins (const wxString &message_id, wxJSONValue 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 371 of file plugin_comm.cpp.

◆ SendActiveLegInfoToAllPlugIns()

void SendActiveLegInfoToAllPlugIns ( const ActiveLegDat leg_info)

Definition at line 195 of file plugin_comm.cpp.

◆ SendAISSentenceToAllPlugIns()

void SendAISSentenceToAllPlugIns ( const wxString &  sentence)

Definition at line 121 of file plugin_comm.cpp.

◆ SendCursorLatLonToAllPlugIns()

void SendCursorLatLonToAllPlugIns ( double  lat,
double  lon 
)

Definition at line 313 of file plugin_comm.cpp.

◆ SendJSONMessageToAllPlugins()

void SendJSONMessageToAllPlugins ( const wxString &  message_id,
wxJSONValue  v 
)

Definition at line 112 of file plugin_comm.cpp.

◆ SendKeyEventToPlugins()

bool SendKeyEventToPlugins ( wxKeyEvent &  event)

Definition at line 262 of file plugin_comm.cpp.

◆ SendMessageToAllPlugins()

void SendMessageToAllPlugins ( const wxString &  message_id,
const wxString &  message_body 
)

Definition at line 59 of file plugin_comm.cpp.

◆ SendMouseEventToPlugins()

bool SendMouseEventToPlugins ( wxMouseEvent &  event)

Definition at line 233 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 324 of file plugin_comm.cpp.

◆ SendPositionFixToAllPlugIns()

void SendPositionFixToAllPlugIns ( GenericPosDatEx ppos)

Definition at line 134 of file plugin_comm.cpp.

◆ SendPreShutdownHookToPlugins()

void SendPreShutdownHookToPlugins ( )

Definition at line 293 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 383 of file plugin_comm.cpp.