@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@...............@@@@@@@@@@@@@@@ @@@@@@@................@@@@@@@@@@ @@@@@@@@@@.......@@@@@@@@.....@@
@@................@@@@@@@@@@@@@@ @@@@@@................@@@@@@@@@@ @@@@@@@@.........@@@@@@@.....@@
@@.....@@@@@@......@@@@@@@@@@ @@@ @@@@@@@@@@.....@@@@@@@@@@@@ @@@ @@@@@@..........@@@@@@.....@@
@@.....@@@@@@@......@@@@@@@@@ @@@ @@@@@@@@@.....@@@@@@@@@@@@ @@@ @@@@@......@....@@@@@.....@@
@@.....@@@@@@@@.....@@@@@ @@@ @@@ @@@@@@@@@.....@@@@@@@@ @@@ @@@ @@@@@......@.....@@@@.....@@
@@.....@@@@@@@@.....@@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@@ @@@ @@ @@@@@......@@.....@@@.....@@
@@.....@@@@@@@@.....@@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@@ @@@ @@ @@@@@......@@@.....@@.....@@
@@.....@@@@@@@......@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@ @@@ @@ @@@@@......@@@.....@@.....@@
@@.....@@@@@........@@@@@@@@@ @@ @@@@@@@@@@.....@@@@@@@@@@@@ @@ @@@@@@......@@@@.....@.....@@
@@.................@@@@@@@@@@ @@ @@@@@@@@@@@@.....@@@@@@@@@@@@ @@ @@@@@@@@......@@@@@..........@@
@@...............@@@@@@@@@@@@@@@ @@@@@@@@@@@@@.....@@@@@@@@@@@@@@@ @@@@@@@@@......@@@@@@........@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The Bundle Protocol library (BPLib) is a C-language implementation of the RFC-9171 Bundle Protocol version 7 that targets embedded space flight applications via BPNode. It also follows the CCSDS Compressed Bundle Status Reporting and Custody Signaling Orange Book that is currently in draft. Currently only a subset of these specifications are implemented, with the goal of implementing the full specifications in future builds.
The following features are currently implemented:
The BPNode application handles most of the convergence layer interactions and currently supports sending and receiving bundles over UDP and over the cFS Software Bus. Additional Convergence Layer Adapters (CLAs) are planned for future builds.
BPLib contains no threads and relies entirely on the calling application for its execution context and implements a thread-safe blocking I/O model where shared resources are mutex-protected. Memory is allocated up-front by the calling application in a single pool that BPLib uses as it moves bundles between threads to perform various ingress, processing, and egress operations. A sqlite3 database provides persistent storage to bundles that cannot be immediately delivered and monitors bundles in storage for potential delivery or lifetime expiration.
Node testing can be done using the DTN Test Tools either as Python scrips on the command line or in OpenC3 COSMOS using the provided COSMOS definitions.
This repository is organized into the following key directories:
inc/bplib_cfg.h fileFor Ubuntu 20.04.6 LTS, the following package versions are required:
For Ubuntu 22.04, the following package versions are required:
cd ~
mkdir bp_install
cd bp_install
export INSTALL_DIR=$(pwd)
# Navigate to the install directory
cd $INSTALL_DIR
# Clone the QCBOR repo
git clone https://github.com/laurencelundblade/QCBOR.git
# Navigate to the QCBOR repo
cd QCBOR
# Switch to the correct version of QCBOR
git checkout v1.5.1
# Build and install QCBOR
sudo make uninstall
cmake -DBUILD_SHARED_LIBS=ON -S . -B build
cmake --build build
sudo make install
To build BPLib within the cFS architecture, see the BPNode documentation.
Please note that the provided standalone executable, bpcat, is provided only as a prototype and does not contain the full functionality of the library. For a comprehensive implementation of bplib, please see the cFS app, BPNode, in the section above.
# Navigate to the install directory
cd $INSTALL_DIR
# Clone the BPLib repository
git clone https://github.com/nasa/bplib
cd bplib
# Clone the OSAL repository
git clone https://github.com/nasa/OSAL osal
If you wish to modify the contact configurations, such as the UDP address or destination EID mappings, you should edit $INSTALL_DIR/bplib/app/src/bpcat_nc.c
export NasaOsal_DIR="${INSTALL_DIR}/bplib/osal-staging/usr/local/lib/cmake"
export BPLIB_OS_LAYER=OSAL
# Choose a build configuration - choose between Debug or Release
export MATRIX_BUILD_TYPE=Release
# Define bplib build directory
export BPLIB_BUILD="${INSTALL_DIR}/bplib/bplib-build-matrix-${MATRIX_BUILD_TYPE}-POSIX"
# Navigate to the bplib directory
cd $INSTALL_DIR/bplib
# Install OSAL
cd osal/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DOSAL_SYSTEM_BSPTYPE=generic-linux \
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
-DOSAL_OMIT_DEPRECATED=TRUE \
-DENABLE_UNIT_TESTS=TRUE \
-DOSAL_CONFIG_DEBUG_PERMISSIVE_MODE=ON -B ../osal-build
cd ../osal-build
make DESTDIR=../osal-staging install
# Navigate to the cFS directory
cd $INSTALL_DIR/bplib
# Build OSAL with debug configurations
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
-DBPLIB_OS_LAYER=OSAL \
-DCMAKE_PREFIX_PATH=/usr/local/lib/cmake -B "${BPLIB_BUILD}"
cd $BPLIB_BUILD
make all
ctest --output-on-failure 2>&1 | tee ctest.log
# Run bpcat executable
cd $BPLIB_BUILD/app
./bpcat
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@...............@@@@@@@@@@@@@@@ @@@@@@@................@@@@@@@@@@ @@@@@@@@@@.......@@@@@@@@.....@@
@@................@@@@@@@@@@@@@@ @@@@@@................@@@@@@@@@@ @@@@@@@@.........@@@@@@@.....@@
@@.....@@@@@@......@@@@@@@@@@ @@@ @@@@@@@@@@.....@@@@@@@@@@@@ @@@ @@@@@@..........@@@@@@.....@@
@@.....@@@@@@@......@@@@@@@@@ @@@ @@@@@@@@@.....@@@@@@@@@@@@ @@@ @@@@@......@....@@@@@.....@@
@@.....@@@@@@@@.....@@@@@ @@@ @@@ @@@@@@@@@.....@@@@@@@@ @@@ @@@ @@@@@......@.....@@@@.....@@
@@.....@@@@@@@@.....@@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@@ @@@ @@ @@@@@......@@.....@@@.....@@
@@.....@@@@@@@@.....@@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@@ @@@ @@ @@@@@......@@@.....@@.....@@
@@.....@@@@@@@......@@@@@ @@@ @@ @@@@@@@@@.....@@@@@@@@ @@@ @@ @@@@@......@@@.....@@.....@@
@@.....@@@@@........@@@@@@@@@ @@ @@@@@@@@@@.....@@@@@@@@@@@@ @@ @@@@@@......@@@@.....@.....@@
@@.................@@@@@@@@@@ @@ @@@@@@@@@@@@.....@@@@@@@@@@@@ @@ @@@@@@@@......@@@@@..........@@
@@...............@@@@@@@@@@@@@@@ @@@@@@@@@@@@@.....@@@@@@@@@@@@@@@ @@@@@@@@@......@@@@@@........@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The Bundle Protocol library (BPLib) is a C-language implementation of the RFC-9171 Bundle Protocol version 7 that targets embedded space flight applications via BPNode. It also follows the CCSDS Compressed Bundle Status Reporting and Custody Signaling Orange Book that is currently in draft. Currently only a subset of these specifications are implemented, with the goal of implementing the full specifications in future builds.
The following features are currently implemented:
The BPNode application handles most of the convergence layer interactions and currently supports sending and receiving bundles over UDP and over the cFS Software Bus. Additional Convergence Layer Adapters (CLAs) are planned for future builds.
BPLib contains no threads and relies entirely on the calling application for its execution context and implements a thread-safe blocking I/O model where shared resources are mutex-protected. Memory is allocated up-front by the calling application in a single pool that BPLib uses as it moves bundles between threads to perform various ingress, processing, and egress operations. A sqlite3 database provides persistent storage to bundles that cannot be immediately delivered and monitors bundles in storage for potential delivery or lifetime expiration.
Node testing can be done using the DTN Test Tools either as Python scrips on the command line or in OpenC3 COSMOS using the provided COSMOS definitions.
This repository is organized into the following key directories:
inc/bplib_cfg.h fileFor Ubuntu 20.04.6 LTS, the following package versions are required:
For Ubuntu 22.04, the following package versions are required:
cd ~
mkdir bp_install
cd bp_install
export INSTALL_DIR=$(pwd)
# Navigate to the install directory
cd $INSTALL_DIR
# Clone the QCBOR repo
git clone https://github.com/laurencelundblade/QCBOR.git
# Navigate to the QCBOR repo
cd QCBOR
# Switch to the correct version of QCBOR
git checkout v1.5.1
# Build and install QCBOR
sudo make uninstall
cmake -DBUILD_SHARED_LIBS=ON -S . -B build
cmake --build build
sudo make install
To build BPLib within the cFS architecture, see the BPNode documentation.
Please note that the provided standalone executable, bpcat, is provided only as a prototype and does not contain the full functionality of the library. For a comprehensive implementation of bplib, please see the cFS app, BPNode, in the section above.
# Navigate to the install directory
cd $INSTALL_DIR
# Clone the BPLib repository
git clone https://github.com/nasa/bplib
cd bplib
# Clone the OSAL repository
git clone https://github.com/nasa/OSAL osal
If you wish to modify the contact configurations, such as the UDP address or destination EID mappings, you should edit $INSTALL_DIR/bplib/app/src/bpcat_nc.c
export NasaOsal_DIR="${INSTALL_DIR}/bplib/osal-staging/usr/local/lib/cmake"
export BPLIB_OS_LAYER=OSAL
# Choose a build configuration - choose between Debug or Release
export MATRIX_BUILD_TYPE=Release
# Define bplib build directory
export BPLIB_BUILD="${INSTALL_DIR}/bplib/bplib-build-matrix-${MATRIX_BUILD_TYPE}-POSIX"
# Navigate to the bplib directory
cd $INSTALL_DIR/bplib
# Install OSAL
cd osal/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DOSAL_SYSTEM_BSPTYPE=generic-linux \
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
-DOSAL_OMIT_DEPRECATED=TRUE \
-DENABLE_UNIT_TESTS=TRUE \
-DOSAL_CONFIG_DEBUG_PERMISSIVE_MODE=ON -B ../osal-build
cd ../osal-build
make DESTDIR=../osal-staging install
# Navigate to the cFS directory
cd $INSTALL_DIR/bplib
# Build OSAL with debug configurations
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE="${MATRIX_BUILD_TYPE}" \
-DBPLIB_OS_LAYER=OSAL \
-DCMAKE_PREFIX_PATH=/usr/local/lib/cmake -B "${BPLIB_BUILD}"
cd $BPLIB_BUILD
make all
ctest --output-on-failure 2>&1 | tee ctest.log
# Run bpcat executable
cd $BPLIB_BUILD/app
./bpcat