psddl_psana/include/control.ddl.h

Go to the documentation of this file.
00001 #ifndef PSANA_CONTROL_DDL_H
00002 #define PSANA_CONTROL_DDL_H 1
00003 
00004 // *** Do not edit this file, it is auto-generated ***
00005 
00006 #include <vector>
00007 #include <iosfwd>
00008 #include <cstring>
00009 #include "ndarray/ndarray.h"
00010 #include "pdsdata/xtc/TypeId.hh"
00011 #include "pdsdata/xtc/ClockTime.hh"
00012 namespace Psana {
00013 namespace ControlData {
00014 
00015 /** @class PVControl
00016 
00017   
00018 */
00019 
00020 
00021 class PVControl {
00022 public:
00023   enum { NameSize = 32 /**< Length of the name array. */ };
00024   enum { NoArray = 0xFFFFFFFF /**< Special value used for _index when PV is not an array */ };
00025   PVControl(const char* arg__name, uint32_t arg__index, double arg__value)
00026     : _index(arg__index), _value(arg__value)
00027   {
00028     if (arg__name) std::copy(arg__name, arg__name+(32), &_name[0]);
00029   }
00030   PVControl() {}
00031   /** Name of the control. */
00032   const char* name() const { return _name; }
00033   /** Index of the control PV (for arrays) or NoArray. */
00034   uint32_t index() const { return _index; }
00035   /** Value for this control. */
00036   double value() const { return _value; }
00037   /** Returns true if the control is an array. */
00038   uint8_t array() const;
00039   static uint32_t _sizeof() { return ((((((0+(1*(32)))+4)+8)+4)-1)/4)*4; }
00040 private:
00041   char  _name[32];      /**< Name of the control. */
00042   uint32_t      _index; /**< Index of the control PV (for arrays) or NoArray. */
00043   double        _value; /**< Value for this control. */
00044 };
00045 
00046 /** @class PVMonitor
00047 
00048   
00049 */
00050 
00051 
00052 class PVMonitor {
00053 public:
00054   enum { NameSize = 32 /**< Length of the name array. */ };
00055   enum { NoArray = 0xFFFFFFFF /**< Special value used for _index when PV is not an array */ };
00056   PVMonitor(const char* arg__name, uint32_t arg__index, double arg__loValue, double arg__hiValue)
00057     : _index(arg__index), _loValue(arg__loValue), _hiValue(arg__hiValue)
00058   {
00059     if (arg__name) std::copy(arg__name, arg__name+(32), &_name[0]);
00060   }
00061   PVMonitor() {}
00062   /** Name of the control. */
00063   const char* name() const { return _name; }
00064   /** Index of the control PV (for arrays) or NoArray. */
00065   uint32_t index() const { return _index; }
00066   /** Lowest value for this monitor. */
00067   double loValue() const { return _loValue; }
00068   /** Highest value for this monitor. */
00069   double hiValue() const { return _hiValue; }
00070   /** Returns true if the monitor is an array. */
00071   uint8_t array() const;
00072   static uint32_t _sizeof() { return (((((((0+(1*(32)))+4)+8)+8)+4)-1)/4)*4; }
00073 private:
00074   char  _name[32];      /**< Name of the control. */
00075   uint32_t      _index; /**< Index of the control PV (for arrays) or NoArray. */
00076   double        _loValue;       /**< Lowest value for this monitor. */
00077   double        _hiValue;       /**< Highest value for this monitor. */
00078 };
00079 
00080 /** @class PVLabel
00081 
00082   
00083 */
00084 
00085 
00086 class PVLabel {
00087 public:
00088   enum { NameSize = 32 /**< Length of the PV name array. */ };
00089   enum { ValueSize = 64 /**< Length of the value array. */ };
00090   PVLabel(const char* arg__name, const char* arg__value)
00091   {
00092     if (arg__name) std::copy(arg__name, arg__name+(32), &_name[0]);
00093     if (arg__value) std::copy(arg__value, arg__value+(64), &_value[0]);
00094   }
00095   PVLabel() {}
00096   /** PV name. */
00097   const char* name() const { return _name; }
00098   /** Label value. */
00099   const char* value() const { return _value; }
00100   static uint32_t _sizeof() { return (((((0+(1*(32)))+(1*(64)))+1)-1)/1)*1; }
00101 private:
00102   char  _name[32];      /**< PV name. */
00103   char  _value[64];     /**< Label value. */
00104 };
00105 
00106 /** @class ConfigV1
00107 
00108   
00109 */
00110 
00111 
00112 class ConfigV1 {
00113 public:
00114   enum { TypeId = Pds::TypeId::Id_ControlConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00115   enum { Version = 1 /**< XTC type version number */ };
00116   virtual ~ConfigV1();
00117   /** Maximum number of events per scan. */
00118   virtual uint32_t events() const = 0;
00119   /** returns true if the configuration uses duration control. */
00120   virtual uint8_t uses_duration() const = 0;
00121   /** returns true if the configuration uses events limit. */
00122   virtual uint8_t uses_events() const = 0;
00123   /** Maximum duration of the scan. */
00124   virtual const Pds::ClockTime& duration() const = 0;
00125   /** Number of PVControl objects in this configuration. */
00126   virtual uint32_t npvControls() const = 0;
00127   /** Number of PVMonitor objects in this configuration. */
00128   virtual uint32_t npvMonitors() const = 0;
00129   /** PVControl configuration objects */
00130   virtual ndarray<const ControlData::PVControl, 1> pvControls() const = 0;
00131   /** PVMonitor configuration objects */
00132   virtual ndarray<const ControlData::PVMonitor, 1> pvMonitors() const = 0;
00133 };
00134 
00135 /** @class ConfigV2
00136 
00137   
00138 */
00139 
00140 
00141 class ConfigV2 {
00142 public:
00143   enum { TypeId = Pds::TypeId::Id_ControlConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00144   enum { Version = 2 /**< XTC type version number */ };
00145   virtual ~ConfigV2();
00146   /** Maximum number of events per scan. */
00147   virtual uint32_t events() const = 0;
00148   /** returns true if the configuration uses duration control. */
00149   virtual uint8_t uses_duration() const = 0;
00150   /** returns true if the configuration uses events limit. */
00151   virtual uint8_t uses_events() const = 0;
00152   /** Maximum duration of the scan. */
00153   virtual const Pds::ClockTime& duration() const = 0;
00154   /** Number of PVControl objects in this configuration. */
00155   virtual uint32_t npvControls() const = 0;
00156   /** Number of PVMonitor objects in this configuration. */
00157   virtual uint32_t npvMonitors() const = 0;
00158   /** Number of PVLabel objects in this configuration. */
00159   virtual uint32_t npvLabels() const = 0;
00160   /** PVControl configuration objects */
00161   virtual ndarray<const ControlData::PVControl, 1> pvControls() const = 0;
00162   /** PVMonitor configuration objects */
00163   virtual ndarray<const ControlData::PVMonitor, 1> pvMonitors() const = 0;
00164   /** PVLabel configuration objects */
00165   virtual ndarray<const ControlData::PVLabel, 1> pvLabels() const = 0;
00166 };
00167 
00168 /** @class ConfigV3
00169 
00170   
00171 */
00172 
00173 
00174 class ConfigV3 {
00175 public:
00176   enum { TypeId = Pds::TypeId::Id_ControlConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00177   enum { Version = 3 /**< XTC type version number */ };
00178   virtual ~ConfigV3();
00179   /** Maximum number of events per scan. */
00180   virtual uint32_t events() const = 0;
00181   /** returns true if the configuration uses l3trigger events limit. */
00182   virtual uint8_t uses_l3t_events() const = 0;
00183   /** returns true if the configuration uses duration control. */
00184   virtual uint8_t uses_duration() const = 0;
00185   /** returns true if the configuration uses events limit. */
00186   virtual uint8_t uses_events() const = 0;
00187   /** Maximum duration of the scan. */
00188   virtual const Pds::ClockTime& duration() const = 0;
00189   /** Number of PVControl objects in this configuration. */
00190   virtual uint32_t npvControls() const = 0;
00191   /** Number of PVMonitor objects in this configuration. */
00192   virtual uint32_t npvMonitors() const = 0;
00193   /** Number of PVLabel objects in this configuration. */
00194   virtual uint32_t npvLabels() const = 0;
00195   /** PVControl configuration objects */
00196   virtual ndarray<const ControlData::PVControl, 1> pvControls() const = 0;
00197   /** PVMonitor configuration objects */
00198   virtual ndarray<const ControlData::PVMonitor, 1> pvMonitors() const = 0;
00199   /** PVLabel configuration objects */
00200   virtual ndarray<const ControlData::PVLabel, 1> pvLabels() const = 0;
00201 };
00202 } // namespace ControlData
00203 } // namespace Psana
00204 #endif // PSANA_CONTROL_DDL_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7