Retrieves a platform-normalized font scaled for consistent physical size.
Retrieves a platform-normalized font scaled for consistent physical size.Provides a font that maintains perceptually consistent size across different platforms, screen densities, and display characteristics. The scaling ensures that a specified font size appears similar in physical dimensions regardless of:
// A 12-point font will look similar on: // - Windows laptop // - MacBook Retina display // - Android tablet wxFont* font = GetOCPNScaledFont_PlugIn("StatusBar", 12);
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
#ifndef DECL_EXP
#if defined(__WXMSW__) || defined(__CYGWIN__)
#define DECL_EXP __declspec(dllexport)
#elif defined __GNUC__ && __GNUC__ >= 4
#define DECL_EXP __attribute__((visibility("default")))
#elif defined __WXOSX__
#define DECL_EXP __attribute__((visibility("default")))
#else
#define DECL_EXP
#endif
#endif
#if defined(__WXMSW__) && defined(MAKING_PLUGIN)
#define DECL_IMP __declspec(dllimport)
#else
#define DECL_IMP
#endif
#include <wx/xml/xml.h>
#include <wx/dcmemory.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/menuitem.h>
#include <wx/gdicmn.h>
#ifdef ocpnUSE_SVG
#include <wx/bitmap.h>
#endif
#include <memory>
#include <vector>
#include <unordered_map>
class wxGLContext;
#define API_VERSION_MAJOR 1
#define API_VERSION_MINOR 19
class wxFileConfig;
class wxNotebook;
class wxFont;
class wxAuiManager;
class wxScrolledWindow;
class wxGLCanvas;
#define WANTS_OVERLAY_CALLBACK 0x00000001
#define WANTS_CURSOR_LATLON 0x00000002
#define WANTS_TOOLBAR_CALLBACK 0x00000004
#define INSTALLS_TOOLBAR_TOOL 0x00000008
#define WANTS_CONFIG 0x00000010
#define INSTALLS_TOOLBOX_PAGE 0x00000020
#define INSTALLS_CONTEXTMENU_ITEMS 0x00000040
#define WANTS_NMEA_SENTENCES 0x00000080
#define WANTS_NMEA_EVENTS 0x00000100
#define WANTS_AIS_SENTENCES 0x00000200
#define USES_AUI_MANAGER 0x00000400
#define WANTS_PREFERENCES 0x00000800
#define INSTALLS_PLUGIN_CHART 0x00001000
#define WANTS_ONPAINT_VIEWPORT 0x00002000
#define WANTS_PLUGIN_MESSAGING 0x00004000
#define WANTS_OPENGL_OVERLAY_CALLBACK 0x00008000
#define WANTS_DYNAMIC_OPENGL_OVERLAY_CALLBACK 0x00010000
#define WANTS_LATE_INIT 0x00020000
#define INSTALLS_PLUGIN_CHART_GL 0x00040000
#define WANTS_MOUSE_EVENTS 0x00080000
#define WANTS_VECTOR_CHART_OBJECT_INFO 0x00100000
#define WANTS_KEYBOARD_EVENTS 0x00200000
#define WANTS_PRESHUTDOWN_HOOK 0x00400000
#define OVERLAY_LEGACY 0
#define OVERLAY_OVER_SHIPS 64
#define OVERLAY_OVER_EMBOSS 96
#define OVERLAY_OVER_UI 128
enum PI_ColorScheme {
PI_GLOBAL_COLOR_SCHEME_RGB,
PI_GLOBAL_COLOR_SCHEME_DAY,
PI_GLOBAL_COLOR_SCHEME_DUSK,
PI_GLOBAL_COLOR_SCHEME_NIGHT,
PI_N_COLOR_SCHEMES
};
public:
double clat;
double clon;
double view_scale_ppm;
double skew;
double rotation;
float chart_scale;
int pix_width;
int pix_height;
wxRect rv_rect;
bool b_quilt;
int m_projection_type;
double lat_min, lat_max, lon_min, lon_max;
bool bValid;
};
public:
double Lat;
double Lon;
double Cog;
double Sog;
double Var;
time_t FixTime;
int nSats;
};
public:
double Lat;
double Lon;
double Cog;
double Sog;
double Var;
double Hdm;
double Hdt;
time_t FixTime;
int nSats;
};
public:
double Xte;
double Btw;
double Dtw;
wxString wp_name;
bool arrival;
};
enum plugin_ais_alarm_type {
PI_AIS_NO_ALARM = 0,
PI_AIS_ALARM_SET,
PI_AIS_ALARM_ACKNOWLEDGED
};
public:
int MMSI;
int Class;
int NavStatus;
double SOG;
double COG;
double HDG;
double Lon;
double Lat;
int ROTAIS;
char CallSign[8];
char ShipName[21];
unsigned char ShipType;
int IMO;
double Range_NM;
double Brg;
bool bCPA_Valid;
double TCPA;
double CPA;
plugin_ais_alarm_type alarm_state;
};
typedef enum ChartTypeEnumPI {
PI_CHART_TYPE_UNKNOWN = 0,
PI_CHART_TYPE_DUMMY,
PI_CHART_TYPE_DONTCARE,
PI_CHART_TYPE_KAP,
PI_CHART_TYPE_GEO,
PI_CHART_TYPE_S57,
PI_CHART_TYPE_CM93,
PI_CHART_TYPE_CM93COMP,
PI_CHART_TYPE_PLUGIN
} _ChartTypeEnumPI;
typedef enum ChartFamilyEnumPI {
PI_CHART_FAMILY_UNKNOWN = 0,
PI_CHART_FAMILY_RASTER,
PI_CHART_FAMILY_VECTOR,
PI_CHART_FAMILY_DONTCARE
} _ChartFamilyEnumPI;
typedef enum ChartDepthUnitTypePI {
PI_DEPTH_UNIT_UNKNOWN,
PI_DEPTH_UNIT_FEET,
PI_DEPTH_UNIT_METERS,
PI_DEPTH_UNIT_FATHOMS
} _ChartDepthUnitTypePI;
typedef enum OcpnProjTypePI {
PI_PROJECTION_UNKNOWN,
PI_PROJECTION_MERCATOR,
PI_PROJECTION_TRANSVERSE_MERCATOR,
PI_PROJECTION_POLYCONIC,
PI_PROJECTION_ORTHOGRAPHIC,
PI_PROJECTION_POLAR,
PI_PROJECTION_STEREOGRAPHIC,
PI_PROJECTION_GNOMONIC,
PI_PROJECTION_EQUIRECTANGULAR
} _OcpnProjTypePI;
double SLAT;
double WLON;
double NLAT;
double ELON;
#define PI_FULL_INIT 0
#define PI_HEADER_ONLY 1
#define PI_THUMB_ONLY 2
public:
virtual wxString GetFileSearchMask(void);
virtual int Init(const wxString &full_path, int init_flags);
virtual void SetColorScheme(int cs, bool bApplyImmediate);
virtual double GetNormalScaleMin(double canvas_scale_factor,
bool b_allow_overzoom);
virtual double GetNormalScaleMax(double canvas_scale_factor,
int canvas_width);
virtual double GetNearestPreferredScalePPM(double target_scale_ppm);
virtual bool GetChartExtent(
ExtentPI *pext);
const wxRegion &Region);
wxRegion *pValidRegion);
virtual int GetCOVREntries() { return 0; }
virtual int GetCOVRTablePoints(int iTable) { return 0; }
virtual int GetCOVRTablenPoints(int iTable) { return 0; }
virtual float *GetCOVRTableHead(int iTable) { return (float *)NULL; }
virtual wxBitmap *GetThumbnail(int tnx, int tny, int cs);
virtual wxString GetFullPath() const { return m_FullPath; }
virtual ChartTypeEnumPI GetChartType() { return m_ChartType; }
virtual ChartFamilyEnumPI GetChartFamily() { return m_ChartFamily; }
virtual OcpnProjTypePI GetChartProjection() { return m_projection; }
virtual wxString GetName() { return m_Name; }
virtual wxString GetDescription() { return m_Description; }
virtual wxString GetID() { return m_ID; }
virtual wxString GetSE() { return m_SE; }
virtual wxString GetDepthUnits() { return m_DepthUnits; }
virtual wxString GetSoundingsDatum() { return m_SoundingsDatum; }
virtual wxString GetDatumString() { return m_datum_str; }
virtual wxString GetExtraInfo() { return m_ExtraInfo; }
virtual wxString GetPubDate() { return m_PubYear; }
virtual double GetChartErrorFactor() { return m_Chart_Error_Factor; }
virtual ChartDepthUnitTypePI GetDepthUnitId() { return m_depth_unit_id; }
virtual bool IsReadyToRender() { return m_bReadyToRender; }
virtual int GetNativeScale() { return m_Chart_Scale; };
virtual double GetChartSkew() { return m_Chart_Skew; }
virtual wxDateTime GetEditionDate(void) { return m_EdDate; }
wxRect *pSourceRect);
virtual double GetRasterScaleFactor();
virtual bool GetChartBits(wxRect &source, unsigned char *pPix, int sub_samp);
virtual int GetSize_X();
virtual int GetSize_Y();
virtual void latlong_to_chartpix(double lat, double lon, double &pixx,
double &pixy);
virtual void chartpix_to_latlong(double pixx, double pixy, double *plat,
double *plon);
protected:
ChartTypeEnumPI m_ChartType;
ChartFamilyEnumPI m_ChartFamily;
wxString m_FullPath;
OcpnProjTypePI m_projection;
int m_Chart_Scale;
double m_Chart_Skew;
wxDateTime m_EdDate;
bool m_bReadyToRender;
wxString m_Name;
wxString m_Description;
wxString m_ID;
wxString m_SE;
wxString m_SoundingsDatum;
wxString m_datum_str;
wxString m_PubYear;
wxString m_DepthUnits;
wxString m_ExtraInfo;
ChartDepthUnitTypePI m_depth_unit_id;
double m_Chart_Error_Factor;
};
public:
virtual int Init(void);
virtual bool DeInit(void);
virtual int GetAPIVersionMajor();
virtual int GetAPIVersionMinor();
virtual int GetPlugInVersionMajor();
virtual int GetPlugInVersionMinor();
virtual wxBitmap *GetPlugInBitmap();
virtual wxString GetCommonName();
virtual wxString GetShortDescription();
virtual wxString GetLongDescription();
virtual void SetDefaults(
void);
virtual int GetToolbarToolCount(void);
virtual int GetToolboxPanelCount(void);
virtual void SetupToolboxPanel(int page_sel, wxNotebook *pnotebook);
virtual void OnCloseToolboxPanel(int page_sel, int ok_apply_cancel);
virtual void ShowPreferencesDialog(wxWindow *parent);
virtual void SetCursorLatLon(double lat, double lon);
virtual void SetNMEASentence(wxString &sentence);
virtual void SetAISSentence(wxString &sentence);
virtual void ProcessParentResize(int x, int y);
virtual void SetColorScheme(PI_ColorScheme cs);
virtual void OnToolbarToolCallback(int id);
virtual void OnContextMenuItemCallback(int id);
virtual void UpdateAuiStatus(void);
virtual wxArrayString GetDynamicChartClassNameArray(void);
};
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif
public:
using opencpn_plugin::RenderOverlay;
virtual void SetPluginMessage(wxString &message_id, wxString &message_body);
};
public:
using opencpn_plugin::RenderOverlay;
virtual void SetPluginMessage(wxString &message_id, wxString &message_body);
};
public:
using opencpn_plugin::RenderOverlay;
virtual void SetPluginMessage(wxString &message_id, wxString &message_body);
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
public:
virtual void OnSetupOptions(void);
};
public:
virtual void LateInit(void);
};
public:
};
public:
virtual bool MouseEventHook(wxMouseEvent &event);
virtual void SendVectorChartObjectInfo(wxString &chart, wxString &feature,
wxString &objname, double lat,
double lon,
double scale,
int nativescale);
};
public:
virtual bool KeyboardEventHook(wxKeyEvent &event);
virtual void OnToolbarToolDownCallback(int id);
virtual void OnToolbarToolUpCallback(int id);
};
public:
};
public:
};
public:
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext,
int canvasIndex);
virtual void PrepareContextMenu(int canvasIndex);
};
public:
virtual int GetPlugInVersionPatch();
virtual int GetPlugInVersionPost();
virtual const char *GetPlugInVersionPre();
virtual const char *GetPlugInVersionBuild();
};
public:
using opencpn_plugin_116::RenderGLOverlayMultiCanvas;
using opencpn_plugin_116::RenderOverlayMultiCanvas;
#ifdef _MSC_VER
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext,
int priority = -1);
#else
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext,
int priority);
bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext,
PlugIn_ViewPort *vp,
int canvas_ix) override {
return RenderGLOverlayMultiCanvas(pcontext, vp, canvas_ix, -1);
}
#endif
#ifdef _MSC_VER
int canvasIndex, int priority = -1);
#else
int canvas_ix, int priority);
int canvas_ix) override {
return RenderOverlayMultiCanvas(dc, vp, canvas_ix, -1);
}
#endif
};
public:
virtual void PreShutdownHook();
};
public:
wxString DescrText;
wxString Link;
wxString Type;
};
public:
const wxString &wp_name, const wxString &GUID = _T(""));
double m_lat;
double m_lon;
wxString m_GUID;
wxString m_MarkName;
wxString m_MarkDescription;
wxDateTime m_CreateTime;
bool m_IsVisible;
wxString m_IconName;
Plugin_HyperlinkList *m_HyperlinkList;
};
public:
wxString m_NameString;
wxString m_StartString;
wxString m_EndString;
wxString m_GUID;
Plugin_WaypointList *pWaypointList;
};
public:
wxString m_NameString;
wxString m_StartString;
wxString m_EndString;
wxString m_GUID;
Plugin_WaypointList *pWaypointList;
};
extern "C" DECL_EXP int InsertPlugInTool(wxString label, wxBitmap *bitmap,
wxBitmap *bmpRollover, wxItemKind kind,
wxString shortHelp, wxString longHelp,
wxObject *clientData, int position,
extern "C" DECL_EXP void RemovePlugInTool(int tool_id);
extern "C" DECL_EXP void SetToolbarToolViz(
int item, bool viz);
extern "C" DECL_EXP void SetToolbarItemState(int item, bool toggle);
extern "C" DECL_EXP void SetToolbarToolBitmaps(int item, wxBitmap *bitmap,
wxBitmap *bmpRollover);
extern "C" DECL_EXP int InsertPlugInToolSVG(
wxString label, wxString SVGfile, wxString SVGfileRollover,
wxString SVGfileToggled, wxItemKind kind, wxString shortHelp,
wxString longHelp, wxObject *clientData, int position, int tool_sel,
extern "C" DECL_EXP void SetToolbarToolBitmapsSVG(int item, wxString SVGfile,
wxString SVGfileRollover,
wxString SVGfileToggled);
extern "C" DECL_EXP int AddCanvasContextMenuItem(wxMenuItem *pitem,
extern "C" DECL_EXP void RemoveCanvasContextMenuItem(
int item);
extern "C" DECL_EXP void SetCanvasContextMenuItemViz(
int item, bool viz);
extern "C" DECL_EXP void SetCanvasContextMenuItemGrey(int item, bool grey);
extern "C" DECL_EXP wxFileConfig *GetOCPNConfigObject(void);
extern "C" DECL_EXP void RequestRefresh(wxWindow *);
extern "C" DECL_EXP bool GetGlobalColor(wxString colorName, wxColour *pcolour);
double lat, double lon);
double *plat, double *plon);
extern "C" DECL_EXP wxWindow *GetOCPNCanvasWindow();
extern "C" DECL_EXP wxFont *
OCPNGetFont(wxString TextElement,
int default_size);
extern "C" DECL_EXP wxString *GetpSharedDataLocation();
extern "C" DECL_EXP ArrayOfPlugIn_AIS_Targets *GetAISTargetArray(void);
extern "C" DECL_EXP wxAuiManager *GetFrameAuiManager(void);
extern "C" DECL_EXP bool AddLocaleCatalog(wxString catalog);
extern "C" DECL_EXP void PushNMEABuffer(wxString str);
extern DECL_EXP wxXmlDocument GetChartDatabaseEntryXML(int dbIndex,
bool b_getGeom);
extern DECL_EXP bool UpdateChartDBInplace(wxArrayString dir_array,
bool b_force_update,
bool b_ProgressDialog);
extern DECL_EXP wxArrayString GetChartDBDirArrayString();
extern "C" DECL_EXP void SendPluginMessage(wxString message_id,
wxString message_body);
extern "C" DECL_EXP void DimeWindow(wxWindow *);
extern "C" DECL_EXP
void JumpToPosition(
double lat,
double lon,
double scale);
extern "C" DECL_EXP void PositionBearingDistanceMercator_Plugin(
double lat, double lon, double brg, double dist, double *dlat,
double *dlon);
extern "C" DECL_EXP void DistanceBearingMercator_Plugin(
double lat0, double lon0, double lat1, double lon1, double *brg,
double *dist);
extern "C" DECL_EXP double DistGreatCircle_Plugin(double slat, double slon,
double dlat, double dlon);
extern "C" DECL_EXP void toTM_Plugin(float lat, float lon, float lat0,
float lon0, double *x, double *y);
extern "C" DECL_EXP void fromTM_Plugin(double x, double y, double lat0,
double lon0, double *lat, double *lon);
extern "C" DECL_EXP void toSM_Plugin(double lat, double lon, double lat0,
double lon0, double *x, double *y);
extern "C" DECL_EXP void fromSM_Plugin(double x, double y, double lat0,
double lon0, double *lat, double *lon);
extern "C" DECL_EXP void toSM_ECC_Plugin(double lat, double lon, double lat0,
double lon0, double *x, double *y);
extern "C" DECL_EXP void fromSM_ECC_Plugin(double x, double y, double lat0,
double lon0, double *lat,
double *lon);
extern "C" DECL_EXP bool DecodeSingleVDOMessage(const wxString &str,
wxString *acc);
extern "C" DECL_EXP int GetChartbarHeight(void);
extern "C" DECL_EXP bool GetActiveRoutepointGPX(char *buffer,
unsigned int buffer_length);
typedef enum OptionsParentPI {
PI_OPTIONS_PARENT_DISPLAY,
PI_OPTIONS_PARENT_CONNECTIONS,
PI_OPTIONS_PARENT_CHARTS,
PI_OPTIONS_PARENT_SHIPS,
PI_OPTIONS_PARENT_UI,
PI_OPTIONS_PARENT_PLUGINS
} _OptionsParentPI;
extern DECL_EXP wxScrolledWindow *AddOptionsPage(OptionsParentPI parent,
wxString title);
extern DECL_EXP bool DeleteOptionsPage(wxScrolledWindow *page);
extern "C" DECL_EXP double toUsrDistance_Plugin(double nm_distance,
extern "C" DECL_EXP double fromUsrDistance_Plugin(double usr_distance,
extern "C" DECL_EXP
double toUsrSpeed_Plugin(
double kts_speed,
int unit = -1);
extern "C" DECL_EXP
double fromUsrSpeed_Plugin(
double usr_speed,
int unit = -1);
extern "C" DECL_EXP
double toUsrTemp_Plugin(
double cel_temp,
int unit = -1);
extern "C" DECL_EXP
double fromUsrTemp_Plugin(
double usr_temp,
int unit = -1);
extern DECL_EXP wxString getUsrDistanceUnit_Plugin(
int unit = -1);
extern DECL_EXP wxString getUsrSpeedUnit_Plugin(
int unit = -1);
extern DECL_EXP wxString getUsrTempUnit_Plugin(
int unit = -1);
extern DECL_EXP wxString GetNewGUID();
extern "C" DECL_EXP bool PlugIn_GSHHS_CrossesLand(double lat1, double lon1,
double lat2, double lon2);
extern DECL_EXP wxBitmap *FindSystemWaypointIcon(wxString &icon_name);
extern DECL_EXP bool AddCustomWaypointIcon(wxBitmap *pimage, wxString key,
wxString description);
bool b_permanent = true);
extern DECL_EXP bool DeleteSingleWaypoint(wxString &GUID);
bool b_permanent = true);
extern DECL_EXP bool DeletePlugInRoute(wxString &GUID);
extern DECL_EXP
bool UpdatePlugInRoute(
PlugIn_Route *proute);
bool b_permanent = true);
extern DECL_EXP bool DeletePlugInTrack(wxString &GUID);
extern DECL_EXP
bool UpdatePlugInTrack(
PlugIn_Track *ptrack);
wxColour DECL_EXP GetBaseGlobalColor(wxString colorName);
int DECL_EXP OCPNMessageBox_PlugIn(wxWindow *parent, const wxString &message,
const wxString &caption = _T("Message"),
int style = wxOK, int x = -1, int y = -1);
extern DECL_EXP wxString toSDMM_PlugIn(int NEflag, double a,
bool hi_precision = true);
extern "C" DECL_EXP wxString *GetpPrivateApplicationDataLocation();
extern DECL_EXP wxString GetOCPN_ExePath(void);
extern "C" DECL_EXP wxString *GetpPlugInLocation();
extern "C" DECL_EXP int AddChartToDBInPlace(wxString &full_path,
bool b_RefreshCanvas);
extern "C" DECL_EXP int RemoveChartFromDBInPlace(wxString &full_path);
extern DECL_EXP wxString GetLocaleCanonicalName();
#define PLIB_CAPS_LINE_VBO 1
#define PLIB_CAPS_LINE_BUFFER 1 << 1
#define PLIB_CAPS_SINGLEGEO_BUFFER 1 << 2
#define PLIB_CAPS_OBJSEGLIST 1 << 3
#define PLIB_CAPS_OBJCATMUTATE 1 << 4
public:
virtual int RenderRegionViewOnGL(const wxGLContext &glc,
const wxRegion &Region, bool b_use_stencil);
virtual ListOfPI_S57Obj *GetObjRuleListAtLatLon(float lat, float lon,
float select_radius,
virtual wxString CreateObjDescriptions(ListOfPI_S57Obj *obj_list);
virtual int GetNoCOVREntries();
virtual int GetNoCOVRTablePoints(int iTable);
virtual int GetNoCOVRTablenPoints(int iTable);
virtual float *GetNoCOVRTableHead(int iTable);
};
public:
virtual ListOfPI_S57Obj *GetLightsObjRuleListVisibleAtLatLon(
};
public:
virtual int RenderRegionViewOnGL(const wxGLContext &glc,
const wxRegion &Region, bool b_use_stencil);
virtual wxBitmap &RenderRegionViewOnDCNoText(
const PlugIn_ViewPort &VPoint,
const wxRegion &Region);
virtual bool RenderRegionViewOnDCTextOnly(wxMemoryDC &dc,
const wxRegion &Region);
virtual int RenderRegionViewOnGLNoText(const wxGLContext &glc,
const wxRegion &Region,
bool b_use_stencil);
virtual int RenderRegionViewOnGLTextOnly(const wxGLContext &glc,
const wxRegion &Region,
bool b_use_stencil);
virtual ListOfPI_S57Obj *GetObjRuleListAtLatLon(float lat, float lon,
float select_radius,
virtual wxString CreateObjDescriptions(ListOfPI_S57Obj *obj_list);
virtual int GetNoCOVREntries();
virtual int GetNoCOVRTablePoints(int iTable);
virtual int GetNoCOVRTablenPoints(int iTable);
virtual float *GetNoCOVRTableHead(int iTable);
virtual void ClearPLIBTextList();
};
public:
virtual ListOfPI_S57Obj *GetLightsObjRuleListVisibleAtLatLon(
};
class wxArrayOfS57attVal;
typedef enum _PI_LUPname {
PI_SIMPLIFIED = 'L',
PI_PAPER_CHART = 'R',
PI_LINES = 'S',
PI_PLAIN_BOUNDARIES = 'N',
PI_SYMBOLIZED_BOUNDARIES = 'O',
PI_LUPNAME_NUM = 5
} PI_LUPname;
typedef enum _PI_DisCat {
PI_DISPLAYBASE = 'D',
PI_STANDARD = 'S',
PI_OTHER = 'O',
PI_MARINERS_STANDARD = 'M',
PI_MARINERS_OTHER,
PI_DISP_CAT_NUM,
} PI_DisCat;
typedef enum _PI_DisPrio {
PI_PRIO_NODATA = '0',
PI_PRIO_GROUP1 = '1',
PI_PRIO_AREA_1 = '2',
PI_PRIO_AREA_2 = '3',
PI_PRIO_SYMB_POINT = '4',
PI_PRIO_SYMB_LINE = '5',
PI_PRIO_SYMB_AREA = '6',
PI_PRIO_ROUTEING = '7',
PI_PRIO_HAZARDS = '8',
PI_PRIO_MARINERS = '9',
PI_PRIO_NUM = 10
} PI_DisPrio;
typedef enum PI_InitReturn {
PI_INIT_OK = 0,
PI_INIT_FAIL_RETRY,
PI_INIT_FAIL_REMOVE,
PI_INIT_FAIL_NOERROR
} _PI_InitReturn;
public:
size_t vbo_offset;
size_t n_points;
int priority;
float lat_max;
float lat_min;
float lon_max;
float lon_min;
int type;
void *private0;
};
public:
public:
char FeatureName[8];
int Primitive_type;
char *att_array;
wxArrayOfS57attVal *attVal;
int n_attr;
int iOBJL;
int Index;
double x;
double y;
double z;
int npt;
void *geoPt;
double *geoPtz;
double *geoPtMulti;
void *pPolyTessGeo;
double m_lat;
double m_lon;
double chart_ref_lat;
double chart_ref_lon;
double lat_min;
double lat_max;
double lon_min;
double lon_max;
int Scamin;
bool bIsClone;
int nRef;
bool bIsAton;
bool bIsAssociable;
int m_n_lsindex;
int *m_lsindex_array;
int m_n_edge_max_points;
void *m_chart_context;
PI_DisCat m_DisplayCat;
void *S52_Context;
double x_rate;
double y_rate;
double x_origin;
double y_origin;
int auxParm0;
int auxParm1;
int auxParm2;
int auxParm3;
bool m_bcategory_mutable;
int m_DPRI;
};
wxString DECL_EXP PI_GetPLIBColorScheme();
int DECL_EXP PI_GetPLIBDepthUnitInt();
int DECL_EXP PI_GetPLIBSymbolStyle();
int DECL_EXP PI_GetPLIBBoundaryStyle();
int DECL_EXP PI_GetPLIBStateHash();
double DECL_EXP PI_GetPLIBMarinerSafetyContour();
bool DECL_EXP PI_GetObjectRenderBox(
PI_S57Obj *pObj,
double *lat_min,
double *lat_max, double *lon_min,
double *lon_max);
void DECL_EXP PI_UpdateContext(
PI_S57Obj *pObj);
PI_LUPname DECL_EXP PI_GetObjectLUPName(
PI_S57Obj *pObj);
PI_DisPrio DECL_EXP PI_GetObjectDisplayPriority(
PI_S57Obj *pObj);
PI_DisCat DECL_EXP PI_GetObjectDisplayCategory(
PI_S57Obj *pObj);
void DECL_EXP PI_PLIBSetLineFeaturePriority(
PI_S57Obj *pObj,
int prio);
void DECL_EXP PI_PLIBPrepareForNewRender(void);
void DECL_EXP PI_PLIBFreeContext(void *pContext);
void DECL_EXP PI_PLIBSetRenderCaps(unsigned int flags);
bool DECL_EXP PI_PLIBSetContext(
PI_S57Obj *pObj);
int DECL_EXP PI_PLIBRenderObjectToDC(wxDC *pdc,
PI_S57Obj *pObj,
int DECL_EXP PI_PLIBRenderAreaToDC(wxDC *pdc,
PI_S57Obj *pObj,
unsigned char *pixbuf);
int DECL_EXP PI_PLIBRenderAreaToGL(
const wxGLContext &glcc,
PI_S57Obj *pObj,
int DECL_EXP PI_PLIBRenderObjectToGL(
const wxGLContext &glcc,
PI_S57Obj *pObj,
float lat = 0, float lon = 0);
extern DECL_EXP
void PlugInNormalizeViewport(
PlugIn_ViewPort *vp,
float lat = 0,
float lon = 0);
class wxPoint2DDouble;
wxPoint2DDouble *pp, double lat,
double lon);
extern DECL_EXP double fromDMM_Plugin(wxString sdms);
extern DECL_EXP void SetCanvasRotation(double rotation);
extern DECL_EXP void SetCanvasProjection(int projection);
extern DECL_EXP bool GetSingleWaypoint(wxString GUID,
extern DECL_EXP bool CheckEdgePan_PlugIn(int x, int y, bool dragging,
int margin, int delta);
extern DECL_EXP wxBitmap GetIcon_PlugIn(const wxString &name);
extern DECL_EXP void SetCursor_PlugIn(wxCursor *pPlugin_Cursor = NULL);
extern DECL_EXP wxFont *GetOCPNScaledFont_PlugIn(wxString TextElement,
int default_size = 0);
extern DECL_EXP double GetOCPNGUIToolScaleFactor_PlugIn(int GUIScaledFactor);
extern DECL_EXP double GetOCPNGUIToolScaleFactor_PlugIn();
extern DECL_EXP float GetOCPNChartScaleFactor_Plugin();
extern DECL_EXP double GetCanvasTilt();
extern DECL_EXP void SetCanvasTilt(double tilt);
int deviceIndex = -1);
extern DECL_EXP void AddChartDirectory(wxString &path);
extern DECL_EXP void ForceChartDBUpdate();
extern DECL_EXP void ForceChartDBRebuild();
extern DECL_EXP wxString GetWritableDocumentsDir(void);
extern DECL_EXP wxDialog *GetActiveOptionsDialog();
extern DECL_EXP wxArrayString GetWaypointGUIDArray(void);
extern DECL_EXP wxArrayString GetIconNameArray(void);
extern DECL_EXP wxString GetActiveStyleName();
extern DECL_EXP wxBitmap GetBitmapFromSVGFile(wxString filename,
unsigned int width,
unsigned int height);
extern DECL_EXP bool IsTouchInterface_PlugIn(void);
extern DECL_EXP int PlatformDirSelectorDialog(wxWindow *parent,
wxString *file_spec,
wxString Title, wxString initDir);
extern DECL_EXP int PlatformFileSelectorDialog(wxWindow *parent,
wxString *file_spec,
wxString Title, wxString initDir,
wxString suggestedName,
wxString wildcard);
typedef enum _OCPN_DLStatus {
OCPN_DL_UNKNOWN = -1,
OCPN_DL_NO_ERROR = 0,
OCPN_DL_FAILED = 1,
OCPN_DL_ABORTED = 2,
OCPN_DL_USER_TIMEOUT = 4,
OCPN_DL_STARTED = 8
} OCPN_DLStatus;
typedef enum _OCPN_DLCondition {
OCPN_DL_EVENT_TYPE_UNKNOWN = -1,
OCPN_DL_EVENT_TYPE_START = 80,
OCPN_DL_EVENT_TYPE_PROGRESS = 81,
OCPN_DL_EVENT_TYPE_END = 82
} OCPN_DLCondition;
0x0002,
0x0020,
0x0040,
0x0100,
OCPN_DLDS_CONN_SETTINGS_ALL,
0x1000,
};
#define ONLINE_CHECK_RETRY \
30
extern DECL_EXP _OCPN_DLStatus OCPN_downloadFile(
const wxString &url, const wxString &outputFile, const wxString &title,
const wxString &message, const wxBitmap &bitmap, wxWindow *parent,
long style, int timeout_secs);
extern DECL_EXP _OCPN_DLStatus
OCPN_downloadFileBackground(const wxString &url, const wxString &outputFile,
wxEvtHandler *handler, long *handle);
extern DECL_EXP void OCPN_cancelDownloadFileBackground(long handle);
extern DECL_EXP _OCPN_DLStatus OCPN_postDataHttp(const wxString &url,
const wxString ¶meters,
wxString &result,
int timeout_secs);
extern DECL_EXP bool OCPN_isOnline();
public:
_OCPN_DLStatus getDLEventStatus() { return m_stat; }
OCPN_DLCondition getDLEventCondition() { return m_condition; }
void setDLEventStatus(_OCPN_DLStatus stat) { m_stat = stat; }
void setDLEventCondition(OCPN_DLCondition cond) { m_condition = cond; }
void setTotal(long bytes) { m_totalBytes = bytes; }
void setTransferred(long bytes) { m_sofarBytes = bytes; }
long getTotal() { return m_totalBytes; }
long getTransferred() { return m_sofarBytes; }
void setComplete(bool b_complete) { m_b_complete = b_complete; }
bool getComplete() { return m_b_complete; }
wxEvent *Clone() const;
private:
OCPN_DLStatus m_stat;
OCPN_DLCondition m_condition;
long m_totalBytes;
long m_sofarBytes;
bool m_b_complete;
};
#ifdef MAKING_PLUGIN
extern DECL_IMP wxEventType wxEVT_DOWNLOAD_EVENT;
#else
extern DECL_EXP wxEventType wxEVT_DOWNLOAD_EVENT;
#endif
bool LaunchDefaultBrowser_Plugin(wxString url);
extern DECL_EXP void PlugInAISDrawGL(wxGLCanvas *glcanvas,
const wxColour color);
extern DECL_EXP double PlugInGetDisplaySizeMM();
int point_size, wxFontFamily family, wxFontStyle style, wxFontWeight weight,
bool underline = false, const wxString &facename = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
extern DECL_EXP int PlugInGetMinAvailableGshhgQuality();
extern DECL_EXP int PlugInGetMaxAvailableGshhgQuality();
extern DECL_EXP void PlugInHandleAutopilotRoute(bool enable);
extern DECL_EXP wxString GetPluginDataDir(const char *plugin_name);
extern DECL_EXP bool ShuttingDown(void);
extern DECL_EXP wxWindow *PluginGetFocusCanvas();
extern DECL_EXP wxWindow *PluginGetOverlayRenderCanvas();
extern "C" DECL_EXP void CanvasJumpToPosition(wxWindow *canvas, double lat,
double lon,
double scale);
extern "C" DECL_EXP int AddCanvasMenuItem(wxMenuItem *pitem,
const char *name = "");
extern "C" DECL_EXP void RemoveCanvasMenuItem(
int item, const char *name = "");
extern "C" DECL_EXP void SetCanvasMenuItemViz(
int item, bool viz,
const char *name = "");
extern "C" DECL_EXP void SetCanvasMenuItemGrey(int item, bool grey,
const char *name = "");
extern DECL_EXP wxString GetSelectedWaypointGUID_Plugin();
extern DECL_EXP wxString GetSelectedRouteGUID_Plugin();
extern DECL_EXP wxString GetSelectedTrackGUID_Plugin();
extern DECL_EXP std::unique_ptr<PlugIn_Waypoint> GetWaypoint_Plugin(
const wxString &);
extern DECL_EXP std::unique_ptr<PlugIn_Route> GetRoute_Plugin(const wxString &);
extern DECL_EXP std::unique_ptr<PlugIn_Track> GetTrack_Plugin(const wxString &);
extern DECL_EXP wxWindow *GetCanvasUnderMouse();
extern DECL_EXP int GetCanvasIndexUnderMouse();
extern DECL_EXP wxWindow *GetCanvasByIndex(int canvasIndex);
extern DECL_EXP int GetCanvasCount();
extern DECL_EXP bool CheckMUIEdgePan_PlugIn(int x, int y, bool dragging,
int margin, int delta,
int canvasIndex);
extern DECL_EXP void SetMUICursor_PlugIn(wxCursor *pCursor, int canvasIndex);
extern DECL_EXP wxRect GetMasterToolbarRect();
enum SDDMFORMAT {
DEGREES_DECIMAL_MINUTES = 0,
DECIMAL_DEGREES,
DEGREES_MINUTES_SECONDS,
END_SDDMFORMATS
};
extern DECL_EXP int GetLatLonFormat(void);
extern "C" DECL_EXP void ZeroXTE();
public:
const wxString &wp_name, const wxString &GUID = "",
const double ScaMin = 1e9, const bool bNameVisible = false,
const int nRanges = 0, const double RangeDistance = 1.0,
const wxColor RangeColor = wxColor(255, 0, 0));
void InitDefaults();
bool GetFSStatus();
int GetRouteMembershipCount();
double m_lat;
double m_lon;
wxString m_GUID;
wxString m_MarkName;
wxString m_MarkDescription;
wxDateTime m_CreateTime;
bool IsVisible;
bool IsActive;
double scamin;
bool b_useScamin;
bool IsNameVisible;
int nrange_rings;
double RangeRingSpace;
wxColour RangeRingColor;
wxString IconName;
wxString IconDescription;
Plugin_HyperlinkList *m_HyperlinkList;
};
public:
wxString m_NameString;
wxString m_StartString;
wxString m_EndString;
wxString m_GUID;
bool m_isActive;
bool m_isVisible;
wxString m_Description;
Plugin_WaypointExList *pWaypointList;
};
extern DECL_EXP wxArrayString GetRouteGUIDArray(void);
extern DECL_EXP wxArrayString GetTrackGUIDArray(void);
extern DECL_EXP bool GetSingleWaypointEx(wxString GUID,
bool b_permanent = true);
bool b_permanent = true);
extern DECL_EXP std::unique_ptr<PlugIn_Waypoint_Ex> GetWaypointEx_Plugin(
const wxString &);
extern DECL_EXP std::unique_ptr<PlugIn_Route_Ex> GetRouteEx_Plugin(
const wxString &);
extern DECL_EXP wxString
GetActiveWaypointGUID(void);
extern DECL_EXP wxString
GetActiveRouteGUID(void);
extern DECL_EXP double OCPN_GetDisplayContentScaleFactor();
extern DECL_EXP double OCPN_GetWinDIPScaleFactor();
extern DECL_EXP std::vector<std::string> GetActivePriorityIdentifiers();
typedef enum _OBJECT_LAYER_REQ {
OBJECTS_ALL = 0,
OBJECTS_NO_LAYERS,
OBJECTS_ONLY_LAYERS
} OBJECT_LAYER_REQ;
extern DECL_EXP wxArrayString GetRouteGUIDArray(OBJECT_LAYER_REQ req);
extern DECL_EXP wxArrayString GetTrackGUIDArray(OBJECT_LAYER_REQ req);
extern DECL_EXP wxArrayString GetWaypointGUIDArray(OBJECT_LAYER_REQ req);
#ifndef OBSERVABLE_EVT_H
#define OBSERVABLE_EVT_H
public:
ObservedEvt(wxEventType commandType = obsNOTIFY,
int id = 0)
: wxCommandEvent(commandType, id) {}
this->m_shared_ptr = event.m_shared_ptr;
}
wxEvent *Clone()
const {
return new ObservedEvt(*
this); }
std::shared_ptr<const void> GetSharedPtr() const { return m_shared_ptr; }
void SetSharedPtr(std::shared_ptr<const void> p) { m_shared_ptr = p; }
private:
std::shared_ptr<const void> m_shared_ptr;
};
#endif
const uint64_t id;
NMEA2000Id(
int value) : id(static_cast<uint64_t>(value)) {};
};
extern DECL_EXP std::shared_ptr<ObservableListener> GetListener(
NMEA2000Id id, wxEventType ev, wxEvtHandler *handler);
const std::string id;
};
extern DECL_EXP std::shared_ptr<ObservableListener> GetListener(
NMEA0183Id id, wxEventType ev, wxEvtHandler *handler);
const std::string id;
};
extern DECL_EXP std::shared_ptr<ObservableListener> GetListener(
SignalkId id, wxEventType ev, wxEvtHandler *handler);
const int type;
};
extern DECL_EXP std::shared_ptr<ObservableListener> GetListener(
NavDataId id, wxEventType ev, wxEvtHandler *handler);
double lat;
double lon;
double sog;
double cog;
double var;
double hdt;
time_t time;
};
RESULT_COMM_NO_ERROR = 0,
RESULT_COMM_INVALID_HANDLE,
RESULT_COMM_INVALID_PARMS,
RESULT_COMM_TX_ERROR,
RESULT_COMM_REGISTER_GATEWAY_ERROR,
RESULT_COMM_REGISTER_PGN_ERROR
extern DECL_EXP const std::unordered_map<std::string, std::string>
DriverHandle handle,
const std::shared_ptr<std::vector<uint8_t>> &payload);
DriverHandle handle,
int PGN,
int destinationCANAddress,
int priority,
const std::shared_ptr<std::vector<uint8_t>> &payload);
std::vector<int> &pgn_list);
typedef enum _PI_NavMode {
PI_NORTH_UP_MODE = 0,
PI_COURSE_UP_MODE,
PI_HEAD_UP_MODE,
} PI_NavMode;
const std::string id;
};
extern DECL_EXP std::shared_ptr<ObservableListener> GetListener(
PluginMsgId id, wxEventType ev, wxEvtHandler *handler);
extern DECL_EXP void ExitOCPN();
extern "C" DECL_EXP void RequestWindowRefresh(wxWindow *win,
bool eraseBackground);
extern DECL_EXP bool GetFullScreen();
extern DECL_EXP void SetFullScreen(bool full_screen_on);
extern DECL_EXP void EnableTouchMode(bool enable);
extern DECL_EXP bool GetTouchMode();
extern DECL_EXP void SetGlobalColor(std::string table, std::string name,
wxColor color);
extern DECL_EXP wxColor GetGlobalColorD(std::string map_name, std::string name);
extern DECL_EXP void EnableStatusBar(bool enable);
extern DECL_EXP void EnableMenu(bool enable);
extern DECL_EXP bool GetEnableStatusBar();
extern DECL_EXP bool GetEnableMenu();
extern DECL_EXP void SetNavigationMode(PI_NavMode mode, int CanvasIndex);
extern DECL_EXP PI_NavMode GetNavigationMode(int CanvasIndex);
extern DECL_EXP void EnableLookaheadMode(bool enable, int CanvasIndex);
extern DECL_EXP bool GetEnableLookaheadMode(int CanvasIndex);
extern DECL_EXP void EnableMUIBar(bool enable, int CanvasIndex);
extern DECL_EXP void EnableCompassGPSIcon(bool enable, int CanvasIndex);
extern DECL_EXP void EnableChartBar(bool enable, int CanvasIndex);
extern DECL_EXP bool GetEnableMUIBar(int CanvasIndex);
extern DECL_EXP bool GetEnableCompassGPSIcon(int CanvasIndex);
extern DECL_EXP bool GetEnableChartBar(int CanvasIndex);
extern DECL_EXP void EnableCanvasFocusBar(bool enable, int CanvasIndex);
extern DECL_EXP bool GetEnableCanvasFocusBar(int CanvasIndex);
extern DECL_EXP void EnableLatLonGrid(bool enable, int CanvasIndex);
extern DECL_EXP void EnableChartOutlines(bool enable, int CanvasIndex);
extern DECL_EXP void EnableDepthUnitDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableAisTargetDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableTideStationsDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableCurrentStationsDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableENCTextDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableENCDepthSoundingsDisplay(bool enable,
int CanvasIndex);
extern DECL_EXP void EnableBuoyLightLabelsDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableLightsDisplay(bool enable, int CanvasIndex);
extern DECL_EXP void EnableLightDescriptionsDisplay(bool enable,
int CanvasIndex);
extern DECL_EXP void SetENCDisplayCategory(PI_DisCat cat, int CanvasIndex);
extern DECL_EXP bool GetEnableLatLonGrid(int CanvasIndex);
extern DECL_EXP bool GetEnableChartOutlines(int CanvasIndex);
extern DECL_EXP bool GetEnableDepthUnitDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableAisTargetDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableTideStationsDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableCurrentStationsDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableENCTextDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableENCDepthSoundingsDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableBuoyLightLabelsDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableLightsDisplay(int CanvasIndex);
extern DECL_EXP bool GetEnableLightDescriptionsDisplay(int CanvasIndex);
extern DECL_EXP PI_DisCat GetENCDisplayCategory(int CanvasIndex);
extern DECL_EXP void PluginSetFollowMode(int CanvasIndex, bool enable_follow);
extern DECL_EXP bool PluginGetFollowMode(int CanvasIndex);
extern DECL_EXP void SetTrackingMode(bool enable);
extern DECL_EXP bool GetTrackingMode();
extern DECL_EXP void SetAppColorScheme(PI_ColorScheme cs);
extern DECL_EXP PI_ColorScheme GetAppColorScheme();
extern DECL_EXP void EnableSplitScreenLayout(bool enable = true);
extern DECL_EXP void PluginZoomCanvas(int CanvasIndex, double factor);
extern DECL_EXP bool GetEnableMainToolbar();
extern DECL_EXP void SetEnableMainToolbar(bool enable);
extern DECL_EXP void ShowGlobalSettingsDialog();
extern DECL_EXP void PluginCenterOwnship(int CanvasIndex);
extern DECL_EXP bool GetEnableTenHertzUpdate();
extern DECL_EXP void EnableTenHertzUpdate(bool enable);
extern DECL_EXP void ConfigFlushAndReload();
#endif
Keeps listening over it's lifespan, removes itself on destruction.
Adds a std::shared<void> element to wxCommandEvent.
CommDriverResult
Error return values
@ OCPN_DLDS_CONN_SETTINGS_AUTH
The dialog allows the user to change the authentication settings.
@ OCPN_DLDS_CAN_START
The transfer won't start automatically.
@ OCPN_DLDS_URL
The dialog shows the URL involved in the transfer.
@ OCPN_DLDS_AUTO_CLOSE
The dialog auto closes when transfer is complete.
@ OCPN_DLDS_CAN_ABORT
The transfer can be aborted by the user.
@ OCPN_DLDS_ESTIMATED_TIME
The dialog shows the estimated total time.
@ OCPN_DLDS_SIZE
The dialog shows the size of the resource to download/upload.
@ OCPN_DLDS_CONN_SETTINGS_PROXY
The dialog allows the user to change the proxy settings.
@ OCPN_DLDS_REMAINING_TIME
The dialog shows the remaining time.
@ OCPN_DLDS_SPEED
The dialog shows the transfer speed.
@ OCPN_DLDS_ELAPSED_TIME
The dialog shows the elapsed time.
@ OCPN_DLDS_CAN_PAUSE
The transfer can be paused.
@ OCPN_DLDS_CONN_SETTINGS_PORT
The dialog allows the user to change the port for the transfer.
std::string DriverHandle
Plugin API supporting direct access to comm drivers for output purposes.
enum CommDriverResult _CommDriverResult
Error return values
wxFont * OCPNGetFont(wxString TextElement, int default_size)
Gets a font for UI elements.
wxFont GetOCPNGUIScaledFont_PlugIn(wxString item)
Gets a uniquely scaled font copy for responsive UI elements.
wxFont * FindOrCreateFont_PlugIn(int point_size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underline, const wxString &facename, wxFontEncoding encoding)
Creates or finds a font in the font cache.
int GetGlobalWatchdogTimoutSeconds()
Comm Global Watchdog Query
wxColour GetFontColour_PlugIn(wxString TextElement)
Gets color configured for a UI text element.
bool PlugInPlaySoundEx(wxString &sound_file, int deviceIndex)
Start playing a sound file asynchronously.
bool PlugInSetFontColor(const wxString TextElement, const wxColour color)
Sets text color for a UI element.
std::vector< std::string > GetPriorityMaps()
Comm Priority query support methods
bool AddPersistentFontKey(wxString TextElement)
Registers a new font configuration element.
void PlugInPlaySound(wxString &sound_file)
Start playing a sound file asynchronously.
std::string GetPluginMsgPayload(PluginMsgId id, ObservedEvt ev)
Retrieve the string in a plugin message, internal or received on the REST insterface.
std::string GetN0183Payload(NMEA0183Id id, ObservedEvt ev)
Return payload in a received n0183 message of type id in ev.
PluginNavdata GetEventNavdata(ObservedEvt ev)
Return BasicNavDataMsg decoded data available in ev.
CommDriverResult WriteCommDriverN2K(DriverHandle handle, int PGN, int destinationCANAddress, int priority, const std::shared_ptr< std::vector< uint8_t > > &payload)
Send a PGN message to an NMEA2000 address.
std::vector< DriverHandle > GetActiveDrivers()
Comm port plugin TX support methods
const std::unordered_map< std::string, std::string > GetAttributes(DriverHandle handle)
Query a specific driver for attributes
std::string GetN2000Source(NMEA2000Id id, ObservedEvt ev)
Return source identifier (iface) of a received n2000 message of type id in ev.
vector< uint8_t > GetN2000Payload(NMEA2000Id id, ObservedEvt ev)
Return N2K payload for a received n2000 message of type id in ev.
std::shared_ptr< void > GetSignalkPayload(ObservedEvt ev)
Get SignalK status payload after receiving a message.
CommDriverResult WriteCommDriver(DriverHandle handle, const std::shared_ptr< std::vector< uint8_t > > &payload)
Send a non-NMEA2000 message.
CommDriverResult RegisterTXPGNs(DriverHandle handle, std::vector< int > &pgn_list)
Register PGNs that this application intends to transmit for some NMEA 2000 adapters like Actisense NG...
Facade for BasicNavDataMsg.
Facade for NavAddrPluginMsg.
Available decoded data for plugins.
Facade for NavAddrSignalK.