CARMA C++
sza::antenna::control::SzaShare::SzaRegDb Class Reference

Access to the register database and its shadow registers is provided through an object of the following type. More...

#include <carma/antenna/sza/antenna/control/Share.h>

Public Member Functions

RegMapBoard * findRegMapBoard (std::string boardName)
 Look up a board in the register map. More...
 
RegMapBoard * findRegMapBoard (std::string boardName)
 Look up a board in the register map. More...
 
void flagBoard (int board)
 Flag a given register board as unreachable. More...
 
void grabRegs (TimeOut timeout)
 Acquire exclusive access to the database. More...
 
void grabRegs (TimeOut timeout)
 Acquire exclusive access to the database. More...
 
void 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. More...
 
 SzaRegDb ()
 Constructor. More...
 
 SzaRegDb ()
 Constructor. More...
 
void SzaShare::SzaRegDb::flagBoard (int board)
 Flag a given register board as unreachable. More...
 
void SzaShare::SzaRegDb::unflagBoard (int board)
 Mark a given register board as reachable. More...
 
bool SzaShare::SzaRegDb::verifyBoard (int board)
 Return the value of the status register of a given register board. More...
 
void unflagBoard (int board)
 Mark a given register board as reachable. More...
 
void ungrabRegs ()
 Release the database. More...
 
void ungrabRegs ()
 Release the database. More...
 
bool verifyBoard (int board)
 Return the value of the status register of a given register board. More...
 
void 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. More...
 
 ~SzaRegDb ()
 Destructor. More...
 
 ~SzaRegDb ()
 Destructor. More...
 

Friends

class SzaShare
 SzaShare will access our members directly. More...
 

Detailed Description

Access to the register database and its shadow registers is provided through an object of the following type.

Definition at line 83 of file Share.h.

Constructor & Destructor Documentation

sza::antenna::control::SzaShare::SzaRegDb::SzaRegDb ( )

Constructor.

Exceptions
Exception
sza::antenna::control::SzaShare::SzaRegDb::~SzaRegDb ( )

Destructor.

sza::antenna::control::SzaShare::SzaRegDb::SzaRegDb ( )

Constructor.

Exceptions
Exception
sza::antenna::control::SzaShare::SzaRegDb::~SzaRegDb ( )

Destructor.

Member Function Documentation

RegMapBoard* sza::antenna::control::SzaShare::SzaRegDb::findRegMapBoard ( std::string  boardName)

Look up a board in the register map.

RegMapBoard* sza::antenna::control::SzaShare::SzaRegDb::findRegMapBoard ( std::string  boardName)

Look up a board in the register map.

void sza::antenna::control::SzaShare::SzaRegDb::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().

Parameters
boardint The index of the board to flag.
Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::grabRegs ( TimeOut  timeout)

Acquire exclusive access to the database.

Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::grabRegs ( TimeOut  timeout)

Acquire exclusive access to the database.

Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::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.

Parameters
blkRegMapBlock * The register block to read from.
firstunsigned The block index of the first element to be read.
nregunsigned The number of register elements to be read.
valueunsigned * The output array.
void sza::antenna::control::SzaShare::SzaRegDb::SzaShare::SzaRegDb::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().

Parameters
boardint The index of the board to flag.
Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::SzaShare::SzaRegDb::unflagBoard ( int  board)

Mark a given register board as reachable.

This sets the status register of the specified board to 0.

Parameters
boardint The index of the board to unflag.
Exceptions
Exception
bool sza::antenna::control::SzaShare::SzaRegDb::SzaShare::SzaRegDb::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.

Parameters
boardint The index of the board to verify.
Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::unflagBoard ( int  board)

Mark a given register board as reachable.

This sets the status register of the specified board to 0.

Parameters
boardint The index of the board to unflag.
Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::ungrabRegs ( )

Release the database.

Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::ungrabRegs ( )

Release the database.

Exceptions
Exception
bool sza::antenna::control::SzaShare::SzaRegDb::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.

Parameters
boardint The index of the board to verify.
Exceptions
Exception
void sza::antenna::control::SzaShare::SzaRegDb::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.

Parameters
blkRegMapBlock * The register block to write from.
firstunsigned The block index of the first element to be written.
nregunsigned The number of register elements to be written.
valueunsigned * The array of values to be written.

Friends And Related Function Documentation

SzaShare
friend

SzaShare will access our members directly.

Definition at line 193 of file Share.h.


The documentation for this class was generated from the following files: