My Project
delayModule.h
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 
16 class DelayModule : public DelayModuleEvr
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
Modular Register Map Event Receivers.
Definition: drvem.h:97