Cyclone DDS安装和例程运行(windows和ubuntu双版本)

一 Cyclone DDS安装

1. Windows安装操作步骤:

1.1 choco安装

打开Windows PowerShell输入指令:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

安装完成,运行choco 或 choco -?检查一下是否安装正确。
在这里插入图片描述

1.2 安装cmake 和 git

choco install cmake

在这里插入图片描述

choco install git

在这里插入图片描述

1.3 git下载c版本Cyclone DDS

git clone https://github.com/eclipse-cyclonedds/cyclonedds.git
cd cyclonedds

在这里插入图片描述

1.4 要构建并安装应用程序所需的库,请使用以下命令:

mkdir build ; cd build

用cmake -G查看cmake编译版本
在这里插入图片描述

cmake -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=<install-location> -DBUILD_EXAMPLES=ON ..

在这里插入图片描述

cmake --build . --parallel

在这里插入图片描述

1.5成功构建后安装 Cyclone DDS:

cmake --build . --target install

在这里插入图片描述

安装步骤将所有内容复制到:
/lib
/bin
/include/ddsc
/share/CycloneDDS

1.6 Windows环境变量

set PATH=<install-location>\bin;%PATH%

参考链接:https://cyclonedds.io/docs/cyclonedds/latest/installation/installation.html

2. ubuntu安装操作步骤:

在这里插入图片描述

2.1安装依赖

Sudo apt-get install git cmake gcc

2.2 下载cyclone DDS

git clone https://github.com/eclipse-cyclonedds/cyclonedds.git
cd cyclonedds

2.3 要构建并安装应用程序所需的库,请使用以下命令:

mkdir builf && cd build

在这里插入图片描述

cmake -DCMAKE_INSTALL_PREFIX=<install-location> -DBUILD_EXAMPLES=ON ..

在这里插入图片描述

cmake --build . –parallel

在这里插入图片描述

2.4 安装 Cyclone DDS:

cmake --build . --target install

在这里插入图片描述

安装步骤将所有内容复制到:
/lib
/bin
/include/ddsc
/share/CycloneDDS

2.5 卸载

rm -rf cyclonedds
rm -rf <install-location>

参考链接:https://cyclonedds.io/docs/cyclonedds/latest/installation/installation.html

二.官方例程运行

1. windows运行例程:

安装完成的路径:C:\Users\guoxu\Desktop\dds\cyclonedds\build\bin\Debug

1.1 HellowWord

HelloworldPublisher.exe

在这里插入图片描述

HelloworldSubscriber.exe

在这里插入图片描述

1.2 Roundtrip往返时间

RoundtripPing.exe 0 0 0
 
RoundtripPong.exe

1.3 Throughput吞吐量

ThroughputPublisher.exe
 
ThroughputSubscriber.exe

2.ubuntu运行例程

安装完成的路径:/build/bin

2.1 HellowWord

./HelloworldSubscriber
./HelloworldPublisher

2.2 Roundtrip往返时间

./ RoundtripPing 0 0 0
./ RoundtripPong

2.3 Throughput吞吐量

./ ThroughputPublisher
./ ThroughputSubscriber
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值