OpenCPN Partial API docs
Loading...
Searching...
No Matches
nmea_log.h
1#ifndef _ABSTRACT_NMEA_LOG__
2#define _ABSTRACT_NMEA_LOG__
3
4#include <wx/string.h>
5
6#include "model/comm_navmsg.h"
8
10struct Logline {
11 const std::shared_ptr<const NavMsg> navmsg;
12 const NavmsgStatus state;
13 const std::string message;
14 std::string error_msg;
15 std::string prefix;
16
17 Logline() {}
18 Logline(const std::shared_ptr<const NavMsg>& navmsg, NavmsgStatus sts)
19 : navmsg(navmsg),
20 state(sts),
21 message(navmsg ? navmsg->to_string() : ""),
22 error_msg("Unknown error") {}
23 Logline(const std::shared_ptr<const NavMsg>& navmsg)
24 : Logline(navmsg, NavmsgStatus()) {}
25};
26
27class NmeaLog {
28public:
30 virtual void Add(const Logline& l) = 0;
31
33 virtual bool IsVisible() const = 0;
34};
35
36#endif // _ABSTRACT_NMEA_LOG__
Representation of message status as determined by the multiplexer.
virtual bool IsVisible() const =0
Return true if log is visible i.
virtual void Add(const Logline &l)=0
Add an formatted string to log output.
Raw, undecoded messages definitions.
Data monitor filter definitions.
Item in the log window.
Definition nmea_log.h:10