Commit Graph

71 Commits

Author SHA1 Message Date
Alexey Rybalchenko
65f1b96dc3 Add Version member to FairMQDevice, settable via constructor 2017-07-17 13:25:16 +02:00
Dennis Klein
a26925cbf5 FairMQ: Fix various errors from CI
* move Plugins::Version to fair::mq::tools
* fix Parser interface
* make device a shared pointer in main
* provide std::hash template specialization
* fix FairMQ.Plugins/FairMQ.PluginsStatic when run with ctest
* fix MQ/serialization example
* add --no-as-needed flag
* GCC 4 does not support member refs, move to pointer types
2017-07-04 07:05:11 +02:00
Dennis Klein
ad0f050c99 FairMQ: Implement PluginServices - Config 2017-07-04 07:05:11 +02:00
Dennis Klein
9b61b924b2 FairMQ: Integration of Plugins through PluginServices 2017-07-04 07:05:11 +02:00
Alexey Rybalchenko
ac69607250 make FairProgOptions calls thread safe 2017-07-04 07:05:11 +02:00
Alexey Rybalchenko
b47cc8b29c add callback on state change 2017-07-04 07:05:11 +02:00
Alexey Rybalchenko
a60fac80d9 FairMQProgOptions: add a method to check key existence 2017-06-23 11:45:46 +02:00
Alexey Rybalchenko
4bc54ad32b add --print-channels to print registered channels of the device 2017-06-23 11:45:46 +02:00
Alexey Rybalchenko
1d38a2350f add --print-options to print available options in short format 2017-06-23 11:45:46 +02:00
Alexey Rybalchenko
f4e5a74f23 Always have access to FairMQProgOptions from device. 2017-06-04 01:06:12 +02:00
Dennis Klein
04bc7d4bfd add missing include guard 2017-05-10 06:42:57 +02:00
Alexey Rybalchenko
7b4a2ae932 shmem: configurable segment name. 2017-04-28 13:30:51 +02:00
Alexey Rybalchenko
a8d40abbd9 FairProgOptions: update ambiguous option name. 2017-04-28 13:30:51 +02:00
Alexey Rybalchenko
7caf0a6aae Configurable shmem segment size 2017-04-20 11:07:49 +02:00
Matthias Richter
55a9d69908 Adding option '--channel-config' to MQProgOptions 2017-04-20 11:07:46 +02:00
Matthias Richter
9943be507e Adding helper function to print the raw boost property tree 2017-04-20 11:07:46 +02:00
Matthias Richter
e184610c06 Adding parser implementation for key-value subopt format
A parser implementation for FairMQ channel properties.
The parser handles a comma separated key=value list format by using the
getsubopt function of the standard library.

The option key '--channel-config' can be used with the list of key/value
pairs like e.g.
--channel-config name=output,type=push,method=bind
2017-04-20 11:07:46 +02:00
Alexey Rybalchenko
b237b3f9d7 Remove unused code.
- Remove unused code in FairMQTools.
- Remove obsolete device options (now in device config).
2017-03-14 17:51:26 +01:00
Alexey Rybalchenko
91b7a72ac5 get default network interface from the default route 2017-03-02 13:25:06 +01:00
Alexey Rybalchenko
c66fd6fe91 Adding multiple transports support & other fixes:
- Avoid polling when only one input channel is used.
 - Send only handles for shared memory transport.
 - Avoid waiting in the rate logger thread when nothing to log.
 - Hide warnings from generated files
 - Fix #483
2017-02-23 06:47:09 +01:00
Alexey Rybalchenko
a332d9fc83 First version of the shared memory transport.
Use via `--transport shmem` cmd option. No pub/sub.
2016-12-18 14:50:58 +01:00
Alexey Rybalchenko
b166cedb63 Convert factory methods to return smart ptrs
- Convert factory methods to return smart ptrs.
 - Refactor state machine to use same thread for user states.
 - Remove unused includes and dependencies, use std.
2016-11-18 14:19:16 +01:00
Sebastien Binet
0a3f14c0e3 all: apply fer-json-fmt 2016-11-10 15:20:54 +01:00
Sebastien Binet
02f5e63784 all: use strict(er) and more regular JSON schema 2016-11-10 15:20:54 +01:00
Sebastien Binet
581e93968e fairmq/options: fix JSON example 2016-11-10 10:55:50 +01:00
Alexey Rybalchenko
79fba8ec4c Update JSON files & readme, use FairMQDevicePtr, cleanup. 2016-11-09 15:01:40 +01:00
Alexey Rybalchenko
da3010b20c Move config & control DDS functionality into plugins. 2016-10-28 14:14:13 +02:00
Alexey Rybalchenko
16fd63cd5b Enable new callback API
- OnData() channel data handler.
 - ConditionalRun() for devices without incoming data.
 - Header file with common main(), to be extended with getDevice/addCustomOptions.
 - Update examples (MQ/Tutorial3) to use the new API and config.
 - NewSimpleMessage() for simpler creation of small messages (additional copy).
 - Replace SetProperty/GetProperty with fConfig access.
 - Runtime configurable channel names for common devices.
 - Configurable logging interval per channel.
 - FairMQMultiplier for distributing same data to multiple outputs.
 - Cleanup state machine messages.
 - Cmd option to toggle signal handling.
 - Simpler API for send/receive timeouts.
 - Enable --log-to-file.
 - Fix coverity issues, warnings.
 - Various code cleanup and minor tweaks.
2016-09-30 14:36:35 +02:00
winckler
e0a03242ac Simplify logger filtering options, fix log error double printing issue 2016-09-19 11:20:22 +02:00
winckler
9ceab6099c add a signal/slot mechanism. 2 APIs : one generic version, and one string API (commented) 2016-09-19 11:20:22 +02:00
Alexey Rybalchenko
7c99bd77cc Fix unused variables, init order and effc++ warnings. 2016-09-06 10:19:23 +02:00
Florian Uhlig
827c8dcd45 Remove warnings about unused parameters. 2016-08-12 13:25:07 +02:00
winckler
bed58891ea merge MQ parameters in the variable_map container of FairMQProgramOptions class 2016-08-05 08:34:15 +02:00
winckler
64f1fd2a3b - add test for serialization examples 1&2
- rename serialization files and scripts
- remove policy and host header files from fairmq installation
2016-07-01 13:05:37 +02:00
Florian Uhlig
75aad5676d Use Boost_ variables instead of hardcoded names. 2016-06-08 15:38:14 +02:00
Alexey Rybalchenko
cc88339791 Cleanup command line options
- Remove old cmd options --config-json-file and --config-xml-file.
   Now handled by --mq-config with file extension detection.
 - Fix --config-json-string and --config-xml-string
 - Move config-key to proper place (in --help)
2016-05-23 16:40:32 +02:00
Alexey Rybalchenko
28aa5e4caa Let ParseAll exit if unsuccessfull 2016-05-12 17:28:33 +02:00
Alexey Rybalchenko
58754e03c7 Make sure logger is used before configuring it. 2016-04-28 10:28:18 +02:00
Alexey Rybalchenko
e039931098 Fix the logger conflict issue 2016-04-27 17:01:23 +02:00
Alexey Rybalchenko
5421922668 Add a cmd option to control state change mechanism 2016-04-27 15:04:29 +02:00
Alexey Rybalchenko
b9883d3b13 Configuration and DDS example/tools updates
- Update DDS example command UI and extract it from example.
 - Unify address handling via DDS properties for dynamic deployment.
 - Update DDS docs with the new approach.
 - Allow `--config-key` to be used to access common config in JSON.
 - Allow common channel properties to be specified for all sockets.
 - Update MQ examples and Tuto3 with new config options.
 - Add start scripts to MQ examples for easier use.
2016-04-25 17:35:57 +02:00
winckler
3b985cd2cd encapsulate and use fairmq default xml and json parser if command line mq-config file.extension is called. The .xml and .json files are recognized internally. Remove explicit json parsing in runSimpleMQStateMAchine.h. Propagate the new commandline mq-config where the runstatemachine function is used 2016-04-05 17:52:10 +02:00
winckler
8df656a302 enable object array parsing in JSON parser for devices, channels, and sockets.
device, channel, and socket are parsed as before
2016-04-05 11:16:53 +02:00
Florian Uhlig
4ca66e33da Fix compiler warnings.
Switch of compiler warnings for part of the code.
The compiler flag -Weffc++ of the gcc compiler creates many warnings about non virtual destructor of base classes where the
base class is actually a class from boost or from stl. Switch of the compiler flag for the problematic parts of the code
using preprocessor statements. There are also such preprocessor guards for code which creates many warnings when
using clang.

Filter warnings comming from generated files.
When using CTest all warnings comming from generated code (Root Dictionaries, code generated by protoc) will be filtered
before sending the results to the CDash web server.

Remove unused variables or use them.
Initialize all data members in initializer lists.
Use in initializer list the same order of data members as defined in the class declaration.
Declare private copy constructors and assignment operators where needed.

Fix format problems in printf statements.
Correctly cast the variables.
2016-03-17 21:33:40 +01:00
Florian Uhlig
fa7040fe65 Fix compiler warnings.
Initialize all data members in initializer lists.
Reorder data members in initializer list to have the same order as in the class declaration.
Comment or remove unused parameters and unused variables.
Convert all old style casts to the correct and explicit c++ cast like const_cast, static_cast,
dynamic_cast or reinterpret_cast. In most cases static_cast is used.
2016-03-14 13:37:55 +01:00
Alexey Rybalchenko
e1fef82657 FairMQ: Extend Multipart and messaging API
- Extend the multipart API to allow sending vectors of messages or helper
   thin wrapper FairMQParts. See example in examples/MQ/8-multipart.
 - NewMessage() can be used in devices instead of
   fTransportFactory->CreateMessage().
   Possible arguments remain unchanged (no args, size or data+size).
 - Send()/Receive() methods can be used in devices instead of
   fChannels.at("chan").at(i).Send()/Receive():
   Send(msg, "chan", i = 0), Receive(msg, "chan", i = 0).
 - Use the new methods in MQ examples and tests.
 - No breaking changes, but FAIRMQ_INTERFACE_VERSION is incremented to 3
   to allow to check for new methods.
2016-02-29 16:25:39 +01:00
Alexey Rybalchenko
82ab7670a9 Add FlatBuffers & MessagePack examples
- Add FlatBuffers serialization example to Tutorial 3
 - Add MessagePack serialization example to Tutorial 3
 - Performance improvements in Boost serialization example
 - Use `GetEntriesFast()` for FairTestDetectorRecoTask
 - Use `Clear()` instead of `Delete()` in MQ parts of Tutorial 3
 - Fix CMake variables from preventing compilation without nanomsg.
 - create macro/data directories in install directory
 - Get rid of data duplication in fill_parameters.C
 - Various cleanups and fixes
2016-02-22 13:06:37 +01:00
Alexey Rybalchenko
f1abb9ecdd Remove compile time transport interface switch
- Remove the compile time check of the transport implementation.
  The transport (zeromq/nanomsg) can be chosen at run time with:
  `device.SetTransport("zeromq"); // possible values are "zeromq" and "nanomsg"`.

  For devices that use FairMQProgOptions, the transport can be configured via cmd option:
  `--transport zeromq` or `--transport nanomsg`. Default values is "zeromq".
  The device receives the configured value with:
  `device.SetTransport(config.GetValue<std::string>("transport"));`

  Old method of setting transport still works. But the NANOMSG constant is not defined.

- Remove old `fairmq/prototest` directory. It was only used as a test for protobuf.
  The protobuf part of Tutorial3 does the same (with different values).

- Fix a bug in FairMQPollerNN, where the `revents` value was not initialized.
  This caused the `poller->CheckOutput()` to trigger when it should not.
2016-01-14 15:19:30 +01:00
Alexey Rybalchenko
e4fed2fa1b Fix copy constructor & assignment operator warning in FairMQChannel
Fix Weffc++ warnings

  - Add missing copy constructors and assignment operators .
  - Hide the warning from FairMQStateMachine.h where it is produced by boost and/or is intended.
  - Some code cleanup.
2016-01-14 14:19:03 +01:00
Alexey Rybalchenko
9a0a8c7516 Add a acknowledgement channel to Tutorial 3...
- ...to measure performance of the serialization libraries.
  - Rename `--log-color-format` cmd option to `--log-color`.
2016-01-14 14:19:03 +01:00