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

SctApi::CrateImpl Class Reference

A representation of the crate controller. More...

#include <crateImpl.h>

Inheritance diagram for SctApi::CrateImpl:

Inheritance graph
[legend]
Collaboration diagram for SctApi::CrateImpl:

Collaboration graph
[legend]

Public Member Functions

 CrateImpl (unsigned int partition, unsigned int crate, boost::shared_ptr< SctConfiguration::Configuration > newConf=boost::shared_ptr< SctConfiguration::Configuration >())
 Tell this crate which partition it belongs to.

 ~CrateImpl ()
 Delete all the RodModules and VmeInterface.

int initialiseCrate ()
 Return number of RODs initialised.

int initialiseTim ()
 Return 0 for success.

int initialiseRod (unsigned int rod)
 Store object in local map.

int initialiseBOC (unsigned int rod)
 Return 0 for success.

int configureBOC (unsigned int rod)
 Return 0 for success.

int sendPrimList (unsigned int rod, boost::shared_ptr< PrimListWrapper > prim)
 Return 0 for success.

int sendPrimListAll (boost::shared_ptr< PrimListWrapper > prim)
 Return 0 for success.

int awaitResponse (unsigned int rod, int timeout)
 Await response from a ROD within this crate.

int awaitResponseAll (int timeout)
 Handle text messages sent by the RODs (print to stdout).

boost::shared_ptr< SctPixelRod::RodOutListgetResponse (unsigned int rod)
 Return the response to the last primlist (a wrapped copy).

void setMrsStream (MRSStream *stream)
bool getRodMessage (unsigned int rod, char *buffer, unsigned long &length)
int mdspBlockRead (unsigned int rod, long dspStart, unsigned long *buffer, unsigned long numWords)
 Proxy for RodModule method.

int slvBlockRead (unsigned int rod, long dspStart, unsigned long *buffer, unsigned long numWords, long slaveNumber)
 Proxy for RodModule method.

int slvBlockWrite (unsigned int rod, long dspStart, unsigned long *buffer, unsigned long numWords, long dspNumber)
 Proxy for RodModule method.

int mdspBlockWrite (unsigned int rod, long dspStart, unsigned long *buffer, unsigned long numWords)
 Proxy for RodModule method.

unsigned long readRodStatusReg (unsigned int rod, long regNumber)
 Proxy for RodModule method.

unsigned long readRodCommandReg (unsigned int rod, long regNumber)
 Proxy for RodModule method.

unsigned long dspSingleRead (unsigned int rod, const unsigned long dspAddr, long dspNumber)
 Proxy for RodModule method.

int dspSingleWrite (unsigned int rod, unsigned long dspAddr, unsigned long buffer, long dspNumber)
 Proxy for RodModule method.

void status ()
 Print status of rods on crate.

void primListControl (unsigned int rod, PLControl function)
 Control the primitive list running on a rod (Untested).

void printBOCSetup (unsigned int rod)
 Print all BOC paramters as set up.

std::vector< SctConfiguration::BOCChannelConfigcurrentBOCSetup (unsigned int rod)
 Return channel parameters as stored in BOC.

void printBOCRegisters (unsigned int rod)
 Print all BOC registers.

SctConfiguration::BOCGlobalConfig currentBOCRegisters (unsigned int rod)
 Return global registers as stored in BOC.

void saveBOCSetup (unsigned int rod, BankType bank)
 Save BOC channel setup.

void saveBOCRegisters (unsigned int rod, BankType bank)
 Save BOC register setup.

void restoreBOCSetup (unsigned int rod, BankType bank)
 Restore BOC channel setup.

void restoreBOCRegisters (unsigned int rod, BankType bank)
 Restore BOC register setup.

bool checkBOCLasersOn (unsigned int rod)
 Check BOC laser interlock.

void enterBOCClockBy2Mode (unsigned int rod)
 Setup BOC to sample at 20MHz.

void leaveBOCClockBy2Mode (unsigned int rod)
 Restore BOC to 40MHz mode.

std::vector< double > getBOCMonitorArray (unsigned int rod)
 Return 12 monitor values from BOC ADCs.

void modifyBOCParam (unsigned int type, unsigned int val, bool raw)
void modifyBOCParam (unsigned int rod, unsigned int channel, unsigned int type, unsigned int val, bool raw)
 Modify parameter on BOC channel.

void lasersOff ()
 Turn all BOC laser currents to 0.

void timSetFrequency (double trigFreq, double rstFreq)
void freeTriggers ()
 Start the TIM generating regular triggers.

void stopTriggers ()
 Stop the TIM generating regular triggers.

void timL1A ()
 Tell the TIM to send an L1A.

void timCalL1A (int delay)
 Tell TIM to send Cal + L1A.

void timECR ()
void timBCR ()
void timFER ()
void sendTimBurst (int count)
 Tell TIM to send a burst of triggers.

void timVerbose ()
 Print all the Tim registers.

void timRegLoad (int reg, UINT16 val)
 Debug, load TIM register.

UINT16 timRegRead (int reg)
 Debug, read TIM register.

bool slavePresent (int rod, int index) const
 Check if a slave has been started.

void slaveStarted (int rod, int slave)
 Notify that slave was started externally...

bool RODPresent (int rod) const
 Check if a ROD has been configured.

std::list< unsigned > getListOfRods () const
 get list of rod identifiers on this crate

long getRodSlot (int rod) const
int getRodRevision (int rod) const
 Get ROD Revision.

void stopPolling ()
 Stop the primitive list polling.

void resumePolling ()
 Restart the primitive list polling.


Private Types

typedef std::map< unsigned
int, std::pair< RodStatus *,
SctPixelRod::RodModule * > > 
RodMap
 Shortcut for rod map.


Private Member Functions

 CrateImpl (const CrateImpl &)
CrateImploperator= (const CrateImpl &)
void rodInitialiseThread (int rod)
void setupScanTx (unsigned int rod, unsigned int channel)
 Turn off all tx channels except channel.

void setupScanRawTx (unsigned int rod, unsigned int channel)
 Turn off all tx channels except channel (Don't map the channel numbers).

SctPixelRod::RodModulegetRod (unsigned int rod) const
 Return 0 if not found.

const RodStatus & getRodData (unsigned int rod) const
RodStatus & getRodData (unsigned int rod)
void doTextBuffer (SctPixelRod::RodModule &rod0)
 Get a text buffer from a ROD.

void pollingLoop ()

Private Attributes

RodMap rodMap
 Map to lookup RodModule objects.

SctPixelRod::TimModuletim
 TIM module.

boost::shared_ptr< SctConfiguration::Configurationconfig
 The configuration.

SctPixelRod::VmeInterface * vme
 The vmeinterface that is used by all rods and tims.

const unsigned int partition
 Which partition this crate is in.

const unsigned int crate
 The id of this crate.

MRSStream * mrs
bool m_stopPolling
bool m_enablePolling
std::list< boost::shared_ptr<
PrimListWrapper > > 
listQueueAll
 Queue for prim lists to go to all RODs.

boost::mutex vmeMutex
boost::condition primQueue_notEmpty
boost::mutex primQueue_mutex
std::auto_ptr< boost::thread > pollThread
int rodCounter

Detailed Description

A representation of the crate controller.

This is used by SCTAPI to send commands to RodModule objects. These are stored in crate memory.

Module configuration will eventually be stored here also?

Definition at line 52 of file crateImpl.h.


Member Typedef Documentation

typedef std::map<unsigned int, std::pair<RodStatus *, SctPixelRod::RodModule *> > SctApi::CrateImpl::RodMap [private]
 

Shortcut for rod map.

Definition at line 347 of file crateImpl.h.


Constructor & Destructor Documentation

SctApi::CrateImpl::CrateImpl unsigned int  partition,
unsigned int  crate,
boost::shared_ptr< SctConfiguration::Configuration newConf = boost::shared_ptr< SctConfiguration::Configuration >()
 

Tell this crate which partition it belongs to.

This creates a VmeInterface.

SctApi::CrateImpl::~CrateImpl  ) 
 

Delete all the RodModules and VmeInterface.

Definition at line 135 of file crate.cxx.

References rodMap, tim, and vme.


Member Function Documentation

int SctApi::CrateImpl::awaitResponse unsigned int  rod,
int  timeout
[virtual]
 

Await response from a ROD within this crate.

Handle text messages sent by the ROD (print to stdout)

If waiting longer than timeout seconds then return anyway

Implements SctApi::Crate.

Definition at line 799 of file crate.cxx.

References crate, doTextBuffer(), SctPixelRod::RodModule::getPrimState(), getRod(), partition, SctPixelRod::RodModule::primHandler(), RODPresent(), SctPixelRod::RodModule::sleep(), status(), and SctPixelRod::RodModule::textHandler().

Referenced by awaitResponseAll().

Here is the call graph for this function:

int SctApi::CrateImpl::awaitResponseAll int  timeout  )  [virtual]
 

Handle text messages sent by the RODs (print to stdout).

If waiting longer than timeout seconds then return anyway

Implements SctApi::Crate.

Definition at line 982 of file crate.cxx.

References awaitResponse(), and rodMap.

Here is the call graph for this function:

bool SctApi::CrateImpl::checkBOCLasersOn unsigned int  rod  )  [virtual]
 

Check BOC laser interlock.

Implements SctApi::Crate.

Definition at line 1683 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getInterlockStatus(), getRod(), and RODPresent().

Here is the call graph for this function:

int SctApi::CrateImpl::configureBOC unsigned int  rod  )  [virtual]
 

Return 0 for success.

Implements SctApi::Crate.

Definition at line 549 of file crate.cxx.

References SctPixelRod::BocCard::clearRxDac(), SctPixelRod::BocCard::clearTxDac(), config, crate, SctConfiguration::BOCChannelConfig::current, SctConfiguration::BOCChannelConfig::delay, SctConfiguration::BOCChannelConfig::delay0, SctConfiguration::BOCChannelConfig::delay1, SctPixelRod::RodModule::getBocCard(), getRod(), SctConfiguration::BOCChannelConfig::markSpace, partition, RODPresent(), SctPixelRod::BocCard::setBpmClockPhase(), SctPixelRod::BocCard::setBpmCoarseDelay(), SctPixelRod::BocCard::setBpmFineDelay(), SctPixelRod::BocCard::setBpmMarkSpace(), SctPixelRod::BocCard::setBregClockPhase(), SctPixelRod::BocCard::setClockControl(), SctPixelRod::BocCard::setLaserCurrent(), SctPixelRod::BocCard::setRxDataDelay(), SctPixelRod::BocCard::setRxDataMode(), SctPixelRod::BocCard::setRxThreshold(), SctPixelRod::BocCard::setVernierClockPhase0(), SctPixelRod::BocCard::setVernierClockPhase1(), SctPixelRod::BocCard::setVernierFinePhase(), SctConfiguration::BOCChannelConfig::threshold0, and SctConfiguration::BOCChannelConfig::threshold1.

Referenced by initialiseBOC().

Here is the call graph for this function:

SctConfiguration::BOCGlobalConfig SctApi::CrateImpl::currentBOCRegisters unsigned int  rod  )  [virtual]
 

Return global registers as stored in BOC.

Implements SctApi::Crate.

Definition at line 1564 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getBpmClockPhase(), SctPixelRod::BocCard::getBregClockPhase(), SctPixelRod::BocCard::getClockControl(), getRod(), SctPixelRod::BocCard::getRxDacClear(), SctPixelRod::BocCard::getRxDataMode(), SctPixelRod::BocCard::getTxDacClear(), SctPixelRod::BocCard::getVernierClockPhase0(), SctPixelRod::BocCard::getVernierClockPhase1(), SctPixelRod::BocCard::getVernierFinePhase(), and RODPresent().

Referenced by saveBOCRegisters().

Here is the call graph for this function:

std::vector< SctConfiguration::BOCChannelConfig > SctApi::CrateImpl::currentBOCSetup unsigned int  rod  )  [virtual]
 

Return channel parameters as stored in BOC.

Implements SctApi::Crate.

Definition at line 1503 of file crate.cxx.

References SctConfiguration::BOCChannelConfig::current, SctConfiguration::BOCChannelConfig::delay, SctConfiguration::BOCChannelConfig::delay0, SctConfiguration::BOCChannelConfig::delay1, SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getBpmCoarseDelay(), SctPixelRod::BocCard::getBpmFineDelay(), SctPixelRod::BocCard::getBpmMarkSpace(), SctPixelRod::BocCard::getLaserCurrent(), getRod(), SctPixelRod::BocCard::getRxDataDelay(), SctPixelRod::BocCard::getRxThreshold(), SctConfiguration::BOCChannelConfig::markSpace, RODPresent(), SctConfiguration::BOCChannelConfig::threshold0, and SctConfiguration::BOCChannelConfig::threshold1.

Referenced by saveBOCSetup().

Here is the call graph for this function:

void SctApi::CrateImpl::doTextBuffer SctPixelRod::RodModule rod0  )  [private]
 

Get a text buffer from a ROD.

Definition at line 1362 of file crate.cxx.

References SctPixelRod::RodModule::clearTextBuffer(), crate, Sct::SctNames::getLogDir(), SctPixelRod::RodModule::getSerialNumber(), SctPixelRod::RodModule::getSlot(), SctPixelRod::RodModule::getTextBuffer(), partition, and SctPixelRod::RodModule::textHandler().

Referenced by awaitResponse(), and initialiseRod().

Here is the call graph for this function:

unsigned long SctApi::CrateImpl::dspSingleRead unsigned int  rod,
const unsigned long  dspAddr,
long  dspNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1205 of file crate.cxx.

References crate, getRod(), SctPixelRod::RodModule::mdspSingleRead(), partition, RODPresent(), and SctPixelRod::RodModule::slvSingleRead().

Here is the call graph for this function:

int SctApi::CrateImpl::dspSingleWrite unsigned int  rod,
unsigned long  dspAddr,
unsigned long  buffer,
long  dspNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1227 of file crate.cxx.

References crate, getRod(), SctPixelRod::RodModule::mdspSingleWrite(), partition, RODPresent(), and SctPixelRod::RodModule::slvSingleWrite().

Here is the call graph for this function:

void SctApi::CrateImpl::enterBOCClockBy2Mode unsigned int  rod  )  [virtual]
 

Setup BOC to sample at 20MHz.

Implements SctApi::Crate.

Definition at line 1698 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), getRod(), RODPresent(), SctPixelRod::BocCard::setClockControl(), and SctPixelRod::BocCard::setRxDataMode().

Here is the call graph for this function:

void SctApi::CrateImpl::freeTriggers  )  [virtual]
 

Start the TIM generating regular triggers.

Implements SctApi::Crate.

Definition at line 1979 of file crate.cxx.

References SctPixelRod::TimModule::loadBitSet(), and tim.

Here is the call graph for this function:

std::vector< double > SctApi::CrateImpl::getBOCMonitorArray unsigned int  rod  )  [virtual]
 

Return 12 monitor values from BOC ADCs.

Implements SctApi::Crate.

Definition at line 1726 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getMonitorAdc(), getRod(), and RODPresent().

Here is the call graph for this function:

std::list< unsigned > SctApi::CrateImpl::getListOfRods  )  const [virtual]
 

get list of rod identifiers on this crate

Implements SctApi::Crate.

Definition at line 270 of file crate.cxx.

References rodMap.

boost::shared_ptr< RodOutList > SctApi::CrateImpl::getResponse unsigned int  rod  )  [virtual]
 

Return the response to the last primlist (a wrapped copy).

Implements SctApi::Crate.

Definition at line 999 of file crate.cxx.

References crate, SctPixelRod::RodModule::deleteOutList(), SctPixelRod::RodOutList::getBody(), SctPixelRod::RodOutList::getLength(), SctPixelRod::RodModule::getOutList(), getRod(), partition, and RODPresent().

Here is the call graph for this function:

SctPixelRod::RodModule * SctApi::CrateImpl::getRod unsigned int  rod  )  const [private]
 

Return 0 if not found.

Definition at line 1328 of file crate.cxx.

References rodMap.

Referenced by awaitResponse(), checkBOCLasersOn(), configureBOC(), currentBOCRegisters(), currentBOCSetup(), dspSingleRead(), dspSingleWrite(), enterBOCClockBy2Mode(), getBOCMonitorArray(), getResponse(), getRodMessage(), getRodRevision(), initialiseBOC(), leaveBOCClockBy2Mode(), mdspBlockRead(), mdspBlockWrite(), modifyBOCParam(), primListControl(), printBOCRegisters(), printBOCSetup(), readRodCommandReg(), readRodStatusReg(), restoreBOCRegisters(), restoreBOCSetup(), RODPresent(), sendPrimList(), setupScanRawTx(), setupScanTx(), slvBlockRead(), and slvBlockWrite().

bool SctApi::CrateImpl::getRodMessage unsigned int  rod,
char *  buffer,
unsigned long &  length
[virtual]
 

Parameters:
rod Index of ROD
buffer Buffer to write text into
length Length of buffer allocated, on return contains amount of data copied.
Return message from ROD if present

Implements SctApi::Crate.

Definition at line 1038 of file crate.cxx.

References SctPixelRod::RodModule::clearTextBuffer(), getRod(), SctPixelRod::RodModule::getTextBuffer(), RODPresent(), and SctPixelRod::RodModule::textHandler().

Here is the call graph for this function:

int SctApi::CrateImpl::getRodRevision int  rod  )  const [virtual]
 

Get ROD Revision.

Implements SctApi::Crate.

Definition at line 2110 of file crate.cxx.

References SctPixelRod::RodModule::getRevision(), and getRod().

Here is the call graph for this function:

int SctApi::CrateImpl::initialiseBOC unsigned int  rod  )  [virtual]
 

Return 0 for success.

Implements SctApi::Crate.

Definition at line 495 of file crate.cxx.

References configureBOC(), crate, SctPixelRod::RodModule::getBocCard(), getRod(), SctPixelRod::BocCard::initialize(), partition, RODPresent(), and SctPixelRod::BocCard::status().

Here is the call graph for this function:

int SctApi::CrateImpl::initialiseCrate  )  [virtual]
 

Return number of RODs initialised.

Implements SctApi::Crate.

Definition at line 167 of file crate.cxx.

References config, crate, initialiseTim(), and partition.

Here is the call graph for this function:

int SctApi::CrateImpl::initialiseRod unsigned int  rod  )  [virtual]
 

Store object in local map.

Return 0 for success

Implements SctApi::Crate.

Definition at line 283 of file crate.cxx.

References SctConfiguration::RodConfig::baseAddress, config, crate, doTextBuffer(), SctConfiguration::SlaveConfig::extFile, SctPixelRod::RodOutList::getBody(), SctPixelRod::RodModule::getOutList(), SctPixelRod::RodModule::getSlot(), SctConfiguration::SlaveConfig::idramFile, SctPixelRod::RodModule::initialize(), SctPixelRod::RodModule::initSlaveDsp(), SctConfiguration::SlaveConfig::ipramFile, partition, SctConfiguration::RodConfig::resetLevel, rodMap, SctConfiguration::RodConfig::slaves, SctPixelRod::RodModule::status(), Sct::Env::substituteVariables(), SctPixelRod::RodModule::textHandler(), and vme.

Here is the call graph for this function:

int SctApi::CrateImpl::initialiseTim  )  [virtual]
 

Return 0 for success.

Implements SctApi::Crate.

Definition at line 215 of file crate.cxx.

References SctConfiguration::TimConfig::baseAddress, config, crate, SctPixelRod::TimModule::initialize(), partition, SctPixelRod::TimModule::reset(), SctConfiguration::TimConfig::resetFrequency, SctPixelRod::TimModule::status(), tim, timSetFrequency(), SctConfiguration::TimConfig::trigFrequency, and vme.

Referenced by initialiseCrate().

Here is the call graph for this function:

void SctApi::CrateImpl::lasersOff  )  [virtual]
 

Turn all BOC laser currents to 0.

Implements SctApi::Crate.

Definition at line 1900 of file crate.cxx.

References rodMap, and SctPixelRod::BocCard::setLaserCurrent().

Here is the call graph for this function:

void SctApi::CrateImpl::leaveBOCClockBy2Mode unsigned int  rod  )  [virtual]
 

Restore BOC to 40MHz mode.

Implements SctApi::Crate.

Definition at line 1712 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), getRod(), RODPresent(), SctPixelRod::BocCard::setClockControl(), and SctPixelRod::BocCard::setRxDataMode().

Here is the call graph for this function:

int SctApi::CrateImpl::mdspBlockRead unsigned int  rod,
long  dspStart,
unsigned long *  buffer,
unsigned long  numWords
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1096 of file crate.cxx.

References crate, getRod(), SctPixelRod::RodModule::mdspBlockRead(), partition, and RODPresent().

Here is the call graph for this function:

int SctApi::CrateImpl::mdspBlockWrite unsigned int  rod,
long  dspStart,
unsigned long *  buffer,
unsigned long  numWords
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1073 of file crate.cxx.

References crate, getRod(), SctPixelRod::RodModule::mdspBlockWrite(), partition, and RODPresent().

Here is the call graph for this function:

void SctApi::CrateImpl::modifyBOCParam unsigned int  rod,
unsigned int  channel,
unsigned int  type,
unsigned int  val,
bool  raw
[virtual]
 

Modify parameter on BOC channel.

Implements SctApi::Crate.

Definition at line 1790 of file crate.cxx.

References config, crate, SctPixelRod::RodModule::getBocCard(), getRod(), partition, RODPresent(), SctPixelRod::BocCard::setBpmClockPhase(), SctPixelRod::BocCard::setBpmCoarseDelay(), SctPixelRod::BocCard::setBpmFineDelay(), SctPixelRod::BocCard::setBpmMarkSpace(), SctPixelRod::BocCard::setBregClockPhase(), SctPixelRod::BocCard::setLaserCurrent(), SctPixelRod::BocCard::setRxDataDelay(), SctPixelRod::BocCard::setRxThreshold(), setupScanRawTx(), setupScanTx(), SctPixelRod::BocCard::setVernierClockPhase0(), SctPixelRod::BocCard::setVernierClockPhase1(), SctPixelRod::BocCard::setVernierClockPhases(), and SctPixelRod::BocCard::setVernierFinePhase().

Here is the call graph for this function:

void SctApi::CrateImpl::modifyBOCParam unsigned int  type,
unsigned int  val,
bool  raw
[virtual]
 

Parameters:
raw If false then map module channel to BOC, otherwise channel refers to BOC channel

Implements SctApi::Crate.

Definition at line 1748 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), getRod(), rodMap, SctPixelRod::BocCard::setBpmClockPhase(), SctPixelRod::BocCard::setBregClockPhase(), setupScanRawTx(), setupScanTx(), SctPixelRod::BocCard::setVernierClockPhase0(), SctPixelRod::BocCard::setVernierClockPhase1(), SctPixelRod::BocCard::setVernierClockPhases(), and SctPixelRod::BocCard::setVernierFinePhase().

Here is the call graph for this function:

void SctApi::CrateImpl::primListControl unsigned int  rod,
PLControl  function
[virtual]
 

Control the primitive list running on a rod (Untested).

Implements SctApi::Crate.

Definition at line 775 of file crate.cxx.

References SctPixelRod::RodModule::clearVmeCommandRegBit(), getRod(), RODPresent(), and SctPixelRod::RodModule::setVmeCommandRegBit().

Here is the call graph for this function:

void SctApi::CrateImpl::printBOCRegisters unsigned int  rod  )  [virtual]
 

Print all BOC registers.

Implements SctApi::Crate.

Definition at line 1532 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getBocReset(), SctPixelRod::BocCard::getBocStatusRegister(), SctPixelRod::BocCard::getBpmClockPhase(), SctPixelRod::BocCard::getBpmReset(), SctPixelRod::BocCard::getBregClockPhase(), SctPixelRod::BocCard::getClockControl(), getRod(), SctPixelRod::BocCard::getRxDacClear(), SctPixelRod::BocCard::getRxDataMode(), SctPixelRod::BocCard::getTxDacClear(), SctPixelRod::BocCard::getVernierClockPhase0(), SctPixelRod::BocCard::getVernierClockPhase1(), SctPixelRod::BocCard::getVernierFinePhase(), and RODPresent().

Here is the call graph for this function:

void SctApi::CrateImpl::printBOCSetup unsigned int  rod  )  [virtual]
 

Print all BOC paramters as set up.

Implements SctApi::Crate.

Definition at line 1462 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), SctPixelRod::BocCard::getBpmCoarseDelay(), SctPixelRod::BocCard::getBpmFineDelay(), SctPixelRod::BocCard::getBpmMarkSpace(), SctPixelRod::BocCard::getLaserCurrent(), getRod(), SctPixelRod::BocCard::getRxDataDelay(), SctPixelRod::BocCard::getRxThreshold(), and RODPresent().

Here is the call graph for this function:

unsigned long SctApi::CrateImpl::readRodCommandReg unsigned int  rod,
long  regNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1187 of file crate.cxx.

References crate, getRod(), partition, SctPixelRod::RodModule::readRodCommandReg(), and RODPresent().

Here is the call graph for this function:

unsigned long SctApi::CrateImpl::readRodStatusReg unsigned int  rod,
long  regNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1169 of file crate.cxx.

References crate, getRod(), partition, SctPixelRod::RodModule::readRodStatusReg(), and RODPresent().

Here is the call graph for this function:

void SctApi::CrateImpl::restoreBOCRegisters unsigned int  rod,
BankType  bank
[virtual]
 

Restore BOC register setup.

Implements SctApi::Crate.

Definition at line 1636 of file crate.cxx.

References SctPixelRod::BocCard::clearRxDac(), SctPixelRod::BocCard::clearTxDac(), SctPixelRod::RodModule::getBocCard(), getRod(), SctPixelRod::BocCard::setBpmClockPhase(), SctPixelRod::BocCard::setBregClockPhase(), SctPixelRod::BocCard::setClockControl(), SctPixelRod::BocCard::setRxDataMode(), SctPixelRod::BocCard::setVernierClockPhase0(), SctPixelRod::BocCard::setVernierClockPhase1(), and SctPixelRod::BocCard::setVernierFinePhase().

Here is the call graph for this function:

void SctApi::CrateImpl::restoreBOCSetup unsigned int  rod,
BankType  bank
[virtual]
 

Restore BOC channel setup.

Implements SctApi::Crate.

Definition at line 1600 of file crate.cxx.

References SctConfiguration::BOCChannelConfig::current, SctConfiguration::BOCChannelConfig::delay, SctConfiguration::BOCChannelConfig::delay0, SctConfiguration::BOCChannelConfig::delay1, SctPixelRod::RodModule::getBocCard(), getRod(), SctConfiguration::BOCChannelConfig::markSpace, SctPixelRod::BocCard::setBpmCoarseDelay(), SctPixelRod::BocCard::setBpmFineDelay(), SctPixelRod::BocCard::setBpmMarkSpace(), SctPixelRod::BocCard::setLaserCurrent(), SctPixelRod::BocCard::setRxDataDelay(), SctPixelRod::BocCard::setRxThreshold(), SctConfiguration::BOCChannelConfig::threshold0, and SctConfiguration::BOCChannelConfig::threshold1.

Here is the call graph for this function:

void SctApi::CrateImpl::resumePolling  )  [virtual]
 

Restart the primitive list polling.

Implements SctApi::Crate.

Definition at line 2118 of file crate.cxx.

bool SctApi::CrateImpl::RODPresent int  rod  )  const [virtual]
 

Check if a ROD has been configured.

Implements SctApi::Crate.

Definition at line 2102 of file crate.cxx.

References getRod().

Referenced by awaitResponse(), checkBOCLasersOn(), configureBOC(), currentBOCRegisters(), currentBOCSetup(), dspSingleRead(), dspSingleWrite(), enterBOCClockBy2Mode(), getBOCMonitorArray(), getResponse(), getRodMessage(), initialiseBOC(), leaveBOCClockBy2Mode(), mdspBlockRead(), mdspBlockWrite(), modifyBOCParam(), primListControl(), printBOCRegisters(), printBOCSetup(), readRodCommandReg(), readRodStatusReg(), sendPrimList(), slavePresent(), slvBlockRead(), and slvBlockWrite().

Here is the call graph for this function:

void SctApi::CrateImpl::saveBOCRegisters unsigned int  rod,
BankType  bank
[virtual]
 

Save BOC register setup.

Implements SctApi::Crate.

Definition at line 1596 of file crate.cxx.

References currentBOCRegisters().

Here is the call graph for this function:

void SctApi::CrateImpl::saveBOCSetup unsigned int  rod,
BankType  bank
[virtual]
 

Save BOC channel setup.

Implements SctApi::Crate.

Definition at line 1592 of file crate.cxx.

References currentBOCSetup().

Here is the call graph for this function:

int SctApi::CrateImpl::sendPrimList unsigned int  rod,
boost::shared_ptr< PrimListWrapper prim
[virtual]
 

Return 0 for success.

Send a primitive list to a ROD within this crate

This returns a -ve number on failure...

Implements SctApi::Crate.

Definition at line 674 of file crate.cxx.

References crate, SctPixelRod::RodModule::deleteOutList(), getRod(), partition, RODPresent(), and SctPixelRod::RodModule::sendPrimList().

Referenced by sendPrimListAll().

Here is the call graph for this function:

int SctApi::CrateImpl::sendPrimListAll boost::shared_ptr< PrimListWrapper prim  )  [virtual]
 

Return 0 for success.

Send a primitive list to a ROD within this crate

Implements SctApi::Crate.

Definition at line 751 of file crate.cxx.

References listQueueAll, rodMap, and sendPrimList().

Here is the call graph for this function:

void SctApi::CrateImpl::sendTimBurst int  count  )  [virtual]
 

Tell TIM to send a burst of triggers.

Implements SctApi::Crate.

Definition at line 2032 of file crate.cxx.

References SctPixelRod::TimModule::loadBitClear(), SctPixelRod::TimModule::loadBitSet(), SctPixelRod::TimModule::regFetch(), SctPixelRod::TimModule::regLoad(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::setupScanRawTx unsigned int  rod,
unsigned int  channel
[private]
 

Turn off all tx channels except channel (Don't map the channel numbers).

Definition at line 2155 of file crate.cxx.

References SctPixelRod::RodModule::getBocCard(), getRod(), and SctPixelRod::BocCard::setLaserCurrent().

Referenced by modifyBOCParam().

Here is the call graph for this function:

void SctApi::CrateImpl::setupScanTx unsigned int  rod,
unsigned int  channel
[private]
 

Turn off all tx channels except channel.

Definition at line 2122 of file crate.cxx.

References config, crate, SctConfiguration::BOCChannelConfig::current, SctPixelRod::RodModule::getBocCard(), getRod(), partition, and SctPixelRod::BocCard::setLaserCurrent().

Referenced by modifyBOCParam().

Here is the call graph for this function:

bool SctApi::CrateImpl::slavePresent int  rod,
int  index
const [virtual]
 

Check if a slave has been started.

Implements SctApi::Crate.

Definition at line 2086 of file crate.cxx.

References RODPresent().

Here is the call graph for this function:

void SctApi::CrateImpl::slaveStarted int  rod,
int  slave
[virtual]
 

Notify that slave was started externally...

Implements SctApi::Crate.

Definition at line 2098 of file crate.cxx.

int SctApi::CrateImpl::slvBlockRead unsigned int  rod,
long  dspStart,
unsigned long *  buffer,
unsigned long  numWords,
long  slaveNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1144 of file crate.cxx.

References crate, getRod(), SctPixelRod::RodModule::mdspSingleWrite(), partition, SctPixelRod::RodModule::readRodStatusReg(), RODPresent(), and SctPixelRod::RodModule::slvBlockRead().

Here is the call graph for this function:

int SctApi::CrateImpl::slvBlockWrite unsigned int  rod,
long  dspStart,
unsigned long *  buffer,
unsigned long  numWords,
long  dspNumber
[virtual]
 

Proxy for RodModule method.

Implements SctApi::Crate.

Definition at line 1122 of file crate.cxx.

References crate, getRod(), partition, RODPresent(), and SctPixelRod::RodModule::slvBlockWrite().

Here is the call graph for this function:

void SctApi::CrateImpl::status  )  [virtual]
 

Print status of rods on crate.

Implements SctApi::Crate.

Definition at line 1250 of file crate.cxx.

References crate, SctPixelRod::RodModule::getBocCard(), SctPixelRod::RodModule::getSlot(), partition, SctPixelRod::RodModule::readRodStatusBit(), SctPixelRod::RodModule::readRodStatusReg(), rodMap, SctPixelRod::RodModule::status(), SctPixelRod::BocCard::status(), SctPixelRod::TimModule::status(), and tim.

Referenced by awaitResponse().

Here is the call graph for this function:

void SctApi::CrateImpl::stopPolling  )  [virtual]
 

Stop the primitive list polling.

Implements SctApi::Crate.

Definition at line 2114 of file crate.cxx.

void SctApi::CrateImpl::stopTriggers  )  [virtual]
 

Stop the TIM generating regular triggers.

Implements SctApi::Crate.

Definition at line 1986 of file crate.cxx.

References SctPixelRod::TimModule::intTrigStop(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::timCalL1A int  delay  )  [virtual]
 

Tell TIM to send Cal + L1A.

Implements SctApi::Crate.

Definition at line 1999 of file crate.cxx.

References SctPixelRod::TimModule::issueVCAL(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::timL1A  )  [virtual]
 

Tell the TIM to send an L1A.

Implements SctApi::Crate.

Definition at line 1991 of file crate.cxx.

References SctPixelRod::TimModule::issueCommand(), SctPixelRod::TimModule::loadBitClear(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::timRegLoad int  reg,
UINT16  val
[virtual]
 

Debug, load TIM register.

Implements SctApi::Crate.

Definition at line 2072 of file crate.cxx.

References SctPixelRod::TimModule::regLoad(), and tim.

Here is the call graph for this function:

UINT16 SctApi::CrateImpl::timRegRead int  reg  )  [virtual]
 

Debug, read TIM register.

Implements SctApi::Crate.

Definition at line 2078 of file crate.cxx.

References SctPixelRod::TimModule::regFetch(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::timSetFrequency double  trigFreq,
double  rstFreq
[virtual]
 

Parameters:
trigFrequency Frequency of triggers
rstFrequency Frequency of resets

Implements SctApi::Crate.

Definition at line 1918 of file crate.cxx.

References SctPixelRod::TimModule::regLoad(), and tim.

Referenced by initialiseTim().

Here is the call graph for this function:

void SctApi::CrateImpl::timVerbose  )  [virtual]
 

Print all the Tim registers.

Implements SctApi::Crate.

Definition at line 2064 of file crate.cxx.

References SctPixelRod::TimModule::regFetch(), and tim.

Here is the call graph for this function:


Field Documentation

boost::shared_ptr<SctConfiguration::Configuration> SctApi::CrateImpl::config [private]
 

The configuration.

Definition at line 356 of file crateImpl.h.

Referenced by configureBOC(), initialiseCrate(), initialiseRod(), initialiseTim(), modifyBOCParam(), and setupScanTx().

const unsigned int SctApi::CrateImpl::crate [private]
 

The id of this crate.

Definition at line 365 of file crateImpl.h.

Referenced by awaitResponse(), configureBOC(), doTextBuffer(), dspSingleRead(), dspSingleWrite(), getResponse(), initialiseBOC(), initialiseCrate(), initialiseRod(), initialiseTim(), mdspBlockRead(), mdspBlockWrite(), modifyBOCParam(), readRodCommandReg(), readRodStatusReg(), sendPrimList(), setupScanTx(), slvBlockRead(), slvBlockWrite(), and status().

std::list<boost::shared_ptr<PrimListWrapper> > SctApi::CrateImpl::listQueueAll [private]
 

Queue for prim lists to go to all RODs.

Definition at line 377 of file crateImpl.h.

Referenced by sendPrimListAll().

const unsigned int SctApi::CrateImpl::partition [private]
 

Which partition this crate is in.

Definition at line 362 of file crateImpl.h.

Referenced by awaitResponse(), configureBOC(), doTextBuffer(), dspSingleRead(), dspSingleWrite(), getResponse(), initialiseBOC(), initialiseCrate(), initialiseRod(), initialiseTim(), mdspBlockRead(), mdspBlockWrite(), modifyBOCParam(), readRodCommandReg(), readRodStatusReg(), sendPrimList(), setupScanTx(), slvBlockRead(), slvBlockWrite(), and status().

RodMap SctApi::CrateImpl::rodMap [private]
 

Map to lookup RodModule objects.

Definition at line 350 of file crateImpl.h.

Referenced by awaitResponseAll(), getListOfRods(), getRod(), initialiseRod(), lasersOff(), modifyBOCParam(), sendPrimListAll(), status(), and ~CrateImpl().

SctPixelRod::TimModule* SctApi::CrateImpl::tim [private]
 

TIM module.

Definition at line 353 of file crateImpl.h.

Referenced by freeTriggers(), initialiseTim(), sendTimBurst(), status(), stopTriggers(), timCalL1A(), timL1A(), timRegLoad(), timRegRead(), timSetFrequency(), timVerbose(), and ~CrateImpl().

SctPixelRod::VmeInterface* SctApi::CrateImpl::vme [private]
 

The vmeinterface that is used by all rods and tims.

Definition at line 359 of file crateImpl.h.

Referenced by initialiseRod(), initialiseTim(), and ~CrateImpl().


The documentation for this class was generated from the following files:
Generated on Fri Sep 16 18:02:59 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5