NDFileNexus Class Reference

Writes NDArrays in the NeXus file format. More...

#include <NDFileNexus.h>

Inheritance diagram for NDFileNexus:

NDPluginFile NDPluginDriver asynNDArrayDriver

List of all members.

Public Member Functions

 NDFileNexus (const char *portName, int queueSize, int blockingCallbacks, const char *NDArrayPort, int NDArrayAddr, int priority, int stackSize)
 Constructor for NDFileNexus; all parameters are simply passed to NDPluginFile::NDPluginFile.
virtual asynStatus openFile (const char *fileName, NDFileOpenMode_t openMode, NDArray *pArray)
 Opens NeXus file.
virtual asynStatus readFile (NDArray **pArray)
 Read NDArray data from a NeXus file; NOT YET IMPLEMENTED.
virtual asynStatus writeFile (NDArray *pArray)
 Writes a single NDArray to a NeXus file.
virtual asynStatus closeFile ()
 Closes the NeXus file opened with NDFileNexus::openFile.
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 the NDPluginFile class if the drvInfo field matches one the strings defined for it.


Detailed Description

Writes NDArrays in the NeXus file format.

Uses an XML template file to configure the contents of the NeXus file.

This version is currently limited to writing a single NDArray to each NeXus file. Future releases will be capable of storing multiple NDArrays in each NeXus file.


Constructor & Destructor Documentation

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

Constructor for NDFileNexus; 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 NDFileNexus::closeFile (  )  [virtual]

Closes the NeXus file opened with NDFileNexus::openFile.

Implements NDPluginFile.

asynStatus NDFileNexus::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 the NDPluginFile 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.

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

Opens NeXus file.

Parameters:
[in] fileName Absolute path name of the file to open.
[in] openMode Bit mask with one of the access mode bits NDFileModeRead, NDFileModeWrite. NDFileModeAppend. May also have the bit NDFileModeMultiple set if the file is to be opened to write or read multiple NDArrays into a single file.
[in] pArray Pointer to an NDArray; this array does not contain data to be written or read. Rather it can be used to determine the header information and data structure for the file. It is guaranteed that NDArrays pass to NDPluginFile::writeFile or NDPluginFile::readFile will have the same data type, data dimensions and attributes as this array.

Implements NDPluginFile.

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

Read NDArray data from a NeXus file; NOT YET IMPLEMENTED.

Parameters:
[in] pArray Pointer to the address of an NDArray to read the data into.

Implements NDPluginFile.

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

Writes a single NDArray to a NeXus file.

Parameters:
[in] pArray Pointer to an NDArray to write to the file. This function can be called multiple times between the call to openFile and closeFile once this class supports MultipleArrays=1 and if NDFileModeMultiple was set in openMode in the call to NDPluginFile::openFile (e.g. capture or stream mode).

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