mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: Move --catch-signals logic to control plugin
* Add StealDeviceControl() API to plugin services
This commit is contained in:
committed by
Mohammad Al-Turany
parent
7dcd09692c
commit
44a59f25a7
@@ -73,6 +73,7 @@ class PluginServices
|
||||
InitTask,
|
||||
Run,
|
||||
Pause,
|
||||
Resume,
|
||||
Stop,
|
||||
ResetTask,
|
||||
ResetDevice,
|
||||
@@ -118,6 +119,13 @@ class PluginServices
|
||||
auto TakeDeviceControl(const std::string& controller) -> void;
|
||||
struct DeviceControlError : std::runtime_error { using std::runtime_error::runtime_error; };
|
||||
|
||||
/// @brief Become device controller by force
|
||||
/// @param controller id
|
||||
///
|
||||
/// Take over device controller privileges by force. Does not trigger the ReleaseDeviceControl condition!
|
||||
/// This function is intended to implement override/emergency control functionality (e.g. device shutdown on SIGINT).
|
||||
auto StealDeviceControl(const std::string& controller) -> void;
|
||||
|
||||
/// @brief Release device controller role
|
||||
/// @param controller id
|
||||
/// @throws fair::mq::PluginServices::DeviceControlError if passed controller id is not the current device controller.
|
||||
@@ -156,8 +164,6 @@ class PluginServices
|
||||
/// @param subscriber id
|
||||
auto UnsubscribeFromDeviceStateChange(const std::string& subscriber) -> void { fDevice->UnsubscribeFromStateChange(subscriber); }
|
||||
|
||||
auto DeviceTerminated() const -> bool { return fDevice->Terminated(); }
|
||||
|
||||
// Config API
|
||||
|
||||
/// @brief Set config property
|
||||
|
Reference in New Issue
Block a user