GithubHelp home page GithubHelp logo

obiltschnig / cyclonedds-cxx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-cyclonedds/cyclonedds-cxx

0.0 1.0 0.0 1.13 MB

License: Other

C++ 91.69% C 4.34% CMake 3.87% Shell 0.11%

cyclonedds-cxx's Introduction

C++ binding for Eclipse Cyclone DDS

An implementation of the ISO/IEC C++ PSM, or simply put, a C++ binding for Eclipse Cyclone DDS. Cyclone DDS is developed completely in the open as an Eclipse IoT project (see eclipse-cyclone-dds) with a growing list of adopters (if you're one of them, please add your logo). It is a tier-1 middleware for the Robot Operating System ROS 2.

Build Status Coverity Status Codecov License License

Getting Started

Building the Eclipse Cyclone DDS C++ binding

In order to build the C++ binding for Cyclone DDS you need a Linux, Mac or Windows 10 machine (or, with some caveats, a *BSD, OpenIndiana one) with the following installed on your host:

  • C and C++ compilers (most commonly GCC on Linux, Visual Studio on Windows, Xcode on macOS);
  • Git version control system;
  • CMake, version 3.7 or later;
  • Eclipse Cyclone DDS

Eclipse Cyclone DDS has dependencies of its own, most notably Bison. To build and install it, please consult the build instructions. Ensure the project is installed into a location convenient for you by specifying CMAKE_INSTALL_PREFIX.

To obtain the C++ binding for Cyclone DDS, do

$ git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx.git
$ cd cyclonedds-cxx
$ mkdir build

Depending on whether you want to develop applications using the C++ binding for Cyclone DDS or contribute to it you can follow different procedures.

For application developers

To build and install the required libraries needed to develop your own applications using the C++ binding for Cyclone DDS requires a few simple steps. There are some small differences between Linux and macOS on the one hand, and Windows on the other. For Linux or macOS:

$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=<install-location> \
        -DCMAKE_PREFIX_PATH="<cyclonedds-install-location>" \
        ..
$ cmake --build .

and for Windows:

$ cd build
$ cmake -G "<generator-name>" \
        -DCMAKE_INSTALL_PREFIX=<install-location> \
        -DCMAKE_PREFIX_PATH="<cyclonedds-install-location>" \
        ..
$ cmake --build .

where you should replace <install-location> by the directory under which you would like to install the C++ binding for Cyclone DDS and <generator-name> by one of the ways CMake generators offer for generating build files. For example, "Visual Studio 15 2017 Win64" would target a 64-bit build using Visual Studio 2017.

To install it after a successful build, do:

$ cmake --build . --target install

Which will copy everything to:

  • <install-location>/lib
  • <install-location>/bin
  • <install-location>/include/ddsc
  • <install-location>/share/CycloneDDS-CXX

Depending on the installation location you may need administrator privileges.

At this point you are ready to use Eclipse Cyclone DDS in your own projects.

Note that the default build type is a release build with debug information included (RelWithDebInfo), which is generally the most convenient type of build to use from applications because of a good mix between performance and still being able to debug things. If you'd rather have a Debug or pure Release build, set CMAKE_BUILD_TYPE accordingly.

Contributing to Eclipse Cyclone DDS

We very much welcome all contributions to the project, whether that is questions, examples, bug fixes, enhancements or improvements to the documentation, or anything else really. When considering contributing code, it might be good to know that build configurations for Travis CI and AppVeyor are present in the repository and that there is a test suite using CTest and Google Test that can be built locally if desired. To build it, set the cmake variable BUILD_TESTING to on when configuring, e.g.:

$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON ..
$ cmake --build .
$ ctest

Such a build requires the presence of Google Test. You can install this yourself, or you can choose to instead rely on the Conan package manager that the CI build infrastructure also uses. In that case, install Conan and do:

$ conan install .. --build missing

in the build directory prior to running cmake. This will automatically download and/or build Google Test.

For Windows, depending on the generator, you might also need to add switches to select the architecture and build type, e.g.,

$ conan install -s arch=x86_64 -s build_type=Debug ..

Documentation

The documentation is still rather limited, and at the moment only available in the sources (in the form of restructured text files in docs and Doxygen comments in the header files). The intent is to automate the process of building the documentation and have them available in more convenient formats and in the usual locations.

Building and Running the HelloWorld Example

We will show you how to build and run an example program that illustrates the necessary steps to setup DCPS entities. The examples are built automatically when you build the C++ language binding for Cyclone DDS, so you don't need to follow these steps to be able to run the program, it is merely to illustrate the process.

$ mkdir helloworld
$ cd helloworld
$ cmake <install-location>/share/CycloneDDS-CXX/examples/helloworld
$ cmake --build .

On one terminal start the application that will be responding to messages:

$ ./ddscxxHelloWorldSubscriber

On another terminal, start the application that will be sending the messages:

$ ./ddscxxHelloWorldPublisher

Trademarks

  • "Eclipse Cyclone DDS" and "Cyclone DDS" are trademarks of the Eclipse Foundation.
  • "DDS" is a trademark of the Object Management Group, Inc.
  • "ROS" is a trademark of Open Source Robotics Foundation, Inc.

License

This project contains 2 types of license: Apache2 and Eclipse Public License / Eclipse Distribution License

  • The Apache2 license located in src/ddscxx/include/dds is for all files under src/ddscxx/include/dds except the details directories
  • Eclipse Public License / Eclipse Distribution License is valid for all other files.

cyclonedds-cxx's People

Contributors

reicheratwork avatar k0ekk0ek avatar sumanth-nirmal avatar e-hndrks avatar eboasson avatar thijssassen avatar kischy avatar obiltschnig avatar kurtuluso avatar t0ny-peng avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.