mrfioc2  2.3.0
input.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2010 Brookhaven Science Associates, as Operator of
3 * Brookhaven National Laboratory.
4 * mrfioc2 is distributed subject to a Software License Agreement found
5 * in file LICENSE that is included with this distribution.
6 \*************************************************************************/
7 /*
8  * Author: Michael Davidsaver <mdavidsaver@gmail.com>
9  */
10 
11 #ifndef INPUT_HPP_INC
12 #define INPUT_HPP_INC
13 
14 #include "mrf/object.h"
15 
16 #include <epicsTypes.h>
17 
18 enum TrigMode {
22 };
23 
24 class epicsShareClass Input : public mrf::ObjectInst<Input>
25 {
26 public:
27  explicit Input(const std::string& n) : mrf::ObjectInst<Input>(n) {}
28  virtual ~Input()=0;
29 
31  virtual void dbusSet(epicsUInt16)=0;
32  virtual epicsUInt16 dbus() const=0;
33 
35  virtual void levelHighSet(bool)=0;
36  virtual bool levelHigh() const=0;
37 
38  // Detect the level state on the input
39  virtual bool state() const=0;
40 
42  virtual void edgeRiseSet(bool)=0;
43  virtual bool edgeRise() const=0;
44 
46  virtual void extModeSet(TrigMode)=0;
47  virtual TrigMode extMode() const=0;
48 
50  virtual void extEvtSet(epicsUInt32)=0;
51  virtual epicsUInt32 extEvt() const=0;
52 
54  virtual void backModeSet(TrigMode)=0;
55  virtual TrigMode backMode() const=0;
56 
58  virtual void backEvtSet(epicsUInt32)=0;
59  virtual epicsUInt32 backEvt() const=0;
60 
61 
65  void extModeSetraw(epicsUInt16 r){extModeSet((TrigMode)r);};
66  epicsUInt16 extModeraw() const{return (TrigMode)extMode();};
67 
68  void backModeSetraw(epicsUInt16 r){backModeSet((TrigMode)r);};
69  epicsUInt16 backModeraw() const{return (TrigMode)backMode();};
71 };
72 
73 #endif /* INPUT_HPP_INC */
epicsUInt16 extModeraw() const
Definition: input.h:66
Input(const std::string &n)
Definition: input.h:27
Definition: input.h:24
Definition: input.h:21
User implementation hook.
Definition: object.h:459
epicsUInt16 backModeraw() const
Definition: input.h:69
void extModeSetraw(epicsUInt16 r)
Definition: input.h:65
void backModeSetraw(epicsUInt16 r)
Definition: input.h:68
Definition: input.h:19
TrigMode
Definition: input.h:18
Definition: flash.cpp:23