My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Scanner.h
1 #ifndef SCANNER_H
2 #define SCANNER_H
3 
11 #include <list>
12 
13 #include "gcp/util/common/AntNum.h"
14 #include "gcp/util/common/DataFrameManager.h"
15 
16 #include "gcp/util/common/AntennaFrameBuffer.h"
17 
18 #include "gcp/antenna/control/specific/FrameBoard.h"
19 #include "gcp/antenna/control/specific/FrameSender.h"
20 #include "gcp/antenna/control/specific/SpecificShare.h"
21 
22 namespace gcp {
23  namespace antenna {
24  namespace control {
25 
26 
31  class Scanner {
32 
33  public:
34 
41 
45  ~Scanner();
46 
51  void packNextFrame();
52 
59  void dispatchNextFrame(FrameSender* consumer);
60 
65 
69  unsigned int getNframesInQueue();
70 
74  std::list<Board*> listBoards();
75 
76  private:
77 
81  SpecificShare* share_;
82 
88 
92  FrameBoard* frame_;
93 
94  //------------------------------------------------------------
95  // Internal record-keeping structs
96  //------------------------------------------------------------
97 
102  struct Features {
103  unsigned seq_; // Sequence number of the last feature
104  // marker command received from the control
105  // program
106  unsigned transient_; // Bit-mask union of persistent
107  // feature markers received from the
108  // control program since the last
109  // frame.
110  unsigned persistent_; // The bit mask union of persistent
111  // feature markers previously received
112  // from the control program but not
113  // cancelled.
114  void reset();
115  } features_;
116  /*
117  * A structure of the following type is used to store the
118  * current bit mask of receiver walsh states, and the bit mask
119  * of walsh states which was in effect during the frame that
120  * we are currently sending to the archiver.
121  */
122  struct Walsh {
123  bool request_on_; // If walshing is requested, this will be
124  // set to true. If requested, slow
125  // walshing will commence on the next
126  // invocation of the tgen interrupt
127  // handler. If walshing is currently on,
128  // walshing will cease at the end of the
129  // current walsh cycle.
130  bool current_on_; // True if walshing was on during the
131  // last integration. at the end of the
132  // current walsh cycle.
133  int counter_; // The walsh iteration counter. This
134  // tells the scanner where in the walsh
135  // cycle we currently are.
136  unsigned current_state_; // The current bit mask of walsh states
137  unsigned last_state_; // The bit mask for the frame we
138  // are currently sending
139  void reset();
140  } walsh_;
141 
142 
146  void initialize();
147 
154  void recordFeatures();
155 
161  void setTime();
162 
168  void recordTime();
169 
176  void recordRecordNumber(unsigned nrecord);
177 
183  void recordWalshState();
184 
188  bool skipOne_;
189 
194  unsigned recordNumber_;
195 
196  }; // End class Scanner
197 
198  }; // End namespace control
199  }; // End namespace antenna
200 } // End namespace gcp
201 
202 #endif // End #ifndef
Definition: FrameBoard.h:21
std::list< Board * > listBoards()
gcp::util::DataFrameManager * dispatchNextFrame()
Definition: Scanner.cc:176
Definition: Scanner.h:31
Definition: FrameSender.h:25
unsigned int getNframesInQueue()
Definition: Scanner.cc:201
Definition: DataFrameManager.h:23
void packNextFrame()
Definition: Scanner.cc:134
Definition: AntNum.h:23
~Scanner()
Definition: Scanner.cc:34
Scanner(SpecificShare *share, gcp::util::AntNum *ant)
Definition: Scanner.cc:13
Definition: AntennaFrameBuffer.h:17