XCube Stream Reader SDK
Public Member Functions
CFileReader Class Reference

Class definition of file reader. More...

#include <CFileReader.h>

List of all members.

Public Member Functions

 CFileReader (const char *inFileName, CPacketBuffer *pktBuf, size_t chunkSz)
 Constructor.
virtual ~CFileReader ()
 De-constructor.
void init (UINT64 offset) throw (IoException)
 Initialize file reader.
void initWithTimeFilter (UINT64 timeVal) throw (IoException)
void start ()
 Start the reader thread and open the files.
void stop ()
 Stop the reader thread and close the files.
int seek (UINT64 pos)
 Seek in the current file to position pos in bytes.

Detailed Description

Class definition of file reader.

this CFileReder class provides functions to read data from x3c files into buffers which can be used for other purpose, such as replay data, restore data... Each file reader has its own packet buffer to write data to and it is also associated with one x3c file which it reads data from. As long as user start a file reader, it will open its x3c file and read data into its packet buffer until packet buffer is full, then it will wait until packet buffer is available for next chunk of data. This process can be terminated by a stop call or until it reaches the end of its x3c file.


Constructor & Destructor Documentation

CFileReader::CFileReader ( const char *  inFileName,
CPacketBuffer pktBuf,
size_t  chunkSz 
)

Constructor.

Create a new File Reader that reads from the file "infile" to the packet buffer and have the preferred read set to 'chunk size'

Parameters:
inFileName- the full filename of the stream to read from
pktBuf- the packet buffer to write to
chunkSz- the preferred read size in MByte
virtual CFileReader::~CFileReader ( ) [virtual]

De-constructor.

Clean a file reader, close the file if it is not closed, clean the file name pointer if it is not null


Member Function Documentation

void CFileReader::init ( UINT64  offset) throw (IoException)

Initialize file reader.

Initialize the file reader and start reading at offset. Can only be called once

Parameters:
offset- the offset to start reading
int CFileReader::seek ( UINT64  pos)

Seek in the current file to position pos in bytes.

Not Implemented

Parameters:
pos- position in file to seek to
Returns:
- the current file position

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Friends Defines