ldas-tools-framecpp  2.5.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Typedefs | Enumerations | Functions
Stream.h File Reference
#include "FrameC.h"

Typedefs

typedef struct fr_file fr_file_t
 

Enumerations

enum  fr_file_mode_t { FRAMEC_FILE_MODE_UNSET, FRAMEC_FILE_MODE_INPUT, FRAMEC_FILE_MODE_OUTPUT }
 

Functions

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

Typedef Documentation

typedef struct fr_file fr_file_t

Enumeration Type Documentation

Enumerator
FRAMEC_FILE_MODE_UNSET 
FRAMEC_FILE_MODE_INPUT 
FRAMEC_FILE_MODE_OUTPUT 

Function Documentation

int FrameCFileCksumValid ( FrameCError **  Error,
fr_file_t Stream 
)

Verify the frame file checksum.

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
Upon success, a non-zero value is returned. Upon failure, a zero value is returned.

The stream for which to obtain the library version.

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.

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.
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.
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.
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.
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.
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.
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.