RTC Toolkit  1.0.0
fitsRecorderDetail.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_FITSRECORDER_DETAIL_HPP
13 #define RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_FITSRECORDER_DETAIL_HPP
14 
16 
18 
19 #include <chrono>
20 
21 
22 namespace rtctk::telemetryRecorder {
23  template<typename T>
24  void FitsRecorder<T>::Open(const std::string& file) {
25  try {
26  m_fits_handle = std::make_unique<CCfits::FITS>(file, CCfits::RWmode::Write);
27  } catch (CCfits::FitsException const& exception) {
28  CII_THROW(FitsException, exception);
29  }
30 
31  }
32 
33  template<typename T>
35  // the unique pointer calls close on the file
36  m_fits_handle.reset();
37  }
38 
39 }
40 
41 #endif // RTCTK_REUSABLECOMPONENT_TELEMETRYRECORDER_FITSRECORDER_DETAIL_HPP
rtctk::telemetryRecorder::FitsRecorder::Close
void Close() override
If a FITS file is currently open, close the file.
Definition: fitsRecorderDetail.hpp:34
fitsRecorder.hpp
Business Logic of the Telemetry Recorder.
rtctk::telemetryRecorder::FitsRecorder::Open
void Open(const std::string &file) override
Open the FITS file given.
Definition: fitsRecorderDetail.hpp:24
rtctk::telemetryRecorder
Definition: businessLogic.hpp:20
rtctk::telemetryRecorder::FitsRecorder::FitsException
This class encapsulates the CCFits exceptions in CiiBaseExceptions.
Definition: fitsRecorder.hpp:43
logger.hpp
Logging Support Library based on log4cplus.