Last change
on this file since 123 was 59, checked in by DHERBOMEZ Gérald, 10 years ago |
Integration of new modules:
- GPS NMEA0183 decoder
- Span CPT Decoder
Update of:
|
File size:
1.2 KB
|
Line | |
---|
1 | #include "nmea0183.h"
|
---|
2 | #pragma hdrstop
|
---|
3 |
|
---|
4 | /*
|
---|
5 | ** Author: Samuel R. Blackburn
|
---|
6 | ** Internet: sam_blackburn@pobox.com
|
---|
7 | **
|
---|
8 | ** You can use it any way you like as long as you don't try to sell it.
|
---|
9 | **
|
---|
10 | ** Copyright, 1996, Samuel R. Blackburn
|
---|
11 | **
|
---|
12 | ** $Workfile: p.cpp $
|
---|
13 | ** $Revision: 4 $
|
---|
14 | ** $Modtime: 10/10/98 2:42p $
|
---|
15 | */
|
---|
16 |
|
---|
17 |
|
---|
18 | P::P()
|
---|
19 | {
|
---|
20 | Mnemonic = "P";
|
---|
21 | Empty();
|
---|
22 | }
|
---|
23 |
|
---|
24 | P::~P()
|
---|
25 | {
|
---|
26 | //Mnemonic.Empty();
|
---|
27 | Empty();
|
---|
28 | }
|
---|
29 |
|
---|
30 | void P::Empty( void )
|
---|
31 | {
|
---|
32 | //Sentence.Empty();
|
---|
33 | //Source.Empty();
|
---|
34 | }
|
---|
35 |
|
---|
36 | BOOL P::Parse( const SENTENCE& sentence )
|
---|
37 | {
|
---|
38 | /*
|
---|
39 | ** This is where parsing of proprietary sentences will go...
|
---|
40 | */
|
---|
41 |
|
---|
42 | Sentence = sentence;
|
---|
43 |
|
---|
44 | QString temp_string = sentence.Field( 0 );
|
---|
45 |
|
---|
46 | Source = temp_string.mid( 1, 3 );
|
---|
47 | CompanyName = Manufacturers[ Source.toLatin1() ];
|
---|
48 |
|
---|
49 | //TRACE1( "Source is \"%s\"\n", (const char *) Source );
|
---|
50 | //TRACE1( "CompanyName \"%s\"\n", (const char *) CompanyName );
|
---|
51 |
|
---|
52 | return( TRUE );
|
---|
53 | }
|
---|
54 |
|
---|
55 | BOOL P::Write( SENTENCE& sentence )
|
---|
56 | {
|
---|
57 | /*
|
---|
58 | ** Let the parent do its thing
|
---|
59 | */
|
---|
60 |
|
---|
61 | RESPONSE::Write( sentence );
|
---|
62 |
|
---|
63 | sentence += Sentence;
|
---|
64 |
|
---|
65 | sentence.Finish();
|
---|
66 |
|
---|
67 | return( TRUE );
|
---|
68 | }
|
---|
69 |
|
---|
70 | const P& P::operator = ( const P& source )
|
---|
71 | {
|
---|
72 | Sentence = source.Sentence;
|
---|
73 |
|
---|
74 | return( *this );
|
---|
75 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.