areaDetector 1-8
Public Member Functions | Public Attributes | Protected Attributes
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 asynPortDriver

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 void setShutter (int open)
 Set the shutter position.
virtual 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.

Protected Attributes

int mar345Erase
int mar345EraseMode
int mar345NumErase
int mar345NumErased
int mar345ChangeMode
int mar345Size
int mar345Res
int mar345Abort

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]portNameThe name of the asyn port driver to be created.
[in]serverPortThe name of the asyn port driver previously created with drvAsynIPPortConfigure connected to the mar345dtb program.
[in]maxBuffersThe 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]maxMemoryThe 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]priorityThe thread priority for the asyn port driver thread.
[in]stackSizeThe stack size for the asyn port driver thread.

Member Function Documentation

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]fpFile pointed passed by caller where the output is written to.
[in]detailsIf >0 then driver details are printed.

Reimplemented from asynNDArrayDriver.

void mar345::setShutter ( int  open) [virtual]

Set the shutter position.

This method will open (1) or close (0) the shutter if ADShutterMode==ADShutterModeEPICS. Drivers will implement setShutter if they support ADShutterModeDetector. If ADShutterMode=ADShutterModeDetector they will control the shutter directly, else they will call this method.

Parameters:
[in]open1 (open) or 0 (closed)

Reimplemented from ADDriver.

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]pasynUserpasynUser structure that encodes the reason and address.
[in]valueValue to write.

Reimplemented from ADDriver.


Member Data Documentation

epicsEventId mar345::abortEventId

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

int mar345::mar345Abort [protected]
int mar345::mar345ChangeMode [protected]
int mar345::mar345Erase [protected]
int mar345::mar345EraseMode [protected]
int mar345::mar345NumErase [protected]
int mar345::mar345NumErased [protected]
int mar345::mar345Res [protected]
int mar345::mar345Size [protected]
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: