ClientListenerLoop.h
Go to the documentation of this file.
1 #ifndef _RMS_CLIENTLISTENERLOOP_H
2 #define _RMS_CLIENTLISTENERLOOP_H
3 
4 #include <NovaDAQUtilities/Runnable.h>
5 #include <rms/util/LinkedBlockingQueue.h>
6 #include <rms/RmsMessageListener.h>
7 #include <rms/MessageFilter.h>
8 
9 #include <boost/shared_ptr.hpp>
10 
11 #include <string>
12 
13 namespace gov {
14 
15 namespace fnal {
16 
17 namespace cd {
18 
19 namespace rms {
20 
21 /**
22  * The ClientListenerLoop decouples receiveing messages from
23  * the provider and sending them to any message listeners.
24  *
25  * @author Kurt Biery
26  * @author Steve Foulkes
27  * @version $Revision: 1.2.18.1 $ $Date: 2019/09/27 00:07:31 $
28  */
29 
31  public:
32  ClientListenerLoop(util::LinkedBlockingQueue <boost::shared_ptr<std::string> > *inputQueue);
34 
35  void run();
36  void stop();
37 
38  void setMessageListener(RmsMessageListener *listener);
40 
41  private:
42  /**
43  * The queue that we will be pulling messages off of.
44  */
46 
47  /**
48  * The listener that we will be sending messages to.
49  */
51 
52  /**
53  * The filter that we will be running messages through to determine if
54  * they are relevant to the listener.
55  */
57 };
58 
59 } // end of namespace rms
60 
61 } // end of namespace cd
62 
63 } // end of namespace fnal
64 
65 } // end of namespace gov
66 
67 #endif
util::LinkedBlockingQueue< boost::shared_ptr< std::string > > * _inputQueue
Module that kips a configurable number of events between each that it allows through. Note that this module really skips (N-1) events, it uses a simple modular division as its critera. This module will cut down the data sample to 1/N of its original size.
void setMessageFilter(MessageFilter *filter)
Definition: fnal.py:1
void setMessageListener(RmsMessageListener *listener)
ClientListenerLoop(util::LinkedBlockingQueue< boost::shared_ptr< std::string > > *inputQueue)
c cd(1)