My Project
pulser.h
1 /*************************************************************************\
2 * Copyright (c) 2010 Brookhaven Science Associates, as Operator of
3 * Brookhaven National Laboratory.
4 * Copyright (c) 2022 Cosylab d.d.
5 * mrfioc2 is distributed subject to a Software License Agreement found
6 * in file LICENSE that is included with this distribution.
7 \*************************************************************************/
8 /*
9  * Author: Michael Davidsaver <mdavidsaver@gmail.com>
10  */
11 
12 #ifndef PULSER_HPP_INC
13 #define PULSER_HPP_INC
14 
15 #include "mrf/object.h"
16 
17 #include <epicsTypes.h>
18 
19 #include <string>
20 
21 struct MapType {
22  enum type {
23  None=0,
24  Trigger,
25  Reset,
26  Set
27  };
28 };
29 
39 class epicsShareClass Pulser : public mrf::ObjectInst<Pulser>
40 {
41 public:
42  explicit Pulser(const std::string& n) : mrf::ObjectInst<Pulser>(n) {}
43  virtual ~Pulser()=0;
44 
48  virtual bool enabled() const=0;
49  virtual void enable(bool)=0;
55  virtual void softSet()=0;
56  virtual void softReset()=0;
64  virtual void setDelayRaw(epicsUInt32)=0;
65  virtual void setDelay(double)=0;
66  virtual epicsUInt32 delayRaw() const=0;
67  virtual double delay() const=0;
75  virtual void setWidthRaw(epicsUInt32)=0;
76  virtual void setWidth(double)=0;
77  virtual epicsUInt32 widthRaw() const=0;
78  virtual double width() const=0;
84  virtual epicsUInt32 prescaler() const=0;
85  virtual void setPrescaler(epicsUInt32)=0;
91  virtual epicsUInt32 psTrig() const=0;
92  virtual void setPSTrig(epicsUInt32)=0;
98  virtual epicsUInt32 dbusTrig() const=0;
99  virtual void setDBusTrig(epicsUInt32)=0;
107  virtual bool polarityInvert() const=0;
108  virtual void setPolarityInvert(bool)=0;
119  virtual MapType::type mappedSource(epicsUInt32 src) const=0;
121  virtual void sourceSetMap(epicsUInt32 src,MapType::type action)=0;
123 };
124 
125 #endif // PULSER_HPP_INC
A programmable delay unit.
Definition: pulser.h:40
virtual void sourceSetMap(epicsUInt32 src, MapType::type action)=0
Set mapping of source 'src'.
virtual MapType::type mappedSource(epicsUInt32 src) const =0
What action is source 'src' mapped to?
User implementation hook.
Definition: object.h:460