Commit Graph

141 Commits

Author SHA1 Message Date
Alexey Rybalchenko
bf8ec968e7 Remove FairMQChannel from parser, implement bulk operations 2019-07-10 19:35:18 +02:00
Alexey Rybalchenko
3538d9f410 Deprecate Channel::GetChannelX() in favor of Channel::GetX() 2019-07-10 19:35:18 +02:00
Alexey Rybalchenko
7e6eb382d5
Extend Readout example 2019-04-29 20:32:38 +02:00
Alexey Rybalchenko
2cc1117637
Notify all listeners on state changes 2019-04-29 20:32:37 +02:00
Alexey Rybalchenko
d9edcad845 Add backwards compatibility for removed ChangeState(int) 2019-02-26 16:13:09 +01:00
Alexey Rybalchenko
8375faf835 Add --max-run-time option and fix bug in LogSocketRates 2019-02-25 12:19:50 +01:00
Alexey Rybalchenko
fc94342db8 Update state machine
- Split INITIALIZING state into Init+Bind+Connect
 - Remove PAUSE state
 - Convert state/transitions to enum classes (CamelCase)
 - Transition to a state only once previous handler is complete
 - Add CompleteInit transition to notify Initializing state
   that config updates are complete
 - Deprecate WaitForEndOfState(transition) in favor of
   WaitForState(state)/WaitForNextState()
 - Update tests/plugins to new APIs
 - Deprecate CheckCurrentState() in favor of NewStatePending()
2019-02-25 12:19:50 +01:00
Alexey Rybalchenko
25fcf13985 Move Bind/Connect/Attach to FairMQChannel 2018-11-13 11:08:48 +01:00
Alexey Rybalchenko
3b5b2b501f Use exceptions for fatal errors in device/channel
- These will be caught by StateMachine::ProcessWork
   and lead to error state.
 - Solve issue where device goes into ready state if
   it encounters misconfigured channel in the Run.
 - deprecate WaitForInitialValidation().
2018-10-31 15:26:43 +01:00
mkrzewic
d40bbfe208 Equip FairMQMessage with pointer to factory (at creation)
the patch seems big but most of it is just propagating the new notion of
constness of the factory - since it keeps track of created messages with
the internal allocator it no longer is const
2018-10-31 13:12:38 +01:00
Alexey Rybalchenko
c40bd7d6a9 Apply clang-tidy suggestions [performance-faster-string-find] 2018-10-29 13:45:36 +01:00
Alexey Rybalchenko
4951433330 Apply clang-tidy suggestions [modernize-loop-convert] 2018-10-29 13:45:36 +01:00
Alexey Rybalchenko
f8824335a5 Add setters/getters for socket options 2018-10-17 13:28:50 +02:00
Alexey Rybalchenko
dfa1b68867 Make factory classes final (optimization potential) 2018-10-17 13:28:50 +02:00
Alexey Rybalchenko
44acd4997d Implement nanomsg linger in our transport 2018-10-17 13:28:50 +02:00
Alexey Rybalchenko
cb199e7283 Fix throw after quit signal case 2018-10-10 19:35:18 +02:00
Alexey Rybalchenko
45354f268b Use future instead of thread for device rateLogger 2018-10-10 19:35:18 +02:00
Dennis Klein
1aab354a5d Resolve hanging process in case of uncaught exception 2018-10-10 19:35:18 +02:00
Alexey Rybalchenko
e1f555bc05 Fix issues found by Codacy 2018-10-08 17:20:02 +02:00
Alexey Rybalchenko
4123ebc9d4 Add interruptable FairMQDevice::WaitFor(duration) method 2018-09-20 14:05:44 +02:00
Alexey Rybalchenko
2498837b8e Use new RateLimiter for ConditionalRun 2018-08-27 17:37:22 +02:00
Alexey Rybalchenko
1bb558a457 Refactor initialization
- add device constructor that accepts FairMQProgOptions object.
 - Initialize config values in INIT state (to allow their update).
 - Simplify FairMQProgOptions handling in FairMQDevice.
 - Simplify SetTransport/SetConfig - refactor duplicated code.
 - Add FairMQDevice methods to add channels.
2018-08-27 17:37:22 +02:00
Alexey Rybalchenko
21419adb40 Change unregistered options warning to debug 2018-06-16 17:40:05 +02:00
Alexey Rybalchenko
653e82cab4 Avoid copy (where possible) when switching transports 2018-06-08 13:10:06 +02:00
Alexey Rybalchenko
2894af803b Add getter for cmd line args & align channel names in log 2018-06-06 16:04:08 +02:00
Alexey Rybalchenko
8b88e67360 Refactor FairMQProgOptions 2018-06-06 16:04:08 +02:00
Dennis Klein
72f5cdef58 Fix various warnings
-Wunused-parameter
-Wreorder
-Wsign-compare
-Wunused-private-field
2018-05-24 13:03:06 +02:00
Alexey Rybalchenko
d93dc2f7f7 Use enum transport types instead of strings in Channel/Device 2018-05-15 19:18:11 +02:00
Alexey Rybalchenko
7a4fd96b27 Fix namespaces in Transports.h and add conversion map 2018-05-15 19:18:11 +02:00
Alexey Rybalchenko
155618af57 Used cached default transport in FairMQDevice::Transport() 2018-05-15 19:18:11 +02:00
Alexey Rybalchenko
a5ff7d5a1e Add resolver for hostname -> ip, use it before bind/connect 2018-05-03 18:33:13 +02:00
Alexey Rybalchenko
166e537d9f Fix incomplete initialization in CreateOwnConfig() 2018-05-02 22:09:42 +02:00
Alexey Rybalchenko
bab7e13737 Refactor the examples after move from FairRoot 2018-05-02 16:12:57 +02:00
Alexey Rybalchenko
fed7601be4 replace cmd socket with transport specific unblock mechanism 2018-03-26 13:58:20 +02:00
Dennis Klein
e73fcbd595 FairMQ: Parameterize the command interface initializing with sub socket
! THIS PATCH BREAKS NANOMSG TRANSPORT !

The subscriber command socket was created using the transport factory of
the channel which might not implement sub sockets. This patch creates
the subscriber command sockets in the device initialization and passes
them down (move) to the command interface initialization.

This patch puts more focus on the GetSocket interface of FairMQSocket,
because all command sockets are now implemented with the default
transport - the channels use an internal poller which polls over sockets
of potentially different transports now (e.g. zeromq command socket and
nanomsg data socket). Basically, all transports need to return file
descriptors compatible to be used in a single poll set. THIS IS NOT THE CASE!

! THIS PATCH BREAKS NANOMSG TRANSPORT !
2018-03-26 13:58:20 +02:00
Dennis Klein
9b7841e89e FairMQ: Remove deprecated TransportFactory factory method 2018-03-26 13:58:20 +02:00
Alexey Rybalchenko
6e40011a18 DDS plugin: handle n to m on single channel name case 2018-02-28 11:22:19 +01:00
Alexey Rybalchenko
13678f9f6d monitor update 2018-02-19 14:03:42 +01:00
Alexey Rybalchenko
f8d4fe01d0 FairMQProgOptions fixes and cleanup
- Remove singular key names from JSON schema.
- Align the property tree created by `FairMQSuboptParser` with the format required by the main parser (plural names).
- Fix `--print-options` to print all options (not only those that have their value set).
- remove XML parser (outdated and unused).
- various code cleanup.
2018-02-07 16:34:21 +01:00
Alexey Rybalchenko
4e2a195289 Fix warnings 2018-02-01 09:59:11 +01:00
Alexey Rybalchenko
a91c481abf remove custom timestamp stuff from logger wrapper 2018-01-16 22:53:26 +01:00
Alexey Rybalchenko
a3393e600e convert log severities use to lowercase and remove use of MQLOG 2018-01-16 22:53:26 +01:00
Alexey Rybalchenko
e340a52bf2 Use FairMQ tools for string creation. 2017-12-10 17:37:53 +01:00
Alexey Rybalchenko
58a312b730 FairMQ: Introduce callbacks for the FairMQUnmanagedRegion.
Callbacks are called when the data buffer of the message assiciated
with the corresponding region is no longer needed by the transport.
Example in examples/advanced/Region/
2017-11-29 09:06:17 +01:00
Matthias Richter
72cdd1e3d7 using steady_clock instead of system_clock 2017-11-17 16:23:38 +01:00
Matthias Richter
4351f3df0d adding missing variable initialisation in second constructor 2017-11-17 16:23:38 +01:00
Matthias Richter
2a134b9206 Changing '--rate' option to type float, remove stringstream from argument scan
This correction to the previous commit leaves the <sstream> header in, because
std::stringstream has been using already before and the header was missing.
2017-11-17 16:23:38 +01:00
Matthias Richter
9b2b1cf9f1 Adding rate control for ConditionalRun function
Devices implementing the conditional run method are typically source
devices and a rate control can be desireable. New option '--rate' with
a float number argument in Hz can be used to configure rate control.
By default it is switched off.
2017-11-17 16:23:38 +01:00
Alexey Rybalchenko
179968db1e Remove FairMQConfigurable 2017-10-05 15:32:12 +02:00
Dennis Klein
44a59f25a7 FairMQ: Move --catch-signals logic to control plugin
* Add StealDeviceControl() API to plugin services
2017-10-05 15:32:12 +02:00