C++ Message Queuing Library and Framework
Go to file
Dennis Klein 8285038ee8 Fix label
2018-05-02 13:49:36 +02:00
cmake Alias targets for imported targets are only supported from CMake 3.11+ 2018-04-25 16:50:14 +02:00
docs Update README 2018-04-10 18:52:57 +02:00
fairmq Depend on ZeroMQ via CMake package 2018-04-23 17:38:47 +02:00
test Depend on ZeroMQ via CMake package 2018-04-23 17:38:47 +02:00
.gitignore Add CMake project 2018-04-10 19:47:30 +02:00
AUTHORS Update README 2018-04-10 18:52:57 +02:00
CMakeLists.txt Depend on ZeroMQ via CMake package 2018-04-23 17:38:47 +02:00
CONTRIBUTORS Update README 2018-04-10 18:52:57 +02:00
CTestConfig.cmake Add CI jobs 2018-05-02 13:49:36 +02:00
Dart.sh Fix label 2018-05-02 13:49:36 +02:00
FairMQTest.cmake Add CI jobs 2018-05-02 13:49:36 +02:00
Jenkinsfile Add CI jobs 2018-05-02 13:49:36 +02:00
LICENSE Help github detect our license 2018-04-23 16:47:50 +02:00
README.md Depend on ZeroMQ via CMake package 2018-04-23 17:38:47 +02:00

FairMQ

C++ Message Queuing Library

Dependencies

  • Boost (PUBLIC)
  • FairLogger (PUBLIC)
  • CMake (BUILD)
  • GTest (BUILD, optional, tests)
  • ZeroMQ (PRIVATE)
  • Msgpack (PRIVATE, optional, nanomsg_transport)
  • nanomsg (PRIVATE, optional, nanomsg_transport)
  • OFI (PRIVATE, optional, ofi_transport)
  • Protobuf (PRIVATE, optional, ofi_transport)
  • DDS (PRIVATE, optional, dds_plugin)

Installation

git clone https://github.com/FairRootGroup/FairMQ
mkdir fairmq_build && cd fairmq_build
cmake -DCMAKE_INSTALL_PREFIX=./fairmq_install ../fairmq
cmake --build . --target install

If dependencies are not installed in standard system directories, you can hint the installation location via -DCMAKE_PREFIX_PATH=... or per dependency via -D{DEPENDENCY}_ROOT=.... {DEPENDENCY} can be GTEST, BOOST, FAIRLOGGER, ZEROMQ, MSGPACK, NANOMSG, OFI, PROTOBUF, or DDS (*_ROOT variables can also be environment variables).

Usage

FairMQ ships as a CMake package, so in your CMakeLists.txt you can discover it like this:

find_package(FairMQ)

If FairMQ is not installed in system directories, you can hint the installation:

set(CMAKE_PREFIX_PATH /path/to/FairMQ_install_prefix ${CMAKE_PREFIX_PATH})
find_package(FairMQ)

find_package(FairMQ) will define an imported target FairMQ::FairMQ (An alias FairRoot::FairMQ is also defined for backwards compatibility, but it is deprecated).

In order to succesfully compile and link against the FairMQ::FairMQ target, you need to discover its public package dependencies, too.

find_package(FairMQ)
find_package(FairLogger ${FairMQ_FairLogger_VERSION})
find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_BOOST_COMPONENTS})

Of course, feel free to customize the above commands to your needs.

Optionally, you can require certain FairMQ package components and a minimum version:

find_package(FairMQ 1.1.0 COMPONENTS nanomsg_transport dds_plugin)
find_package(FairLogger ${FairMQ_FairLogger_VERSION})
find_package(Boost ${FairMQ_Boost_VERSION} COMPONENTS ${FairMQ_BOOST_COMPONENTS})

When building FairMQ, CMake will print a summary table of all available package components.

CMake options

On command line:

  • -DDISABLE_COLOR=ON disables coloured console output.
  • -DBUILD_TESTING=OFF disables building of tests.
  • -DBUILD_NANOMSG_TRANSPORT=ON enables building of nanomsg transport.
  • -DBUILD_OFI_TRANSPORT=ON enables building of the experimental OFI transport.
  • -DBUILD_DDS_PLUGIN=ON enables building of the DDS plugin.
  • You can hint non-system installations for dependent packages, see the #Installation section above

After the find_package(FairMQ) call the following CMake variables are defined:

  • ${FairMQ_Boost_VERSION} contains the minimum Boost version FairMQ requires.
  • ${FairMQ_Boost_COMPONENTS} contains the list of Boost components FairMQ depends on.
  • ${FairMQ_FairLogger_VERSION} contains the minimum FairLogger version FairMQ requires.
  • ... TODO

Documentation

Standard FairRoot is running all the different analysis tasks within one process. FairMQ (Message Queue) allows starting tasks on different processes and provides the communication layer between these processes.

  1. Device
    1. Topology
    2. Communication Patterns
    3. State Machine
    4. Multiple devices in the same process
  2. Transport Interface
    1. Message
      1. Ownership
    2. Channel
    3. Poller
  3. Configuration
    1. Device Configuration
    2. Communication Channels Configuration
      1. JSON Parser
      2. SuboptParser
    3. Introspection
  4. Development
    1. Testing
  5. Logging
    1. Log severity
    2. Log verbosity
    3. Color for console output
    4. File output
    5. Custom sinks
  6. Examples

License

GNU Lesser General Public Licence (LGPL) version 3, see LICENSE.

Copyright (C) 2013-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH