mar345 Class Reference

Driver for mar345 online image plate detector; communicates with the mar345dtb program over a TCP/IP socket. More...

Inheritance diagram for mar345:

ADDriver asynNDArrayDriver

List of all members.

Public Member Functions

 mar345 (const char *portName, const char *mar345Port, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Constructor for mar345 driver; most parameters are simply passed to ADDriver::ADDriver.
virtual asynStatus writeInt32 (asynUser *pasynUser, epicsInt32 value)
 Called when asyn clients call pasynInt32->write().
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.
void report (FILE *fp, int details)
 Report status of the driver.
void mar345Task ()
 Should be private but accessed from C, must be public.

Public Attributes

epicsEventId startEventId
 Should be private but accessed from C, must be public.
epicsEventId stopEventId
 Should be private but accessed from C, must be public.
epicsEventId abortEventId
 Should be private but accessed from C, must be public.


Detailed Description

Driver for mar345 online image plate detector; communicates with the mar345dtb program over a TCP/IP socket.

The mar345dtb program must be running and must be configured to listen for commands on a socket. This is done by adding a line like the following to the file /home/mar345/tables/config.xxx (where xxx is the detector serial number) COMMAND PORT 5001 In this example 5001 is the TCP/IP port number that the mar345dtb and this driver will use to communicate.


Constructor & Destructor Documentation

mar345::mar345 ( const char *  portName,
const char *  serverPort,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor for mar345 driver; most parameters are simply passed to ADDriver::ADDriver.

After calling the base class constructor this method creates a thread to collect the detector data, and sets reasonable default values for the parameters defined in this class and ADDriver.

Parameters:
[in] portName The name of the asyn port driver to be created.
[in] serverPort The name of the asyn port driver previously created with drvAsynIPPortConfigure connected to the mar345dtb program.
[in] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
[in] maxMemory The maximum amount of memory that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
[in] priority The thread priority for the asyn port driver thread.
[in] stackSize The stack size for the asyn port driver thread.


Member Function Documentation

asynStatus mar345::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 ADDriver::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 ADDriver.

void mar345::mar345Task (  ) 

Should be private but accessed from C, must be public.

This thread controls handling of slow events - erase, acquire, change mode.

void mar345::report ( FILE *  fp,
int  details 
) [virtual]

Report status of the driver.

Prints details about the driver if details>0. It then calls the ADDriver::report() method.

Parameters:
[in] fp File pointed passed by caller where the output is written to.
[in] details If >0 then driver details are printed.

Reimplemented from asynNDArrayDriver.

asynStatus mar345::writeInt32 ( asynUser *  pasynUser,
epicsInt32  value 
) [virtual]

Called when asyn clients call pasynInt32->write().

This function performs actions for some parameters, including ADAcquire, mar345Erase, etc. For all parameters it sets the value in the parameter library and calls any registered callbacks..

Parameters:
[in] pasynUser pasynUser structure that encodes the reason and address.
[in] value Value to write.

Reimplemented from ADDriver.


Member Data Documentation

epicsEventId mar345::abortEventId

Should be private but accessed from C, must be public.

epicsEventId mar345::startEventId

Should be private but accessed from C, must be public.

epicsEventId mar345::stopEventId

Should be private but accessed from C, must be public.


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

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