Transient Recorder Framework
TRBaseConfig.h
Go to the documentation of this file.
1 /* This file is part of the Transient Recorder Framework.
2  * It is subject to the license terms in the LICENSE.txt file found in the
3  * top-level directory of this distribution and at
4  * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part
5  * of the Transient Recorder Framework, including this file, may be copied,
6  * modified, propagated, or distributed except according to the terms
7  * contained in the LICENSE.txt file.
8  */
9 
16 #ifndef TRANSREC_BASE_CONFIG_H
17 #define TRANSREC_BASE_CONFIG_H
18 
19 #include <stddef.h>
20 
21 #include <string>
22 
29 class TRBaseConfig {
30 public:
38  inline TRBaseConfig ()
39  : num_channels(0),
41  num_asyn_params(0),
42  interface_mask(0),
43  interrupt_mask(0),
46  max_ad_buffers(0),
47  max_ad_memory(0),
48  supports_pre_samples(false),
49  update_arrays(true)
50  {
51  }
52 
59  std::string port_name;
60 
67 
76 
85 
94 
103 
110 
118 
125 
132 
139 
147 
163  template <typename ParamType>
164  inline TRBaseConfig & set (ParamType TRBaseConfig::*param, ParamType const &value)
165  {
166  this->*param = value;
167  return *this;
168  }
169 };
170 
171 #endif
std::string port_name
Name for the base asyn port.
Definition: TRBaseConfig.h:59
int num_channels
Number of channels supported.
Definition: TRBaseConfig.h:66
int interrupt_mask
Mask of asyn interface types for asyn parameters of the derived class which might use asynchronous no...
Definition: TRBaseConfig.h:102
int num_asyn_params
Number of asyn parameters defined by the derived class.
Definition: TRBaseConfig.h:84
int interface_mask
Mask of asyn interface types for asyn parameters of the derived class.
Definition: TRBaseConfig.h:93
int max_ad_buffers
Maximum number of allocated NDArrays of the channels port.
Definition: TRBaseConfig.h:124
int num_config_params
Number of configuration parameters (TRConfigParam) defined by the derived class.
Definition: TRBaseConfig.h:75
TRBaseConfig()
Constructor which sets default values.
Definition: TRBaseConfig.h:38
bool supports_pre_samples
Whether the driver supports samples before the trigger event.
Definition: TRBaseConfig.h:138
size_t max_ad_memory
Maximum memory used by NDArrays of the channels port.
Definition: TRBaseConfig.h:131
bool update_arrays
Whether copies of submitted NDArrays are kept in the TRChannelsDriver.
Definition: TRBaseConfig.h:146
int read_thread_stack_size
Stack size for the read thread.
Definition: TRBaseConfig.h:117
Construction parameters for TRBaseDriver.
Definition: TRBaseConfig.h:29
int read_thread_prio
Priority for the read thread, in EPICS units.
Definition: TRBaseConfig.h:109