|
ifw-daq
1.0.0
IFW Data Acquisition modules
|
Go to the documentation of this file.
8 #ifndef OCF_DAQ_FITS_CONTROLLER_HPP_
9 #define OCF_DAQ_FITS_CONTROLLER_HPP_
18 #include <boost/thread/future.hpp>
21 #include <log4cplus/logger.h>
38 std::ostream&
operator<<(std::ostream& os, FitsController
const& ctl);
103 virtual void UpdateKeywords(std::vector<fits::KeywordVariant>
const& keywords) = 0;
142 std::shared_ptr<ObservableEventLog> event_log,
144 void Start()
override;
147 void UpdateKeywords(std::vector<fits::KeywordVariant>
const& )
override;
148 void AddComment(std::string comment)
override;
159 struct NotStarted {};
163 using StateVariant = std::variant<NotStarted, Acquiring, Stopped, Aborted>;
169 void WriteFitsfile();
172 std::string m_out_path;
173 std::shared_ptr<ObservableEventLog> m_event_log;
176 std::string m_hostname;
178 StateVariant m_state;
180 std::vector<fits::KeywordVariant> m_keywords;
181 std::vector<std::string> m_comments;
186 std::string m_file_path;
189 log4cplus::Logger m_logger;
194 #endif // #ifndef OCF_DAQ_FITS_CONTROLLER_HPP_
State
Observable states of the data acquisition process.
UniqueFitsFile CreateEmpty(char const *filename)
Creates empty FITS file using fits_create_file and returns a pointer with a deleter that will close t...
Structure carrying properties needed to start a DataAcquisition.
virtual void UpdateKeywords(std::vector< fits::KeywordVariant > const &keywords)=0
Updates with provided keywords.
Contains data structure for FITS keywords.
virtual ~FitsController()=default
virtual std::string const & GetId() const DAQ_NOEXCEPT=0
Query FITS file path.
Contains declaration for EventLog, ObservableEventLog and related events.
virtual State GetState() const DAQ_NOEXCEPT=0
Query state.
std::unique_ptr< fitsfile, void(*)(fitsfile *) noexcept > UniqueFitsFile
Defines unique ownership type to cfitsio fitsfile.
Config class header file.
virtual std::optional< DpPart > GetResult() const DAQ_NOEXCEPT=0
Query FITS file path.
virtual void AddComment(std::string comment)=0
Add comment.
Contains declaration for Status and ObservableStatus.
Provides information of the location and origin of a FITS file or keywords produced by a data acquisi...
fitsfile * GetFitsfile() const noexcept
virtual void Start()=0
Creates FITS file and pupulates it with initial list of keywords.
Contains functions and data structures related to cfitsio.
std::ostream & operator<<(std::ostream &os, DaqController const &daq)
Create FITS file containing keywords from OCM for the Data Acquisition.
Declares daq::State and related functions.
@ NotStarted
Initial state of data acquisition.
ErrorPolicy
Error policy supported by certain operations.
Contains declaration of daq::Properties.
virtual std::optional< DpPart > Stop(ErrorPolicy policy)=0
Finalizes the FITS file.
virtual void Abort(ErrorPolicy policy)=0
Aborts and deletes FITS file.
Contains error related declarations for DAQ.