My Project
|
#include <Share.h>
Public Member Functions | |
ExpstubRegDb () | |
~ExpstubRegDb () | |
void | readShadowReg (RegMapBlock *blk, unsigned first, unsigned nreg, DataPtr &value) |
void | writeShadowReg (RegMapBlock *blk, unsigned first, unsigned nreg, Dataptr &value) |
void | grabRegs (TimeOut timeout) |
void | ungrabRegs () |
RegMapBoard * | findRegMapBoard (std::string boardName) |
void | SpecificShare::ExpstubRegDb::flagBoard (int board) |
void | SpecificShare::ExpstubRegDb::unflagBoard (int board) |
bool | SpecificShare::ExpstubRegDb::verifyBoard (int board) |
Friends | |
class | SpecificShare |
Access to the register database and its shadow registers is provided through an object of the following type.
gcp::antenna::control::SpecificShare::ExpstubRegDb::ExpstubRegDb | ( | ) |
Constructor.
Exception |
gcp::antenna::control::SpecificShare::ExpstubRegDb::~ExpstubRegDb | ( | ) |
Destructor.
RegMapBoard* gcp::antenna::control::SpecificShare::ExpstubRegDb::findRegMapBoard | ( | std::string | boardName | ) |
Look up a board in the register map
void gcp::antenna::control::SpecificShare::ExpstubRegDb::grabRegs | ( | TimeOut | timeout | ) |
Acquire exclusive access to the database.
Exception |
void gcp::antenna::control::SpecificShare::ExpstubRegDb::readShadowReg | ( | RegMapBlock * | blk, |
unsigned | first, | ||
unsigned | nreg, | ||
DataPtr & | value | ||
) |
A private function of readReg() and readRawReg() to read one or more elements of a shadow register. Arguments are assumed to have been validated by the caller.
blk | RegMapBlock * The register block to read from. |
first | unsigned The block index of the first element to be read. |
nreg | unsigned The number of register elements to be read. |
value | unsigned * The output array. |
void gcp::antenna::control::SpecificShare::ExpstubRegDb::SpecificShare::ExpstubRegDb::flagBoard | ( | int | board | ) |
Flag a given register board as unreachable. This sets the status register of the specified board to 1. Note that readReg() and writeReg() don't check the status of this register before accessing other registers, so if you want to avoid I/O errors, call verifyBoard() before calling readReg() or writeReg().
board | int The index of the board to flag. |
Exception |
void gcp::antenna::control::SpecificShare::ExpstubRegDb::SpecificShare::ExpstubRegDb::unflagBoard | ( | int | board | ) |
Mark a given register board as reachable. This sets the status register of the specified board to 0.
board | int The index of the board to unflag. |
Exception |
bool gcp::antenna::control::SpecificShare::ExpstubRegDb::SpecificShare::ExpstubRegDb::verifyBoard | ( | int | board | ) |
Return the value of the status register of a given register board. This will be zero if the board is reachable, or non-zero otherwise.
returns bool true - The board is marked as ok. false - The board is marked as unreachable, or an error occured in the function.
board | int The index of the board to verify. |
Exception |
void gcp::antenna::control::SpecificShare::ExpstubRegDb::ungrabRegs | ( | ) |
Release the database.
Exception |
void gcp::antenna::control::SpecificShare::ExpstubRegDb::writeShadowReg | ( | RegMapBlock * | blk, |
unsigned | first, | ||
unsigned | nreg, | ||
Dataptr & | value | ||
) |
A private function of writeReg() and writeRawReg() to write one or more elements of a shadow register. Arguments are assumed to have been validated by the caller.
blk | RegMapBlock * The register block to write from. |
first | unsigned The block index of the first element to be written. |
nreg | unsigned The number of register elements to be written. |
value | unsigned * The array of values to be written. |
|
friend |
SpecificShare will access our members directly.