DataReceiver Module#

SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2

Base module for Constellation Satellites that receive data.

class core.datareceiver.DataReceiver(*args: Any, **kwargs: Any)#

Bases: Satellite

Constellation Satellite which receives data via ZMQ.

do_initializing(config: dict[str, Any]) str#

Initialize and configure the satellite.

do_landing() str#

Close all open sockets.

do_launching() str#

Set up pull sockets to listen to incoming data.

do_run(run_identifier: str) str#

Handle the data enqueued by the ZMQ Poller.

The implementation of this method will have to monitor the self._state_thread_evt Event and perform all necessary steps for stopping the acquisition when self._state_thread_evt.is_set() is True as there will be no call to do_stopping in this class. This allows to e.g. wrap opening files in with … or try: … finally: … clauses.

This method will be executed in a separate thread by the underlying Satellite class. It therefore needs to monitor the self.stop_running Event and close itself down if the Event is set.

do_starting(run_identifier: str) str#

Final preparation for acquisition.

fail_gracefully() str#

Method called when reaching β€˜ERROR’ state.

get_data_sources(_request: CSCP1Message | None = None) Tuple[str, list[str], None]#

Get list of connected data sources.

No payload argument.