OpenCPN Partial API docs
Loading...
Searching...
No Matches
comm_n0183_output.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2010 by David S. Register *
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 _COMMN0183_OUT_H
25#define _COMMN0183_OUT_H
26
27#include <functional>
28
29#include <wx/wxprec.h>
30#ifndef WX_PRECOMP
31#include <wx/wx.h>
32#endif
33
34#include "observable/evtvar.h"
35
36#include "model/nmea_log.h"
37#include "model/multiplexer.h"
38#include "model/route.h"
39#include "model/route_point.h"
40
44#define ERR_GARMIN_INITIALIZE -1
48#define ERR_GARMIN_SEND_MESSAGE -2
52#define ERR_GPS_DRIVER_NOT_AVAILAIBLE -3
53
54void BroadcastNMEA0183Message(const wxString& msg, NmeaLog* nmea_log,
55 obs::EventVar& on_msg_sent);
56
58public:
59 std::function<void(int)> set_value;
60 std::function<void(int)> set_range;
61 std::function<void(void)> pulse;
62 std::function<void(const std::string&)> set_message;
63 std::function<bool()> confirm_overwrite;
64
66 : set_value([](int) {}),
67 set_range([](int) {}),
68 pulse([](void) {}),
69 set_message([](const std::string&) {}),
70 confirm_overwrite([]() { return true; }) {}
71};
72
73int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
74 bool bsend_waypoints, Multiplexer& multiplexer,
75 N0183DlgCtx ctx);
76
77int SendWaypointToGPS_N0183(RoutePoint* prp, const wxString& com_name,
78 Multiplexer& multiplexer, N0183DlgCtx ctx);
79
80#endif // _COMMN0183>>UT_H
Handle logging and forwarding of incoming n0183/n2k messages.
Definition multiplexer.h:56
NMEA Log Interface.
Definition nmea_log.h:70
Represents a waypoint or mark within the navigation system.
Definition route_point.h:71
Represents a navigational route in the navigation system.
Definition route.h:99
Multiplexer class and helpers.
Basic DataMonitor logging interface: LogLine (reflects a line in the log) and NmeaLog,...
Route abstraction.
Waypoint or mark abstraction.