OpenDDS 安装使用

环境:

两台linux服务器

192.168.8.106    centos 8 stream   dds主服务及subscribe
192.168.8.100    centos 8 stream   dds publisher

一台window机器

一、Linux下安装

参考

https://opendds.org/quickstart/GettingStartedLinux.html

安装环境

centos 8 stream

1、安装依赖包

yum install perl
yum install cmake

安装java1.5以上

2. 下载 OpenDDS 3.25

 Release OpenDDS 3.25.0 · OpenDDS/OpenDDS · GitHub

3. 解压 

tar -xzvf OpenDDS-3.25.tar.gz

cd OpenDDS-3.25/

4. 编译

 ./configure

5. 安装

 make -j16 install INSTALL_PREFIX=.

会安装bin和lib到INSTALL_PREFIX,也就是当前目录下

6. 设置环境

source  setenv.sh

二. 测试

1. 编译命令行测试程序

cd DevGuideExamples/DCPS/Messenger

mkdir build

cd build

cmake ..

cmake --build .

2. 在106机器上运行

 /root/OpenDDS-3.25/bin/DCPSInfoRepo -ORBDebugLevel 10 -DCPSTransportDebugLevel 5 -ORBLogFile DCPSInfoRepo.log -ORBListenEndpoints iiop://192.168.8.106:12345

 ./subscriber -ORBDebugLevel 10 -DCPSDebugLevel 10 -DCPSTransportDebugLevel 5 -ORBLogFile subscriber.log -DCPSInfoRepo 192.168.0.106:12345

3. 在101机器上运行

./publisher -ORBDebugLevel 10 -DCPSDebugLevel 10 -DCPSTransportDebugLevel 5 -ORBLogFile publisher.log -DCPSInfoRepo 192.168.8.106:12345

4. 检查是否收到消息 

在101机器上

查看publisher.log文件,可看到 类似的received sample: SAMPLE_DATA (0x00), Length: 199的接收消息日志

vi publisher.log

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值