DPM Control

Interface for application control. It has a similar role as stdif but limited to operations supported by daqDpmServer.

Note

This interface is reserved for daqOcmServer and is not meant to be used by end-users.

daqDpmServer hosts the interface daqif.DpmControl under URI path /dpm.

class daqif.DpmControl

DPM control interface for non-DAQ related commands.

QueryStorageStatus() StorageStatus

Queries disk space usage and availability on the file system used by daqDpmServer workspace.

Return type:

StorageStatus

Raises:

RuntimeError – On fatal error.

Exit() str

Terminates application in a controlled manner.

Note

Reply is sent before application terminates, but there is no guaranteed delivery.

Return type:

str

Raises:

DaqException – On fatal error.

DPM Data Acquisition Control

Interface for Data Acquisition control.

Note

This interface is reserved for daqOcmServer and is not meant to be used by end-users.

daqDpmServer hosts the interface daqif.DpmDaqControl under URI path /daq.

class daqif.DpmDaqControl

DPM control interface for initiating, monitoring and controlling Data Product creation life-cycle of Data Acquisitions.

QueueDaq(specification) DaqReply

Add Data Acquisition to queue for merging.

Parameters:

specification (str) – JSON encoded string following schema in Data Product Specification specifying how to create the Data Product.

Return type:

DaqReply

Raises:

DaqException – On fatal error.

AbortDaq(id) DaqReply

Aborts merging.

Fail-fast

If any error occur DaqException is thrown and the DAQ state remains in Aborting.

Parameters:

id (str) – Id of data acquisition to abort.

Return type:

DaqReply

Raises:

DaqException – On fatal error.

RetryMergeDaq(id: str) None

New in version 3.2.0.

Unblocks Data Acquisition that has been blocked from progress due to a failure in state DaqState.StateMerging. If for example Data Acquisition failed to transfer a source file this can be attempted again by sending RetryMerge().

Command is valid in state DaqState.StateMerging, after DaqSubState.Scheduled, and will return immediately after unblocking.

Parameters:

id (str) – Id of data acquisition with error to retry.

Raises:

DaqException – On error, e.g. if command is rejected.

GetDaqStatus(id) DaqStatus

Query Data Acquisition status. If no Data Acquisition has previously been queued with QueueDaq() or is archived (in a completed state) an exceptional reply is returned.

Parameters:

id (str) – Id of data acquisition to get status for.

Return type:

DaqStatus

Raises:

DaqException – On fatal error.

GetActiveDaqs() List[DaqStatus]

Get list of active Data Acquisitions (i.e. not in daqif.DaqState.StateCompleted).

Returns:

List of active Data Acquisitions.

Return type:

List[DaqStatus]

Raises:

DaqException – On fatal error.

GetInternalDaqStatus(id) InternalDaqStatus

Internal version of GetDaqStatus().

New in version 3.1.0.

Parameters:

id (str) – Id of data acquisition to get status for.

Return type:

InternalDaqStatus

Raises:

DaqException – On fatal error.