Loop Timing Witness
Native controller and runtime interfaces; hardware qualification pending
Loading...
Searching...
No Matches
witness::ExclusiveOutput Class Reference

#include <exclusive_output.h>

Public Member Functions

 ExclusiveOutput (const char *path, OutputFormat format, const char *error)
 ~ExclusiveOutput ()
 ExclusiveOutput (const ExclusiveOutput &)=delete
ExclusiveOutput & operator= (const ExclusiveOutput &)=delete
bool is_open () const noexcept
std::FILE * stream (const char *closed_error) const
int close (const char *closed_error)

Detailed Description

Own one exclusive stream, retain partial bytes and refuse access after close.

Definition at line 26 of file exclusive_output.h.

Constructor & Destructor Documentation

◆ ExclusiveOutput()

witness::ExclusiveOutput::ExclusiveOutput ( const char * path,
OutputFormat format,
const char * error )
inline

Open exclusively; destruction closes an earlier stream if later setup fails.

Definition at line 31 of file exclusive_output.h.

◆ ~ExclusiveOutput()

witness::ExclusiveOutput::~ExclusiveOutput ( )
inline

Close once during failure cleanup without masking the original exception.

Definition at line 37 of file exclusive_output.h.

Member Function Documentation

◆ close()

int witness::ExclusiveOutput::close ( const char * closed_error)
inline

Release ownership even on flush failure; the caller checks the return status.

Definition at line 52 of file exclusive_output.h.

◆ is_open()

bool witness::ExclusiveOutput::is_open ( ) const
inlinenoexcept

Report stream ownership without touching a released FILE.

Definition at line 44 of file exclusive_output.h.

◆ stream()

std::FILE * witness::ExclusiveOutput::stream ( const char * closed_error) const
inline

Borrow the owned stream for a checked native write or flush.

Definition at line 46 of file exclusive_output.h.


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