psddl_psana/include/usdusb.ddl.h

Go to the documentation of this file.
00001 #ifndef PSANA_USDUSB_DDL_H
00002 #define PSANA_USDUSB_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 namespace Psana {
00012 namespace UsdUsb {
00013 
00014 /** @class FexConfigV1
00015 
00016   Class for creating a FexData for an encoder - takes an offset and scale.
00017 */
00018 
00019 
00020 class FexConfigV1 {
00021 public:
00022   enum { TypeId = Pds::TypeId::Id_UsdUsbFexConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00023   enum { Version = 1 /**< XTC type version number */ };
00024   enum { NCHANNELS = 4 };
00025   enum { NAME_CHAR_MAX = 48 };
00026   virtual ~FexConfigV1();
00027   /** Offset (in counts) to apply to raw encoder counts */
00028   virtual ndarray<const int32_t, 1> offset() const = 0;
00029   /** Scale factor for converting encoder counts to units */
00030   virtual ndarray<const double, 1> scale() const = 0;
00031   /** Descriptive name for each channel */
00032   virtual const char* name(uint32_t i0) const = 0;
00033   /** Method which returns the shape (dimensions) of the data returned by name() method. */
00034   virtual std::vector<int> name_shape() const = 0;
00035 };
00036 
00037 /** @class FexDataV1
00038 
00039   Class for holding the encoder value after application of an offset and scale.
00040 */
00041 
00042 
00043 class FexDataV1 {
00044 public:
00045   enum { TypeId = Pds::TypeId::Id_UsdUsbFexData /**< XTC type ID value (from Pds::TypeId class) */ };
00046   enum { Version = 1 /**< XTC type version number */ };
00047   enum { Encoder_Inputs = 4 };
00048   virtual ~FexDataV1();
00049   /** Corrected encoder value = (raw_count + offset) * scale */
00050   virtual ndarray<const double, 1> encoder_values() const = 0;
00051 };
00052 
00053 /** @class ConfigV1
00054 
00055   
00056 */
00057 
00058 
00059 class ConfigV1 {
00060 public:
00061   enum { TypeId = Pds::TypeId::Id_UsdUsbConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00062   enum { Version = 1 /**< XTC type version number */ };
00063   enum { NCHANNELS = 4 };
00064   enum Count_Mode {
00065     WRAP_FULL,
00066     LIMIT,
00067     HALT,
00068     WRAP_PRESET,
00069   };
00070   enum Quad_Mode {
00071     CLOCK_DIR,
00072     X1,
00073     X2,
00074     X4,
00075   };
00076   virtual ~ConfigV1();
00077   virtual ndarray<const uint32_t, 1> counting_mode() const = 0;
00078   virtual ndarray<const uint32_t, 1> quadrature_mode() const = 0;
00079 };
00080 std::ostream& operator<<(std::ostream& str, UsdUsb::ConfigV1::Count_Mode enval);
00081 std::ostream& operator<<(std::ostream& str, UsdUsb::ConfigV1::Quad_Mode enval);
00082 
00083 /** @class DataV1
00084 
00085   
00086 */
00087 
00088 
00089 class DataV1 {
00090 public:
00091   enum { TypeId = Pds::TypeId::Id_UsdUsbData /**< XTC type ID value (from Pds::TypeId class) */ };
00092   enum { Version = 1 /**< XTC type version number */ };
00093   enum { Encoder_Inputs = 4 };
00094   enum { Analog_Inputs = 4 };
00095   enum { Digital_Inputs = 8 };
00096   virtual ~DataV1();
00097   virtual uint8_t digital_in() const = 0;
00098   virtual uint32_t timestamp() const = 0;
00099   virtual ndarray<const uint8_t, 1> status() const = 0;
00100   virtual ndarray<const uint16_t, 1> analog_in() const = 0;
00101   /** Return lower 24 bits of _count array as signed integer values. */
00102   virtual ndarray<const int32_t, 1> encoder_count() const = 0;
00103 };
00104 } // namespace UsdUsb
00105 } // namespace Psana
00106 #endif // PSANA_USDUSB_DDL_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7