CARMA C++
Scanner.h
Go to the documentation of this file.
1 #ifndef SCANNER_H
2 #define SCANNER_H
3 
11 #include <list>
12 
13 #include "carma/szautil/AntNum.h"
15 
17 
20 
21 namespace sza {
22  namespace antenna {
23  namespace control {
24 
25 
30  class Scanner {
31 
32  public:
33 
39  Scanner(SzaShare* share, sza::util::AntNum* ant);
40 
44  ~Scanner();
45 
50  void packNextFrame();
51 
56 
60  unsigned int getNframesInQueue();
61 
65  std::list<Board*> listBoards();
66 
67  private:
68 
72  SzaShare* share_;
73 
78  sza::util::AntennaFrameBuffer fb_;
79 
83  FrameBoard* frame_;
84 
85  //------------------------------------------------------------
86  // Internal record-keeping structs
87  //------------------------------------------------------------
88 
93  struct Features {
94  unsigned seq_; // Sequence number of the last feature
95  // marker command received from the control
96  // program
97  unsigned transient_; // Bit-mask union of persistent
98  // feature markers received from the
99  // control program since the last
100  // frame.
101  unsigned persistent_; // The bit mask union of persistent
102  // feature markers previously received
103  // from the control program but not
104  // cancelled.
105  void reset();
106  } features_;
107  /*
108  * A structure of the following type is used to store the
109  * current bit mask of receiver walsh states, and the bit mask
110  * of walsh states which was in effect during the frame that
111  * we are currently sending to the archiver.
112  */
113  struct Walsh {
114  bool request_on_; // If walshing is requested, this will be
115  // set to true. If requested, slow
116  // walshing will commence on the next
117  // invocation of the tgen interrupt
118  // handler. If walshing is currently on,
119  // walshing will cease at the end of the
120  // current walsh cycle.
121  bool current_on_; // True if walshing was on during the
122  // last integration. at the end of the
123  // current walsh cycle.
124  int counter_; // The walsh iteration counter. This
125  // tells the scanner where in the walsh
126  // cycle we currently are.
127  unsigned current_state_; // The current bit mask of walsh states
128  unsigned last_state_; // The bit mask for the frame we
129  // are currently sending
130  void reset();
131  } walsh_;
132 
133 
137  void initialize();
138 
145  void recordFeatures();
146 
152  void setTime();
153 
159  void recordTime();
160 
167  void recordRecordNumber(unsigned nrecord);
168 
174  void recordWalshState();
175 
179  bool skipOne_;
180 
185  unsigned recordNumber_;
186 
187  }; // End class Scanner
188 
189  }; // End namespace control
190  }; // End namespace antenna
191 }; // End namespace sza
192 
193 #endif // End #ifndef
A class to enumerate a single Antenna, or a set of Antennas.
Definition: AntNum.h:21
std::list< Board * > listBoards()
Return the list of boards controlled by this task.
Tagged: Mon Mar 22 03:56:39 UTC 2004.
This is a base class for managing a generic dataframe of registers.
Tagged: Thu Nov 13 16:53:38 UTC 2003.
Tagged: Thu Nov 13 16:53:54 UTC 2003.
Scanner(SzaShare *share, sza::util::AntNum *ant)
Constructor with antenna specification.
Tagged: Fri Nov 14 12:39:31 UTC 2003.
A class to encapsulate the transmission of monitor frames from the AC to the ACC. ...
Definition: Scanner.h:30
A class to encapsulate details of the frame software board.
Definition: FrameBoard.h:21
void packNextFrame()
If there is room in the circular frame buffer, record another data frame.
An instance of this class is created by AntennaMaster and passed to the constructors of other tasks...
Definition: Share.h:38
sza::util::DataFrameManager * dispatchNextFrame()
Method to return the next frame from our ring buffer.
Tagged: Fri Nov 14 12:37:53 UTC 2003.
unsigned int getNframesInQueue()
Return the number of data frames waiting to be dispatched.