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

#include <PmacBoard.h>

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

Public Member Functions

 PmacBoard (SpecificShare *share, std::string name, bool simPmac=false)
 
 ~PmacBoard ()
 
bool isBusyOld ()
 
bool isBusy ()
 
unsigned int readPositionFault ()
 
void commandNewPosition (PmacTarget *pmac)
 
void strobeServo ()
 
bool readPosition (AxisPositions *axes, Model *model)
 
bool connect ()
 
void disconnect ()
 
void mirrorDpramToSharedMemory ()
 
bool pmacIsConnected ()
 
unsigned char driveStatusToBit (unsigned int driveStatus)
 
- Public Member Functions inherited from gcp::antenna::control::Board
 Board (SpecificShare *share, std::string name)
 
 Board (SpecificShare *share, gcp::util::AntNum ant)
 
 Board (SpecificShare *share)
 
 Board ()
 
virtual ~Board ()
 
RegMapBlock * findReg (char *name)
 
bool isReachable ()
 
virtual void reset ()
 
int getIndex ()
 
virtual void readRegNoLock (RegMapBlock *blk, unsigned int first, unsigned int nreg, unsigned int *value)
 
virtual void readReg (RegMapBlock *blk, unsigned int first, unsigned int nreg, float *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, signed char *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, signed short *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, int *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned int *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
virtual void writeRegNoLock (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, signed char *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned char *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, signed short *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned short *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, int *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, unsigned int *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, float *value)
 
virtual void writeReg (RegMapBlock *blk, unsigned first, unsigned nreg, double *value)
 

Additional Inherited Members

- Protected Attributes inherited from gcp::antenna::control::Board
SpecificShareshare_
 
RegMapBoard * board_
 
bool hasBoard_
 

Detailed Description

Encapsulate details about the registers of the pmac board.

Constructor & Destructor Documentation

PmacBoard::PmacBoard ( SpecificShare share,
std::string  name,
bool  simPmac = false 
)

Constructor function for this board

Exceptions
Exception....................................................................... Constructor for PMAC board class. This calls the base-class constructor with the board as the first argument
Exception
PmacBoard::~PmacBoard ( )

Destructor function for this board

....................................................................... Destructor.

Member Function Documentation

void PmacBoard::commandNewPosition ( PmacTarget pmac)

Tell the PMAC to read a new position

....................................................................... Tell the PMAC to read a new position

bool PmacBoard::connect ( )

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

....................................................................... A public method to connect to the pmac.

void PmacBoard::disconnect ( )

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

....................................................................... A public method to disconnect from the pmac.

bool PmacBoard::isBusy ( )

....................................................................... Return 1 if the pmac is either unreachable or its newPosition flag is still clear. This indicates that the pmac isn't ready to receive a new command.

bool PmacBoard::isBusyOld ( )

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

....................................................................... Return 1 if the pmac is either unreachable or its newPosition flag is still clear. This indicates that the pmac isn't ready to receive a new command.

void PmacBoard::mirrorDpramToSharedMemory ( )

Mirror the DPRAM to shared memory.

....................................................................... Mirror the DPRAM image to shared memory.

We may want to use SzaShare::writeRawReg() for speed, but for now, just use the normal interface for simplicity.

bool PmacBoard::pmacIsConnected ( )

Return true if the pmac is connected.

....................................................................... Return true if the pmac is connected.

bool 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 PmacBoard::readPositionFault ( )

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

Exceptions
Exception....................................................................... Return the current value of the PMAC position-fault flag.
void PmacBoard::strobeServo ( )

....................................................................... Tell the servo to return its position information


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