📄 response.cpp
字号:
#include "nmea0183.h"
#pragma hdrstop
/*
** Author: Samuel R. Blackburn
** Internet: sam_blackburn@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Copyright, 1996, Samuel R. Blackburn
**
** $Workfile: response.cpp $
** $Revision: 6 $
** $Modtime: 10/10/98 2:51p $
*/
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
RESPONSE::RESPONSE()
{
DataSource = "--"; // Default to an unknown source
Mnemonic.Empty();
Talker.Empty();
// 15 Jan 98 - Thanks go to Craig Miller (Craig.Miller@Bigfoot.com) for
// finding a bug here. I had left off the () after Empty
ErrorMessage.Empty();
}
RESPONSE::~RESPONSE()
{
DataSource.Empty();
Mnemonic.Empty();
Talker.Empty();
ErrorMessage.Empty();
}
void RESPONSE::SetContainer( NMEA0183 *container )
{
ASSERT( container != NULL );
container_p = container;
}
void RESPONSE::SetErrorMessage( const CString& error_message )
{
ErrorMessage = Mnemonic;
ErrorMessage += ", ";
ErrorMessage += error_message;
}
BOOL RESPONSE::Write( SENTENCE& sentence )
{
/*
** All NMEA0183 sentences begin with the mnemonic...
**
** Thanks to Jan-Erik Eriksson (Jan-Erik.Eriksson@st.se) for
** finding and fixing a bug here
*/
sentence = "$" + DataSource + Mnemonic;
return( TRUE );
}
CString RESPONSE::PlainEnglish( void ) const
{
CString return_string;
return_string.Empty();
return( return_string );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -