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 "model/nmea_log.h"
35#include "model/multiplexer.h"
36#include "model/route.h"
37#include "model/route_point.h"
38#include "observable_evtvar.h"
39
43#define ERR_GARMIN_INITIALIZE -1
47#define ERR_GARMIN_SEND_MESSAGE -2
51#define ERR_GPS_DRIVER_NOT_AVAILAIBLE -3
52
53void BroadcastNMEA0183Message(const wxString& msg, NmeaLog* nmea_log,
54 EventVar& on_msg_sent);
55
57public:
58 std::function<void(int)> set_value;
59 std::function<void(int)> set_range;
60 std::function<void(void)> pulse;
61 std::function<void(const std::string&)> set_message;
62 std::function<bool()> confirm_overwrite;
63
65 : set_value([](int) {}),
66 set_range([](int) {}),
67 pulse([](void) {}),
68 set_message([](const std::string&) {}),
69 confirm_overwrite([]() { return true; }) {}
70};
71
72int SendRouteToGPS_N0183(Route* pr, const wxString& com_name,
73 bool bsend_waypoints, Multiplexer& multiplexer,
74 N0183DlgCtx ctx);
75
76int SendWaypointToGPS_N0183(RoutePoint* prp, const wxString& com_name,
77 Multiplexer& multiplexer, N0183DlgCtx ctx);
78
79#endif // _COMMN0183>>UT_H
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
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,...
A common variable shared between producer and consumer which supports Listen() and Notify().
Route abstraction.
Waypoint or mark abstraction.