mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 10:30:41 +02:00
runStatus enum added and get function indexes all starting from -1
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@13 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
2cfbc846b9
commit
26765a30b7
@ -341,10 +341,25 @@ int sendModule(sls_detector_module *myMod) {
|
|||||||
int nAdcs=myMod->nadc;
|
int nAdcs=myMod->nadc;
|
||||||
int nDacs=myMod->ndac;
|
int nDacs=myMod->ndac;
|
||||||
ts+= sendDataOnly(myMod,sizeof(sls_detector_module));
|
ts+= sendDataOnly(myMod,sizeof(sls_detector_module));
|
||||||
|
#ifdef VERBOSE
|
||||||
|
printf("module %d of size %d sent\n",myMod->module, ts);
|
||||||
|
#endif
|
||||||
ts+= sendDataOnly(myMod->dacs,sizeof(float)*nDacs);
|
ts+= sendDataOnly(myMod->dacs,sizeof(float)*nDacs);
|
||||||
|
#ifdef VERBOSE
|
||||||
|
printf("dacs %d of size %d sent\n",myMod->module, ts);
|
||||||
|
#endif
|
||||||
ts+= sendDataOnly(myMod->adcs,sizeof(float)*nAdcs);
|
ts+= sendDataOnly(myMod->adcs,sizeof(float)*nAdcs);
|
||||||
|
#ifdef VERBOSE
|
||||||
|
printf("adcs %d of size %d sent\n",myMod->module, ts);
|
||||||
|
#endif
|
||||||
ts+=sendDataOnly(myMod->chipregs,sizeof(int)*nChips);
|
ts+=sendDataOnly(myMod->chipregs,sizeof(int)*nChips);
|
||||||
|
#ifdef VERBOSE
|
||||||
|
printf("chips %d of size %d sent\n",myMod->module, ts);
|
||||||
|
#endif
|
||||||
ts+=sendDataOnly(myMod->chanregs,sizeof(int)*nChans);
|
ts+=sendDataOnly(myMod->chanregs,sizeof(int)*nChans);
|
||||||
|
#ifdef VERBOSE
|
||||||
|
printf("chans %d of size %d sent - %d\n",myMod->module, ts, myMod->nchan);
|
||||||
|
#endif
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
printf("module %d of size %d sent register %x\n",myMod->module, ts, myMod->reg);
|
printf("module %d of size %d sent register %x\n",myMod->module, ts, myMod->reg);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
#define SLS_DETECTOR_DEFS_H
|
#define SLS_DETECTOR_DEFS_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef float float32_t;
|
||||||
|
typedef int int32_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file sls_detector_defs.h
|
\file sls_detector_defs.h
|
||||||
This file contains all the basic definitions common to the slsDetector class
|
This file contains all the basic definitions common to the slsDetector class
|
||||||
@ -106,12 +111,13 @@ typedef struct {
|
|||||||
Type of the detector
|
Type of the detector
|
||||||
*/
|
*/
|
||||||
enum detectorType {
|
enum detectorType {
|
||||||
GET_DETECTOR_TYPE, /**< the detector will return its type */
|
GET_DETECTOR_TYPE=-1, /**< the detector will return its type */
|
||||||
GENERIC, /**< generic sls detector */
|
GENERIC, /**< generic sls detector */
|
||||||
MYTHEN, /**< mythen */
|
MYTHEN, /**< mythen */
|
||||||
PILATUS, /**< pilatus */
|
PILATUS, /**< pilatus */
|
||||||
EIGER, /**< eiger */
|
EIGER, /**< eiger */
|
||||||
GOTTHARD, /**< gotthard */
|
GOTTHARD, /**< gotthard */
|
||||||
|
PICASSO, /**< mythen */
|
||||||
AGIPD /**< agipd */
|
AGIPD /**< agipd */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -153,7 +159,7 @@ enum dimension {
|
|||||||
enum {
|
enum {
|
||||||
OK, /**< function succeeded */
|
OK, /**< function succeeded */
|
||||||
FAIL, /**< function failed */
|
FAIL, /**< function failed */
|
||||||
FINISHED /**< function failed */
|
FINISHED /**< acquisition finished */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,7 +174,7 @@ enum {
|
|||||||
use of the external signals
|
use of the external signals
|
||||||
*/
|
*/
|
||||||
enum externalSignalFlag {
|
enum externalSignalFlag {
|
||||||
GET_EXTERNAL_SIGNAL_FLAG, /**<return flag for signal */
|
GET_EXTERNAL_SIGNAL_FLAG=-1, /**<return flag for signal */
|
||||||
SIGNAL_OFF, /**<signal unused*/
|
SIGNAL_OFF, /**<signal unused*/
|
||||||
GATE_IN_ACTIVE_HIGH, /**<input gate active high*/
|
GATE_IN_ACTIVE_HIGH, /**<input gate active high*/
|
||||||
GATE_IN_ACTIVE_LOW, /**<input gate active low */
|
GATE_IN_ACTIVE_LOW, /**<input gate active low */
|
||||||
@ -190,7 +196,7 @@ enum externalSignalFlag {
|
|||||||
\see ::externalSignalFlag
|
\see ::externalSignalFlag
|
||||||
*/
|
*/
|
||||||
enum externalCommunicationMode{
|
enum externalCommunicationMode{
|
||||||
GET_EXTERNAL_COMMUNICATION_MODE,
|
GET_EXTERNAL_COMMUNICATION_MODE=-1,
|
||||||
AUTO,
|
AUTO,
|
||||||
TRIGGER_EXPOSURE,
|
TRIGGER_EXPOSURE,
|
||||||
TRIGGER_READOUT,
|
TRIGGER_READOUT,
|
||||||
@ -304,6 +310,18 @@ enum speedVariable {
|
|||||||
SET_SIGNAL_LENGTH /**< set/clear signal length */
|
SET_SIGNAL_LENGTH /**< set/clear signal length */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
staus mask
|
||||||
|
*/
|
||||||
|
enum runStatus {
|
||||||
|
IDLE, /**< detector ready to start acquisition - no data in memory */
|
||||||
|
ERROR, /**< error i.e. normally fifo full */
|
||||||
|
WAITING, /**< waiting for trigger or gate signal */
|
||||||
|
RUN_FINISHED, /**< acquisition not running but data in memory */
|
||||||
|
TRANSMITTING, /**< acquisition running and data in memory */
|
||||||
|
RUNNING /**< acquisition running, no data in memory */
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
readout flags
|
readout flags
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user