CARMA C++
sza::antenna::control::Board Class Reference

A class which encapsulates resources of a board of the shared register map. More...

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

Inheritance diagram for sza::antenna::control::Board:
sza::antenna::canbus::CanDevice sza::antenna::control::CameraBoard sza::antenna::control::FrameBoard sza::antenna::control::GpsBoard sza::antenna::control::PmacBoard sza::antenna::control::QuadShiftBoard sza::antenna::control::TrackerBoard

Public Member Functions

 Board (SzaShare *share, std::string name)
 Constructor looks up a board by name and stores a pointer to it in private member board_ (below). More...
 
 Board (SzaShare *share, sza::util::AntNum ant)
 Constructor looks up the rx board corresponding to the requested antenna and stores a pointer to it in private member board_ (below) More...
 
 Board (SzaShare *share)
 Constructor for a virtual board. More...
 
RegMapBlock * findReg (char *name)
 Return a pointer to a register of the board managed by this object. More...
 
int getIndex ()
 Public function to return the index of this board in the register database. More...
 
bool isReachable ()
 Verify that this board is reachable. More...
 
virtual void readReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 Method to read a register from this board. More...
 
virtual void reset ()
 Function to reset private members of a board-management object. More...
 
virtual void writeReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 Methods to write to a register of this board. More...
 
virtual void writeReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, bool *value)
 Methods to write to a register of this board. More...
 
virtual ~Board ()
 Declaration of destructor as pure virtual prevents instantiation of this base class. More...
 

Protected Attributes

RegMapBoard * board_
 A pointer to the board this object refers to. More...
 
bool hasBoard_
 True if this Board has a real board corresponding to it. More...
 
SzaShareshare_
 The resource object of the shared memory database. More...
 

Detailed Description

A class which encapsulates resources of a board of the shared register map.

Definition at line 24 of file Board.h.

Constructor & Destructor Documentation

sza::antenna::control::Board::Board ( SzaShare share,
std::string  name 
)

Constructor looks up a board by name and stores a pointer to it in private member board_ (below).

Exceptions
Exception
sza::antenna::control::Board::Board ( SzaShare share,
sza::util::AntNum  ant 
)

Constructor looks up the rx board corresponding to the requested antenna and stores a pointer to it in private member board_ (below)

Exceptions
Exception
sza::antenna::control::Board::Board ( SzaShare share)

Constructor for a virtual board.

Exceptions
Exception
virtual sza::antenna::control::Board::~Board ( )
virtual

Declaration of destructor as pure virtual prevents instantiation of this base class.

Member Function Documentation

RegMapBlock* sza::antenna::control::Board::findReg ( char *  name)

Return a pointer to a register of the board managed by this object.

Exceptions
Exception
int sza::antenna::control::Board::getIndex ( )

Public function to return the index of this board in the register database.

bool sza::antenna::control::Board::isReachable ( )

Verify that this board is reachable.

Exceptions
(indirectly)Exception
virtual void sza::antenna::control::Board::readReg ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg,
unsigned int *  value 
)
virtual

Method to read a register from this board.

virtual void sza::antenna::control::Board::reset ( )
virtual

Function to reset private members of a board-management object.

Should be overwritten by classes which inherit from Board

Exceptions
Exception

Reimplemented in sza::antenna::control::FrameBoard, and sza::antenna::control::GpsBoard.

Definition at line 81 of file Board.h.

virtual void sza::antenna::control::Board::writeReg ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg,
unsigned int *  value 
)
virtual

Methods to write to a register of this board.

virtual void sza::antenna::control::Board::writeReg ( RegMapBlock *  blk,
unsigned int  first,
unsigned int  nreg,
bool *  value 
)
virtual

Methods to write to a register of this board.

Member Data Documentation

RegMapBoard* sza::antenna::control::Board::board_
protected

A pointer to the board this object refers to.

Definition at line 117 of file Board.h.

bool sza::antenna::control::Board::hasBoard_
protected

True if this Board has a real board corresponding to it.

Todo:
Will we ever not have one??

Definition at line 125 of file Board.h.

SzaShare* sza::antenna::control::Board::share_
protected

The resource object of the shared memory database.

Definition at line 112 of file Board.h.


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