source: pacpusframework/branches/2.0-beta1/src/TestComponents/CPT/NMEA0183/include/NMEA0183_slim.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 3.0 KB
Line 
1#if ! defined( NMEA_0183_HEADER )
2
3#define NMEA_0183_HEADER
4
5/*
6** Author: Samuel R. Blackburn
7** Internet: sam_blackburn@pobox.com
8**q
9** You can use it any way you like as long as you don't try to sell it.
10**
11** Copyright, 1998, Samuel R. Blackburn
12**
13** $Workfile: nmea0183.h $
14** $Revision: 6 $
15** $Modtime: 10/13/98 6:37a $
16*/
17
18/*
19** Updates : Maria Alwan & G�rald Dherbomez
20** Date : 14/09/2005
21** purpose : use of Qt API instead of MFC
22** source code may be compatible with Windows, Linux and Mac
23** tested with Qt3.3.3 API under Windows
24*/
25
26#include <stdio.h>
27
28#ifdef WIN32
29#include <windows.h>
30#endif
31
32#include <QString>
33#include <QVector>
34#include <QDateTime>
35
36
37#ifndef FALSE
38#define FALSE 0
39#endif
40
41#ifndef TRUE
42#define TRUE 1
43#endif
44
45/*
46** Now include the math stuff for some calculations in the COORDINATE class
47*/
48
49#include <math.h>
50
51/*
52** Turn off the warning about precompiled headers, it is rather annoying
53*/
54
55#pragma warning( disable : 4699 )
56
57#if ! defined( CARRIAGE_RETURN )
58#define CARRIAGE_RETURN 0x0D
59#endif
60
61#if ! defined( LINE_FEED )
62#define LINE_FEED 0x0A
63#endif
64
65typedef enum _NMEA0183_BOOLEAN
66{
67 NMEA_Unknown = 0,
68 True,
69 False
70} NMEA0183_BOOLEAN;
71
72typedef enum _leftright
73{
74 LR_Unknown = 0,
75 Left,
76 Right
77} LEFTRIGHT;
78
79typedef enum _eastwest
80{
81 EW_Unknown = 0,
82 East,
83 West
84} EASTWEST;
85
86typedef enum
87{
88 NS_Unknown = 0,
89 North,
90 South
91} NORTHSOUTH;
92
93typedef enum
94{
95 ReferenceUnknown = 0,
96 BottomTrackingLog,
97 ManuallyEntered,
98 WaterReferenced,
99 RadarTrackingOfFixedTarget,
100 PositioningSystemGroundReference
101} REFERENCE;
102
103typedef enum
104{
105 CommunicationsModeUnknown = 0,
106 F3E_G3E_SimplexTelephone = 'd',
107 F3E_G3E_DuplexTelephone = 'e',
108 J3E_Telephone = 'm',
109 H3E_Telephone = 'o',
110 F1B_J2B_FEC_NBDP_TelexTeleprinter = 'q',
111 F1B_J2B_ARQ_NBDP_TelexTeleprinter = 's',
112 F1B_J2B_ReceiveOnlyTeleprinterDSC = 'w',
113 A1A_MorseTapeRecorder = 'x',
114 A1A_MorseKeyHeadset = '{',
115 F1C_F2C_F3C_FaxMachine = '|'
116} COMMUNICATIONS_MODE;
117
118typedef enum
119{
120 TransducerUnknown = 0,
121 AngularDisplacementTransducer = 'A',
122 TemperatureTransducer = 'C',
123 LinearDisplacementTransducer = 'D',
124 FrequencyTransducer = 'F',
125 HumidityTransducer = 'H',
126 ForceTransducer = 'N',
127 PressureTransducer = 'P',
128 FlowRateTransducer = 'R',
129 TachometerTransducer = 'T',
130 VolumeTransducer = 'V'
131} TRANSDUCER_TYPE;
132
133/*
134** Misc Function Prototypes
135*/
136
137unsigned int HexValue( const char *hex_string );
138
139QString expand_talker_id( const QString & );
140QString Hex( unsigned int value );
141QString talker_id( const QString& sentence );
142
143#ifndef BOOL
144#define BOOL bool
145#endif
146
147//#include "nmea0183.hpp"
148
149#endif // NMEA0183_HEADER
Note: See TracBrowser for help on using the repository browser.