source: pacpussensors/trunk/NMEA0183/src/FREQMODE.cpp

Last change on this file 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.1 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: freqmode.cpp $
13** $Revision: 5 $
14** $Modtime: 10/10/98 2:46p $
15*/
16
17
18FREQUENCY_AND_MODE::FREQUENCY_AND_MODE()
19{
20 Empty();
21}
22
23FREQUENCY_AND_MODE::~FREQUENCY_AND_MODE()
24{
25 Empty();
26}
27
28void FREQUENCY_AND_MODE::Empty( void )
29{
30 Frequency = 0.0;
31 Mode = CommunicationsModeUnknown;
32}
33
34void FREQUENCY_AND_MODE::Parse( int first_field_number, const SENTENCE& sentence )
35{
36 Frequency = sentence.Double( first_field_number );
37 Mode = sentence.CommunicationsMode( first_field_number + 1 );
38}
39
40void FREQUENCY_AND_MODE::Write( SENTENCE& sentence )
41{
42 sentence += Frequency;
43 sentence += Mode;
44}
45
46const FREQUENCY_AND_MODE& FREQUENCY_AND_MODE::operator = ( const FREQUENCY_AND_MODE& source )
47{
48 Frequency = source.Frequency;
49 Mode = source.Mode;
50
51 return( *this );
52}
Note: See TracBrowser for help on using the repository browser.