This is Unofficial EPICS BASE Doxygen Site
putDoneThread.h
Go to the documentation of this file.
1 
10 #ifndef PutDoneThread_H
11 #define PutDoneThread_H
12 #include <queue>
13 #include <cadef.h>
14 #include <shareLib.h>
15 #include <epicsThread.h>
16 #include <pv/event.h>
17 #include <pv/lock.h>
18 
19 namespace epics {
20 namespace pvAccess {
21 namespace ca {
22 
23 class NotifyPutRequester;
24 typedef std::tr1::shared_ptr<NotifyPutRequester> NotifyPutRequesterPtr;
25 typedef std::tr1::weak_ptr<NotifyPutRequester> NotifyPutRequesterWPtr;
26 
27 
28 class PutDoneThread;
29 typedef std::tr1::shared_ptr<PutDoneThread> PutDoneThreadPtr;
30 
31 class CAChannelPut;
32 typedef std::tr1::shared_ptr<CAChannelPut> CAChannelPutPtr;
33 typedef std::tr1::weak_ptr<CAChannelPut> CAChannelPutWPtr;
34 
36 {
37 public:
38  ChannelPutRequester::weak_pointer channelPutRequester;
39  CAChannelPutWPtr channelPut;
40  bool isOnQueue;
41  NotifyPutRequester() : isOnQueue(false) {}
42  void setChannelPut(CAChannelPutPtr const &channelPut)
43  { this->channelPut = channelPut;}
44 };
45 
46 
48  public epicsThreadRunable
49 {
50 public:
51  static PutDoneThreadPtr get();
52  ~PutDoneThread();
53  virtual void run();
54  void start();
55  void stop();
56  void putDone(NotifyPutRequesterPtr const &notifyPutRequester);
57 private:
58  PutDoneThread();
59  bool isStop;
60  std::tr1::shared_ptr<epicsThread> thread;
62  epics::pvData::Event waitForCommand;
63  epics::pvData::Event waitForStop;
64  std::queue<NotifyPutRequesterWPtr> notifyPutQueue;
65 };
66 
67 
68 }}}
69 
70 #endif /* PutDoneThread_H */
ChannelPutRequester::weak_pointer channelPutRequester
Definition: putDoneThread.h:38
C++ wrapper for epicsEvent from EPICS base.
Definition: event.h:31
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
Mark external symbols and entry points for shared libraries.
std::tr1::shared_ptr< PutDoneThread > PutDoneThreadPtr
Definition: caChannel.h:54
void setChannelPut(CAChannelPutPtr const &channelPut)
Definition: putDoneThread.h:42
epicsMutex mutex
Definition: pvAccess.cpp:71
std::tr1::weak_ptr< CAChannelPut > CAChannelPutWPtr
Definition: caChannel.h:62
std::tr1::shared_ptr< CAChannelPut > CAChannelPutPtr
Definition: caChannel.h:60
std::tr1::weak_ptr< NotifyPutRequester > NotifyPutRequesterWPtr
Definition: caChannel.h:53
std::tr1::shared_ptr< NotifyPutRequester > NotifyPutRequesterPtr
Definition: caChannel.h:51
epicsMutex Mutex
Definition: lock.h:28
C++ and C descriptions for a thread.
#define false
Definition: flexdef.h:85