Debian Codegraph @

src/Network/flarm.hxx

raw symbols SCIP
1 // flarm.hxx -- Flarm protocol class
2 //
3 // Written by Thorsten Brehm, started November 2017.
4 //
5 // Copyright (C) 2017 Thorsten Brehm - brehmt (at) gmail com
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 //
21 // $Id$
22
23 #ifndef _FG_FLARM_HXX
24 #define _FG_FLARM_HXX
25
26 #include "garmin.hxx"
27
28 namespace NMEA
29 {
30 // Flarm proprietary messages
31 namespace FLARM
32 {
33 const unsigned int PFLAU = (1<<0);
34 const unsigned int PFLAA = (1<<1);
35 const unsigned int SET = (PFLAU|PFLAA);
36 }
37 }
38
39 class FGFlarm : public FGGarmin {
40 protected:
41 unsigned int mFlarmMessages;
42 SGPropertyNode_ptr mFlarmConfig;
43 unsigned long mLastUpdate;
44
45 // process a Flarm sentence
46 virtual void parse_message(const std::vector<std::string>& tokens);
47
48 void setDefaultConfigValue(const char* ConfigKey, const char* Value);
49 void setDefaultConfigValue(const char* ConfigKey, unsigned int Value);
50
51 public:
52 FGFlarm();
53 ~FGFlarm();
54
55 virtual bool gen_message();
56 };
57
58 #endif // _FG_FLARM_HXX