areaDetector  3-13
EPICS areaDetector framework
mpxConnection.h
Go to the documentation of this file.
1 #ifndef MPXCONN_H_
2 #define MPXCONN_H_
3 
4 #define ASYN_TRACE_MPX 0x0100
5 #define ASYN_TRACE_MPX_VERBOSE 0x0200
6 
7 #include "merlin_low.h"
8 
10 typedef enum
11 {
17 
18 class merlinDetector;
19 
21 {
22 public:
23  /* input and output from the labView controller */
30 
31 public:
32  // Constructor
33  mpxConnection(asynUser* parentUser, asynUser* tcpUser,
34  merlinDetector* parentObj);
35 
36  /* The labview communication primitives */
37  asynStatus mpxGet(char* valueId, double timeout);
38  asynStatus mpxSet(char* valueId, char* value, double timeout);
39  asynStatus mpxCommand(char* commandId, double timeout);
40  asynStatus mpxWrite(double timeout);
41  asynStatus mpxReadCmd(char* cmdType, char* cmdName, double timeout);
42  asynStatus mpxWriteRead(char* cmdType, char* cmdName, double timeout);
43  asynStatus mpxRead(asynUser* pasynUser, char* bodyBuf, int bufSize,
44  int* bytesRead, double timeout);
45 
46  /* Helper functions */
47  merlinDataHeader parseDataHeader(const char* header);
48  void parseMqDataFrame(NDAttributeList* pAttr, const char* header,
49  size_t *xsize, size_t *ysize, int* pixelDepth, int* offset,
50  int* profileSelect);
51 
52  void dumpData(char* sdata, int size);
53 
54 private:
55  asynUser* parentUser;
56  asynUser* tcpUser;
57  merlinDetector* parentObj;
58 };
59 
60 #endif
NDAttributeList.h.
Definition: NDAttributeList.h:21
Driver for Dectris merlin pixel array detectors using their Labview server over TCP/IP socket.
Definition: merlinDetector.h:114
Definition: mpxConnection.h:21
void parseMqDataFrame(NDAttributeList *pAttr, const char *header, size_t *xsize, size_t *ysize, int *pixelDepth, int *offset, int *profileSelect)
Definition: mpxConnection.cpp:56
asynStatus mpxWriteRead(char *cmdType, char *cmdName, double timeout)
Definition: mpxConnection.cpp:797
asynStatus mpxRead(asynUser *pasynUser, char *bodyBuf, int bufSize, int *bytesRead, double timeout)
Reads in a raw MPX frame from a pasynOctetSyncIO handle.
Definition: mpxConnection.cpp:588
char fromLabview[MPX_MAXLINE]
Definition: mpxConnection.h:25
char fromLabviewValue[MPX_MAXLINE]
Definition: mpxConnection.h:28
char fromLabviewHeader[MPX_MAXLINE]
Definition: mpxConnection.h:26
void dumpData(char *sdata, int size)
memory dump of data for diagnostics
Definition: mpxConnection.cpp:828
char fromLabviewBody[MPX_MAXLINE]
Definition: mpxConnection.h:27
char toLabview[MPX_MAXLINE]
Definition: mpxConnection.h:24
asynStatus mpxGet(char *valueId, double timeout)
Get the specified named value from Labview.
Definition: mpxConnection.cpp:490
asynStatus mpxWrite(double timeout)
Send a request to labview.
Definition: mpxConnection.cpp:551
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...
Definition: mpxConnection.cpp:729
mpxConnection(asynUser *parentUser, asynUser *tcpUser, merlinDetector *parentObj)
Definition: mpxConnection.cpp:23
asynStatus mpxSet(char *valueId, char *value, double timeout)
Definition: mpxConnection.cpp:391
int fromLabviewError
Definition: mpxConnection.h:29
asynStatus mpxCommand(char *commandId, double timeout)
Definition: mpxConnection.cpp:439
merlinDataHeader parseDataHeader(const char *header)
Definition: mpxConnection.cpp:33
#define MPX_MAXLINE
Definition: merlin_low.h:33
merlinDataHeader
data header types
Definition: mpxConnection.h:11
@ MPXUnknownHeader
Definition: mpxConnection.h:15
@ MPXAcquisitionHeader
Definition: mpxConnection.h:12
@ MPXProfileHeader
Definition: mpxConnection.h:14
@ MPXQuadDataHeader
Definition: mpxConnection.h:13
list value
Definition: makeDbAndEdl.py:234