Barracuda Application Server C/C++ Reference
FileCspReader Struct Reference

Detailed Description

Example code that shows you how to write a CspReader driver object.

The Web-Server uses the CspReader driver object when requesting data from the "dat" file generated by CspLink.

This example code uses the file system for reading the "dat" file. The constructor opens the "dat" file and method "diskRead" uses the Posix function fseek for setting the file pointer to the requested offset position and function fread for reading the actual data.

#include <FileCspReader.h>

Inheritance diagram for FileCspReader:

Public Member Functions

 FileCspReader (const char *pathName)
 The FileCspReader constructor opens the "dat" file for reading. More...
- Public Member Functions inherited from CspReader
bool isValid ()
 Returns true if the reader object is valid.

Constructor & Destructor Documentation

◆ FileCspReader()

FileCspReader::FileCspReader ( const char *  pathName)

The FileCspReader constructor opens the "dat" file for reading.

You must call CspReader::isValid, which informs you if the constructor successfully opened the "data" file for reading.

pathNameis the path and name to the "data" file.