Commit Graph

320 Commits

Author SHA1 Message Date
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
Alexey Rybalchenko
151d3b5de8 Fix dereference before null check in example and formatting 2016-04-14 13:23:09 +02:00
Alexey Rybalchenko
a892a5a744 Update FairMQParts with doxygen comments and non-blocking send 2016-04-14 12:51:55 +02:00
Alexey Rybalchenko
82090c356c Fix identity setting for req/rep socket 2016-04-07 15:13:51 +02:00
winckler
e977dfb609 update generic sampler with new serialization api 2016-04-06 12:05:50 +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
winckler
819a21f46a remove obsolete documentation 2016-03-31 19:13:51 +02:00
winckler
e215049db9 remove alternative serialization API 2016-03-31 19:12:48 +02:00
winckler
835c88c6d2 change serialization API so that it takes a FairMQMessage reference 2016-03-31 19:12:48 +02:00
winckler
4c50409af5 add serialization API 2016-03-31 19:12:48 +02:00
Mohammad Al-Turany
9a340fb7f6 Use Variables for Boost libraries instead of explicit names
Use the vairables filled by FindBoost instead explicit names in the cmake files
2016-03-29 15:31:29 +02:00
Alexey Rybalchenko
732373faa2 Update multi-part features (nanomsg) and various fixes
- Implement nanomsg multipart with MessagePack.
 - Use the MessagePack from FairSoft and handle not found case.
 - Update splitter, merger and proxy devices to handle multi-part.
 - Let FairMQParts.At() return pointer reference (can be used for moving).
 - Add missing const specifier in the message interface.
 - Add transmit kernel size setting to channels (ZMQ_SNDBUF).
 - Remove FairMQBuffer device.
 - Remove old multi-part methods from Tutorial3 example (to be replaced with Parts API).
 - Make callback mandatory for newMsg(data, size, callback).
 - Add missing <vector> include in FairMQSocket.
2016-03-24 13:36:47 +01: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
bb36147099 Allocate dynamic size flatbuffers structure on the heap 2016-03-10 13:08:00 +01:00
Alexey Rybalchenko
1ad58653e7 Fix return value of multipart send/receive methods 2016-03-03 15:46:27 +01:00
Mohammad Al-Turany
c564a3f066 Merge branch 'fix-uint' of https://github.com/rbx/FairRoot into rbx-fix-uint 2016-03-03 15:35:36 +01:00
Alexey Rybalchenko
10f997f680 Fix return value of multipart send/receive methods 2016-03-03 15:35:39 +01:00
Alexey Rybalchenko
c42b6ca4ae Include device ID in the zeromq socket identity.
For request sockets in ZeroMQ the socket identity must be unique, otherwise multiple clients will be rejected.
Update the tests to test this use case.
2016-03-03 13:10:56 +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
0e1a1ad552 Allow to limit number of messages for the Benchmark sampler and sink 2016-01-14 14:19:03 +01:00
Alexey Rybalchenko
c10a6abeef Fix memory leaks in Tutorial3
- Fix small memory leaks in Processor and Sink of Tutorial 3.
 - Use FairFileSource for FairMQSampler of Tutorial 3.
2016-01-14 14:19:03 +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
Florian Uhlig
d254efb91f Fix compiler warnings. Mostly unused parameters have been removed. 2016-01-14 14:19:02 +01:00
NicolasWinckler
2060f0b1d7 FairMQLogger : remove pragma command and use CMake include SYSTEM command instead 2015-11-25 08:59:19 +01:00
Alexey Rybalchenko
2afa0652f4 Extend DDS Example to use command interface 2015-11-25 08:59:19 +01:00
NicolasWinckler
35c64c67a2 add a command line to enable/disable the color format in the fairmq log console output 2015-11-20 15:26:20 +01:00
NicolasWinckler
10d6482716 remove unfinished doc 2015-11-20 09:03:34 +01:00
NicolasWinckler
8f32579984 add a pointer data type serializer function in the boost serializer add the zmq and nanomsg directories in cmaklists that use the runSimpleMQStateMachine 2015-11-20 09:03:34 +01:00
Alexey Rybalchenko
afda64a83d Simplify the handling of send/receive timeouts 2015-11-20 09:00:22 +01:00
Florian Uhlig
0894900f52 Add missing link dependencies. 2015-11-19 15:51:44 +01:00
NicolasWinckler
89d57db5ea - create 3 test scripts for bin, boost, and root serialization format
- print message at the end of the data generator of GenericDevices tutorial
2015-11-12 11:25:14 +01:00
NicolasWinckler
76626b4f4b add test dir to examples/MQ/GenericDevices + change policy typedef in generic device from private to protected 2015-11-12 11:24:07 +01:00
NicolasWinckler
1467360f75 access channel map with at 2015-11-12 11:24:07 +01:00
Alexey Rybalchenko
383a220333 Update device configuration
- Move general config files out of example directory to fairmq/run.
 - Use FairMQProgOptions for MQ example 5.
 - Add SendPartAsync() for non-blocking send of a message part.
2015-11-11 11:09:42 +01:00
NicolasWinckler
837490cc38 add FairProgOptionsHelper.h in header list to be installed of fairmq/CMakeLists.txt 2015-11-09 14:17:44 +01:00
NicolasWinckler
819a8df952 add function helpers for FairProgOptions which simplify FairProgOptions.cxx 2015-11-09 14:08:27 +01:00
NicolasWinckler
13d3729fec enable/disable multipart functionnality for sending header if source policy has the proper signature
add comment to sendHeader
2015-11-09 14:08:27 +01:00
NicolasWinckler
6ce6887212 formatting, change and clean generic_sampler and SimpleTreeReader 2015-11-09 14:08:27 +01:00
Alexey Rybalchenko
d0c20d3729 Rename /example to /examples and move MQ examples in it 2015-11-09 10:36:24 +01:00
Alexey Rybalchenko
307d698736 Add example for sending multipart messages 2015-11-06 14:46:15 +01:00
Alexey Rybalchenko
2e789e4439 Add ParameterMQServer and example of its use 2015-11-06 14:46:15 +01:00
NicolasWinckler
19b3347ade - rename tutorial7 and move it to example/MQ/GenericDevices
- rename functions of MQ examples and change directory structures
- move FairMQUnpacker.h from example/MQ/LmdSampler to base/MQ/devices
- add runSimpleMQStateMachine.h helper function in fairmq/tools
2015-11-05 15:10:11 +01:00
NicolasWinckler
93b82767eb correct some coverity issues and add empty string to the logger if boost version = 1,59.0 2015-11-04 11:04:11 +01:00