mrfioc2  2.3.0
delayModule.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
3 * mrfioc2 is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
6 #ifndef DELAYMODULE_H
7 #define DELAYMODULE_H
8 
9 #include "evr/delay.h"
10 
11 #include "mrmGpio.h"
12 
13 
14 class EVRMRM;
15 
17 {
18 public:
19  DelayModule(const std::string&, EVRMRM*, unsigned int);
20  virtual ~DelayModule();
21 
26  virtual void setDelay0(double val) OVERRIDE FINAL;
31  virtual double getDelay0() const OVERRIDE FINAL;
32 
37  virtual void setDelay1(double val) OVERRIDE FINAL;
42  virtual double getDelay1() const OVERRIDE FINAL;
43 
48  virtual void setState(bool enabled) OVERRIDE FINAL;
53  virtual bool enabled() const OVERRIDE FINAL;
54 
55  //void set(bool a, bool b, epicsUInt16 c, epicsUInt16 d){setDelay(a,b,c,d);}
56 
57 private:
58  const unsigned int N_;
59  MRMGpio *gpio_;
60  epicsUInt16 dly0_, dly1_;
61 
65  void setGpioOutput();
66 
70  void enable();
71 
75  void disable();
76 
84  void setDelay(bool output0, bool output1, epicsUInt16 value0, epicsUInt16 value1);
85 
90  void pushData(epicsUInt32 data);
91 
92  // There is no locking needed, but methods must be present since there are virtual in mrf::Object class
93  virtual void lock() const {}
94  virtual void unlock() const {}
95 };
96 
97 #endif // DELAYMODULE_H
virtual void setState(bool enabled) OVERRIDE FINAL
setState Sets the enabled state of the delay module. If disabled, the module will output logic low on...
Definition: delayModule.cpp:51
Modular Register Map Event Receivers.
Definition: drvem.h:86
virtual void setDelay1(double val) OVERRIDE FINAL
setDelay1 Sets the delay of the output 1 in the module
Definition: delayModule.cpp:39
virtual ~DelayModule()
Definition: delayModule.cpp:23
virtual double getDelay0() const OVERRIDE FINAL
getDelay0 Returns the last set delay for the output 0 in the module
Definition: delayModule.cpp:34
DelayModule(const std::string &, EVRMRM *, unsigned int)
Definition: delayModule.cpp:16
virtual void setDelay0(double val) OVERRIDE FINAL
setDelay0 Sets the delay of the output 0 in the module
Definition: delayModule.cpp:27
virtual double getDelay1() const OVERRIDE FINAL
getDelay1R eturns the last set delay for the output 1 in the module
Definition: delayModule.cpp:46
virtual bool enabled() const OVERRIDE FINAL
enabled Checks if the module is enabled or not.
Definition: delayModule.cpp:59