1. 環(huán)境
Windows 7
Visual Studio 2017
2. Build OPC UA-.NET
1. 代碼
OPC UA .NET:https://github.com/OPCFoundation/UA-.NET
OpenSSL:https://www.openssl.org/source/
CertificateGenerator:https://github.com/OPCFoundation/Misc-Tools
2. 安裝Perl (Build OpenSSL需用到)
在Perl的官網(wǎng)提供了2個(gè)Windows的安裝版本,選擇一個(gè)安裝即可。
https://www.activestate.com/activeperl/downloads
3. Build CertificateGenerator
把OpenSSL的代碼放到CertificateGenerator的\third-party\src\openssl路徑下
打開Developer Command Prompt for VS 2017,運(yùn)行third-party\build_openssl.bat,大約需要5分鐘左右完成編譯。
在VS2017中打開CertificateGenerator Solution.sln,并編譯(選擇release版本)。完成后在Bin文件夾下會(huì)生成Opc.Ua.CertificateGenerator.exe。
4. Build OPC UA-.NET
把上一步生成的Opc.Ua.CertificateGenerator.exe拷貝到OPC UA source code的\SampleApplications\Bin\Debug路徑下。
在VS2017中打開UA Quickstart Applications.sln,并編譯(可以選擇rebuild all)。完成后,在Bin文件夾下會(huì)看到新編譯出來的application。
至此,OPC UA-.NET的編譯初步完成。
參考
http://opcfoundation.github.io/UA-.NETStandardLibrary/
http://opcfoundation.github.io/UA-.NETStandardLibrary/help/index.htm#ua_sample_client.htm