4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef XCSOAR_FLARM_NET_RECORD_HPP
25 #define XCSOAR_FLARM_NET_RECORD_HPP
27 #include "Util/StaticString.hpp"
36 LatinBufferSize(size_t size
)
39 /* with wide characters, the exact size of the FLARMNet database field
40 (plus one for the terminator) is just right, ... */
43 /* ..., but when we convert Latin-1 to UTF-8, we need a little bit
45 return size
* 3 / 2 + 1;
50 * FlarmNet.org file entry
52 struct FlarmNetRecord
{
53 /**< FLARM id 6 bytes */
54 StaticString
<LatinBufferSize(7)> id
;
57 StaticString
<LatinBufferSize(22)> pilot
;
59 /**< Airfield 4 bytes */
60 StaticString
<LatinBufferSize(22)> airfield
;
62 /**< Aircraft type 1 byte */
63 StaticString
<LatinBufferSize(22)> plane_type
;
65 /**< Registration 7 bytes */
66 StaticString
<LatinBufferSize(8)> registration
;
68 /**< Callsign 3 bytes */
69 StaticString
<LatinBufferSize(4)> callsign
;
71 /**< Radio frequency 6 bytes */
72 StaticString
<LatinBufferSize(8)> frequency
;
75 FlarmId
GetId() const;