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.
- MergingBlocked
Data Acquisition is blocked from transitioning to
DaqState.StateMerging. This state can be used to introduce an externally controlled synchronization point, to e.g. give time to update keywords or even defer start of merge process until a later time.State is only entered if Data Acquisition property block merge is true.
To unblock use
SetBlockMerge()withblock=false.See also
- MergingBlocked overview
New in version 3.3.0.
- 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).
- Merging
Data Product is being created by merging input files together.
- 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.AlertSeverity
Enumeration of alert severity levels.
- Error
Error has occurred that is expected to require intervention to continue Data Acquisition.
- Warning
Alerts a condition that is suspicious but it is not known to be an error at the time of the alert. It could cause an error in due time.
- Info
Alerts a condition or event that has no unexpected functional impact but is nevertheless relevant information that can be useful for e.g. troubleshooting or tuning.
- class daqif.DaqException
Exception used by OcmDaqControl.
- id: str
Data Acquisition identifier.
- message: str
Exception message.
- class daqif.RuntimeError
Exception used when there is no Data Acquisition.
- message: str
Exception message.
- class daqif.DaqAlert
Describes a notable condition or event that occurred in a Data Acquisition.
See also
- Alerted Conditions
For a list of alerted conditions.
- alertId: str
Alert identifier which is unique for the associated Data Acquisition.
- severity: AlertSeverity
Severity of the alert.
- timestamp: int
Timestamp in nanoseconds since 1970-01-01 00:00 TAI of last alert activation.
Changed in version 3.3.0: Changed from floating point seconds to integer nanoseconds.
- description: str
Describes the alert.
- class daqif.DaqStatus
Specifies the Data Acquisition status structure.
- id: str
Data Acquisition identifier.
- fileId: str
A unique OLAS compatible file id is assigned by daqOcmServer when Data Acquisition is started. This is also used as a basis for the Archive File Name and recoded as
ARCFILEFITS keyword with only the addition of the FITS extension:{fileId}.fits[RD7].See also
- state: DaqState
Data Acquisition state at the time the reply/sample was sent.
- substate: DaqSubState
Data Acquisition sub-state at the time the reply/sample was sent.
- timestamp: int
Timestamp in nanoseconds since 1970-01-01 00:00 TAI of last status update.
Changed in version 3.3.0: Changed from floating point seconds to integer nanoseconds.
- error: bool
A derived property, that if set indicates that there is one or more alerts with severity
Error. It is also the main mechanism for communicating asynchronous errors that cannot be communicated as part of a command reply. Attributealertscontains the active alerts.
- alerts: List[DaqAlert]
Contains list of active alerts for this Data Acquisition.
See also
- Alerted Conditions
For a list of alerted conditions.
New in version 3.2.0.
- message: str
May contain messages related to current status.
- result: str
Once Data Product has been created successfully in state
Mergingthis property will contain the file path.To ensure that result is available synchronize to substate
ReleasingorCompleted.New in version 2.0.0.
- blockMerge: bool
Property that specify if Data Acquisition is to be prevented from transitioning from
StateAcquiringto the merging phaseStateMerging. If blockMerge is true Data Acquisition transitions fromStoppedtoMergingBlockedinstead, where it remains until unblocked withSetBlockMerge().New in version 3.3.0.
See also
- MergingBlocked overview
- history: DaqHistory
Property holding notable history as
DaqHistory.New in version 3.3.0.
- class daqif.DaqReply
Basic reply type that also indicate non-fatal errors.
- id: str
Data Acquisition identifier.
- error: bool
When
Truethis indicates Data Acquisition has one or more issues which can be read fromDaqStatus.message.
- class daqif.AwaitDaqReply
- timeout: bool
Indicates if the await request timed out before condition was fulfilled.
- status: DaqStatus
Data Acquisition status when reply was sent.
- class daqif.DaqHistory
Holds notable events in time.
New in version 3.3.0.
- startingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Starting.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Starting.
- startingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Starting.If value is zero it indicates Data Acquisition have not left
DaqSubState.Starting.
- acquiringBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Acquiring.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Acquiring.
- acquiringDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Acquiring.If value is zero it indicates Data Acquisition have not left
DaqSubState.Acquiring.
- stoppingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Stopping.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Stopping.
- stoppingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Stopping.If value is zero it indicates Data Acquisition have not left
DaqSubState.Stopping.
- stoppedBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Stopped.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Stopped.
- stoppedDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Stopped.If value is zero it indicates Data Acquisition have not left
DaqSubState.Stopped.
- mergingBlockedBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.MergingBlocked.If value is zero it indicates Data Acquisition have not entered
DaqSubState.MergingBlocked.
- mergingBlockedDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.MergingBlocked.If value is zero it indicates Data Acquisition have not left
DaqSubState.MergingBlocked.
- notScheduledBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.NotScheduled.If value is zero it indicates Data Acquisition have not entered
DaqSubState.NotScheduled.
- notScheduledDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.NotScheduled.If value is zero it indicates Data Acquisition have not left
DaqSubState.NotScheduled.
- scheduledBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Scheduled.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Scheduled.
- scheduledDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Scheduled.If value is zero it indicates Data Acquisition have not left
DaqSubState.Scheduled.
- collectingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Collecting.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Collecting.
- collectingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Collecting.If value is zero it indicates Data Acquisition have not left
DaqSubState.Collecting.
- mergingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Merging.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Merging.
- mergingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Merging.If value is zero it indicates Data Acquisition have not left
DaqSubState.Merging.
- releasingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Releasing.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Releasing.
- releasingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Releasing.If value is zero it indicates Data Acquisition have not left
DaqSubState.Releasing.
- abortingBegin: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqSubState.Aborting.If value is zero it indicates Data Acquisition have not entered
DaqSubState.Aborting.
- abortingDuration: int
If non-zero it specifies number of nanoseconds Data Acquisition spent in state
DaqSubState.Aborting.If value is zero it indicates Data Acquisition have not left
DaqSubState.Aborting.
- completed: int
If non-zero it specifies number of nanoseconds since 1970-01-01 00:00 TAI until Data Acquisition entered state
DaqState.Completed.If value is zero it indicates Data Acquisition have not entered
DaqState.Completed.
- class daqif.StorageStatus
Provides storage status information.
- name: str
Process name of sender.
- path: str
Workspace storage path.
- 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.
- class daqif.InternalDaqStatus
Structure used for internal communication between daqOcmServer and daqDpmServer. It is left undocumented on purpose and should not be used by end-users.
New in version 3.1.0.