CARMA C++
Board.h
Go to the documentation of this file.
1 #ifndef BOARD_H
2 #define BOARD_H
3 
11 #include "carma/szaarrayutils/regmap.h"
12 #include "carma/szautil/AntNum.h"
13 
14 namespace sza {
15  namespace antenna {
16  namespace control {
17 
18  class SzaShare;
19 
24  class Board {
25 
26  public:
27 
34  Board(SzaShare* share, std::string name);
35 
43  Board(SzaShare* share, sza::util::AntNum ant);
44 
50  Board(SzaShare* share);
51 
56  // virtual ~Board() = 0;
57  virtual ~Board();
58 
65  RegMapBlock* findReg(char* name);
66 
72  bool isReachable();
73 
81  virtual void reset() {};
82 
87  int getIndex();
88 
92  virtual void readReg(RegMapBlock* blk, unsigned int first,
93  unsigned int nreg, unsigned int* value);
94 
98  virtual void writeReg(RegMapBlock* blk, unsigned int first,
99  unsigned int nreg, unsigned int* value);
100 
104  virtual void writeReg(RegMapBlock* blk, unsigned int first,
105  unsigned int nreg, bool* value);
106 
107  protected:
108 
113 
117  RegMapBoard* board_;
118 
125  bool hasBoard_;
126 
127  }; // End class Board
128 
129  }; // End namespace control
130  }; // End namespace antenna
131 }; // End namespace sza
132 
133 #endif
A class to enumerate a single Antenna, or a set of Antennas.
Definition: AntNum.h:21
virtual ~Board()
Declaration of destructor as pure virtual prevents instantiation of this base class.
Board(SzaShare *share, std::string name)
Constructor looks up a board by name and stores a pointer to it in private member board_ (below)...
bool hasBoard_
True if this Board has a real board corresponding to it.
Definition: Board.h:125
virtual void writeReg(RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
Methods to write to a register of this board.
RegMapBoard * board_
A pointer to the board this object refers to.
Definition: Board.h:117
virtual void readReg(RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
Method to read a register from this board.
Tagged: Fri Nov 14 12:39:31 UTC 2003.
A class which encapsulates resources of a board of the shared register map.
Definition: Board.h:24
bool isReachable()
Verify that this board is reachable.
int getIndex()
Public function to return the index of this board in the register database.
RegMapBlock * findReg(char *name)
Return a pointer to a register of the board managed by this object.
virtual void reset()
Function to reset private members of a board-management object.
Definition: Board.h:81
An instance of this class is created by AntennaMaster and passed to the constructors of other tasks...
Definition: Share.h:38
SzaShare * share_
The resource object of the shared memory database.
Definition: Board.h:112