forte是基于c++的第三方开源IEC 61499运行环境,默认可以不启用opcua,如果要启用opcua则需要在编译时指定opcua的参数。
1.在编译opcua时,即open62541, 需要定义 UA_ENABLE_AMALGAMATION=ON
2.cmake forte时,需要FORTE_COM_OPC_UA=ON,以及指定62541的include 和lib的位置
Linux- Download the FORTE source from http://git.eclipse.org/c/4diac/org.eclipse.4diac.forte.git:
$ mkdir ~/4diac && cd "$_" $ git clone -b develop https://git.eclipse.org/r/4diac/org.eclipse.4diac.forte forte $ cd forte && mkdir build
- Download the source for open62541 from https://github.com/open62541/open62541:
$ cd ~/4diac $ git clone https://github.com/open62541/open62541.git --branch=v1.0 open62541
- Build open62541. If you are running the code on production devices we suggest setting the build type to Release.
$ cd ~/4diac/open62541 && mkdir build && cd $_ $ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DUA_ENABLE_AMALGAMATION=ON .. $ make -j
- Set FORTE to include open62541. If you are running the code on production devices we suggesst setting the build type to Release.
$ cd ~/4diac/forte/build $ cmake -DCMAKE_BUILD_TYPE=Debug -DFORTE_ARCHITECTURE=Posix -DFORTE_MODULE_ConVERT=ON -DFORTE_COM_ETH=ON -DFORTE_MODULE_IEC61131=ON -DFORTE_COM_OPC_UA=ON -DFORTE_COM_OPC_UA_INCLUDE_DIR=$HOME/4diac/open62541/build -DFORTE_COM_OPC_UA_LIB_DIR=$HOME/4diac/open62541/build/bin -DFORTE_COM_OPC_UA_LIB=libopen62541.so $ make -j
参考:
OPC UA with IEC 61499 Tutorial (from v 1.11.0)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)