#!/bin/bash
set -e
ROOT_DIR=/media/nvme/ddsrecord-replay
git clone https://github.com/lz4/lz4.git
cd lz4
git checkout v1.9.3
make -j8
make install
cd -
git clone https://github.com/facebook/zstd.git
cd zstd
git checkout v1.4.8
make -j8
make install
cd -
rm -rf ${ROOT_DIR}/DDS-Record-Replay > /dev/null
mkdir -p ${ROOT_DIR}/DDS-Record-Replay/src
mkdir -p ${ROOT_DIR}/DDS-Record-Replay/build
cd ${ROOT_DIR}/DDS-Record-Replay
wget https://raw.githubusercontent.com/eProsima/DDS-Record-Replay/main/ddsrecordreplay.repos
vcs import src < ddsrecordreplay.repos
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/foonathan_memory_vendor
cd build/foonathan_memory_vendor
cmake ${ROOT_DIR}/DDS-Record-Replay/src/foonathan_memory_vendor -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DBUILD_SHARED_LIBS=ON
cmake --build . --target install -- -j8
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/fastcdr
cd build/fastcdr
cmake ${ROOT_DIR}/DDS-Record-Replay/src/fastcdr -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/fastdds
cd build/fastdds
cmake ${ROOT_DIR}/DDS-Record-Replay/src/fastdds -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# CMake Utils
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/cmake_utils
cd build/cmake_utils
cmake ${ROOT_DIR}/DDS-Record-Replay/src/dev-utils/cmake_utils -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# C++ Utils
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/cpp_utils
cd build/cpp_utils
cmake ${ROOT_DIR}/DDS-Record-Replay/src/dev-utils/cpp_utils -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddspipe_core
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddspipe_core
cd build/ddspipe_core
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddspipe/ddspipe_core -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddspipe_participants
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddspipe_participants
cd build/ddspipe_participants
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddspipe/ddspipe_participants -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddspipe_yaml
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddspipe_yaml
cd build/ddspipe_yaml
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddspipe/ddspipe_yaml -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddsrecorder_participants
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddsrecorder_participants
cd build/ddsrecorder_participants
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddsrecordreplay/ddsrecorder_participants -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddsrecorder_yaml
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddsrecorder_yaml
cd build/ddsrecorder_yaml
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddsrecordreplay/ddsrecorder_yaml -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddsrecorder
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddsrecorder_tool
cd build/ddsrecorder_tool
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddsrecordreplay/ddsrecorder -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
# ddsreplayer
cd ${ROOT_DIR}/DDS-Record-Replay
mkdir build/ddsreplayer_tool
cd build/ddsreplayer_tool
cmake ${ROOT_DIR}/DDS-Record-Replay/src/ddsrecordreplay/ddsreplayer -DCMAKE_INSTALL_PREFIX=${ROOT_DIR}/DDS-Record-Replay/install -DCMAKE_PREFIX_PATH=${ROOT_DIR}/DDS-Record-Replay/install
cmake --build . --target install -- -j8
./TypeLookupService
Participant < 01.0f.b6.0f.7c.04.54.88.00.00.00.00|0.0.1.c1> created...
- DDS Domain: 0
- DataWriter: 01.0f.b6.0f.7c.04.54.88.00.00.00.00|0.0.1.3
- Topic name: /dds/topic
- Topic data type: HelloWorld
Publisher running. Please press CTRL+C to stop the Publisher at any time.
Message published:
index: 0
message: Hello World
-----------------------------------------------------
Message published:
index: 1
message: Hello World
-----------------------------------------------------
Message published:
index: 2
message: Hello World
-----------------------------------------------------
Message published:
index: 3
message: Hello World
-----------------------------------------------------
Message published:
index: 4
message: Hello World
-----------------------------------------------------
Message published:
index: 5
message: Hello World
-----------------------------------------------------
Message published:
index: 6
message: Hello World
-----------------------------------------------------
Message published:
index: 7
message: Hello World
-----------------------------------------------------
Message published:
index: 8
message: Hello World
-----------------------------------------------------
Message published:
index: 9
message: Hello World
-----------------------------------------------------
Message published:
index: 10
message: Hello World
-----------------------------------------------------
Message published:
index: 11
message: Hello World
-----------------------------------------------------
Message published:
index: 12
message: Hello World
-----------------------------------------------------
Message published:
index: 13
message: Hello World
-----------------------------------------------------
Message published:
index: 14
message: Hello World
-----------------------------------------------------
2023-05-25 17:01:12.123 [RTPS_TRANSPORT_SHM Warning] Buffer is being invalidated, segment_size may be insufficient -> Function invalidate_if_not_processing
DataWriter matched with DataReader: 1.f.b6.f.e7.4.f.8b.0.0.0.0.0.0.1.4
Message published:
index: 15
message: Hello World
-----------------------------------------------------
Message published:
index: 16
message: Hello World
-----------------------------------------------------
./ddsrecorder
Not configuration file given, using default file DDS_RECORDER_CONFIGURATION.yaml.
Starting DDS Recorder execution.
DDS Recorder running.
^C./ddsrecorder: symbol lookup error: /media/nvme/ddsrecord-replay/DDS-Record-Replay/install/lib/libddsrecorder_participants.so.0: undefined symbol: ZSTD_compress2
ls -la output_
2023-05-25_21-01-12.mcap.tmp~
-rw-r--r-- 1 root root 0 May 25 17:01 output_2023-05-25_21-01-12.mcap.tmp~
dds:
domain: 0
recorder:
output:
filename: "output"
path: "."
buffer-size: 10
event-window: 60
log-publish-time: false
downsampling: 1
max-reception-rate: 2000
remote-controller:
enable: false
domain: 0
initial-state: "RUNNING"
command-topic-name: "/ddsrecorder/command"
status-topic-name: "/ddsrecorder/status"
specs:
threads: 8
max-pending-samples: 10
cleanup-period: 90
Please note that sometimes ddsrecord create non-zero size files and does not complain about the "undefined symbol: ZSTD_compress2", but when trying to replay the subscriber does not detect any messages.