OpenDDS安装与开发
OpenDDS安裝與開發
文章目錄
- OpenDDS安裝與開發
- 1. OpenDDS介紹
- 2. 環境搭建
- 3. OpenDDS測試
- 4. 名詞解釋
- 5. OpenDDS應用開發步驟
- 參考鏈接
1. OpenDDS介紹
官網:https://opendds.org/
是個開源的數據分發中間件,有三層:TAO+ACE+DDS
-
TAO負責封裝數據,讓OpenDDS支持跨平臺;
-
ACE負責數據通信;
-
DDS負責數據的分發交互。
2. 環境搭建
主要包括三部分:
- Perl:用于運行OpenDDS的用例和一些環境配置
- OpenDDS:V3.20
- ACE+TAO:V7.0.6
具體的安裝步驟可以參考博客:https://blog.csdn.net/babypphappy/article/details/123228108 ,經過驗證可以安裝成功。
注:在編譯TAO的過程中編譯出錯,錯誤如下:
…/orbsvcs\orbsvcs/Security.idl(7): fatal error C1083: 無法打開包括文件: “orb.idl”: No such file or directory [D:\DDS\ACE_wrappers\TAO\orbsvcs\orbsvcs\Security_vs2019.vcxproj]
…/orbsvcs\orbsvcs/Security.idl(7): fatal error C1083: 無法打開包括文件: “orb.idl”: No such file or directory [D:\DDS\ACE_wrappers\TAO\orbsvcs\orbsvcs\Security_vs2019.vcxproj]
參照博客ACE+TAO環境搭建 windows平臺,需要先編譯一下TAO\TAO_IDL文件夾里的TAO_IDL_ACE_vs2019.sln,另外需要保證已經通過Visual Studio Installer安裝了通用Windows平臺開發這一組件,另外注意ace\config.h配置中只有一行代碼
#include "ace/config-win32.h"
3. OpenDDS測試
OpenDDS在配置完成,并將生成的解決方案.sln編譯完成后,就可以通過perl run_test.pl命令進行測試,測試過程中報錯如下:
D:\DDS\OpenDDS-3.20\examples\DCPS\Messenger_Imr>perl run_test.pl Can't locate Win32/Process.pm in @INC (you may need to install the Win32::Process module) (@INC contains: D:\DDS\ACE_wrappers/bin D:\DDS\OpenDDS-3.20/bin D:\DDS\OpenDDS-3.20\bin\PerlDDS c:/Users/SN-539/AppData/Local/activestate/cache/922e561e/site/lib c:/Users/SN-539/AppData/Local/activestate/cache/922e561e/lib) at D:\DDS\ACE_wrappers/bin/PerlACE/Process_Win32.pm line 8.提示找不到Win32/Process.pm,這個是Perl的模塊缺失問題,可以直接在ActiveState命令行中通過state install Win32-Process安裝對應的模塊包:
[minglwang1115/Perl-5.34.0-Windows] C:\Users\SN-539\Perl-5.34.0-Windows>state install Win32-Process安裝完畢后,再運行命令perl run_test.pl,又出現新的錯誤:
.\.\publisher.EXE -DCPSConfigFile pub.ini -orbendpoint iiop://:23204 ERROR: Cannot Spawn: <.\.\publisher.EXE> not found .\.\subscriber.EXE -DCPSConfigFile sub.ini ERROR: Cannot Spawn: <.\.\subscriber.EXE> not found cP is not of type Win32::Process at D:\DDS\ACE_wrappers/bin/PerlACE/Process_Win32.pm line 458. ERROR: <D:\DDS\ACE_wrappers\TAO/orbsvcs/ImplRepo_Service/tao_imr_activator> still running upon object destruction ERROR: <D:\DDS\ACE_wrappers\TAO/orbsvcs/ImplRepo_Service/tao_imr_locator> still running upon object destruction缺少publisher和subscriber,可能是由于目前使用的OpenDDS最新版本中示例文件就沒有帶這倆文件,不過通過文件全局搜索,發現在OpenDDS-3.20\DevGuideExamples\DCPS\Messenger目錄下有上一步sln編譯生成好的publisher.exe和subscriber.exe文件,拷貝到OpenDDS-3.20\examples\DCPS\Messenger_Imr目錄后,再運行perl run_test.pl發現測試成功。
SampleInfo.instance_state = NOT_ALIVE_DISPOSED_INSTANCE_STATE >>> D:\DDS\ACE_wrappers\bin\tao_imr.EXE -ORBInitRef ImplRepoService=file://imr.ior shutdown InfoRepo Successfully shut down server <InfoRepo> test PASSED.4. 名詞解釋
ACE is an open-source framework that provides many components and patterns for developing high-performance, distributed real-time and embedded systems. ACE provides powerful, yet efficient abstractions for sockets, demultiplexing loops, threads, synchronization primitives.TAO (The ACE ORB) is an open-source implementation of a CORBA Object Request Broker (ORB) built using components and patterns in the ACE framework.ACE是一個開源的函數庫,一種框架。TAO是基于ACE的對CORBA的一種實現。CORBA(Common Object Request Broker Architecture,公共對象請求代理體系結構,通用對象請求代理體系結構)是由OMG組織制訂的一種標準的面向對象應用程序體系規范。IDL:Interface description language的縮寫,指接口描述語言,是CORBA規范的一部分,是跨平臺開發的基礎。RPC(Remote Procedure Call)—遠程過程調用,CORBA的底層實現OpenDDS is an open-source C++ implementation of the Object Management Group's specification "Data Distribution Service for Real-time Systems" (DDS), as well as some other related specifications. OpenDDS is built on the ACE abstraction layer to provide platform portability. OpenDDS also leverages capabilities of TAO, such as its IDL compiler and as the basis of the OpenDDS DCPS Information Repository (DCPSInfoRepo).OpenDDS: 是對OMG組織的DDS協議的C++開源實現,它建立在ACE抽象層之上來保證平臺間的可移植性,OpenDDS同樣依賴了TAO的一些特性。5. OpenDDS應用開發步驟
原文鏈接: OPenDDS程序 的 實現+運行
基于Windows10的OpenDDS測試、https://github.com/WeiKangJian/OpenDDSapplication
參考鏈接
- OpenDDS環境搭建-Windows 10
- Windows環境下OpenDDS的安裝
- OpenDDS的學習和使用
- OpenDDS開發示例
- 通訊協議篇(底層TCP/UDP;上層MQTT、HTTP、CoAP、DDS、AMQP、JMS;實現層RabbitMQ、ActiveMQ、Kafka)
總結
以上是生活随笔為你收集整理的OpenDDS安装与开发的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: bat文件注册为Windows服务与依赖
- 下一篇: 且看且学Gradle--(1)Gradl