nmea0183.hpp
来自「提取各种NEMA0183格式数据的类编程。」· HPP 代码 · 共 293 行
HPP
293 行
#if ! defined( NMEA_0183_CLASS_HEADER )
#define NMEA_0183_CLASS_HEADER
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** Copyright, 1996-2005, Samuel R. Blackburn
**
** "You can get credit for something or get it done, but not both."
** Dr. Richard Garwin
**
** BSD License follows.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer. Redistributions
** in binary form must reproduce the above copyright notice, this list
** of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution. Neither the name of
** the WFC nor the names of its contributors may be used to endorse or
** promote products derived from this software without specific prior
** written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** $Workfile: nmea0183.hpp $
** $Revision: 5 $
** $Modtime: 10/10/98 3:03p $
*/
/*
** General Purpose Classes
*/
#include "Sentence.hpp"
#include "Response.hpp"
#include "LatLong.hpp"
#include "LoranTD.hpp"
#include "Manufact.hpp"
#include "MList.hpp"
#include "OmegaPar.hpp"
#include "DeccaLOP.hpp"
#include "RatioPls.hpp"
#include "RadarDat.hpp"
#include "SatDat.hpp"
#include "FreqMode.hpp"
#include "WayptLoc.hpp" // Sentence Not Recommended For New Designs
/*
** Response Classes
*/
#include "AAM.hpp"
#include "ALM.hpp"
#include "APB.hpp"
#include "ASD.hpp"
#include "BEC.hpp"
#include "BOD.hpp"
#include "BWC.hpp"
#include "BWR.hpp"
#include "BWW.hpp"
#include "DBT.hpp"
#include "DCN.hpp"
#include "DPT.hpp"
#include "FSI.hpp"
#include "GDA.hpp" // Sentence Not Recommended For New Designs
#include "GDF.hpp" // Sentence Not Recommended For New Designs
#include "GDP.hpp" // Sentence Not Recommended For New Designs
#include "GGA.hpp"
#include "GLA.hpp" // Sentence Not Recommended For New Designs
#include "GLC.hpp"
#include "GLF.hpp" // Sentence Not Recommended For New Designs
#include "GLL.hpp"
#include "GLP.hpp" // Sentence Not Recommended For New Designs
#include "GOA.hpp" // Sentence Not Recommended For New Designs
#include "GOF.hpp" // Sentence Not Recommended For New Designs
#include "GOP.hpp" // Sentence Not Recommended For New Designs
#include "GSA.hpp"
#include "GSV.hpp"
#include "GTD.hpp" // Sentence Not Recommended For New Designs
#include "GXA.hpp"
#include "GXF.hpp" // Sentence Not Recommended For New Designs
#include "GXP.hpp" // Sentence Not Recommended For New Designs
#include "HCC.hpp" // Sentence Not Recommended For New Designs
#include "HDG.hpp"
#include "HDM.hpp" // Sentence Not Recommended For New Designs
#include "HDT.hpp"
#include "HSC.hpp"
#include "HVD.hpp" // Sentence Not Recommended For New Designs (added 03 Mar 2005)
#include "HVM.hpp" // Sentence Not Recommended For New Designs (added 03 Mar 2005)
#include "IMA.hpp" // Sentence Not Recommended For New Designs
#include "LCD.hpp"
#include "MHU.hpp" // Sentence Not Recommended For New Designs
#include "MTA.hpp" // Sentence Not Recommended For New Designs
#include "MTW.hpp"
#include "MWD.hpp" // Sentence Not Recommended For New Designs (added 28 Feb 2005)
#include "MWV.hpp"
#include "OLN.hpp"
#include "OSD.hpp"
#include "P.hpp"
#include "RMA.hpp"
#include "RMB.hpp"
#include "RMC.hpp"
#include "RMM.hpp" // Garmin Datum as provided by Jeff Bailey
#include "ROT.hpp"
#include "RPM.hpp"
#include "RSA.hpp"
#include "RSD.hpp"
#include "RTE.hpp"
#include "SFI.hpp"
#include "STN.hpp"
#include "TEP.hpp" // Sentence Not Recommended For New Designs
#include "TRF.hpp"
#include "TTM.hpp"
#include "VBW.hpp"
#include "VDR.hpp"
#include "VHW.hpp"
#include "VLW.hpp"
#include "VPW.hpp"
#include "VTG.hpp"
#include "VWE.hpp" // Sentence Not Recommended For New Designs
#include "VWR.hpp" // Sentence Not Recommended For New Designs (added 28 Feb 2005)
#include "VWT.hpp" // Sentence Not Recommended For New Designs (added 28 Feb 2005)
#include "WCV.hpp"
#include "WDC.hpp" // Sentence Not Recommended For New Designs
#include "WDR.hpp" // Sentence Not Recommended For New Designs
#include "WNC.hpp"
#include "WPL.hpp"
#include "XDR.hpp"
#include "XTE.hpp"
#include "XTR.hpp"
#include "ZDA.hpp"
#include "ZFI.hpp" // Sentence Not Recommended For New Designs
#include "ZFO.hpp"
#include "ZLZ.hpp" // Sentence Not Recommended For New Designs
#include "ZPI.hpp" // Sentence Not Recommended For New Designs
#include "ZTA.hpp" // Sentence Not Recommended For New Designs
#include "ZTE.hpp" // Sentence Not Recommended For New Designs
#include "ZTG.hpp"
#include "ZTI.hpp" // Sentence Not Recommended For New Designs
#include "ZWP.hpp" // Sentence Not Recommended For New Designs
#include "ZZU.hpp" // Sentence Not Recommended For New Designs
class NMEA0183
{
private:
SENTENCE m_Sentence;
void m_Initialize( void );
protected:
CPtrArray m_ResponseTable;
void m_SetContainerPointers( void );
void m_SortResponseTable( void );
public:
NMEA0183();
virtual ~NMEA0183();
/*
** NMEA 0183 Sentences we understand
*/
AAM Aam;
ALM Alm;
APB Apb;
ASD Asd;
BEC Bec;
BOD Bod;
BWC Bwc;
BWR Bwr;
BWW Bww;
DBT Dbt;
DCN Dcn;
DPT Dpt;
FSI Fsi;
GDA Gda; // Sentence Not Recommended For New Designs
GDF Gdf; // Sentence Not Recommended For New Designs
GDP Gdp; // Sentence Not Recommended For New Designs
GGA Gga;
GLA Gla; // Sentence Not Recommended For New Designs
GLC Glc;
GLF Glf; // Sentence Not Recommended For New Designs
GLL Gll;
GLP Glp; // Sentence Not Recommended For New Designs
GOA Goa; // Sentence Not Recommended For New Designs
GOF Gof; // Sentence Not Recommended For New Designs
GOP Gop; // Sentence Not Recommended For New Designs
GSA Gsa;
GSV Gsv;
GTD Gtd; // Sentence Not Recommended For New Designs
GXA Gxa;
GXF Gxf; // Sentence Not Recommended For New Designs
GXP Gxp; // Sentence Not Recommended For New Designs
HCC Hcc; // Sentence Not Recommended For New Designs
HDG Hdg;
HDM Hdm; // Sentence Not Recommended For New Designs
HDT Hdt;
HSC Hsc;
HVD Hvd; // Sentence Not Recommended For New Designs
HVM Hvm; // Sentence Not Recommended For New Designs
IMA Ima; // Sentence Not Recommended For New Designs
LCD Lcd;
MHU Mhu; // Sentence Not Recommended For New Designs
MTA Mta; // Sentence Not Recommended For New Designs
MTW Mtw;
MWD Mwd; // Sentence Not Recommended For New Designs
MWV Mwv;
OLN Oln;
OSD Osd;
P Proprietary;
RMA Rma;
RMB Rmb;
RMC Rmc;
RMM Rmm; // Germin Datum as provided by Jeff Bailey
ROT Rot;
RPM Rpm;
RSA Rsa;
RSD Rsd;
RTE Rte;
SFI Sfi;
STN Stn;
TEP Tep; // Sentence Not Recommended For New Designs
TRF Trf;
TTM Ttm;
VBW Vbw;
VDR Vdr;
VHW Vhw;
VLW Vlw;
VPW Vpw;
VTG Vtg;
VWE Vwe; // Sentence Not Recommended For New Designs
VWR Vwr; // Sentence Not Recommended For New Designs
VWT Vwt; // Sentence Not Recommended For New Designs
WCV Wcv;
WDC Wdc; // Sentence Not Recommended For New Designs
WDR Wdr; // Sentence Not Recommended For New Designs
WNC Wnc;
WPL Wpl;
XDR Xdr;
XTE Xte;
XTR Xtr;
ZDA Zda;
ZFI Zfi; // Sentence Not Recommended For New Designs
ZFO Zfo;
ZLZ Zlz; // Sentence Not Recommended For New Designs
ZPI Zpi; // Sentence Not Recommended For New Designs
ZTA Zta; // Sentence Not Recommended For New Designs
ZTE Zte; // Sentence Not Recommended For New Designs
ZTI Zti; // Sentence Not Recommended For New Designs
ZTG Ztg;
ZWP Zwp; // Sentence Not Recommended For New Designs
ZZU Zzu; // Sentence Not Recommended For New Designs
CString ErrorMessage; // Filled when Parse returns FALSE
CString LastSentenceIDParsed; // ID of the lst sentence successfully parsed
CString LastSentenceIDReceived; // ID of the last sentence received, may not have parsed successfully
CString PlainText; // A human-readable string of text that explains what just happened
CString TalkerID;
CString ExpandedTalkerID;
virtual BOOL IsGood( void ) const;
virtual BOOL Parse( void );
virtual size_t NumberOfSupportedSentences( void ) const;
virtual BOOL GetSentenceMnemonic( long index, CString& mnemonic ) const;
//virtual void Serialize( CArchive& archive );
NMEA0183& operator << ( const char *source );
NMEA0183& operator >> ( CString& destination );
};
#endif // NMEA_0183_CLASS_HEADER
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?