栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

4diac.forte 支持 OPC UA的方法

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

4diac.forte 支持 OPC UA的方法

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)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/699162.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号