areaDetector  2-6
Public Member Functions | Public Attributes | List of all members
mpxConnection Class Reference

#include <mpxConnection.h>

Public Member Functions

 mpxConnection (asynUser *parentUser, asynUser *tcpUser, medipixDetector *parentObj)
 
asynStatus mpxGet (char *valueId, double timeout)
 Get the specified named value from Labview. More...
 
asynStatus mpxSet (char *valueId, char *value, double timeout)
 
asynStatus mpxCommand (char *commandId, double timeout)
 
asynStatus mpxWrite (double timeout)
 Send a request to labview. More...
 
asynStatus mpxReadCmd (char *cmdType, char *cmdName, double timeout)
 Reads in the MPX command header and body from labview verifies the header and places the body in this->fromLabviewBody for parsing by the caller. More...
 
asynStatus mpxWriteRead (char *cmdType, char *cmdName, double timeout)
 
asynStatus mpxRead (asynUser *pasynUser, char *bodyBuf, int bufSize, int *bytesRead, double timeout)
 Reads in a raw MPX frame from a pasynOctetSyncIO handle. More...
 
medipixDataHeader parseDataHeader (const char *header)
 
void parseDataFrame (NDAttributeList *pAttr, const char *header, medipixDataHeader headerType, size_t *xsize, size_t *ysize, int *pixelSize, int *profileMask)
 
void parseMqDataFrame (NDAttributeList *pAttr, const char *header, size_t *xsize, size_t *ysize, int *pixelDepth, int *offset)
 
void dumpData (char *sdata, int size)
 memory dump of data for diagnostics More...
 

Public Attributes

char toLabview [MPX_MAXLINE]
 
char fromLabview [MPX_MAXLINE]
 
char fromLabviewHeader [MPX_MAXLINE]
 
char fromLabviewBody [MPX_MAXLINE]
 
char fromLabviewValue [MPX_MAXLINE]
 
int fromLabviewError
 

Constructor & Destructor Documentation

mpxConnection::mpxConnection ( asynUser *  parentUser,
asynUser *  tcpUser,
medipixDetector parentObj 
)

Member Function Documentation

void mpxConnection::dumpData ( char *  sdata,
int  size 
)

memory dump of data for diagnostics

asynStatus mpxConnection::mpxCommand ( char *  commandId,
double  timeout 
)
asynStatus mpxConnection::mpxGet ( char *  valueId,
double  timeout 
)

Get the specified named value from Labview.

asynStatus mpxConnection::mpxRead ( asynUser *  pasynUser,
char *  bodyBuf,
int  bufSize,
int *  bytesRead,
double  timeout 
)

Reads in a raw MPX frame from a pasynOctetSyncIO handle.

This function skips any leading data, looking for the pattern MPX,0000000000,

Where 0000000000 = the no. of bytes in body of the frame in decimal (inclusive of comma after 000000000) Reads the rest of the body into the passed bodyBuf

asynStatus mpxConnection::mpxReadCmd ( char *  cmdType,
char *  cmdName,
double  timeout 
)

Reads in the MPX command header and body from labview verifies the header and places the body in this->fromLabviewBody for parsing by the caller.

asynStatus mpxConnection::mpxSet ( char *  valueId,
char *  value,
double  timeout 
)
asynStatus mpxConnection::mpxWrite ( double  timeout)

Send a request to labview.

asynStatus mpxConnection::mpxWriteRead ( char *  cmdType,
char *  cmdName,
double  timeout 
)
void mpxConnection::parseDataFrame ( NDAttributeList pAttr,
const char *  header,
medipixDataHeader  headerType,
size_t *  xsize,
size_t *  ysize,
int *  pixelSize,
int *  profileMask 
)
medipixDataHeader mpxConnection::parseDataHeader ( const char *  header)
void mpxConnection::parseMqDataFrame ( NDAttributeList pAttr,
const char *  header,
size_t *  xsize,
size_t *  ysize,
int *  pixelDepth,
int *  offset 
)

Member Data Documentation

char mpxConnection::fromLabview[MPX_MAXLINE]
char mpxConnection::fromLabviewBody[MPX_MAXLINE]
int mpxConnection::fromLabviewError
char mpxConnection::fromLabviewHeader[MPX_MAXLINE]
char mpxConnection::fromLabviewValue[MPX_MAXLINE]
char mpxConnection::toLabview[MPX_MAXLINE]

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