一 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