My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::antenna::control::SpecificShare::SpecificRegDb Class Reference

#include <SpecificShare.h>

Public Member Functions

 SpecificRegDb ()
 
 ~SpecificRegDb ()
 
void grabRegs (TimeOut timeout)
 
void ungrabRegs ()
 
RegMapBoard * findRegMapBoard (std::string boardName)
 
void flagBoard (int board)
 
void unflagBoard (int board)
 
bool verifyBoard (int board)
 

Friends

class SpecificShare
 

Detailed Description

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

Constructor & Destructor Documentation

SpecificShare::SpecificRegDb::SpecificRegDb ( )

Constructor.

Exceptions
Exception....................................................................... Create the register database.
SpecificShare::SpecificRegDb::~SpecificRegDb ( )

Destructor.

....................................................................... Destructor for a register-database object.

Member Function Documentation

RegMapBoard * SpecificShare::SpecificRegDb::findRegMapBoard ( std::string  boardName)

Look up a board in the register map

....................................................................... Look up a board in the register map

void SpecificShare::SpecificRegDb::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 SpecificShare::SpecificRegDb::grabRegs ( TimeOut  timeout)

Acquire exclusive access to the database.

Exceptions
Exception....................................................................... Acquire exclusive access to the database.

Input: timeout int How long to wait for the database to become available. This is one of the following special values:

NO_WAIT - Return immediately if another task is using the database. WAIT_FOREVER - Don't timeout.

void SpecificShare::SpecificRegDb::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....................................................................... Mark a given register board as reachable. This sets the status register of the specified board to 0.

Input: board int The index of the board to unflag.

void SpecificShare::SpecificRegDb::ungrabRegs ( )

Release the database.

Exceptions
Exception....................................................................... Relinquish exclusive access to the database.
bool SpecificShare::SpecificRegDb::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....................................................................... 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.

Input: board int The index of the board to verify. Output: return int 1 - The board is marked as ok. 0 - The board is marked as unreachable, or an error occured in the function.

Friends And Related Function Documentation

friend class SpecificShare
friend

SpecificShare will access our members directly.


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