Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

SctPixelRod::BocCard Class Reference

BocCard: A class for setting-up etc. the BOC. This class contains the methods to set up a BOC. The name BocCard was chosen because the possibly more obvious "BocModule" implies that this class is derived from VmeModule. In fact it relies on RodModule for the interface to the BOC. More...

#include <BocCard.h>


Public Member Functions

 BocCard (RodModule &rod)
 ~BocCard ()
UINT32 getSerialNumber ()
UINT32 getManufacturer ()
UINT32 getModuleType ()
UINT32 getHardwareRevision ()
UINT32 getFirmwareRevision ()
RodModulegetRod ()
void initialize ()
void reset ()
void status ()
void getLaserCurrent (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getLaserCurrent (const UINT32 channel)
void setLaserCurrent (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setLaserCurrent (const UINT32 channel, const UINT32 value)
void getRxThreshold (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getRxThreshold (const UINT32 channel)
void setRxThreshold (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setRxThreshold (const UINT32 channel, const UINT32 value)
void getRxDataDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getRxDataDelay (const UINT32 channel)
void setRxDataDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setRxDataDelay (const UINT32 channel, const UINT32 value)
void getStrobeDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getStrobeDelay (const UINT32 channel)
void setStrobeDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setStrobeDelay (const UINT32 channel, const UINT32 value)
void getBpmStreamInhibit (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getBpmStreamInhibit (const UINT32 channel)
void setBpmStreamInhibit (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setBpmStreamInhibit (const UINT32 channel, const UINT32 value)
void getBpmMarkSpace (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getBpmMarkSpace (const UINT32 channel)
void setBpmMarkSpace (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setBpmMarkSpace (const UINT32 channel, const UINT32 value)
void getBpmCoarseDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getBpmCoarseDelay (const UINT32 channel)
void setBpmCoarseDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setBpmCoarseDelay (const UINT32 channel, const UINT32 value)
void getBpmFineDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels)
UINT32 getBpmFineDelay (const UINT32 channel)
void setBpmFineDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels)
void setBpmFineDelay (const UINT32 channel, const UINT32 value)
UINT32 getClockControl ()
void setClockControl (const UINT32 value)
UINT32 getRxDataMode ()
void setRxDataMode (const UINT32 value)
UINT32 getRxDacClear ()
void clearRxDac ()
UINT32 getTxDacClear ()
void clearTxDac ()
UINT32 getVernierFinePhase ()
void setVernierFinePhase (const UINT32 value)
UINT32 getVernierClockPhase0 ()
void setVernierClockPhase0 (const UINT32 value)
UINT32 getVernierClockPhase1 ()
void setVernierClockPhase1 (const UINT32 value)
UINT32 getBpmClockPhase ()
void setBpmClockPhase (const UINT32 value)
UINT32 getBregClockPhase ()
void setBregClockPhase (const UINT32 value)
UINT32 getBocReset ()
void resetBoc ()
UINT32 getBpmReset ()
void resetBpm ()
UINT32 getVpinReset ()
void resetVpin ()
UINT32 getBocStatusRegister ()
double getMonitorAdc (const UINT32 channel)
void resetMonitorAdc ()
UINT32 getInterlockStatus (UINT32 *localEnable, UINT32 *remoteEnable)
UINT32 getInterlockStatus ()

Private Member Functions

UINT32 singleRead (const UINT32 bocAddress)
 Read and write to single BOC registers.

void singleWrite (const UINT32 bocAddress, const UINT32 value)
void blockRead (const UINT32 bocAddress, UINT32 buffer[], const INT32 length)
 Read and write to a block of BOC registers.

void blockWrite (const UINT32 bocAddress, const UINT32 buffer[], const INT32 length)
UINT32 bpmRead (const UINT32 bpm, const UINT32 stream, const UINT32 offset)
 Read and write to BPM streams.

void bpmWrite (const UINT32 bpm, const UINT32 stream, const UINT32 offset, const UINT32 value)

Private Attributes

RodModulem_myrod
 Handle for the ROD through which this BOC is accessed.

UINT32 m_serialNumber
 BOC serial number (read in initialize method). Set on a pair of hex switches.

UINT32 m_manufacturer
 BOC manufacturer (read in initialize method). Should be 0xCB.

UINT32 m_moduleType
 BOC module type (read in initialize method).

UINT32 m_hardwareRevision
 BOC hardware revision (read in initialize method).

UINT32 m_firmwareRevision
 BOC firmware revision (read in initialize method).

UINT32 m_bocType
 BOC type.


Detailed Description

BocCard: A class for setting-up etc. the BOC. This class contains the methods to set up a BOC. The name BocCard was chosen because the possibly more obvious "BocModule" implies that this class is derived from VmeModule. In fact it relies on RodModule for the interface to the BOC.

Author:
John Hill (hill@hep.phy.cam.ac.uk) - originator

Definition at line 92 of file BocCard.h.


Constructor & Destructor Documentation

SctPixelRod::BocCard::BocCard RodModule   rod
 

SctPixelRod::BocCard::~BocCard  
 


Member Function Documentation

void SctPixelRod::BocCard::blockRead const UINT32    bocAddress,
UINT32    buffer[],
const INT32    length
[private]
 

Read and write to a block of BOC registers.

void SctPixelRod::BocCard::blockWrite const UINT32    bocAddress,
const UINT32    buffer[],
const INT32    length
[private]
 

UINT32 SctPixelRod::BocCard::bpmRead const UINT32    bpm,
const UINT32    stream,
const UINT32    offset
[private]
 

Read and write to BPM streams.

void SctPixelRod::BocCard::bpmWrite const UINT32    bpm,
const UINT32    stream,
const UINT32    offset,
const UINT32    value
[private]
 

void SctPixelRod::BocCard::clearRxDac  
 

clearRxDac() clears the Rx Dac register by writing 1 followed by 0 to the register. A method to write a specific value to the register is not provided, as this is not a meaningful operation for the user.

void SctPixelRod::BocCard::clearTxDac  
 

clearTxDac() clears the Tx Dac register by writing 1 followed by 0 to the register. A method to write a specific value to the register is not provided, as this is not a meaningful operation for the user.

UINT32 SctPixelRod::BocCard::getBocReset  
 

getBocReset() reads the contents of the BOC Reset register.

UINT32 SctPixelRod::BocCard::getBocStatusRegister  
 

getBocStatusRegister() reads the contents of the BOC Status register. This is a readonly register, hence there is no "set" method provided.

UINT32 SctPixelRod::BocCard::getBpmClockPhase  
 

getBpmClockPhase() reads the contents of the BPM Clock Phase register.

UINT32 SctPixelRod::BocCard::getBpmCoarseDelay const UINT32    channel
 

void SctPixelRod::BocCard::getBpmCoarseDelay const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getBpmCoarseDelay() reads the contents of one or more BPM coarse delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBpmFineDelay const UINT32    channel
 

void SctPixelRod::BocCard::getBpmFineDelay const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getBpmFineDelay() reads the contents of one or more BPM fine delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBpmMarkSpace const UINT32    channel
 

void SctPixelRod::BocCard::getBpmMarkSpace const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getBpmMarkSpace() reads the contents of one or more BPM mark/space registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBpmReset  
 

getBpmReset() reads the contents of the BPM Reset register.

UINT32 SctPixelRod::BocCard::getBpmStreamInhibit const UINT32    channel
 

void SctPixelRod::BocCard::getBpmStreamInhibit const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getBpmStreamInhibit() reads the contents of one or more BPM stream inhibit registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

UINT32 SctPixelRod::BocCard::getBregClockPhase  
 

getBregClockPhase() reads the contents of the BREG Clock Phase register.

UINT32 SctPixelRod::BocCard::getClockControl  
 

getClockControl() reads the contents of the Clock Control register.

UINT32 SctPixelRod::BocCard::getFirmwareRevision   [inline]
 

Definition at line 107 of file BocCard.h.

References m_firmwareRevision.

UINT32 SctPixelRod::BocCard::getHardwareRevision   [inline]
 

Definition at line 106 of file BocCard.h.

References m_hardwareRevision.

UINT32 SctPixelRod::BocCard::getInterlockStatus  
 

UINT32 SctPixelRod::BocCard::getInterlockStatus UINT32 *    localEnable,
UINT32 *    remoteEnable
 

getInterlockStatus() returns the status of the laser interlocks. The returned value is 0 if there is an interlock, 1 if not. The relevant bits on the status register are used. The state of the local enable and remote enable can be returned in the arguments, to give extra information if required - the method is overloaded so that the user can avoid this complication if necessary.

UINT32 SctPixelRod::BocCard::getLaserCurrent const UINT32    channel
 

void SctPixelRod::BocCard::getLaserCurrent const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getLaserCurrent() reads the contents of one or more Tx laser current DACs. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

UINT32 SctPixelRod::BocCard::getManufacturer   [inline]
 

Definition at line 104 of file BocCard.h.

References m_manufacturer.

UINT32 SctPixelRod::BocCard::getModuleType   [inline]
 

Definition at line 105 of file BocCard.h.

References m_moduleType.

double SctPixelRod::BocCard::getMonitorAdc const UINT32    channel
 

getMonitorAdc() gets the reading for a single channel of the monitoring ADC on the BOC. The returned value is in "natural" units: mA for current, V for voltage and degrees C for temperature.

RodModule* SctPixelRod::BocCard::getRod   [inline]
 

Definition at line 108 of file BocCard.h.

References m_myrod.

UINT32 SctPixelRod::BocCard::getRxDacClear  
 

getRxDacClear() reads the contents of the Rx Dac Clear register.

UINT32 SctPixelRod::BocCard::getRxDataDelay const UINT32    channel
 

void SctPixelRod::BocCard::getRxDataDelay const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getRxDataDelay() reads the contents of one or more Rx data delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

UINT32 SctPixelRod::BocCard::getRxDataMode  
 

getRxDataMode() reads the contents of the Data Mode register.

UINT32 SctPixelRod::BocCard::getRxThreshold const UINT32    channel
 

void SctPixelRod::BocCard::getRxThreshold const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getRxThreshold() reads the contents of one or more Rx threshold DACs. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

UINT32 SctPixelRod::BocCard::getSerialNumber   [inline]
 

Definition at line 103 of file BocCard.h.

References m_serialNumber.

UINT32 SctPixelRod::BocCard::getStrobeDelay const UINT32    channel
 

void SctPixelRod::BocCard::getStrobeDelay const UINT32    channel,
UINT32    buffer[],
const UINT32    numChannels
 

getRxStrobeDelay() reads the contents of one or more Rx strobe delay registers. The method is overloaded to return either a number of consecutive channels from a starting channel number in a buffer, or a single channel via the method return value.

UINT32 SctPixelRod::BocCard::getTxDacClear  
 

getTxDacClear() reads the contents of the Tx Dac Clear register.

UINT32 SctPixelRod::BocCard::getVernierClockPhase0  
 

getVernierClockPhase0() reads the contents of the Vernier Clock Phase register 0. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

UINT32 SctPixelRod::BocCard::getVernierClockPhase1  
 

getVernierClockPhase1() reads the contents of the Vernier Clock Phase register 1. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

UINT32 SctPixelRod::BocCard::getVernierFinePhase  
 

getVernierFinePhase() reads the contents of the Vernier Fine Phase register.

UINT32 SctPixelRod::BocCard::getVpinReset  
 

getVpinReset() reads the contents of the Vpin Reset register.

void SctPixelRod::BocCard::initialize  
 

initialize() sets the BOC into a well-defined state. Power-on should set the BOC into much the same state, but we may wish to do this to recover that state without power cycling.

Activities: Reset the BOC Read the read-only registers Set clock registers Initialize the I2C busses by writing to each in turn Set 0xFF into the Rx thresholds Set 0x00 into the data delays, strobe delays and laser current DACs Reset the BPM12 chips Set the defaults values for the BPM12 chips (including the test structures).

void SctPixelRod::BocCard::reset  
 

reset() issues a BOC reset

void SctPixelRod::BocCard::resetBoc  
 

resetBoc() resets the BOC by writing 1 followed by 0 to the Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::resetBpm  
 

resetBpm() resets the BPM registers on the BOC by writing 1 followed by 0 to the BPM Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::resetMonitorAdc  
 

resetMonitorAdc() initialises the monitoring ADC chip. This is done in the initialisation method, but can be redone any time.

void SctPixelRod::BocCard::resetVpin  
 

resetVpin() resets the Vpin registers on the BOC by writing 1 followed by 0 to the Vpin Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation.

void SctPixelRod::BocCard::setBpmClockPhase const UINT32    value
 

setBpmClockPhase() writes the contents of the BPM Clock Phase register.

void SctPixelRod::BocCard::setBpmCoarseDelay const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setBpmCoarseDelay const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setBpmCoarseDelay() writes the contents of one or more BPM coarse delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmFineDelay const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setBpmFineDelay const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setBpmFineDelay() writes the contents of one or more BPM fine delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmMarkSpace const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setBpmMarkSpace const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setBpmMarkSpace() writes the contents of one or more BPM mark/space registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBpmStreamInhibit const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setBpmStreamInhibit const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setBpmStreamInhibit() writes the contents of one or more BPM stream inhibit registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. "Channel" refers to the BOC channel number - the BPM stream number mapping is dealt with internally.

void SctPixelRod::BocCard::setBregClockPhase const UINT32    value
 

setBregClockPhase() writes the contents of the BREG Clock Phase register.

void SctPixelRod::BocCard::setClockControl const UINT32    value
 

setClockControl() writes the contents of the Clock Control register.

void SctPixelRod::BocCard::setLaserCurrent const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setLaserCurrent const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setLaserCurrent() writes the contents of one or more Tx laser current DACs. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setRxDataDelay const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setRxDataDelay const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setRxDataDelay() writes the contents of one or more Rx data delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setRxDataMode const UINT32    value
 

setRxDataMode() writes the contents of the Data Mode register.

void SctPixelRod::BocCard::setRxThreshold const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setRxThreshold const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setRxThreshold() writes the contents of one or more Rx threshold DACs. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setStrobeDelay const UINT32    channel,
const UINT32    value
 

void SctPixelRod::BocCard::setStrobeDelay const UINT32    channel,
const UINT32    buffer[],
const UINT32    numChannels
 

setRxStrobeDelay() writes the contents of one or more Rx strobe delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel.

void SctPixelRod::BocCard::setVernierClockPhase0 const UINT32    value
 

setVernierClockPhase0() writes the contents of the Vernier Clock Phase register 0. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

void SctPixelRod::BocCard::setVernierClockPhase1 const UINT32    value
 

setVernierClockPhase1() writes the contents of the Vernier Clock Phase register 1. This is one of two clock phase registers allowing the user to set a delay of up to 50 nsec.

void SctPixelRod::BocCard::setVernierFinePhase const UINT32    value
 

setVernierFinePhase() writes the contents of the Vernier Fine Phase register.

UINT32 SctPixelRod::BocCard::singleRead const UINT32    bocAddress [private]
 

Read and write to single BOC registers.

void SctPixelRod::BocCard::singleWrite const UINT32    bocAddress,
const UINT32    value
[private]
 

void SctPixelRod::BocCard::status  
 


Field Documentation

UINT32 SctPixelRod::BocCard::m_bocType [private]
 

BOC type.

This identifies the different BOC revisions, deduced from a combination of module type and hardware revision.

Definition at line 520 of file BocCard.h.

UINT32 SctPixelRod::BocCard::m_firmwareRevision [private]
 

BOC firmware revision (read in initialize method).

Definition at line 516 of file BocCard.h.

Referenced by getFirmwareRevision().

UINT32 SctPixelRod::BocCard::m_hardwareRevision [private]
 

BOC hardware revision (read in initialize method).

Definition at line 512 of file BocCard.h.

Referenced by getHardwareRevision().

UINT32 SctPixelRod::BocCard::m_manufacturer [private]
 

BOC manufacturer (read in initialize method). Should be 0xCB.

Definition at line 504 of file BocCard.h.

Referenced by getManufacturer().

UINT32 SctPixelRod::BocCard::m_moduleType [private]
 

BOC module type (read in initialize method).

Definition at line 508 of file BocCard.h.

Referenced by getModuleType().

RodModule* SctPixelRod::BocCard::m_myrod [private]
 

Handle for the ROD through which this BOC is accessed.

Definition at line 496 of file BocCard.h.

Referenced by getRod().

UINT32 SctPixelRod::BocCard::m_serialNumber [private]
 

BOC serial number (read in initialize method). Set on a pair of hex switches.

Definition at line 500 of file BocCard.h.

Referenced by getSerialNumber().


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:38:06 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3