Commit Graph

99 Commits

Author SHA1 Message Date
Gvozden Neskovic
40f6db430a Print channel name in error log 2019-06-01 06:20:39 +02:00
Alexey Rybalchenko
6809d60fad Fix mismatch of docs/API, wrong return value 2019-03-19 18:09:01 +01:00
Alexey Rybalchenko
44a9946ea6 Allow creating region with a callback with default transport 2019-03-11 20:20:22 +01:00
Alexey Rybalchenko
d9edcad845 Add backwards compatibility for removed ChangeState(int) 2019-02-26 16:13:09 +01:00
Alexey Rybalchenko
7dcd84dd93 Delete old unused code 2019-02-25 12:19:50 +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
Dennis Klein
5e4876c947 Allow plugins to create channels
This also fixes a bug, that prevented the usage of custom types with the
plugin config API.
2018-10-31 15:42:04 +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
0cfa9192d7 Deprecate Send-/ReceiveAsync, use timeout variant instead 2018-10-30 10:39:35 +01:00
Dennis Klein
a78d35d90d Remove obsolete declaration 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
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
a53ef79552 Run state handlers on the main thread (breaking change for control). 2018-08-08 16:13:41 +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
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
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
7b4976898a include FairMQProgOptions.h in FairMQDevice.h 2018-03-22 14:11:34 +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
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
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
0bb866ff36 FairMQ: shared memory unmanaged region updates:
- use same mapping for sender/receiver (created/remote) region.
 - rename FairMQRegion -> FairMQUnmanagedRegion.
2017-10-20 14:17:15 +02: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
Dennis Klein
7dcd09692c FairMQ: Move static and interactive control modes to plugin (3) 2017-10-05 15:32:12 +02:00
Alexey Rybalchenko
01327426c3 Port DDS plugin to the new plugin system. 2017-10-05 15:32:12 +02:00
Alexey Rybalchenko
2db114bc5c Eliminate warnings in FairLink and FairMQ Plugins. 2017-10-05 15:32:12 +02:00
Alexey Rybalchenko
70e46a0b86 Cleanup base/MQ. 2017-10-05 15:32:12 +02:00
Alexey Rybalchenko
334b91785b FairMQ: Move static and interactive control modes to plugin (2) 2017-10-05 15:32:12 +02:00
Alexey Rybalchenko
6349438829 Run InitTask in the worker thread (same as all other state handlers). 2017-09-07 14:22:50 +02:00
Alexey Rybalchenko
9be5a20df6 Add doxygen comment about state handlers running in worker thread 2017-08-30 08:38:00 +02:00
Alexey Rybalchenko
221d2567f0 FairMQRegion and examples/advanced/Region 2017-08-08 14:18:10 +02:00
Alexey Rybalchenko
65f1b96dc3 Add Version member to FairMQDevice, settable via constructor 2017-07-17 13:25:16 +02:00
Alexey Rybalchenko
b47cc8b29c add callback on state change 2017-07-04 07:05:11 +02:00
Alexey Rybalchenko
035d5fb353 Provide accessors for device members that are part of publiv API 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
f4e5a74f23 Always have access to FairMQProgOptions from device. 2017-06-04 01:06:12 +02:00
Dennis Klein
7bb6a2eed9 add default subchannel index 2017-05-24 16:37:33 +02:00
Dennis Klein
8bc21675af Refactor TransportFactory to RAII
* Remove explicit Initialize and Terminate states,
    map them onto ctor/dtor
  * Remove no longer needed Shutdown state
  * Remove deprecated SetTransport()
2017-05-24 16:37:33 +02:00