psddl_psana/include/genericpgp.ddl.h

Go to the documentation of this file.
00001 #ifndef PSANA_GENERICPGP_DDL_H
00002 #define PSANA_GENERICPGP_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 GenericPgp {
00013 
00014 /** @class CDimension
00015 
00016   
00017 */
00018 
00019 
00020 class CDimension {
00021 public:
00022   virtual ~CDimension();
00023   virtual uint32_t rows() const = 0;
00024   virtual uint32_t columns() const = 0;
00025 };
00026 
00027 /** @class CRegister
00028 
00029   
00030 */
00031 
00032 
00033 class CRegister {
00034 public:
00035   enum Action {
00036     RegisterRead = 0, /**< Read and store */
00037     RegisterWrite = 1, /**< Write */
00038     RegisterWriteA = 2, /**< Write and wait for ack */
00039     RegisterVerify = 3, /**< Read and verify */
00040     Spin = 4, /**< Spin lock */
00041     Usleep = 5, /**< Sleep */
00042     Flush = 6, /**< Flush pending reads */
00043   };
00044   CRegister(GenericPgp::CRegister::Action arg__action, uint32_t arg__datasize, uint32_t arg__address, uint32_t arg__offset, uint32_t arg__mask)
00045     : _Action(((arg__action) & 0xff)|(((arg__datasize) & 0xffffff)<<8)), _address(arg__address), _offset(arg__offset), _mask(arg__mask)
00046   {
00047   }
00048   CRegister() {}
00049   /** Configuration action */
00050   GenericPgp::CRegister::Action action() const { return Action(this->_Action & 0xff); }
00051   /** Size of register access (in uint32_t's) */
00052   uint32_t datasize() const { return uint32_t((this->_Action>>8) & 0xffffff); }
00053   /** Register access address */
00054   uint32_t address() const { return _address; }
00055   /** Payload offset */
00056   uint32_t offset() const { return _offset; }
00057   /** Register value mask */
00058   uint32_t mask() const { return _mask; }
00059   static uint32_t _sizeof() { return 16; }
00060 private:
00061   uint32_t      _Action;
00062   uint32_t      _address;       /**< Register access address */
00063   uint32_t      _offset;        /**< Payload offset */
00064   uint32_t      _mask;  /**< Register value mask */
00065 };
00066 std::ostream& operator<<(std::ostream& str, GenericPgp::CRegister::Action enval);
00067 
00068 /** @class CStream
00069 
00070   
00071 */
00072 
00073 
00074 class CStream {
00075 public:
00076   CStream(uint32_t arg__pgp_channel, uint32_t arg__data_type, uint32_t arg__config_type, uint32_t arg__config_offset)
00077     : _pgp_channel(arg__pgp_channel), _data_type(arg__data_type), _config_type(arg__config_type), _config_offset(arg__config_offset)
00078   {
00079   }
00080   CStream() {}
00081   /** PGP virtual channel ID */
00082   uint32_t pgp_channel() const { return _pgp_channel; }
00083   /** Event data type ID */
00084   uint32_t data_type() const { return _data_type; }
00085   /** Configuration data type ID */
00086   uint32_t config_type() const { return _config_type; }
00087   /** Location of configuration data */
00088   uint32_t config_offset() const { return _config_offset; }
00089   static uint32_t _sizeof() { return 16; }
00090 private:
00091   uint32_t      _pgp_channel;   /**< PGP virtual channel ID */
00092   uint32_t      _data_type;     /**< Event data type ID */
00093   uint32_t      _config_type;   /**< Configuration data type ID */
00094   uint32_t      _config_offset; /**< Location of configuration data */
00095 };
00096 
00097 /** @class ConfigV1
00098 
00099   
00100 */
00101 
00102 
00103 class ConfigV1 {
00104 public:
00105   enum { TypeId = Pds::TypeId::Id_GenericPgpConfig /**< XTC type ID value (from Pds::TypeId class) */ };
00106   enum { Version = 1 /**< XTC type version number */ };
00107   virtual ~ConfigV1();
00108   /** Serial number identifying the array */
00109   virtual uint32_t id() const = 0;
00110   /** Dimensions of the frame data from the array */
00111   virtual const GenericPgp::CDimension& frame_dim() const = 0;
00112   /** Dimensions of the auxillary data from the array */
00113   virtual const GenericPgp::CDimension& aux_dim() const = 0;
00114   /** Dimensions of the environmental data from the array */
00115   virtual const GenericPgp::CDimension& env_dim() const = 0;
00116   /** Number of registers in the sequence array */
00117   virtual uint32_t number_of_registers() const = 0;
00118   /** Number of (sub)sequences of register operations in the array */
00119   virtual uint32_t number_of_sequences() const = 0;
00120   virtual uint32_t number_of_streams() const = 0;
00121   virtual uint32_t payload_size() const = 0;
00122   virtual ndarray<const uint32_t, 2> pixel_settings() const = 0;
00123   /** Lengths of (sub)sequence register operations in the array */
00124   virtual ndarray<const uint32_t, 1> sequence_length() const = 0;
00125   /** Register Operations */
00126   virtual ndarray<const GenericPgp::CRegister, 1> sequence() const = 0;
00127   /** Stream readout configuration */
00128   virtual ndarray<const GenericPgp::CStream, 1> stream() const = 0;
00129   /** Stream and Register Data */
00130   virtual ndarray<const uint32_t, 1> payload() const = 0;
00131   /** Number of rows in a readout unit */
00132   virtual uint32_t numberOfRows() const = 0;
00133   /** Number of columns in a readout unit */
00134   virtual uint32_t numberOfColumns() const = 0;
00135   /** Number of rows in the auxillary data */
00136   virtual uint32_t lastRowExclusions() const = 0;
00137   /** Number of elements in environmental data */
00138   virtual uint32_t numberOfAsics() const = 0;
00139 };
00140 } // namespace GenericPgp
00141 } // namespace Psana
00142 #endif // PSANA_GENERICPGP_DDL_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7