NDFileJPEG Class Reference

Writes NDArrays in the JPEG file format, which is a lossy compression format. More...

#include <NDFileJPEG.h>

Inheritance diagram for NDFileJPEG:

NDPluginFile NDPluginDriver asynNDArrayDriver

List of all members.

Public Member Functions

 NDFileJPEG (const char *portName, int queueSize, int blockingCallbacks, const char *NDArrayPort, int NDArrayAddr, int priority, int stackSize)
 Constructor for NDFileJPEG; all parameters are simply passed to NDPluginFile::NDPluginFile.
virtual asynStatus drvUserCreate (asynUser *pasynUser, const char *drvInfo, const char **pptypeName, size_t *psize)
 Sets pasynUser->reason to one of the enum values for the parameters defined for this class if the drvInfo field matches one the strings defined for it.
virtual asynStatus openFile (const char *fileName, NDFileOpenMode_t openMode, NDArray *pArray)
 Opens a JPEG file.
virtual asynStatus readFile (NDArray **pArray)
 Reads single NDArray from a JPEG file; NOT CURRENTLY IMPLEMENTED.
virtual asynStatus writeFile (NDArray *pArray)
 Writes single NDArray to the JPEG file.
virtual asynStatus closeFile ()
 Closes the JPEG file.
void initDestination ()
 Initializes the destination file; should be private but called from C so must be public.
boolean emptyOutputBuffer ()
 Empties the output buffer; should be private but called from C so must be public.
void termDestination ()
 Terminates the destination file; should be private but called from C so must be public.


Detailed Description

Writes NDArrays in the JPEG file format, which is a lossy compression format.

This plugin was developed using the libjpeg library to write the file.


Constructor & Destructor Documentation

NDFileJPEG::NDFileJPEG ( const char *  portName,
int  queueSize,
int  blockingCallbacks,
const char *  NDArrayPort,
int  NDArrayAddr,
int  priority,
int  stackSize 
)

Constructor for NDFileJPEG; all parameters are simply passed to NDPluginFile::NDPluginFile.

Parameters:
[in] portName The name of the asyn port driver to be created.
[in] queueSize The number of NDArrays that the input queue for this plugin can hold when NDPluginDriverBlockingCallbacks=0. Larger queues can decrease the number of dropped arrays, at the expense of more NDArray buffers being allocated from the underlying driver's NDArrayPool.
[in] blockingCallbacks Initial setting for the NDPluginDriverBlockingCallbacks flag. 0=callbacks are queued and executed by the callback thread; 1 callbacks execute in the thread of the driver doing the callbacks.
[in] NDArrayPort Name of asyn port driver for initial source of NDArray callbacks.
[in] NDArrayAddr asyn port driver address for initial source of NDArray callbacks.
[in] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
[in] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.


Member Function Documentation

asynStatus NDFileJPEG::closeFile (  )  [virtual]

Closes the JPEG file.

Implements NDPluginFile.

asynStatus NDFileJPEG::drvUserCreate ( asynUser *  pasynUser,
const char *  drvInfo,
const char **  pptypeName,
size_t *  psize 
) [virtual]

Sets pasynUser->reason to one of the enum values for the parameters defined for this class if the drvInfo field matches one the strings defined for it.

If the parameter is not recognized by this class then calls NDPluginDriver::drvUserCreate. Uses asynPortDriver::drvUserCreateParam.

Parameters:
[in] pasynUser pasynUser structure that driver modifies
[in] drvInfo String containing information about what driver function is being referenced
[out] pptypeName Location in which driver puts a copy of drvInfo.
[out] psize Location where driver puts size of param
Returns:
Returns asynSuccess if a matching string was found, asynError if not found.

Reimplemented from NDPluginFile.

boolean NDFileJPEG::emptyOutputBuffer (  ) 

Empties the output buffer; should be private but called from C so must be public.

void NDFileJPEG::initDestination (  ) 

Initializes the destination file; should be private but called from C so must be public.

asynStatus NDFileJPEG::openFile ( const char *  fileName,
NDFileOpenMode_t  openMode,
NDArray pArray 
) [virtual]

Opens a JPEG file.

Parameters:
[in] fileName The name of the file to open.
[in] openMode Mask defining how the file should be opened; bits are NDFileModeRead, NDFileModeWrite, NDFileModeAppend, NDFileModeMultiple
[in] pArray A pointer to an NDArray; this is used to determine the array and attribute properties.

Implements NDPluginFile.

asynStatus NDFileJPEG::readFile ( NDArray **  pArray  )  [virtual]

Reads single NDArray from a JPEG file; NOT CURRENTLY IMPLEMENTED.

Parameters:
[in] pArray Pointer to the NDArray to be read

Implements NDPluginFile.

void NDFileJPEG::termDestination (  ) 

Terminates the destination file; should be private but called from C so must be public.

asynStatus NDFileJPEG::writeFile ( NDArray pArray  )  [virtual]

Writes single NDArray to the JPEG file.

Parameters:
[in] pArray Pointer to the NDArray to be written

Implements NDPluginFile.


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

Generated on Tue Aug 25 16:53:04 2009 for areaDetector by  doxygen 1.5.7.1