/* * VPulser.hh * * An abstract class for a pulser to be interfaced with SNL code. * It needs to have methods for interfacing with the SNL code. * * Created on: Aug 14, 2015 * Author: Hovanes Egiyan */ #ifndef __VPULSER_HH__ #define __VPULSER_HH__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "PulserPVs.hh" class VPulser { protected: // Pulser ID std::string vpID ; // Pointer to the PV object for this pulser. Usually // defined by the detector and the value is shared by all // pulsers in the same detector. PulserPVs* vpPV ; VPulser(){return;} public: VPulser( const std::string id ) : vpID(id), vpPV() {return ;} VPulser( const VPulser& p ) : vpID(p.vpID), vpPV(p.vpPV){return;} virtual ~VPulser() {return;} virtual inline std::string getID() const { return vpID; } virtual inline std::string setID( const std::string id ) { return vpID = id ; } virtual inline PulserPVs* getPVs() {return vpPV;} virtual inline PulserPVs* setPVs( PulserPVs* pv ) { vpPV=pv; return vpPV;} // Below are the methods for interfacing with the SNL code. virtual void switchState( const short state ) = 0; virtual void setWidth( const unsigned width ) = 0; virtual void setFrequency( const double freq ) = 0; virtual void setNPulses( const unsigned width ) = 0; virtual void setDelay( const unsigned delay ) = 0; virtual short getStatus() = 0; virtual unsigned getWidth() = 0; virtual double getFrequency() = 0; virtual unsigned getNPulses() = 0; virtual unsigned getDelay() = 0; }; #endif /* __VPULSER_HH__ */