資源簡介
利用VC編寫一個通過計算機的端口實現ais數據的串口數據接收和數據的監聽,是一個很好數據接收處理程序,對航海信息數據處理有重要的意義

代碼片段和文件信息
//?AIS.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“AIS.h“
#include?“AISDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CAISApp
BEGIN_MESSAGE_MAP(CAISApp?CWinApp)
//{{AFX_MSG_MAP(CAISApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CAISApp?construction
CAISApp::CAISApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CAISApp?object
CAISApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CAISApp?initialization
BOOL?CAISApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CAISDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????21800??2009-12-30?10:51??AIS數據接收\AIS.APS
?????文件???????2052??2009-12-31?18:23??AIS數據接收\AIS.clw
?????文件???????2115??2008-06-04?20:48??AIS數據接收\AIS.cpp
?????文件???????4362??2008-06-05?21:32??AIS數據接收\AIS.dsp
?????文件????????514??2008-06-05?21:32??AIS數據接收\AIS.dsw
?????文件???????1291??2008-06-04?20:48??AIS數據接收\AIS.h
?????文件?????320512??2009-12-31?18:24??AIS數據接收\AIS.ncb
?????文件????????240??2009-12-31?18:23??AIS數據接收\AIS.plg
?????文件???????6333??2008-07-04?20:27??AIS數據接收\AIS.rc
?????文件???????7507??2008-07-06?16:13??AIS數據接收\AISDlg.cpp
?????文件???????1833??2008-07-04?21:50??AIS數據接收\AISDlg.h
?????文件????1070054??2008-07-04?22:02??AIS數據接收\AISimages\停止監聽.bmp
?????文件????1067446??2008-07-04?22:05??AIS數據接收\AISimages\停止監聽后清除數據.bmp
?????文件????1067610??2008-07-04?22:03??AIS數據接收\AISimages\開始監聽.bmp
?????文件?????850614??2008-07-04?22:10??AIS數據接收\AISimages\開始監聽前狀態.bmp
?????文件??????76662??2008-07-04?22:12??AIS數據接收\AISimages\端口對話框設置.bmp
?????目錄??????????0??2008-07-06?13:30??AIS數據接收\AISimages
?????文件?????527646??2008-07-06?15:55??AIS數據接收\AIS接收數據程序.doc
?????文件?????114755??2008-07-06?16:13??AIS數據接收\Debug\AIS.exe
?????文件??????15044??2008-06-04?22:39??AIS數據接收\Debug\AIS.obj
?????文件?????435200??2008-07-06?16:13??AIS數據接收\Debug\AIS.pdb
?????文件???????2952??2008-07-04?20:27??AIS數據接收\Debug\AIS.res
?????文件??????????0??2008-06-04?22:39??AIS數據接收\Debug\AIS.sbr
?????文件??????42231??2008-07-06?16:13??AIS數據接收\Debug\AISDlg.obj
?????文件??????????0??2008-07-06?16:13??AIS數據接收\Debug\AISDlg.sbr
?????文件???????5802??2008-06-04?21:57??AIS數據接收\Debug\ClieSocket.obj
?????文件??????????0??2008-06-04?21:57??AIS數據接收\Debug\ClieSocket.sbr
?????文件??????10185??2008-07-04?19:12??AIS數據接收\Debug\LisSocket.obj
?????文件??????????0??2008-07-04?19:12??AIS數據接收\Debug\LisSocket.sbr
?????文件??????13091??2008-06-04?21:57??AIS數據接收\Debug\PortDlg.obj
............此處省略21個文件信息
評論
共有 條評論