ldas-tools-framecpp 3.0.4
Loading...
Searching...
No Matches
Stream.cc File Reference
#include <framecpp_config.h>
#include <fstream>
#include <memory>
#include "framecpp/Common/FrameSpec.hh"
#include "framecpp/Common/IOStream.hh"
#include "framecpp/Common/Verify.hh"
#include "framecppc/Stream.h"
#include "FrameCInternal.hh"
#include "StreamInternal.hh"
Include dependency graph for Stream.cc:

Namespaces

namespace  FrameC
 Routines related to implementing the C interface.
 

Typedefs

typedef FrameCPP::Common::FrameBuffer< filebuf > FrameBuffer
 

Functions

template<>
pointer_type FrameC::PointerType (fr_file_t *Value)
 
fr_file_tFrameCFileOpen (FrameCError **Error, const char *Filename, const fr_file_mode_t Mode)
 Open a stream.
 
int FrameCFileClose (FrameCError **Error, fr_file_t *Stream)
 Close an open stream.
 
int FrameCFileFree (FrameCError **Error, fr_file_t *Stream)
 Recycle the file structure.
 
int FrameCFrameLibrary (FrameCError **Error, fr_file_t *Stream)
 Obtains the name of the frame library id of the stream.
 
int FrameCFrameLibraryName (FrameCError **Error, fr_file_t *Stream, char *Buffer, size_t BufferSize)
 Obtains the name of the frame library of the stream.
 
int FrameCFrameLibraryVersion (FrameCError **Error, fr_file_t *Stream)
 Obtain the major version of the frame specification.
 
int FrameCFrameLibraryVersionMinor (FrameCError **Error, fr_file_t *Stream)
 Obtain the library version.
 
int FrameCFileCksumValid (FrameCError **Error, fr_file_t *Stream)
 Verify the frame file checksum.
 

Typedef Documentation

◆ FrameBuffer

Function Documentation

◆ FrameCFileCksumValid()

int FrameCFileCksumValid ( FrameCError ** Error,
fr_file_t * Stream )

Verify the frame file checksum.

Validate the file checksum of the stream. This is a lenghty process and should be avoided. Beginning with version 8 of the frame specification, Individual channels are validated using the per structure checksums.

◆ FrameCFileClose()

int FrameCFileClose ( FrameCError ** Error,
fr_file_t * Stream )

Close an open stream.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream to close.
Returns
Upon successfully closing the stream a value of true is returned, false otherwise.

◆ FrameCFileFree()

int FrameCFileFree ( FrameCError ** Error,
fr_file_t * Stream )

Recycle the file structure.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream whos resources will be released.
Returns
The value 1 is returned on success, 0 otherwise.

◆ FrameCFileOpen()

fr_file_t * FrameCFileOpen ( FrameCError ** Error,
const char * Filename,
const fr_file_mode_t Mode )

Open a stream.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]FilenameName of the stream to open.
[in]ModeSpecifies if the file should be open for input or output.
Returns
Upon successfully opening the stream, a non NULL pointer is returned, NULL otherwise.

◆ FrameCFrameLibrary()

int FrameCFrameLibrary ( FrameCError ** Error,
fr_file_t * Stream )

Obtains the name of the frame library id of the stream.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream from which to read the table of contents.
Returns
The enumerated number representing the frame library of the stream.

◆ FrameCFrameLibraryName()

int FrameCFrameLibraryName ( FrameCError ** Error,
fr_file_t * Stream,
char * Buffer,
size_t BufferSize )

Obtains the name of the frame library of the stream.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream from which to read the table of contents.
[out]BufferAllocated buffer to receive the frame library name.
[in]BufferSizeMaximum size of Buffer
Returns
Upon success, 1 is returned; 0 otherwise.

◆ FrameCFrameLibraryVersion()

int FrameCFrameLibraryVersion ( FrameCError ** Error,
fr_file_t * Stream )

Obtain the major version of the frame specification.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream for which to obtain the frame specification.
Returns
The frame specification of the stream.

◆ FrameCFrameLibraryVersionMinor()

int FrameCFrameLibraryVersionMinor ( FrameCError ** Error,
fr_file_t * Stream )

Obtain the library version.

Parameters
[out]ErrorIf an error occurs, this will contain the details of the error. For full details on error processing, please refer to FrameCError.
[in]StreamThe stream for which to obtain the library version.
Returns
The library version of the stream.
Note
The value only has significance in relationship to the frame library used to create the frame.