28 : mRegistry{registry},
29 mDeviceState{deviceState},
37 std::scoped_lock lock(mMutex);
44 std::scoped_lock lock(mMutex);
51 mDeviceState.quitRequested =
true;
52 mDriverClient.tell(
"CONTROL_ACTION: READY_TO_QUIT_ALL");
55 mDeviceState.quitRequested =
true;
56 mDriverClient.tell(
"CONTROL_ACTION: READY_TO_QUIT_ME");
63 std::scoped_lock lock(mMutex);
66 mDriverClient.tell(
"CONTROL_ACTION: NOTIFY_STREAMING_STATE IDLE");
69 mDriverClient.tell(
"CONTROL_ACTION: NOTIFY_STREAMING_STATE STREAMING");
72 mDriverClient.tell(
"CONTROL_ACTION: NOTIFY_STREAMING_STATE EOS");
75 throw std::runtime_error(
"Unknown streaming state");
81 std::scoped_lock lock(mMutex);
82 mDriverClient.tell(fmt::format(
"CONTROL_ACTION: PUT {} {} {}",
key, timestamp,
value),
true);
87 std::scoped_lock lock(mMutex);
88 mDriverClient.tell(fmt::format(
"CONTROL_ACTION: NOTIFY_DEVICE_STATE {}", currentState));
89 mDriverClient.flushPending(mRegistry);
void readyToQuit(bool all)
Compatibility with old API.
ControlService(ServiceRegistryRef registry, DeviceState &deviceState)
void notifyStreamingState(StreamingState state)
Report the current streaming state of a given device.
void push(std::string_view key, std::string_view value, int64_t timestamp)
Push a generic key/value pair to the driver.
void endOfStream()
Signal that we are done with the current stream.
void notifyDeviceState(std::string state)
Report the current FairMQ state of a given device.
A service API to communicate with the driver.
GLsizei const GLfloat * value
Defining PrimaryVertex explicitly as messageable.
@ EndOfStreaming
End of streaming requested, but not notified.
@ Streaming
Data is being processed.
@ Idle
End of streaming notified.
QuitRequest
Kind of request we want to issue to control.
@ Me
Only quit this data processor.
@ All
Quit all data processor, regardless of their state.
Running state information of a given device.