areaDetector  3-13
EPICS areaDetector framework
rixscam.h
Go to the documentation of this file.
1 #include <epicsEvent.h>
2 #include "ADDriver.h"
3 #include <iostream>
4 #include <string>
5 #include <vector>
6 #include <set>
7 #include <sstream>
8 #include <assert.h>
9 
10 #define BYTE unsigned char
11 #include "xcmclm.h"
12 
13 #define _STRING(x) #x
14 #define STRING(x) _STRING(x)
15 #define __Note__(x) message(__FILE__ "(" STRING(__LINE__) ") : Note >>>> " x )
16 
17 // The following was included from Parameter.tlh
18 
20 {
21 public:
22  virtual asynStatus Initialize(asynPortDriver& driver) = 0;
23 
24 protected:
26  _name(name)
27  {};
28 
29  asynStatus ParameterBase::SetParameter(asynPortDriver& driver, const int parameterIndex, const epicsInt32 value)
30  {
31  return driver.setIntegerParam(parameterIndex, value);
32  }
33 
34  asynStatus ParameterBase::SetParameter(asynPortDriver& driver, const int parameterIndex, const epicsFloat64 value)
35  {
36  return driver.setDoubleParam(parameterIndex, value);
37  }
38 
39  asynStatus ParameterBase::GetParameter(asynPortDriver& driver, const int parameterIndex, epicsInt32& value)
40  {
41  return driver.getIntegerParam(parameterIndex, &value);
42  }
43 
44  asynStatus ParameterBase::GetParameter(asynPortDriver& driver, const int parameterIndex, epicsFloat64& value)
45  {
46  return driver.getDoubleParam(parameterIndex, &value);
47  }
48 
50 };
51 
52 
53 
54 
55 template <typename T>
57 {
58 public:
59  ReadOnlyParameter(const std::string& name, const short internalIndex, const T& defaultValue, const T& scale) :
61  _internalIndex(internalIndex),
62  _parameterIndex(0),
63  _value(defaultValue),
64  _scale(scale)
65  {
66  };
67 
68  ReadOnlyParameter(const std::string& name, const short internalIndex, const T& defaultValue) :
70  _internalIndex(internalIndex),
71  _parameterIndex(0),
72  _value(defaultValue),
73  _scale((T)1)
74  {
75  };
76 
77  ReadOnlyParameter(const std::string& name, const short internalIndex) :
79  _internalIndex(internalIndex),
80  _parameterIndex(0),
81  _value((T)0),
82  _scale((T)1)
83  {
84  };
85 
86  virtual asynStatus Initialize(asynPortDriver& driver)
87  {
88  asynStatus status = Create(driver, _name, _parameterIndex);
89  if (status == asynSuccess)
90  {
91  status = SetParameter(driver, _parameterIndex, _value);
92  }
93 
94  return status;
95  }
96 
97  virtual T Value(asynPortDriver& driver)
98  {
99  // The local value is definitive for a read-only parameter
100  return _value;
101  }
102 
103  // We implement SetValue even for read-only parameters, because the 'read only' is from
104  // the point of view of the outside world; we still have to set the parameter value
105  virtual asynStatus SetValue(asynPortDriver& driver, T newValue)
106  {
107  if (newValue == _value)
108  return asynSuccess;
109 
110  _value = newValue;
111  return SetParameter(driver, _parameterIndex, _value);
112  }
113 
114  virtual int ScaledValue(asynPortDriver& driver)
115  {
116  return (int)((Value(driver) + _scale / (T)2) / _scale);
117  }
118 
119  virtual bool SetValueAtMinimum(asynPortDriver& driver, T minimumValue)
120  {
121  T currentValue = Value(driver);
122  if (currentValue >= minimumValue)
123  return false; // The value is already >= the required level
124 
125  // Calculate the minimum multiple of _scale that's >= minimumVaue
126  int scaled = (int)ceil(minimumValue / _scale);
127  T newValue = scaled * _scale;
128 
129  assert(newValue >= minimumValue);
130 
131  SetValue(driver, newValue);
132 
133  return true;
134  }
135 
136  virtual asynStatus SetScaledValue(asynPortDriver& driver, int newValue)
137  {
138  T internalValue = (T)newValue * _scale;
139  return SetValue(driver, internalValue);
140  }
141 
142  virtual bool Normalize(asynPortDriver& driver)
143  {
144  int scaled = ScaledValue(driver);
145  if ((scaled * _scale) != Value(driver))
146  {
147  SetScaledValue(driver, scaled);
148  return true;
149  }
150  else
151  return false;
152  }
153 
154  virtual bool HasParameterIndex(int indexToMatch) const
155  {
156  return _parameterIndex == indexToMatch;
157  }
158 
159  // Return an index value associated with the parameter
160  virtual short InternalIndex() const
161  {
162  return _internalIndex;
163  }
164 
165 protected:
166  virtual asynStatus Create(asynPortDriver& driver, const std::string& name, int& parameterIndex)
167  {
168  return asynError; // Only executed if <T> is unknown
169  }
170 
171  T _value; // Local value
172  int _parameterIndex; // The numeric index by which the variable is known to asynPortDriver
173  const int _internalIndex; // A numeric index by which the parameter is known to the user (e.g. a voltage index)
174  const T _scale; // Scale factor: <EPICS value> = <Internal value> * _scale
175 };
176 
177 
178 template<> asynStatus ReadOnlyParameter<epicsInt32>::Create(asynPortDriver& driver, const std::string& name, int& parameterIndex)
179 {
180  return driver.createParam(name.c_str(), asynParamInt32, &parameterIndex);
181 }
182 
183 template<> asynStatus ReadOnlyParameter<epicsFloat64>::Create(asynPortDriver& driver, const std::string& name, int& parameterIndex)
184 {
185  return driver.createParam(name.c_str(), asynParamFloat64, &parameterIndex);
186 }
187 
188 
189 template <typename T>
190 class Parameter : public ReadOnlyParameter<T>
191 {
192 public:
193  Parameter(const std::string& name, const short internalIndex,
194  const T& minimumValue, const T& maximumValue, const T& defaultValue) :
195  ReadOnlyParameter(name, internalIndex, defaultValue),
196  _minValue(minimumValue),
197  _maxValue(maximumValue)
198  {
199  assert(minimumValue <= maximumValue);
200  assert(minimumValue <= defaultValue);
201  assert(defaultValue <= maximumValue);
202  };
203 
204  Parameter(const std::string& name, const short internalIndex,
205  const T& minimumValue, const T& maximumValue, const T& defaultValue, const T& scale) :
206  ReadOnlyParameter(name, internalIndex, defaultValue, scale),
207  _minValue(minimumValue),
208  _maxValue(maximumValue)
209  {
210  assert(minimumValue <= maximumValue);
211  assert(minimumValue <= defaultValue);
212  assert(defaultValue <= maximumValue);
213  };
214 
215  virtual T Value(asynPortDriver& driver)
216  {
218 
219  if (_value < _minValue)
220  {
221  _value = _minValue;
223  }
224  else if (_value > _maxValue)
225  {
226  _value = _maxValue;
228  }
229 
230  return _value;
231  }
232 
233 private:
234  const T _minValue; // Minimum valid value
235  const T _maxValue; // Maximum valid value
236 };
237 
238 template <int valueCount, typename T>
240 {
241 public:
242  MultiParameter(const std::string& rootName, const short internalIndex,
243  const T& minimumValue, const T& maximumValue, const T& defaultValue, const T& scale) :
244  ParameterBase(rootName),
245  _internalIndex(internalIndex),
246  _minValue(minimumValue),
247  _maxValue(maximumValue),
248  _defaultValue(defaultValue)
249  {
250  assert(minimumValue <= maximumValue);
251  assert(minimumValue <= defaultValue);
252  assert(defaultValue <= maximumValue);
253 
254  for (size_t i = 0; i < valueCount; ++i)
255  {
256  std::stringstream fullName;
257  fullName << _name << "_" << (i + 1);
258 
259  _parameters.push_back(Parameter<T>(fullName.str(), _internalIndex, _minValue, _maxValue, _defaultValue, scale));
260  }
261  };
262 
263  asynStatus Initialize(asynPortDriver& driver)
264  {
265  asynStatus status;
266  for (auto& parameter : _parameters)
267  {
268  status = parameter.Initialize(driver);
269  if (status != asynSuccess)
270  return status;
271  }
272 
273  return status;
274  }
275 
276  T Value(asynPortDriver& driver, size_t index)
277  {
278  return _parameters[index].Value(driver);
279  }
280 
281  int ScaledValue(asynPortDriver& driver, size_t index)
282  {
283  return _parameters[index].ScaledValue(driver);
284  }
285 
286  asynStatus SetValue(asynPortDriver& driver, size_t index, T newValue)
287  {
288  return _parameters[index].SetValue(driver, newValue);
289  }
290 
291  bool SetValueAtMinimum(asynPortDriver& driver, size_t index, T minimumValue)
292  {
293  return _parameters[index].SetValueAtMinimum(driver, minimumValue);
294  }
295 
296  asynStatus SetScaledValue(asynPortDriver& driver, size_t index, int newValue)
297  {
298  return _parameters[index].SetScaledValue(driver, newValue);
299  }
300 
301  bool Normalize(asynPortDriver& driver, size_t index)
302  {
303  return _parameters[index].Normalize(driver);
304  }
305 
306  bool HasParameterIndex(int indexToMatch) const
307  {
308  for (auto& parameter : _parameters)
309  {
310  if (parameter.HasParameterIndex(indexToMatch))
311  return true;
312  }
313 
314  return false;
315  }
316 
317  short InternalIndex(size_t index, short indexStep)
318  {
319  return _parameters[index].InternalIndex() + (short)(index + 1) * indexStep;
320  }
321 
322 protected:
323  const short _internalIndex;
324  const T _defaultValue; // Default, and initial, value
325  const T _minValue; // Minimum valid value
326  const T _maxValue; // Maximum valid value
327  std::vector<Parameter<T>> _parameters;
328 };
329 
330 // RIXSCAM
331 
332 class epicsShareClass xcamCamera : public ADDriver {
333 public:
334  xcamCamera(const char *portName, int maxSizeX, int maxSizeY,
335  int maxBuffers, size_t maxMemory,
336  int priority, int stackSize);
337 
338  /* These are the methods that we override from ADDriver */
339  virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
340  virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
341  virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars, size_t *nActual);
342  virtual void setShutter(int open);
343  virtual void report(FILE *fp, int details);
344 
345  // The following should be private, but get called from C, so must be public
346  void imageTask();
347  void temperatureTask(void);
348  void Shutdown();
349 
350 protected:
352 #define FIRST_XCAM_CAMERA_PARAM SoftVersion
357 #define LAST_XCAM_CAMERA_PARAM SeqFilename
358 
359 
360 private:
361  epicsMutex _xcmclmMutex;
362 
363  const size_t _sensorSizeX = 1600;
364  const size_t _sensorSizeY = 1600;
365 
366  // We check at these time intervals to see if any of the major settings have changed
367  const double _acquireTimeoutSeconds = 0.2;
368 
369  // These are private and therefore not accessible outside the class - let alone outside the dll.
370  // We can therefore ignore warnings about dll linkages
371 #pragma warning (push)
372 #pragma warning (disable: 4251)
373 
374  bool _newImageRequired;
375 
376  static const char* _driverName;
377 
378  bool _exiting;
379  std::vector<int> _serialNumbers;
380  vector<NDArray*> _ccdImages;
381 
382  // Included from PVDeclarations.h
383  const static int _ccdCountMax = 3;
384  Parameter<epicsInt32> _paramSEQ_ADC_DELAY{"SEQ_ADC_DELAY", 0, 1, 65535, 144};
385  Parameter<epicsInt32> _paramSEQ_INT_MINUS_DELAY{"SEQ_INT_MINUS_DELAY", 1, 1, 65535, 3};
386  Parameter<epicsInt32> _paramSEQ_INT_PLUS_DELAY{"SEQ_INT_PLUS_DELAY", 2, 1, 65535, 3};
387  Parameter<epicsInt32> _paramSEQ_INT_TIME{"SEQ_INT_TIME", 3, 1, 65535, 50};
388  Parameter<epicsInt32> _paramSEQ_SERIAL_T{"SEQ_SERIAL_T", 4, 1, 65535, 1};
389  Parameter<epicsInt32> _paramSEQ_PARALLEL_T{"SEQ_PARALLEL_T", 5, 1, 65535, 255};
390  Parameter<epicsInt32> _paramSEQ_SERIAL_CLOCK{"SEQ_SERIAL_CLOCK", 7, 0, 0, 0};
391  Parameter<epicsInt32> _paramSEQ_PARALLEL_CLOCK{"SEQ_PARALLEL_CLOCK", 8, 0, 1, 0};
392  Parameter<epicsInt32> _paramSEQ_NODE_SELECTION{"SEQ_NODE_SELECTION", 13, 0, 3, 0};
393  ReadOnlyParameter<epicsInt32> _paramSEQ_STATUS{"SEQ_STATUS", 68};
394  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_OD{"VOLT_BIAS_OD", 4, 0, 33.915, 0, 0.133};
395  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_RD{"VOLT_BIAS_RD", 5, 0, 23.97, 0, 0.094};
396  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_DD{"VOLT_BIAS_DD", 6, 0, 23.97, 0, 0.094};
397  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_OG{"VOLT_BIAS_OG", 7, 0, 23.97, 0, 0.094};
398  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_SS{"VOLT_BIAS_SS", 9, 0, 23.97, 0, 0.094};
399  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_HVDC{"VOLT_BIAS_HVDC", 8, 0, 23.97, 0, 0.094};
400  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_PEDESTAL{"VOLT_BIAS_PEDESTAL", 10, 0, 14.025, 0, 0.055};
401  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_BIAS_HV{"VOLT_BIAS_HV", 11, 0, 49.98, 0, 0.196};
402  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_CLOCK_IMAGE{"VOLT_CLOCK_IMAGE", 0, 0, 14.025, 0, 0.055};
403  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_CLOCK_STORE{"VOLT_CLOCK_STORE", 1, 0, 14.025, 0, 0.055};
404  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_CLOCK_SERIAL{"VOLT_CLOCK_SERIAL", 2, 0, 14.025, 0, 0.055};
405  MultiParameter<_ccdCountMax, epicsFloat64> _paramVOLT_CLOCK_RESET{"VOLT_CLOCK_RESET", 3, 0, 14.025, 0, 0.055};
406  Parameter<epicsInt32> _paramCCD_POWER{"CCD_POWER", 0, 0, 1, 0};
407  Parameter<epicsInt32> _paramRIXS_SIMULATION{"RIXS_SIMULATION", 0, 0, 1, 0};
408  Parameter<epicsInt32> _paramRIXS_EVENTSPERFRAME{"RIXS_EVENTSPERFRAME", 0, 0, 10000, 100};
409  Parameter<epicsInt32> _paramRIXS_BACKGROUNDLEVEL{"RIXS_BACKGROUNDLEVEL", 0, 0, 65535, 0};
410  Parameter<epicsFloat64> _paramRIXS_EVENTHEIGHT{"RIXS_EVENTHEIGHT", 0, 0, 65535, 200};
411  Parameter<epicsFloat64> _paramRIXS_EVENTRADIUS{"RIXS_EVENTRADIUS", 0, 0.001, 2, 1};
412  Parameter<epicsInt32> _paramTEMP_PROP_GAIN{"TEMP_PROP_GAIN", 4, 0, 255, 0};
413  Parameter<epicsInt32> _paramTEMP_INT_GAIN{"TEMP_INT_GAIN", 6, 0, 255, 0};
414  Parameter<epicsInt32> _paramTEMP_DERIV_GAIN{"TEMP_DERIV_GAIN", 8, 0, 255, 0};
415  Parameter<epicsInt32> _paramTEMP_PROP_RATE{"TEMP_PROP_RATE", 10, 0, 65535, 0};
416  Parameter<epicsInt32> _paramTEMP_INT_RATE{"TEMP_INT_RATE", 12, 0, 65535, 0};
417  Parameter<epicsInt32> _paramTEMP_DERIV_RATE{"TEMP_DERIV_RATE", 14, 0, 65535, 0};
418  Parameter<epicsInt32> _paramTEMP_ACCUMULATED_ERROR_LIMIT{"TEMP_ACCUMULATED_ERROR_LIMIT", 16, 0, 16777215, 0};
419  Parameter<epicsInt32> _paramTEMP_OUTPUT_BIAS{"TEMP_OUTPUT_BIAS", 18, 0, 65535, 0};
420  Parameter<epicsInt32> _paramTEMP_MANUAL_MODE{"TEMP_MANUAL_MODE", 19, 0, 1, 1};
421  Parameter<epicsInt32> _paramTEMP_ENABLE{"TEMP_ENABLE", 20, 0, 1, 1};
422  Parameter<epicsInt32> _paramTEMP_HEATER_SELECT{"TEMP_HEATER_SELECT", 0, 0, 1, 0};
423  Parameter<epicsInt32> _paramTEMP_SENSOR_SELECT{"TEMP_SENSOR_SELECT", 0, 0, 1, 0};
424  ReadOnlyParameter<epicsInt32> _paramCCD_COUNT{"CCD_COUNT", 0};
425  Parameter<epicsFloat64> _paramADC_GAIN{"ADC_GAIN", 0, 0, 36.1119, 10, 0.0353};
426  Parameter<epicsInt32> _paramADC_OFFSET{"ADC_OFFSET", 0, 0, 1020, 40, 4};
427 
428  const static int _parameterContainerCount = 43;
429  const static int _parameterCount = 67;
430 
431  std::vector<ParameterBase*> _allParams;
432 
433  bool _ccdPowerOn;
434  bool _CCDPowerChanged;
435  bool _sequencerFilenameChanged;
436 
437  bool _TriggerModeChanged;
438 
439  const short _voltageIndexStep = 16; // Add this * <ccd number> to the internal index, to get register number
440  std::vector<MultiParameter<_ccdCountMax, epicsFloat64>*> _voltageParams;
441  bool _voltageParamsChanged;
442 
443  std::vector<Parameter<epicsInt32>*> _tempControllerParams;
444  bool _tempControllerParamsChanged;
445 
446  std::vector<Parameter<epicsInt32>*> _sequencerParams;
447  bool _SequencerParametersChanged;
448 
449  bool _acquireTimeChanged;
450  bool _adcGainOffsetChanged;
451  bool _shutterModeChanged;
452  bool _shutterDelayChanged;
453  bool _grabWaitFlag;
454  double _grabWaitValue;
455 
456  //int _node;
457 
458  // Mechanism to detect changes to roi parameters, so scan does not have to be set up
459  // if no changes have been made
460  bool _roiParametersChanged;
461  bool _callGrabSetup;
462  bool _switchModeCheck;
463 
464  std::set<int> _roiParameterIndices;
465 
466 #pragma warning (pop)
467 
468  size_t CCDCount() const { return _serialNumbers.size(); };
469 
470  // Load the sequencer from the file specified by the parameter
471  bool xcamCamera::LoadSequencer();
472  // Set the CCD power according to the parameter setting
473  bool SetCCDPower();
474  // Set the CCD power according to the boolean parameter. If force is true, ignore the cached state
475  bool SetCCDPower(bool on, bool force = false);
476  // Apply voltages, if the power is on
477  bool SetCCDVoltages();
478  bool ApplyVoltageConstraints();
479  // Set the exposure time registers from the AcquisitionTime parameter, and update the readback
480  void SetExposureTime();
481  // Set the temperature controller configuration
482  void SetTemperatureController();
483  // Configure the ROI and binning etc.
484  void ConfigureROIBinning();
485  // Configure the ROI and binning etc. for a particular axis (i.e. X or Y)
486  void ConfigureROIBinningAxis(const int binID, const int minID, const int sizeID, const int maxID,
487  int& bin, int& origin, int& count);
488  void ConstrainToSensorAxis(const int globalOrigin, const int globalSize, const int globalBin,
489  const int localOrigin, const int localSize,
490  int& originOut, int& countOut);
491 
492  int computeRIXSArray(int sizeX, int sizeY);
493  NDArray* GetImage();
494 
495  enum temperatureControllerCommands
496  {
497  CMD_TEMP_GET_RAW_PLANT_VALUE = 0,
498  CMD_TEMP_GET_SETPOINT = 1,
499  CMD_TEMP_SET_SETPOINT = 2,
500  CMD_TEMP_GET_PROPORTIONAL_GAIN = 3,
501  CMD_TEMP_SET_PROPORTIONAL_GAIN = 4,
502  CMD_TEMP_GET_INTEGRAL_GAIN = 5,
503  CMD_TEMP_SET_INTEGRAL_GAIN = 6,
504  CMD_TEMP_GET_DERIVATIVE_GAIN = 7,
505  CMD_TEMP_SET_DERIVATIVE_GAIN = 8,
506  CMD_TEMP_GET_PROPORTIONAL_TIME = 9,
507  CMD_TEMP_SET_PROPORTIONAL_TIME = 10,
508  CMD_TEMP_GET_INTEGRAL_RATE = 11,
509  CMD_TEMP_SET_INTEGRAL_RATE = 12,
510  CMD_TEMP_GET_DERIVATIVE_RATE = 13,
511  CMD_TEMP_SET_DERIVATIVE_RATE = 14,
512  CMD_TEMP_GET_ACCUMULATED_ERROR_LIMIT = 15,
513  CMD_TEMP_SET_ACCUMULATED_ERROR_LIMIT = 16,
514  CMD_TEMP_GET_OUTPUT_BIAS_VALUE = 17,
515  CMD_TEMP_SET_OUTPUT_BIAS_VALUE = 18,
516  CMD_TEMP_SET_MANUAL_MODE = 19,
517  CMD_TEMP_SET_ENABLE_CONTROL = 20
518  };
519 
520  int EncodeTemperatureCelsius(double tempDegreesC) { return (int)(0.5 + (tempDegreesC + 260.0) / 0.0000277); };
521  double DecodeTemperatureCelsius(int encoded) { return ((double)encoded * 0.0000277) - 260.0; }
522 
523  void ReportWriteStatus(asynUser *pasynUser, const asynStatus status, const char * methodName);
524 
525  /* Our data */
526  epicsEventId startEventId;
527  epicsEventId stopEventId;
528  NDArray *pRaw;
529 };
530 
531 #define NUM_XCAM_CAMERA_PARAMS ((int)(&LAST_XCAM_CAMERA_PARAM - &FIRST_XCAM_CAMERA_PARAM + 1))
532 
Class from which areaDetector drivers are directly derived.
Definition: ADDriver.h:132
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Sets an int32 parameter.
Definition: ADDriver.cpp:84
virtual void setShutter(int open)
Set the shutter position.
Definition: ADDriver.cpp:29
Definition: rixscam.h:240
short InternalIndex(size_t index, short indexStep)
Definition: rixscam.h:317
bool SetValueAtMinimum(asynPortDriver &driver, size_t index, T minimumValue)
Definition: rixscam.h:291
int ScaledValue(asynPortDriver &driver, size_t index)
Definition: rixscam.h:281
const T _maxValue
Definition: rixscam.h:326
asynStatus Initialize(asynPortDriver &driver)
Definition: rixscam.h:263
MultiParameter(const std::string &rootName, const short internalIndex, const T &minimumValue, const T &maximumValue, const T &defaultValue, const T &scale)
Definition: rixscam.h:242
asynStatus SetScaledValue(asynPortDriver &driver, size_t index, int newValue)
Definition: rixscam.h:296
T Value(asynPortDriver &driver, size_t index)
Definition: rixscam.h:276
const T _defaultValue
Definition: rixscam.h:324
bool Normalize(asynPortDriver &driver, size_t index)
Definition: rixscam.h:301
bool HasParameterIndex(int indexToMatch) const
Definition: rixscam.h:306
std::vector< Parameter< T > > _parameters
Definition: rixscam.h:327
const T _minValue
Definition: rixscam.h:325
asynStatus SetValue(asynPortDriver &driver, size_t index, T newValue)
Definition: rixscam.h:286
const short _internalIndex
Definition: rixscam.h:323
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition: NDArray.h:99
Definition: rixscam.h:20
ParameterBase(const std::string &name)
Definition: rixscam.h:25
asynStatus GetParameter(asynPortDriver &driver, const int parameterIndex, epicsInt32 &value)
Definition: rixscam.h:39
virtual asynStatus Initialize(asynPortDriver &driver)=0
const std::string _name
Definition: rixscam.h:49
asynStatus SetParameter(asynPortDriver &driver, const int parameterIndex, const epicsInt32 value)
Definition: rixscam.h:29
Definition: rixscam.h:191
virtual T Value(asynPortDriver &driver)
Definition: rixscam.h:215
Parameter(const std::string &name, const short internalIndex, const T &minimumValue, const T &maximumValue, const T &defaultValue, const T &scale)
Definition: rixscam.h:204
Parameter(const std::string &name, const short internalIndex, const T &minimumValue, const T &maximumValue, const T &defaultValue)
Definition: rixscam.h:193
Definition: rixscam.h:57
T _value
Definition: rixscam.h:171
int _parameterIndex
Definition: rixscam.h:172
virtual asynStatus Initialize(asynPortDriver &driver)
Definition: rixscam.h:86
ReadOnlyParameter(const std::string &name, const short internalIndex, const T &defaultValue, const T &scale)
Definition: rixscam.h:59
const T _scale
Definition: rixscam.h:174
virtual bool SetValueAtMinimum(asynPortDriver &driver, T minimumValue)
Definition: rixscam.h:119
virtual bool HasParameterIndex(int indexToMatch) const
Definition: rixscam.h:154
virtual int ScaledValue(asynPortDriver &driver)
Definition: rixscam.h:114
ReadOnlyParameter(const std::string &name, const short internalIndex)
Definition: rixscam.h:77
virtual asynStatus Create(asynPortDriver &driver, const std::string &name, int &parameterIndex)
Definition: rixscam.h:166
virtual T Value(asynPortDriver &driver)
Definition: rixscam.h:97
virtual short InternalIndex() const
Definition: rixscam.h:160
const int _internalIndex
Definition: rixscam.h:173
virtual asynStatus SetValue(asynPortDriver &driver, T newValue)
Definition: rixscam.h:105
ReadOnlyParameter(const std::string &name, const short internalIndex, const T &defaultValue)
Definition: rixscam.h:68
virtual asynStatus SetScaledValue(asynPortDriver &driver, int newValue)
Definition: rixscam.h:136
virtual bool Normalize(asynPortDriver &driver)
Definition: rixscam.h:142
virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars, size_t *nActual)
Called when asyn clients call pasynOctet->write().
Definition: asynNDArrayDriver.cpp:511
virtual void report(FILE *fp, int details)
Report status of the driver.
Definition: asynNDArrayDriver.cpp:753
Definition: rixscam.h:332
int IFSVersion
Definition: rixscam.h:353
int SoftVersion
Definition: rixscam.h:351
int SeqFilename
Definition: rixscam.h:356
int FPGAVersion
Definition: rixscam.h:354
int CamSerial
Definition: rixscam.h:355
@ string
Definition: NDFileHDF5Layout.h:44
int i
Definition: makeAdl.py:479
name
Definition: makeDbAndEdl.py:232
list value
Definition: makeDbAndEdl.py:234