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

Encapsulate details about the registers of the pmac board. More...

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

Inheritance diagram for sza::antenna::control::PmacBoard:
sza::antenna::control::Board

Public Member Functions

void commandNewPosition (PmacTarget *pmac)
 Tell the PMAC to read a new position. More...
 
bool connect ()
 Public interface to PmacComms::connect() to connect to the pmac. More...
 
void disconnect ()
 Public interface to PmacComms::disconnect() to connect to the pmac. More...
 
unsigned char driveStatusToBit (unsigned int driveStatus)
 
bool isBusy ()
 
bool isBusyOld ()
 Returns true if the Pmac isn't ready to receive a new command. More...
 
void mirrorDpramToSharedMemory ()
 Mirror the DPRAM to shared memory. More...
 
 PmacBoard (SzaShare *share, std::string name, bool simPmac=false)
 Constructor function for this board. More...
 
bool pmacIsConnected ()
 Return true if the pmac is connected. More...
 
bool readPosition (AxisPositions *axes, Model *model)
 Read the pmac monitor data to update our view of where the telescope axes are currently positioned. More...
 
unsigned int readPositionFault ()
 Return the current value of the PMAC position-fault flag. More...
 
 ~PmacBoard ()
 Destructor function for this board. More...
 
- Public Member Functions inherited from 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). 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 reset ()
 Function to reset private members of a board-management object. 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...
 

Additional Inherited Members

- Protected Attributes inherited from sza::antenna::control::Board
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

Encapsulate details about the registers of the pmac board.

Definition at line 31 of file PmacBoard.h.

Constructor & Destructor Documentation

sza::antenna::control::PmacBoard::PmacBoard ( SzaShare share,
std::string  name,
bool  simPmac = false 
)

Constructor function for this board.

Exceptions
Exception
sza::antenna::control::PmacBoard::~PmacBoard ( )

Destructor function for this board.

Member Function Documentation

void sza::antenna::control::PmacBoard::commandNewPosition ( PmacTarget *  pmac)

Tell the PMAC to read a new position.

Exceptions
Exception
bool sza::antenna::control::PmacBoard::connect ( )

Public interface to PmacComms::connect() to connect to the pmac.

void sza::antenna::control::PmacBoard::disconnect ( )

Public interface to PmacComms::disconnect() to connect to the pmac.

bool sza::antenna::control::PmacBoard::isBusyOld ( )

Returns true if the Pmac isn't ready to receive a new command.

void sza::antenna::control::PmacBoard::mirrorDpramToSharedMemory ( )

Mirror the DPRAM to shared memory.

bool sza::antenna::control::PmacBoard::pmacIsConnected ( )

Return true if the pmac is connected.

bool sza::antenna::control::PmacBoard::readPosition ( AxisPositions axes,
Model model 
)

Read the pmac monitor data to update our view of where the telescope axes are currently positioned.

This function must not be called until lacking_ & (PTG_ZEROS | PTG_ENCODERS) is zero.

Parameters
axesAxisPositions * The telescope position will be recorded in a container of this type.
Exceptions
Exception
unsigned int sza::antenna::control::PmacBoard::readPositionFault ( )

Return the current value of the PMAC position-fault flag.

Exceptions
Exception

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