91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.58MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-15
  • 語言: C/C++
  • 標(biāo)簽: OPC??Server??SDK??

資源簡介

史上最簡單的OPC Server SDK開發(fā)包,最少只需調(diào)用4個函數(shù)即可完成一個OPC Server的開發(fā)。不需要知道OPC規(guī)范、也不需要知道任何COM/DCOM、ATL、MFC的知識,不需要理解wchar_t、BSTR等寬字符,甚至不需要理解注冊表操作和命令行參數(shù)。只需要會C++和會使用標(biāo)準(zhǔn)DLL即可。 OpcSvrSdk開發(fā)包SDK是基于win32平臺,滿足OPC Server DA1.0/2.0/3.0規(guī)范的快速OPC Server開發(fā)工具包。標(biāo)簽數(shù)沒有限制,也沒有限制并發(fā)客戶連接數(shù),更沒有限制每個連接客戶可建立的數(shù)據(jù)組數(shù)。內(nèi)部標(biāo)簽組織采用HASHMAP組織,極速的檢索速度。 opcsvrsdk開發(fā)包包含如下內(nèi)容: demo/ 例程,利用本開發(fā)包和C++開發(fā)OPC Server的例程 bin/ 編譯好的opcsvrtst.exe例子OPC Server opcsvrtst/ opcsvrtst例子OPC Server的VC9源碼工程 opcclinet/ OPC客戶端測試工具,供參考 sdk/ opcdasvr.dll和opcdasvr.h以及方便開發(fā)的輔助C++源碼 wopc3tst/ opc da3.0 的IOPCItemIO接口的簡易測試代碼。 OPC Core Components Redistributable (x86) 105.1.zip OPC基金會的發(fā)布安裝包。 OPC Server DA開發(fā)包opcdasvr使用說明.doc

資源截圖

代碼片段和文件信息

//?opcsvrtst.cpp
#include?“opcsvrtst.h“

//?ProgID就按照?Vendor.DriverName.Version格式生成。因此ProgID?=?tom.tstopcdasvr.1
const?char*?g_sClsID?=?“{863C6791-86E0-4058-A670-95067ED0C061}“;//?CLSID?用GUID工具產(chǎn)生的Registry?Format
const?char*?g_sVendor?=?“tom“; //?提供商比如“tom“
const?char*?g_sDrivername?=?“tstopcdasvr“; //?驅(qū)動名比如“rdb4opcda“
const?char*?g_sVersion?=?“1“; //?版本名比如“1“?
const?char* g_sOpcServerDes?=?“opc?server?for?test?opcdasvr“; //?OPC?Server描述?,<128字符
/*
DAS_Main?方法已經(jīng)處理了命令行了。
注冊opcsvrtst:
opcsvrtst?-regserver
????或者
????opcsvrtst?-reg

????如果要卸載,只需執(zhí)行如下命令:
????opcsvrtst?-unregserver
????或者
????opcsvrtst?-unreg

注:上面命令中的?‘-‘?可用?‘/‘?代替
*/
//?win32程序入口函數(shù)
int?APIENTRY?_tWinMain(HINSTANCE?hInstance
?????????????????????HINSTANCE?hPrevInstance
?????????????????????LPTSTR????lpCmdLine
?????????????????????int???????nCmdShow)
{
int?nerr?=?OE_OK; char?sMsg[512];
COpcDaSvr?opcsvr;?//?定義一個opc?server對象
if(!opcsvr.LoadDll(“opcdasvr.dll“))?{
MessageBox(NULL_T(“opcsvr.LoadDll?error!“)_T(“opcsvrtst“)MB_IConerror);
return?0;
}
CMyTags*?ptags?=?new?CMyTags;?//?創(chuàng)建一個測試用的標(biāo)簽集合對象
if(?!ptags){
MessageBox(NULL_T(“out?of?memory?error!“)_T(“opcsvrtst“)MB_IConerror);
return?0;
}
ptags->InitTags(&opcsvr);?//?初始化標(biāo)簽集合對象中的標(biāo)簽

nerr?=?opcsvr.DAS_Init(g_sClsIDg_sVendorg_sDrivernameg_sVersiong_sOpcServerDesCMyTags::CB_SetTagValptags);//?初始化OPC?Server
if(nerr?!=?OE_OK) {
MessageBox(NULL_T(“opcsvr.DAS_Init?error!“)_T(“opcsvrtst“)MB_IConerror);
delete?ptags;
return?nerr;
}

ptags->Start_thread();//?啟動數(shù)據(jù)模擬線程
nerr?=?opcsvr.DAS_Main(hInstancehPrevInstancelpCmdLinenCmdShow);//?進入OPC?Server的main函數(shù)
if(nerr){
sprintf(sMsg“opcsvr.DAS_Main?error!?errcode?=?%d“nerr);
MessageBox(NULLsMsg_T(“opcsvrtst“)MB_IConerror);
}
ptags->Stop_thread();//?停止數(shù)據(jù)模擬線程
delete?ptags;
return?0;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-07-18?15:54??demo\
?????目錄???????????0??2012-07-18?15:55??demo\bin\
?????文件??????127488??2012-07-19?08:30??demo\bin\opcdasvr.dll
?????文件???????83968??2012-07-18?15:52??demo\bin\opcsvrtst.exe
?????目錄???????????0??2012-07-18?15:53??demo\opcsvrtst\
?????目錄???????????0??2012-07-18?15:54??demo\opcsvrtst\opcsvrtst\
?????文件?????????893??2012-07-15?13:57??demo\opcsvrtst\opcsvrtst.sln
?????文件???????37376??2012-07-18?15:52??demo\opcsvrtst\opcsvrtst.suo
?????目錄???????????0??2012-07-18?15:53??demo\opcsvrtst\opcsvrtst\opcsvrsdk\
?????文件????????1422??2012-07-17?15:27??demo\opcsvrtst\opcsvrtst\opcsvrsdk\datacls.h
?????文件???????12659??2012-07-17?10:12??demo\opcsvrtst\opcsvrtst\opcsvrsdk\opcdasvr.h
?????文件????????2172??2012-07-17?10:04??demo\opcsvrtst\opcsvrtst\opcsvrsdk\tom_syn.h
?????文件???????33964??2012-07-16?16:21??demo\opcsvrtst\opcsvrtst\opcsvrtst.aps
?????文件????????2041??2012-07-17?10:17??demo\opcsvrtst\opcsvrtst\opcsvrtst.cpp
?????文件????????5474??2012-07-17?15:39??demo\opcsvrtst\opcsvrtst\opcsvrtst.h
?????文件????????2409??2012-07-16?16:21??demo\opcsvrtst\opcsvrtst\opcsvrtst.rc
?????文件????????4114??2012-07-17?15:36??demo\opcsvrtst\opcsvrtst\opcsvrtst.vcproj
?????文件????????1415??2012-07-15?17:23??demo\opcsvrtst\opcsvrtst\opcsvrtst.vcproj.jywin7-PC.jywin7.user
?????文件????????1415??2012-07-18?15:52??demo\opcsvrtst\opcsvrtst\opcsvrtst.vcproj.jywork-PC.jywork.user
?????文件?????????388??2012-07-16?16:18??demo\opcsvrtst\opcsvrtst\resource.h
?????目錄???????????0??2012-07-18?15:53??demo\opcsvrtst\Release\
?????文件???????83968??2012-07-18?15:52??demo\opcsvrtst\Release\opcsvrtst.exe
?????文件?????1347784??2012-06-27?23:55??OPC?Core?Components?Redistributable?(x86)?105.1.zip
?????文件??????874496??2012-07-18?16:11??OPC?Server?DA開發(fā)包opcdasvr使用說明.doc
?????目錄???????????0??2012-07-18?16:09??opcclient\
?????目錄???????????0??2012-07-18?16:09??opcclient\drivers\
?????文件??????321024??2012-05-17?13:05??opcclient\drivers\modbus.dll
?????文件??????326144??2012-07-16?09:24??opcclient\drivers\opcdrv.dll
?????文件??????302592??2012-05-23?09:21??opcclient\drivers\simdrv.dll
?????目錄???????????0??2012-07-18?16:09??opcclient\drvcsv\
?????文件??????395644??2012-04-23?10:53??opcclient\drvcsv\scdrv.csv
............此處省略45個文件信息

評論

共有 條評論