Introduction
Reference Documents
- [RD1]
- Central Control System Development Standards;
Data Recorder Interface - recif
The Data RecorderInterface, recif, defines the CII request/reponse interface for data recording applications, i.e., applications sampling data and typically, writing these in output data files.
This document serves merely to provide an overview of the Data Recorder Interface. The CII MAL generates the structures (classes) for the interface and are not described in this document.
Interfaces
- class recif.RecCmds
Data Recorder Request/Response Interface.
- RecAbort() String.
Abort an on-going Data Recording Session.
- Returns:
A string with information about the execution of the request.
- Return type:
String
- Raises:
recif::ExceptionErr – On error.
- RecContinue() recif::RecStatus.
Continue a previously paused Data Recording Session.
- Returns:
A recif::RecStatus with current information about the Data Recording Session.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
- RecPause() recif::RecStatus.
Pause an on-going Data Recording Session.
- Returns:
A recif::RecStatus with current information about the Data Recording Session.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
- RecStart(properties) recif::RecStatus.
Start a new Data Recording Session according to the properties provided.
- Parameters:
properties (recif::RecProperties) – Instance of recif::RecProperties class, specifying the conditions for starting the Recording Session.
- Returns:
A recif::RecStatus with the estimated information about the Data Recording Session execution.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
- RecStatus(id) recif::RecStatus.
Query the status of an active or completed Data Recording Session, referenced with the specified Recording ID. If no Recording ID is given the current active Recording Session is considered or the last one executed.
- Parameters:
id (str) – Recording ID for the Recording Session in quetions or empty string for current/previous.
- Returns:
A recif::RecStatus with the estimated information about the Data Recording Session execution.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
- RecStop() recif::RecStatus.
Stop an on-going Data Recording Session. Possible output data product files are kept.
- Returns:
A recif::RecStatus with the status about the Data Recording Session up to the point when it was stopped.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
- RecWait(waitCond) recif::RecStatus.
Wait (blocking) on an on-going Recording Session according to the conditions specified. If the request times out a positive response is returned with a status indicating that the request timed out. If an on-going Recording Session is aborted or stopped prematurely, pending responses to RecWait requests, are submitted.
- Parameters:
waitCond (recif::RecWaitSepc) – Conditions for waiting for the Recording Session to complete, typically the timeout to apply.
- Returns:
A recif::RecStatus with the estimated information about the Data Recording Session execution.
- Return type:
recif::RecStatus
- Raises:
recif::ExceptionErr – On error.
Data Structures
- class recif.RecStatusNames
Possible status values for a Recording Session. The values defined are:
Active: The Recording Session is on-going.
Completed: The Recording Session has completed, successfully.
Stopped: The Recording Session was stopped due to a RecStop request.
Aborted: The Recording Session was aborted due to a RecAbort request.
Failed: The Recording Session failed due to some unrecoverable error.
Undefined: The status is unknown/not yet updated.
- class recif.RecStatusNames
Possible status values for a RecWait Request. The values defined are:
Success: The Recording Session completed while the RecWait request was pending.
Timeout: The RecWait request timed out while waiting for the Recording Session to complete.
- class recif.ExceptionErr
DCS Exception class thrown in case an error is encountered while handling a request.
- code: int
Exception (error) code allocated to the specific exception; 0 if no code is allocated.
- desc: str
Description of the exception (diagnostics).
- class recif.RecWaitSpec
Defines the conditions for the RecWait Request.
- info: str
Facilitates submission of context specific information in connection with the RecWait Request.
- timeout: Double
Timeout in seconds to apply while waiting for an on-going Recording Session to end.
- class recif.RecProperties
Defines the properties for executing the Recording Session.
- absTime: double
Absolute point in time given as seconds since epoch for when to start the Recording Session.
- id: str
Recording ID to allocate to the Recording Session. If specified as an empty string a unique ID will be allocated by the Data Recorder Application.
- info: str
Free format information (context specific) to submit with the request.
- publishers: str-array[32]
Reference to specific Recording Data Publishers to activate for recording data. If none are specified, all Recording Data Publishers are activated.
- class recif.RecStatus
Contains the status about an on-going or completed Recording Session.
- dpFiles: str-array[32]
List of Data Product output files generated in connection with the Recording Session, from all activated Recording Data Publishers.
- endTime: double
Estimated or actual time for ending the Recording Session.
- filesGenerated: int
Number of Data Product Files generated in connection with the Recording Session from all activated Recording Data Publishers.
- framesProcessed: int
Number of image frames processed (so far) during the Recording Session from all activated Recording Data Publishers.
- framesRemaining: int
Number of image frames expected (still) to be processed during the Recording Session from all activated Recording Data Publishers.
- id: str
Recording ID allocated to the given Recording Session.
- info: str
Context speicific status information provided for the Recording Session.
- remainingTime: double
Estimated remaining execution time for ending the Recording Session.
- sizeRecorded: int
Size in bytes of all Data Product files produced during the Recording Session by all activated Recording Data Publishers.
- startTime: double
Time in seconds since epoch for when the Recording Session was started.
- status: recif::RecStatusNames
Current status an on-going or ended Recording Session.
- timeElapsed: double
Time in seconds since epoch elapsed since the Recording Session was started.