详细看了这段代码自解码goose报文已经不是问题
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 82 2011-08-25 17:05 GOOSE(能够接收intfloatingstvaltime)database_con.cfg
文件 83 2011-08-26 09:15 GOOSE(能够接收intfloatingstvaltime)Debugdatabase.cfg
文件 81 2011-08-25 11:22 GOOSE(能够接收intfloatingstvaltime)Debugdatabase_con.cfg
文件 48 2011-06-28 09:51 GOOSE(能够接收intfloatingstvaltime)DebugGOOSE.cfg
文件 108032 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.exe
文件 673204 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.ilk
文件 1428480 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.pdb
文件 23533 2011-08-25 11:49 GOOSE(能够接收intfloatingstvaltime)DebugGoose数据库数据字典.docx
文件 17 2011-08-28 13:20 GOOSE(能够接收intfloatingstvaltime)Debug able.cfg
文件 17116160 2011-08-29 17:08 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.ncb
文件 899 2011-05-26 17:20 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.sln
..A..H. 80384 2011-08-29 17:08 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.suo
文件 23879 2011-08-26 13:42 GOOSE(能够接收intfloatingstvaltime)Goose数据库数据字典.docx
文件 7220224 2011-06-28 14:37 GOOSE(能够接收intfloatingstvaltime)RecGoose8.ncb
..A..H. 32256 2011-06-28 14:37 GOOSE(能够接收intfloatingstvaltime)RecGoose8.suo
文件 6436 2011-08-29 15:41 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOConn.cpp
文件 1287 2011-08-29 15:39 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOConn.h
文件 4873 2011-08-29 16:35 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOExecute.cpp
文件 305 2011-08-29 16:12 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOExecute.h
文件 1732 2011-08-29 16:44 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCChangFun.cpp
文件 503 2011-08-29 16:39 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCChangFun.h
文件 1553 2011-07-01 11:35 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCConDatabase.cpp
文件 452 2011-08-29 08:38 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCConDatabase.h
文件 83 2011-08-25 17:12 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCdatabase.cfg
文件 201205 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugADOConn.obj
文件 195397 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugADOExecute.obj
文件 9966 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugBuildLog.htm
文件 663 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.embed.manifest
文件 728 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.embed.manifest.res
文件 621 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.intermediate.manifest
............此处省略78个文件信息
// ADOConn.cpp:连接、访问、关闭数据库的类
/*
*作者:王胜
*Email:hust_wsh@qq.com
*日期:2011-6-14
*版本v8
*/
//数据库连接字符串在此处定义
//////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “ADOConn.h“
#include “stdio.h“
#include
#include “ConDatabase.h“
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
extern ADOConn* g_pado;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
//构造函数
ADOConn::ADOConn()
{
HRESULT hr;
string databse;
ifstream fin(“database.cfg“); //打开配置文件
getline(findatabse);
//sqlStringStruct *sqlString=new _sqlStringStruct;//初始化结构体指针
//GetConnection(“database.cfg“databse);
/*bstr_t provider(sqlString->Provider.c_str());
_bstr_t datasource(sqlString->DataSource.c_str());
_bstr_t initialcatalog(sqlString->InitialCatalog.c_str());
_bstr_t userid(sqlString->UserID.c_str());
_bstr_t password(sqlString->Password.c_str());*/
try
{
hr=m_pConnection.CreateInstance(“ADODB.Connection“);
if (SUCCEEDED(hr))
{
//m_pConnection->ConnectionTimeout=3;//设置等待超时3s
//_bstr_t strConnect=provider+“;“+datasource+“;“+initialcatalog+“;“+userid+“;“+password+““;//连接字符串
m_pConnection->Open(_bstr_t(databse.c_str())““““adModeUnknown);//以写的方式打开数据库
}
}
catch(_com_error e)
{
//char errormessage[1024];
//memset(errormessage01024);
//sprintf(errormessage“连接数据库失败!
错误信息:%s“e.ErrorMessage());
//:MessageBox(NULLerrormessage““0);///显示错误信息
cout<<“服务器连接异常请检查环境配置!“< cout<ription()<
Sleep(2000);
exit(5);
}
//free(sqlString);
}
ADOConn::~ADOConn()
{
m_pRecordset_GEN->Close ();
m_pConnection->Close ();
}
//初始化函数,连接数据库,打开数据库
//数据集获取
_RecordsetPtr& ADOConn::GetRecordSet(_bstr_t bstrSQL)
{
try
{
m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pRecordset->Open(bstrSQLm_pConnection.GetInterfacePtr()adOpenDynamicadLockOptimisticadCmdText);
}
catch(_com_error e)
{
cout<ription()< }
return m_pRecordset;
}
//执行sql语句
BOOL ADOConn::ExecuteSQL(_bstr_t bstrSQL)
{
_variant_t RecordsAffected;
try
{
m_pConnection->Execute(bstrSQLNULLadCmdText);
return true;
}
catch(_com_error e)
{
cout<ription()< return false;
}
}
//void ConnDatabase(int idint stnumchar *uctimeDataSetEntryList *dataSetEntryList)
//{
// _bstr_t vSQLsql;
// /************************************************************************/
// /* 将值转换过来 */
// _bstr_t stnumt(stnum);
// _bstr_t uctimet(uctime);
// _bstr_t stval(dataSetEntryList->stval);
// _bstr_t intval(dataSetEntryList->intval);
// _bstr_t floatval(dataSetEntryList->floatval);
// _bstr_t bitstring(dataSetEntryList->bitstring);
// /**********
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 82 2011-08-25 17:05 GOOSE(能够接收intfloatingstvaltime)databa
文件 83 2011-08-26 09:15 GOOSE(能够接收intfloatingstvaltime)Debugdataba
文件 81 2011-08-25 11:22 GOOSE(能够接收intfloatingstvaltime)Debugdataba
文件 48 2011-06-28 09:51 GOOSE(能够接收intfloatingstvaltime)DebugGOOSE.cfg
文件 108032 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.exe
文件 673204 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.ilk
文件 1428480 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)DebugGOOSEcapture.pdb
文件 23533 2011-08-25 11:49 GOOSE(能够接收intfloatingstvaltime)DebugGoose数据库数据字典.docx
文件 17 2011-08-28 13:20 GOOSE(能够接收intfloatingstvaltime)Debug able.cfg
文件 17116160 2011-08-29 17:08 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.ncb
文件 899 2011-05-26 17:20 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.sln
..A..H. 80384 2011-08-29 17:08 GOOSE(能够接收intfloatingstvaltime)GOOSEcapature.suo
文件 23879 2011-08-26 13:42 GOOSE(能够接收intfloatingstvaltime)Goose数据库数据字典.docx
文件 7220224 2011-06-28 14:37 GOOSE(能够接收intfloatingstvaltime)RecGoose8.ncb
..A..H. 32256 2011-06-28 14:37 GOOSE(能够接收intfloatingstvaltime)RecGoose8.suo
文件 6436 2011-08-29 15:41 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOConn.cpp
文件 1287 2011-08-29 15:39 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOConn.h
文件 4873 2011-08-29 16:35 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOExecute.cpp
文件 305 2011-08-29 16:12 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCADOExecute.h
文件 1732 2011-08-29 16:44 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCChangFun.cpp
文件 503 2011-08-29 16:39 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCChangFun.h
文件 1553 2011-07-01 11:35 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCConDataba
文件 452 2011-08-29 08:38 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCConDataba
文件 83 2011-08-25 17:12 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCdataba
文件 201205 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugADOConn.obj
文件 195397 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugADOExecute.obj
文件 9966 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugBuildLog.htm
文件 663 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.em
文件 728 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.em
文件 621 2011-08-29 17:06 GOOSE(能够接收intfloatingstvaltime)RecGooseMFCDebugGOOSEcapture.exe.intermediate.manifest
............此处省略78个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)