#include <BocCard.h>
Collaboration diagram for SctPixelRod::BocCard:
Public Member Functions | |
BocCard (RodModule &rod) | |
UINT32 | getSerialNumber () |
UINT32 | getManufacturer () |
UINT32 | getModuleType () |
UINT32 | getHardwareRevision () |
UINT32 | getFirmwareRevision () |
RodModule * | getRod () |
void | initialize () |
void | reset () |
void | status () |
void | getLaserCurrent (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getLaserCurrent (const UINT32 channel) throw (BocException&) |
void | setLaserCurrent (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setLaserCurrent (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getRxThreshold (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getRxThreshold (const UINT32 channel) throw (BocException&) |
void | setRxThreshold (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setRxThreshold (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getRxDataDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getRxDataDelay (const UINT32 channel) throw (BocException&) |
void | setRxDataDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setRxDataDelay (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getStrobeDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getStrobeDelay (const UINT32 channel) throw (BocException&) |
void | setStrobeDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setStrobeDelay (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getBpmStreamInhibit (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getBpmStreamInhibit (const UINT32 channel) throw (BocException&) |
void | setBpmStreamInhibit (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setBpmStreamInhibit (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getBpmMarkSpace (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getBpmMarkSpace (const UINT32 channel) throw (BocException&) |
void | setBpmMarkSpace (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setBpmMarkSpace (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getBpmCoarseDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getBpmCoarseDelay (const UINT32 channel) throw (BocException&) |
void | setBpmCoarseDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setBpmCoarseDelay (const UINT32 channel, const UINT32 value) throw (BocException&) |
void | getBpmFineDelay (const UINT32 channel, UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
UINT32 | getBpmFineDelay (const UINT32 channel) throw (BocException&) |
void | setBpmFineDelay (const UINT32 channel, const UINT32 buffer[], const UINT32 numChannels) throw (BocException&) |
void | setBpmFineDelay (const UINT32 channel, const UINT32 value) throw (BocException&) |
UINT32 | getClockControl () |
void | setClockControl (const UINT32 value) throw (BocException&) |
UINT32 | getRxDataMode () |
void | setRxDataMode (const UINT32 value) throw (BocException&) |
UINT32 | getRxDacClear () |
void | clearRxDac () |
UINT32 | getTxDacClear () |
void | clearTxDac () |
UINT32 | getVernierFinePhase () |
void | setVernierFinePhase (const UINT32 value) throw (BocException&) |
UINT32 | getVernierClockPhase0 () |
void | setVernierClockPhase0 (const UINT32 value) throw (BocException&) |
UINT32 | getVernierClockPhase1 () |
void | setVernierClockPhase1 (const UINT32 value) throw (BocException&) |
UINT32 | getBpmClockPhase () |
void | setBpmClockPhase (const UINT32 value) throw (BocException&) |
UINT32 | getBregClockPhase () |
void | setBregClockPhase (const UINT32 value) throw (BocException&) |
UINT32 | getBocReset () |
void | resetBoc () |
UINT32 | getBpmReset () |
void | resetBpm () |
UINT32 | getVpinReset () |
void | resetVpin () |
UINT32 | getBocOkReset () |
void | resetBocOk () |
UINT32 | getBocStatusRegister () |
double | getMonitorAdc (const UINT32 channel, std::string &units, std::string &type) throw (BocException&) |
double | getMonitorAdc (const UINT32 channel) throw (BocException&) |
std::string | getMonitorAdcUnits (const UINT32 channel) throw (BocException&) |
std::string | getMonitorAdcType (const UINT32 channel) throw (BocException&) |
void | resetMonitorAdc () |
UINT32 | getInterlockStatus (UINT32 *localEnable, UINT32 *remoteEnable) |
UINT32 | getInterlockStatus () |
Private Member Functions | |
UINT32 | singleRead (const UINT32 bocAddress) throw (BocException&) |
Read and write to single BOC registers. | |
void | singleWrite (const UINT32 bocAddress, const UINT32 value) throw (BocException&) |
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 | |
RodModule * | m_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. | |
UINT32 | m_bocMask |
BOC setup bus mask. |
Definition at line 151 of file BocCard.h.
|
Read and write to a block of BOC registers.
|
|
Read and write to BPM streams.
|
|
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. |
|
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. |
|
getBocOkReset() reads the contents of the BOC_OK Reset register. |
|
getBocReset() reads the contents of the BOC Reset register. |
|
getBocStatusRegister() reads the contents of the BOC Status register. This is a readonly register, hence there is no "set" method provided. |
|
getBpmClockPhase() reads the contents of the BPM Clock Phase register. |
|
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. |
|
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. |
|
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. |
|
getBpmReset() reads the contents of the BPM Reset register. |
|
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. |
|
getBregClockPhase() reads the contents of the BREG Clock Phase register. |
|
getClockControl() reads the contents of the Clock Control register. |
|
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. |
|
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. |
|
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. The method is now (11 March 2004) overloaded to provide the units and type of quantity monitored if desired. |
|
getMonitorAdcType() returns the type of information monitored (PIN current, PIN voltage or temperature). |
|
getMonitorAdcUnits() returns the units in which the channel monitoring is reported by getMonitorAdc(). |
|
getRxDacClear() reads the contents of the Rx Dac Clear register. |
|
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. |
|
getRxDataMode() reads the contents of the Data Mode register. |
|
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. |
|
getStrobeDelay() reads the contents of one or more 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. Note that these registers no longer do anything that is of practical use - the methods are retained for completeness and might be made private at a later date. |
|
getTxDacClear() reads the contents of the Tx Dac Clear register. |
|
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. |
|
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. |
|
getVernierFinePhase() reads the contents of the Vernier Fine Phase register. |
|
getVpinReset() reads the contents of the Vpin Reset register. |
|
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). |
|
reset() issues a reset to all parts of the BOC. |
|
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. |
|
resetBocOk() resets the BOC_OK register on the BOC by writing 1 followed by 0 to the BOC_OK Reset register. A method to write a specific value to the register is not provided as this would not be a useful operation. |
|
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. |
|
resetMonitorAdc() initialises the monitoring ADC chip. This is done in the initialisation method, but can be redone any time. |
|
resetVpin() resets the Vpin register 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. |
|
setBpmClockPhase() writes the contents of the BPM Clock Phase register. |
|
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. |
|
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. |
|
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. |
|
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. |
|
setBregClockPhase() writes the contents of the BREG Clock Phase register. |
|
setClockControl() writes the contents of the Clock Control register. |
|
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. |
|
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. |
|
setRxDataMode() writes the contents of the Data Mode register. |
|
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. |
|
setStrobeDelay() writes the contents of one or more strobe delay registers. The method is overloaded to write either a number of consecutive channels from a starting channel number, or a single channel. Note that these registers no longer do anything that is of practical use - the methods are retained for completeness and might be made private at a later date. |
|
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. |
|
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. |
|
setVernierFinePhase() writes the contents of the Vernier Fine Phase register. |
|
Read and write to single BOC registers.
|
|
BOC setup bus mask. This is the maximum width of any data to be read or written via the setup bus. |
|
BOC type. This identifies the different BOC revisions, deduced from the upper 3 bits of the Hardware Revision register (modified 3 March 2004). |
|
BOC firmware revision (read in initialize method).
|
|
BOC hardware revision (read in initialize method). This variable holds the lower 5 bits of the register only now. |
|
BOC manufacturer (read in initialize method). Should be 0xCB.
|
|
BOC module type (read in initialize method).
|
|
Handle for the ROD through which this BOC is accessed.
|
|
BOC serial number (read in initialize method). Set on a pair of hex switches.
|