OpenCPN Partial API docs
Loading...
Searching...
No Matches
plugin_comm.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2024 Alec Leamas *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef PLUGIN_COMM_H
25#define PLUGIN_COMM_H
26
27#include <wx/event.h>
28#include <wx/jsonval.h>
29#include <wx/string.h>
30
31#include "ocpn-nlohmann/json.hpp"
32
33#include "model/ocpn_types.h"
34
35void SendMessageToAllPlugins(const std::string& message_id,
36 const std::string& message_body);
37
38void SendJsonMessageToAllPlugins(const std::string& message_id,
39 const nlohmann::json& v);
40
41void SendAISSentenceToAllPlugIns(const wxString& sentence);
42
43void SendPositionFixToAllPlugIns(GenericPosDatEx* ppos);
44
45void SendActiveLegInfoToAllPlugIns(const ActiveLegDat* leg_info);
46
47bool SendMouseEventToPlugins(wxMouseEvent& event);
48
49bool SendKeyEventToPlugins(wxKeyEvent& event);
50
51void SendPreShutdownHookToPlugins();
52
53void SendCursorLatLonToAllPlugIns(double lat, double lon);
54
72void SendNMEASentenceToAllPlugIns(const wxString& sentence);
73
74int GetJSONMessageTargetCount();
75
76void SendVectorChartObjectInfo(const wxString& chart, const wxString& feature,
77 const wxString& objname, double& lat,
78 double& lon, double& scale, int& nativescale);
79
80#endif // PLUGIN_COMM_H
Navigation data types.
void SendNMEASentenceToAllPlugIns(const wxString &sentence)
Distribute a NMEA 0183 sentence to all plugins that have registered interest by setting the WANTS_NME...
A generic position and navigation data structure.
Definition ocpn_types.h:68