Data Structures

This section contains the data structures that are used by the daqif interfaces daqif.OcmDaqControl, daqif.DpmControl and daqif.DpmDaqControl or used as pub/sub topic type.

class daqif.DaqState

Enumeration of top-level Data Acquisition states, see The Data Acquisition Process for additional details.

StateAcquiring

State that span the initial point it is created in OCM through the phase where data is acquired until all inputs for the Data Product have been created. See also StateAcquiring.

StateMerging

State that spans not where a Data Product is created from the acquired data. Phase where Data Product is created. See also StateMerging.

StateCompleted

Data Acquisition is completed.

StateUndefined

Only used for technical reasons. This is not an expected state.

class daqif.DaqSubState

Enumeration of possible Data Acquisition sub-states, see The Data Acquisition Process for additional details.

Note

Only a subset of the listed states are possible/valid in each DaqState.

NotStarted

Data Acquisition is created but not yet started.

Starting

Transitional state where Data Acquisition is being started. Some data sources might already be acquiring data. When all sources have started the Data Acquisition transitions to Acquiring.

Acquiring

Data is being acquired.

Stopping

Transitional state to Stopped. Some data sources might still be acquiring data and are about to be stopped. When all data sources have stopped the Data Acquisition transitions to Stopped.

Stopped

All data has been acquired.

Aborting

Transitional state where Data Acquisition remains while it is in the process of being aborted.

Aborted

If a Data Acquisition has errors or otherwise needs to be aborted the Data Acquisition also include the Aborted state.

NotScheduled

Before Data Acquisition is acknowledged by DPM it remains in NotScheduled.

Scheduled

Data Acquisition is acknowledged by DPM and is scheduled for merging (i.e. the Data Acquisition is in the backlog).

Transferring

Inputs for Data Product are being transferred to DPM host in preparation for merging.

Merging

Data Product is being created by merging input files together.

Releasing

Data Product is being released to specified receivers, which in the normal case is OLAS.

Completed

Nominal final state for a Data Acquisition (i.e. final state when Data Acquisition is not aborted).

Undefined

Only used for technical reasons. This is not an expected state.

class daqif.DaqException

Exception used by OcmDaqControl.

id: str

Data Acquisition identifier.

message: str

Exception message.

class daqif.DaqStatus

Contains the Data Acquisition reply.

id: str

Data Acquisition identifier.

fileId: str

A unique OLAS compatible file id is assigned when Data Acquisition is started by OCM. This is also used as a basis for the ARCFILE FITS keyword with only the addition of the FITS extension: {fileId}.fits[RD7].

state: DaqState

Data Acquisition state at the time the reply was sent.

substate: DaqSubState

Data Acquisition sub-state at the time the reply was sent.

timestamp: double

Timestamp of last status update.

error: boolean

Indicates an error has occurred. This is the main mechanism for communicating asynchronous errors that cannot be communicated as part of a command reply. Attribute message contains additional details.

message: str

Contains message related to current status. This is currently mainly used to provide information about active alerts.

result: str

Once Data Product has been created successfully in state Merging this property will contain the file path.

To ensure that result is available synchronize to substate Releasing or Completed.

New in version 2.0.0.

class daqif.DaqReply

Basic reply type that also indicate non-fatal errors.

id: str

Data Acquisition identifier.

error: boolean

Identifies if request was completed with non-fatal error.

class daqif.AwaitDaqReply
timeout: boolean

Indicates if the await request timed out before condition was fulfilled.

status: DaqStatus

Data Acquisition status when reply was sent.

class daqif.StorageStatus

Provides storage status information.

capacity: int

Partition size in number of bytes.

free: int

Free space on the file system in number of bytes.

available: int

Free space available to daqDpmServer, if non-privileged, in number of bytes. This may be less or equal to free.