camcom 1.0.0-pre2
 
Loading...
Searching...
No Matches
camcom::server::FitsRecorder Class Reference

Records frames to FITS files. More...

#include <fits_recorder.hpp>

Classes

struct  Impl
 

Public Member Functions

 FitsRecorder (const RecordingConfig &config, const std::string &camera_name)
 
 ~FitsRecorder ()
 
 FitsRecorder (const FitsRecorder &)=delete
 
FitsRecorderoperator= (const FitsRecorder &)=delete
 
bool open ()
 Open a new recording session. Creates output directory if needed.
 
bool recordFrame (const DataFrame &frame)
 Record one frame. Returns true on success.
 
void close ()
 Close the session: flush remaining data, write summary log.
 
int framesWritten () const
 Number of frames successfully written so far.
 
size_t bytesWritten () const
 Total bytes written so far.
 
std::string getLastFilePath () const
 Path of the last file written (or the single file for cube/mef).
 
std::vector< std::string > getWrittenFiles () const
 All file paths written during the current/last session.
 
bool isOpen () const
 True while a session is open.
 

Detailed Description

Records frames to FITS files.

Supports three modes controlled by RecordingConfig::format: "fits" — one FITS file per frame "fits:cube" — single file with 3D data cube (all frames, written at close) "fits:mef" — multi-extension FITS (one image extension per frame)

Lifetime: open()recordFrame() x N → close() close() writes the session summary log.

Constructor & Destructor Documentation

◆ FitsRecorder() [1/2]

camcom::server::FitsRecorder::FitsRecorder ( const RecordingConfig & config,
const std::string & camera_name )
explicit

◆ ~FitsRecorder()

camcom::server::FitsRecorder::~FitsRecorder ( )

◆ FitsRecorder() [2/2]

camcom::server::FitsRecorder::FitsRecorder ( const FitsRecorder & )
delete

Member Function Documentation

◆ bytesWritten()

size_t camcom::server::FitsRecorder::bytesWritten ( ) const

Total bytes written so far.

◆ close()

void camcom::server::FitsRecorder::close ( )

Close the session: flush remaining data, write summary log.

◆ framesWritten()

int camcom::server::FitsRecorder::framesWritten ( ) const

Number of frames successfully written so far.

◆ getLastFilePath()

std::string camcom::server::FitsRecorder::getLastFilePath ( ) const

Path of the last file written (or the single file for cube/mef).

◆ getWrittenFiles()

std::vector< std::string > camcom::server::FitsRecorder::getWrittenFiles ( ) const

All file paths written during the current/last session.

◆ isOpen()

bool camcom::server::FitsRecorder::isOpen ( ) const

True while a session is open.

◆ open()

bool camcom::server::FitsRecorder::open ( )

Open a new recording session. Creates output directory if needed.

◆ operator=()

FitsRecorder & camcom::server::FitsRecorder::operator= ( const FitsRecorder & )
delete

◆ recordFrame()

bool camcom::server::FitsRecorder::recordFrame ( const DataFrame & frame)

Record one frame. Returns true on success.


The documentation for this class was generated from the following files: