My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
DioSquidClient.h
Go to the documentation of this file.
1 #ifndef GCP_RECEIVER_DIOSQUIDCLIENT_H
2 #define GCP_RECEIVER_DIOSQUIDCLIENT_H
3 
13 #include "gcp/util/common/BoardDataFrameManager.h"
14 
15 #include "gcp/receiver/specific/DioClient.h"
16 #include "gcp/receiver/specific/SquidDataFrameManager.h"
17 
18 namespace gcp {
19  namespace receiver {
20 
21  class DioSquidClient : public DioClient {
22  public:
23 
24  // Constructor.
25 
26  DioSquidClient(std::string dioHost, unsigned short dioPort,
27  std::string hwHost, unsigned short hwPort,
28  unsigned int nSamplesPerSecond);
29 
30  // Destructor.
31 
32  virtual ~DioSquidClient();
33 
34  // Initialize the list of channels from the HardwareManager
35 
36  void initializeChannels();
37 
38  // Overload the base-class method to set up the filter function
39  // for this client
40 
41  void setUpFilter();
42 
44 
45  // Copy stored values of persistent items into the register
46  // frame
47 
48  private:
49 
50  std::vector<std::string> squids_;
51  bool haveSquidChannels_;
52 
53  SquidDataFrameManager frame_;
54  float* dcPtr_;
55  unsigned filterNtaps_;
56  unsigned subSampling_;
57 
58  void bufferData(std::vector<MuxReadout::DIODatum>& data);
59 
60  // Add a single sample of DIO data to the buffer
61 
62  void addSampleToBuffer(gcp::util::RegDate& date,
63  std::vector<MuxReadout::DIODatum>& data,
64  bool isValid);
65 
66  // Reset pointers to memory where data are being buffered
67 
68  void resetBufferPointers();
69 
70  // Define what happens when the subsampling is set for this
71  // client
72 
73  void archiveSubSampling(unsigned sampling);
74 
75  }; // End class DioSquidClient
76 
77  } // End namespace receiver
78 } // End namespace gcp
79 
80 
81 
82 #endif // End #ifndef GCP_RECEIVER_DIOSQUIDCLIENT_H
void initializeChannels()
Definition: DioSquidClient.cc:72
Definition: BoardDataFrameManager.h:31
Definition: DioClient.h:28
void setUpFilter()
Definition: DioSquidClient.cc:102
Definition: SquidDataFrameManager.h:29
Definition: DioSquidClient.h:21
Definition: RegDate.h:19
virtual ~DioSquidClient()
Definition: DioSquidClient.cc:27
DioSquidClient(std::string dioHost, unsigned short dioPort, std::string hwHost, unsigned short hwPort, unsigned int nSamplesPerSecond)
Definition: DioSquidClient.cc:16