areaDetector  3-13
EPICS areaDetector framework
nEDChannel.h
Go to the documentation of this file.
1 
9 #ifndef NEDCHANNEL_H
10 #define NEDCHANNEL_H
11 
12 #include <epicsThread.h>
13 #include <epicsTime.h>
14 #include <pv/epicsException.h>
15 #include <pv/createRequest.h>
16 #include <pv/event.h>
17 #include <pv/pvData.h>
18 #include <pv/clientFactory.h>
19 #include <pv/pvAccess.h>
20 #include <pv/monitor.h>
21 
22 class ADnED;
23 
24 namespace nEDChannel {
25 
26  using std::tr1::shared_ptr;
27  using namespace epics::pvData;
28  using namespace epics::pvAccess;
29 
30  //Channel connect/disconnect class
31 
32  class nEDChannelRequester : public virtual ChannelRequester {
33 
34  public:
35 
36  nEDChannelRequester(std::string &requester_name);
37  virtual ~nEDChannelRequester();
38 
39  void channelCreated(const Status& status, Channel::shared_pointer const & channel);
40  void channelStateChange(Channel::shared_pointer const & channel, Channel::ConnectionState connectionState);
41  bool waitUntilConnected(double timeOut);
42  std::string getRequesterName();
43  void message(std::string const & message, MessageType messageType);
44 
45  private:
46 
47  std::string m_requesterName;
48  Event m_connectEvent;
49 
50  };
51 
52  //Channel monitor class
53 
54  class nEDMonitorRequester : public virtual MonitorRequester
55  {
56 
57  public:
58 
59  nEDMonitorRequester(std::string &requester_name, ADnED *nED, epicsUInt32 channel);
60  virtual ~nEDMonitorRequester();
61 
62  void monitorConnect(Status const & status, MonitorPtr const & monitor, StructureConstPtr const & structure);
63  void monitorEvent(MonitorPtr const & monitor);
64  void unlisten(MonitorPtr const & monitor);
65  bool waitUntilConnected(double timeOut);
66  boolean waitUntilDone();
67 
68 
69  std::string getRequesterName();
70  void message(std::string const & message, MessageType messageType);
71 
72  private:
73 
74  Event m_connectEvent;
75  std::string m_requesterName;
76  ADnED *p_nED;
77  Event m_doneEvent;
78  epicsUInt32 m_channelID;
79 
80  };
81 
82 
83 
84 }
85 
86 #endif //NEDCHANNEL_H
87 
88 
89 
90 
91 
Definition: ADnED.h:130
Definition: nEDChannel.h:32
Definition: nEDChannel.h:55
Definition: ADnED.h:125
@ string
Definition: NDFileHDF5Layout.h:44
list structure
Definition: makeAdl.py:78
Definition: nEDChannel.cpp:22
ConnectionState
Definition: pxrd2_interface_misc.h:50