OpenCPN Partial API docs
|
#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>
#include <memory>
#include <vector>
#include <unordered_map>
Go to the source code of this file.
Typedefs | |
typedef enum ChartTypeEnumPI | _ChartTypeEnumPI |
typedef enum ChartFamilyEnumPI | _ChartFamilyEnumPI |
typedef enum ChartDepthUnitTypePI | _ChartDepthUnitTypePI |
typedef enum OcpnProjTypePI | _OcpnProjTypePI |
typedef struct _ExtentPI | ExtentPI |
typedef opencpn_plugin * | create_t(void *) |
typedef void | destroy_t(opencpn_plugin *) |
typedef enum OptionsParentPI | _OptionsParentPI |
typedef enum _PI_LUPname | PI_LUPname |
typedef enum _PI_DisCat | PI_DisCat |
typedef enum _PI_DisPrio | PI_DisPrio |
typedef enum PI_InitReturn | _PI_InitReturn |
typedef enum _OCPN_DLStatus | OCPN_DLStatus |
typedef enum _OCPN_DLCondition | OCPN_DLCondition |
typedef enum _OBJECT_LAYER_REQ | OBJECT_LAYER_REQ |
typedef std::string | DriverHandle |
Plugin API supporting direct access to comm drivers for output purposes. More... | |
typedef enum CommDriverResult | _CommDriverResult |
Error return values | |
Enumerations | |
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 } |
enum | plugin_ais_alarm_type { PI_AIS_NO_ALARM = 0 , PI_AIS_ALARM_SET , PI_AIS_ALARM_ACKNOWLEDGED } |
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 } |
enum | ChartFamilyEnumPI { PI_CHART_FAMILY_UNKNOWN = 0 , PI_CHART_FAMILY_RASTER , PI_CHART_FAMILY_VECTOR , PI_CHART_FAMILY_DONTCARE } |
enum | ChartDepthUnitTypePI { PI_DEPTH_UNIT_UNKNOWN , PI_DEPTH_UNIT_FEET , PI_DEPTH_UNIT_METERS , PI_DEPTH_UNIT_FATHOMS } |
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 } |
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 } |
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 } |
enum | _PI_DisCat { PI_DISPLAYBASE = 'D' , PI_STANDARD = 'S' , PI_OTHER = 'O' , PI_MARINERS_STANDARD = 'M' , PI_MARINERS_OTHER , PI_DISP_CAT_NUM } |
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 } |
enum | PI_InitReturn { PI_INIT_OK = 0 , PI_INIT_FAIL_RETRY , PI_INIT_FAIL_REMOVE , PI_INIT_FAIL_NOERROR } |
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 } |
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 } |
enum | OCPN_DLDialogStyle { OCPN_DLDS_ELAPSED_TIME = 0x0001 , OCPN_DLDS_ESTIMATED_TIME , OCPN_DLDS_REMAINING_TIME = 0x0004 , OCPN_DLDS_SPEED = 0x0008 , OCPN_DLDS_SIZE = 0x0010 , OCPN_DLDS_URL , OCPN_DLDS_CONN_SETTINGS_AUTH , OCPN_DLDS_CONN_SETTINGS_PORT = 0x0080 , OCPN_DLDS_CONN_SETTINGS_PROXY , OCPN_DLDS_CONN_SETTINGS_ALL , OCPN_DLDS_SHOW_ALL , OCPN_DLDS_CAN_ABORT = 0x0200 , OCPN_DLDS_CAN_START = 0x0400 , OCPN_DLDS_CAN_PAUSE = 0x0800 , OCPN_DLDS_AUTO_CLOSE , OCPN_DLDS_DEFAULT_STYLE } |
enum | SDDMFORMAT { DEGREES_DECIMAL_MINUTES = 0 , DECIMAL_DEGREES , DEGREES_MINUTES_SECONDS , END_SDDMFORMATS } |
enum | _OBJECT_LAYER_REQ { OBJECTS_ALL = 0 , OBJECTS_NO_LAYERS , OBJECTS_ONLY_LAYERS } |
enum | CommDriverResult { 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 } |
Error return values | |
Functions | |
WX_DEFINE_ARRAY_PTR (PlugIn_AIS_Target *, ArrayOfPlugIn_AIS_Targets) | |
WX_DECLARE_LIST (Plugin_Hyperlink, Plugin_HyperlinkList) | |
WX_DECLARE_LIST (PlugIn_Waypoint, Plugin_WaypointList) | |
DECL_EXP int | InsertPlugInTool (wxString label, wxBitmap *bitmap, wxBitmap *bmpRollover, wxItemKind kind, wxString shortHelp, wxString longHelp, wxObject *clientData, int position, int tool_sel, opencpn_plugin *pplugin) |
DECL_EXP void | RemovePlugInTool (int tool_id) |
DECL_EXP void | SetToolbarToolViz (int item, bool viz) |
DECL_EXP void | SetToolbarItemState (int item, bool toggle) |
DECL_EXP void | SetToolbarToolBitmaps (int item, wxBitmap *bitmap, wxBitmap *bmpRollover) |
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, opencpn_plugin *pplugin) |
DECL_EXP void | SetToolbarToolBitmapsSVG (int item, wxString SVGfile, wxString SVGfileRollover, wxString SVGfileToggled) |
DECL_EXP int | AddCanvasContextMenuItem (wxMenuItem *pitem, opencpn_plugin *pplugin) |
DECL_EXP void | RemoveCanvasContextMenuItem (int item) |
DECL_EXP void | SetCanvasContextMenuItemViz (int item, bool viz) |
DECL_EXP void | SetCanvasContextMenuItemGrey (int item, bool grey) |
DECL_EXP wxFileConfig * | GetOCPNConfigObject (void) |
DECL_EXP void | RequestRefresh (wxWindow *) |
DECL_EXP bool | GetGlobalColor (wxString colorName, wxColour *pcolour) |
DECL_EXP void | GetCanvasPixLL (PlugIn_ViewPort *vp, wxPoint *pp, double lat, double lon) |
DECL_EXP void | GetCanvasLLPix (PlugIn_ViewPort *vp, wxPoint p, double *plat, double *plon) |
DECL_EXP wxWindow * | GetOCPNCanvasWindow () |
DECL_EXP wxFont * | OCPNGetFont (wxString TextElement, int default_size) |
DECL_EXP wxString * | GetpSharedDataLocation () |
DECL_EXP ArrayOfPlugIn_AIS_Targets * | GetAISTargetArray (void) |
DECL_EXP wxAuiManager * | GetFrameAuiManager (void) |
DECL_EXP bool | AddLocaleCatalog (wxString catalog) |
DECL_EXP void | PushNMEABuffer (wxString str) |
DECL_EXP wxXmlDocument | GetChartDatabaseEntryXML (int dbIndex, bool b_getGeom) |
DECL_EXP bool | UpdateChartDBInplace (wxArrayString dir_array, bool b_force_update, bool b_ProgressDialog) |
DECL_EXP wxArrayString | GetChartDBDirArrayString () |
DECL_EXP void | SendPluginMessage (wxString message_id, wxString message_body) |
DECL_EXP void | DimeWindow (wxWindow *) |
DECL_EXP void | JumpToPosition (double lat, double lon, double scale) |
DECL_EXP void | PositionBearingDistanceMercator_Plugin (double lat, double lon, double brg, double dist, double *dlat, double *dlon) |
DECL_EXP void | DistanceBearingMercator_Plugin (double lat0, double lon0, double lat1, double lon1, double *brg, double *dist) |
DECL_EXP double | DistGreatCircle_Plugin (double slat, double slon, double dlat, double dlon) |
DECL_EXP void | toTM_Plugin (float lat, float lon, float lat0, float lon0, double *x, double *y) |
DECL_EXP void | fromTM_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
DECL_EXP void | toSM_Plugin (double lat, double lon, double lat0, double lon0, double *x, double *y) |
DECL_EXP void | fromSM_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
DECL_EXP void | toSM_ECC_Plugin (double lat, double lon, double lat0, double lon0, double *x, double *y) |
DECL_EXP void | fromSM_ECC_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
DECL_EXP bool | DecodeSingleVDOMessage (const wxString &str, PlugIn_Position_Fix_Ex *pos, wxString *acc) |
DECL_EXP int | GetChartbarHeight (void) |
DECL_EXP bool | GetActiveRoutepointGPX (char *buffer, unsigned int buffer_length) |
DECL_EXP wxScrolledWindow * | AddOptionsPage (OptionsParentPI parent, wxString title) |
DECL_EXP bool | DeleteOptionsPage (wxScrolledWindow *page) |
DECL_EXP double | toUsrDistance_Plugin (double nm_distance, int unit=-1) |
DECL_EXP double | fromUsrDistance_Plugin (double usr_distance, int unit=-1) |
DECL_EXP double | toUsrSpeed_Plugin (double kts_speed, int unit=-1) |
DECL_EXP double | fromUsrSpeed_Plugin (double usr_speed, int unit=-1) |
DECL_EXP double | toUsrTemp_Plugin (double cel_temp, int unit=-1) |
DECL_EXP double | fromUsrTemp_Plugin (double usr_temp, int unit=-1) |
DECL_EXP wxString | getUsrDistanceUnit_Plugin (int unit=-1) |
DECL_EXP wxString | getUsrSpeedUnit_Plugin (int unit=-1) |
DECL_EXP wxString | getUsrTempUnit_Plugin (int unit=-1) |
DECL_EXP wxString | GetNewGUID () |
DECL_EXP bool | PlugIn_GSHHS_CrossesLand (double lat1, double lon1, double lat2, double lon2) |
DECL_EXP void | PlugInPlaySound (wxString &sound_file) |
Start playing a sound file asynchronously. More... | |
DECL_EXP wxBitmap * | FindSystemWaypointIcon (wxString &icon_name) |
DECL_EXP bool | AddCustomWaypointIcon (wxBitmap *pimage, wxString key, wxString description) |
DECL_EXP bool | AddSingleWaypoint (PlugIn_Waypoint *pwaypoint, bool b_permanent=true) |
DECL_EXP bool | DeleteSingleWaypoint (wxString &GUID) |
DECL_EXP bool | UpdateSingleWaypoint (PlugIn_Waypoint *pwaypoint) |
DECL_EXP bool | AddPlugInRoute (PlugIn_Route *proute, bool b_permanent=true) |
DECL_EXP bool | DeletePlugInRoute (wxString &GUID) |
DECL_EXP bool | UpdatePlugInRoute (PlugIn_Route *proute) |
DECL_EXP bool | AddPlugInTrack (PlugIn_Track *ptrack, bool b_permanent=true) |
DECL_EXP bool | DeletePlugInTrack (wxString &GUID) |
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) |
DECL_EXP wxString | toSDMM_PlugIn (int NEflag, double a, bool hi_precision=true) |
DECL_EXP wxString * | GetpPrivateApplicationDataLocation () |
DECL_EXP wxString | GetOCPN_ExePath (void) |
DECL_EXP wxString * | GetpPlugInLocation () |
DECL_EXP wxString | GetPlugInPath (opencpn_plugin *pplugin) |
DECL_EXP int | AddChartToDBInPlace (wxString &full_path, bool b_RefreshCanvas) |
DECL_EXP int | RemoveChartFromDBInPlace (wxString &full_path) |
DECL_EXP wxString | GetLocaleCanonicalName () |
WX_DECLARE_LIST (PI_S57Obj, ListOfPI_S57Obj) | |
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) |
bool DECL_EXP | PI_PLIBObjectRenderCheck (PI_S57Obj *pObj, PlugIn_ViewPort *vp) |
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, PlugIn_ViewPort *vp) |
int DECL_EXP | PI_PLIBRenderAreaToDC (wxDC *pdc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect rect, unsigned char *pixbuf) |
int DECL_EXP | PI_PLIBRenderAreaToGL (const wxGLContext &glcc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect &render_rect) |
int DECL_EXP | PI_PLIBRenderObjectToGL (const wxGLContext &glcc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect &render_rect) |
DECL_EXP bool | PlugInHasNormalizedViewPort (PlugIn_ViewPort *vp) |
DECL_EXP void | PlugInMultMatrixViewport (PlugIn_ViewPort *vp, float lat=0, float lon=0) |
DECL_EXP void | PlugInNormalizeViewport (PlugIn_ViewPort *vp, float lat=0, float lon=0) |
DECL_EXP void | GetDoubleCanvasPixLL (PlugIn_ViewPort *vp, wxPoint2DDouble *pp, double lat, double lon) |
DECL_EXP double | fromDMM_Plugin (wxString sdms) |
DECL_EXP void | SetCanvasRotation (double rotation) |
DECL_EXP void | SetCanvasProjection (int projection) |
DECL_EXP bool | GetSingleWaypoint (wxString GUID, PlugIn_Waypoint *pwaypoint) |
DECL_EXP bool | CheckEdgePan_PlugIn (int x, int y, bool dragging, int margin, int delta) |
DECL_EXP wxBitmap | GetIcon_PlugIn (const wxString &name) |
DECL_EXP void | SetCursor_PlugIn (wxCursor *pPlugin_Cursor=NULL) |
DECL_EXP wxFont * | GetOCPNScaledFont_PlugIn (wxString TextElement, int default_size=0) |
DECL_EXP wxFont | GetOCPNGUIScaledFont_PlugIn (wxString item) |
DECL_EXP double | GetOCPNGUIToolScaleFactor_PlugIn (int GUIScaledFactor) |
DECL_EXP double | GetOCPNGUIToolScaleFactor_PlugIn () |
DECL_EXP float | GetOCPNChartScaleFactor_Plugin () |
DECL_EXP wxColour | GetFontColour_PlugIn (wxString TextElement) |
DECL_EXP double | GetCanvasTilt () |
DECL_EXP void | SetCanvasTilt (double tilt) |
DECL_EXP bool | PlugInPlaySoundEx (wxString &sound_file, int deviceIndex=-1) |
Start playing a sound file asynchronously. More... | |
DECL_EXP void | AddChartDirectory (wxString &path) |
DECL_EXP void | ForceChartDBUpdate () |
DECL_EXP void | ForceChartDBRebuild () |
DECL_EXP wxString | GetWritableDocumentsDir (void) |
DECL_EXP wxDialog * | GetActiveOptionsDialog () |
DECL_EXP wxArrayString | GetWaypointGUIDArray (void) |
DECL_EXP wxArrayString | GetIconNameArray (void) |
DECL_EXP bool | AddPersistentFontKey (wxString TextElement) |
DECL_EXP wxString | GetActiveStyleName () |
DECL_EXP wxBitmap | GetBitmapFromSVGFile (wxString filename, unsigned int width, unsigned int height) |
DECL_EXP bool | IsTouchInterface_PlugIn (void) |
DECL_EXP int | PlatformDirSelectorDialog (wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir) |
DECL_EXP int | PlatformFileSelectorDialog (wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir, wxString suggestedName, wxString wildcard) |
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) |
DECL_EXP _OCPN_DLStatus | OCPN_downloadFileBackground (const wxString &url, const wxString &outputFile, wxEvtHandler *handler, long *handle) |
DECL_EXP void | OCPN_cancelDownloadFileBackground (long handle) |
DECL_EXP _OCPN_DLStatus | OCPN_postDataHttp (const wxString &url, const wxString ¶meters, wxString &result, int timeout_secs) |
DECL_EXP bool | OCPN_isOnline () |
bool | LaunchDefaultBrowser_Plugin (wxString url) |
DECL_EXP void | PlugInAISDrawGL (wxGLCanvas *glcanvas, const PlugIn_ViewPort &vp) |
DECL_EXP bool | PlugInSetFontColor (const wxString TextElement, const wxColour color) |
DECL_EXP double | PlugInGetDisplaySizeMM () |
DECL_EXP wxFont * | FindOrCreateFont_PlugIn (int point_size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underline=false, const wxString &facename=wxEmptyString, wxFontEncoding encoding=wxFONTENCODING_DEFAULT) |
DECL_EXP int | PlugInGetMinAvailableGshhgQuality () |
DECL_EXP int | PlugInGetMaxAvailableGshhgQuality () |
DECL_EXP void | PlugInHandleAutopilotRoute (bool enable) |
DECL_EXP wxString | GetPluginDataDir (const char *plugin_name) |
Return the plugin data directory for a given directory name. More... | |
DECL_EXP bool | ShuttingDown (void) |
DECL_EXP wxWindow * | PluginGetFocusCanvas () |
DECL_EXP wxWindow * | PluginGetOverlayRenderCanvas () |
DECL_EXP void | CanvasJumpToPosition (wxWindow *canvas, double lat, double lon, double scale) |
DECL_EXP int | AddCanvasMenuItem (wxMenuItem *pitem, opencpn_plugin *pplugin, const char *name="") |
DECL_EXP void | RemoveCanvasMenuItem (int item, const char *name="") |
DECL_EXP void | SetCanvasMenuItemViz (int item, bool viz, const char *name="") |
DECL_EXP void | SetCanvasMenuItemGrey (int item, bool grey, const char *name="") |
DECL_EXP wxString | GetSelectedWaypointGUID_Plugin () |
DECL_EXP wxString | GetSelectedRouteGUID_Plugin () |
DECL_EXP wxString | GetSelectedTrackGUID_Plugin () |
DECL_EXP std::unique_ptr< PlugIn_Waypoint > | GetWaypoint_Plugin (const wxString &) |
DECL_EXP std::unique_ptr< PlugIn_Route > | GetRoute_Plugin (const wxString &) |
DECL_EXP std::unique_ptr< PlugIn_Track > | GetTrack_Plugin (const wxString &) |
DECL_EXP wxWindow * | GetCanvasUnderMouse () |
DECL_EXP int | GetCanvasIndexUnderMouse () |
DECL_EXP wxWindow * | GetCanvasByIndex (int canvasIndex) |
DECL_EXP int | GetCanvasCount () |
DECL_EXP bool | CheckMUIEdgePan_PlugIn (int x, int y, bool dragging, int margin, int delta, int canvasIndex) |
DECL_EXP void | SetMUICursor_PlugIn (wxCursor *pCursor, int canvasIndex) |
DECL_EXP wxRect | GetMasterToolbarRect () |
DECL_EXP int | GetLatLonFormat (void) |
DECL_EXP void | ZeroXTE () |
WX_DECLARE_LIST (PlugIn_Waypoint_Ex, Plugin_WaypointExList) | |
DECL_EXP wxArrayString | GetRouteGUIDArray (void) |
DECL_EXP wxArrayString | GetTrackGUIDArray (void) |
DECL_EXP bool | GetSingleWaypointEx (wxString GUID, PlugIn_Waypoint_Ex *pwaypoint) |
DECL_EXP bool | AddSingleWaypointEx (PlugIn_Waypoint_Ex *pwaypoint, bool b_permanent=true) |
DECL_EXP bool | UpdateSingleWaypointEx (PlugIn_Waypoint_Ex *pwaypoint) |
DECL_EXP bool | AddPlugInRouteEx (PlugIn_Route_Ex *proute, bool b_permanent=true) |
DECL_EXP bool | UpdatePlugInRouteEx (PlugIn_Route_Ex *proute) |
DECL_EXP std::unique_ptr< PlugIn_Waypoint_Ex > | GetWaypointEx_Plugin (const wxString &) |
DECL_EXP std::unique_ptr< PlugIn_Route_Ex > | GetRouteEx_Plugin (const wxString &) |
DECL_EXP wxString | GetActiveWaypointGUID (void) |
DECL_EXP wxString | GetActiveRouteGUID (void) |
DECL_EXP double | OCPN_GetDisplayContentScaleFactor () |
DECL_EXP double | OCPN_GetWinDIPScaleFactor () |
DECL_EXP std::vector< std::string > | GetPriorityMaps () |
Comm Priority query support methods | |
DECL_EXP std::vector< std::string > | GetActivePriorityIdentifiers () |
DECL_EXP int | GetGlobalWatchdogTimoutSeconds () |
Comm Global Watchdog Query | |
DECL_EXP wxArrayString | GetRouteGUIDArray (OBJECT_LAYER_REQ req) |
DECL_EXP wxArrayString | GetTrackGUIDArray (OBJECT_LAYER_REQ req) |
DECL_EXP wxArrayString | GetWaypointGUIDArray (OBJECT_LAYER_REQ req) |
wxDECLARE_EVENT (obsNOTIFY, ObservedEvt) | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NMEA2000Id id, wxEventType ev, wxEvtHandler *handler) |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NMEA0183Id id, wxEventType ev, wxEvtHandler *handler) |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (SignalkId id, wxEventType ev, wxEvtHandler *handler) |
DECL_EXP std::vector< uint8_t > | GetN2000Payload (NMEA2000Id id, ObservedEvt ev) |
Return N2K payload for a received n2000 message of type id in ev. More... | |
std::shared_ptr< void > | GetSignalkPayload (ObservedEvt ev) |
Get SignalK status payload after receiving a message. More... | |
DECL_EXP std::string | GetN2000Source (NMEA2000Id id, ObservedEvt ev) |
Return source identifier (iface) of a received n2000 message of type id in ev. | |
DECL_EXP std::string | GetN0183Payload (NMEA0183Id id, ObservedEvt ev) |
Return payload in a received n0183 message of type id in ev. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NavDataId id, wxEventType ev, wxEvtHandler *handler) |
DECL_EXP PluginNavdata | GetEventNavdata (ObservedEvt ev) |
Return BasicNavDataMsg decoded data available in ev. | |
DECL_EXP std::vector< DriverHandle > | GetActiveDrivers () |
Query OCPN core for a list of active drivers More... | |
DECL_EXP const std::unordered_map< std::string, std::string > | GetAttributes (DriverHandle handle) |
Query a specific driver for attributes More... | |
DECL_EXP CommDriverResult | WriteCommDriver (DriverHandle handle, const std::shared_ptr< std::vector< uint8_t >> &payload) |
DECL_EXP 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. More... | |
DECL_EXP CommDriverResult | RegisterTXPGNs (DriverHandle handle, std::vector< int > &pgn_list) |
Special NMEA2000 requirements NMEA2000 bus protocol device management requires that devices writing on the bus must inform all bus listeners of the specific PGNs that may be transmitted by this device. More... | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (PluginMsgId id, wxEventType ev, wxEvtHandler *handler) |
DECL_EXP std::string | GetPluginMsgPayload (PluginMsgId id, ObservedEvt ev) |
Variables | |
DECL_EXP wxEventType | wxEVT_DOWNLOAD_EVENT |
Definition in file ocpn_plugin.h.
typedef std::string DriverHandle |
Plugin API supporting direct access to comm drivers for output purposes.
Definition of OCPN DriverHandle
Definition at line 1792 of file ocpn_plugin.h.
enum OCPN_DLDialogStyle |
Definition at line 1292 of file ocpn_plugin.h.
DECL_EXP std::vector<DriverHandle> GetActiveDrivers | ( | ) |
Query OCPN core for a list of active drivers
Query OCPN core for a list of active drivers
Definition at line 136 of file plugin_api.cpp.
DECL_EXP const std::unordered_map<std::string, std::string> GetAttributes | ( | DriverHandle | handle | ) |
Query a specific driver for attributes
Query driver attributes
Definition at line 148 of file plugin_api.cpp.
DECL_EXP std::vector<uint8_t> GetN2000Payload | ( | NMEA2000Id | id, |
ObservedEvt | ev | ||
) |
Return N2K payload for a received n2000 message of type id in ev.
The vector returned is described in the following example
[147,19, // Header bytes, unused 3, // N2K priority 16,240,1, // example pgn 126992 encoded little endian 255, // N2K destination address 1, // N2K origin address 255,255,255,255, // timestamp, unused 8, // count of following NMEA2000 data 13,240,207,76,208,3,94,40, // NMEA2000 data 85 // CRC byte, unused,not included in count ];
Definition at line 47 of file plugin_api.cpp.
DECL_EXP wxString GetPluginDataDir | ( | const char * | plugin_name | ) |
Return the plugin data directory for a given directory name.
On Linux, the returned data path is an existing directory ending in "opencpn/plugins/<plugin_name>" where the last part is the plugin_name argument. The prefix part is one of the directories listed in the environment variable XDG_DATA_DIRS, by default ~/.local/share:/usr/local/share:/usr/share.
On other platforms, the returned value is GetSharedDataDir() + "/opencpn/plugins/" + plugin_name (with native path separators) if that path exists.
Return "" if no existing directory is found.
Definition at line 269 of file base_platform.cpp.
std::shared_ptr<void> GetSignalkPayload | ( | ObservedEvt | ev | ) |
Get SignalK status payload after receiving a message.
auto ptr = GetSignalkPayload(ev); const auto msg = *std::static_pointer_cast<const wxJSONValue>(payload);The map contains the following entries:
Definition at line 68 of file plugin_api.cpp.
DECL_EXP void PlugInPlaySound | ( | wxString & | sound_file | ) |
Start playing a sound file asynchronously.
Supported formats depends on sound backend.
Definition at line 3089 of file pluginmanager.cpp.
DECL_EXP bool PlugInPlaySoundEx | ( | wxString & | sound_file, |
int | deviceIndex = -1 |
||
) |
Start playing a sound file asynchronously.
Supported formats depends on sound backend. The deviceIx is only used on platforms using the portaudio sound backend where -1 indicates the default device.
Definition at line 6562 of file pluginmanager.cpp.
DECL_EXP CommDriverResult RegisterTXPGNs | ( | DriverHandle | handle, |
std::vector< int > & | pgn_list | ||
) |
Special NMEA2000 requirements NMEA2000 bus protocol device management requires that devices writing on the bus must inform all bus listeners of the specific PGNs that may be transmitted by this device.
Once configured, this bus management process will be handled transparently by the OCPN core drivers. It is only necessary for plugins wishing to write to the NMEA2000 bus to register the specific PGNs that they anticipate using, with the selected driver.
Definition at line 220 of file plugin_api.cpp.
DECL_EXP CommDriverResult WriteCommDriverN2K | ( | DriverHandle | handle, |
int | PGN, | ||
int | destinationCANAddress, | ||
int | priority, | ||
const std::shared_ptr< std::vector< uint8_t >> & | payload | ||
) |