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 (const Sct::UCID &ucid, 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.
SctPixelRod::RodModule * getRod (unsigned int rod) const
 Access the RodModule.
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::RodOutList > getResponse (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.
std::string 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.
virtual void modifyTIMParam (unsigned int type, unsigned int val)
 Modify parameter on TIM.
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)
virtual double timGetTriggerFrequency ()
 get tim trig frequency (kHz)
virtual double timGetResetFrequency ()
 get tim reset frequency (Hz)
virtual void timLoadSequence (const std::vector< unsigned > &seq)
 load a TIM trigger sequence;
virtual unsigned long timRunSequence (long unsigned ntrigs, int random, bool external)
 run the tim sequencer
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 ()
unsigned long sendTimBurst (unsigned long count, int random, bool external)
 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).
const RodStatusgetRodData (unsigned int rod) const
RodStatusgetRodData (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::TimModule * tim
 TIM module.
boost::shared_ptr< SctConfiguration::Configurationconfig
 The configuration.
SctPixelRod::VmeInterface * vme
 The vmeinterface that is used by all rods and tims.
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 53 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 369 of file crateImpl.h.


Constructor & Destructor Documentation

SctApi::CrateImpl::CrateImpl const Sct::UCID ucid,
boost::shared_ptr< SctConfiguration::Configuration newConf = boost::shared_ptr< SctConfiguration::Configuration >()
 

Tell this crate which partition it belongs to.

This creates a VmeInterface.

Definition at line 58 of file crate.cxx.

References config, Sct::SctNames::isMrsValid(), Sct::SctNames::Mrs(), SctApi::Crate::ucid(), and vme.

Here is the call graph for this function:

SctApi::CrateImpl::~CrateImpl  ) 
 

Delete all the RodModules and VmeInterface.

Definition at line 145 of file crate.cxx.

References m_stopPolling, pollThread, and rodMap.


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 812 of file crate.cxx.

References SctApi::Utility::decodeVme(), doTextBuffer(), getRod(), getRodData(), RODPresent(), status(), and SctApi::Crate::ucid().

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 995 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 1699 of file crate.cxx.

References 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 562 of file crate.cxx.

References SctConfiguration::BOCGlobalConfig::bpmClockPhase, SctConfiguration::BOCGlobalConfig::bregClockPhase, SctConfiguration::BOCGlobalConfig::clockControl, config, getRod(), RODPresent(), SctConfiguration::BOCGlobalConfig::rxDacClear, SctConfiguration::BOCGlobalConfig::rxDataMode, SctConfiguration::BOCGlobalConfig::txDacClear, SctApi::Crate::ucid(), SctConfiguration::BOCGlobalConfig::validMask, SctConfiguration::BOCGlobalConfig::vernierClockPhase0, SctConfiguration::BOCGlobalConfig::vernierClockPhase1, and SctConfiguration::BOCGlobalConfig::vernierFinePhase.

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 1580 of file crate.cxx.

References SctConfiguration::BOCGlobalConfig::bpmClockPhase, SctConfiguration::BOCGlobalConfig::bregClockPhase, SctConfiguration::BOCGlobalConfig::clockControl, getRod(), RODPresent(), SctConfiguration::BOCGlobalConfig::rxDacClear, SctConfiguration::BOCGlobalConfig::rxDataMode, SctConfiguration::BOCGlobalConfig::txDacClear, SctConfiguration::BOCGlobalConfig::validMask, SctConfiguration::BOCGlobalConfig::vernierClockPhase0, SctConfiguration::BOCGlobalConfig::vernierClockPhase1, and SctConfiguration::BOCGlobalConfig::vernierFinePhase.

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 1519 of file crate.cxx.

References getRod(), and RODPresent().

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 1377 of file crate.cxx.

References mrs, Sct::UniqueCrateLevelIdentifierBase::partition(), Sct::StringStreamer, and SctApi::Crate::ucid().

Referenced by awaitResponse(), and pollingLoop().

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 1218 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1240 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1714 of file crate.cxx.

References getRod(), and RODPresent().

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 2030 of file crate.cxx.

References tim.

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

Return 12 monitor values from BOC ADCs.

Implements SctApi::Crate.

Definition at line 1742 of file crate.cxx.

References 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 283 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 1012 of file crate.cxx.

References getRod(), and RODPresent().

Here is the call graph for this function:

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

Access the RodModule.

Returns:
0 if not found

Reimplemented from SctApi::Crate.

Definition at line 1343 of file crate.cxx.

References rodMap.

Referenced by awaitResponse(), checkBOCLasersOn(), configureBOC(), currentBOCRegisters(), currentBOCSetup(), dspSingleRead(), dspSingleWrite(), enterBOCClockBy2Mode(), getBOCMonitorArray(), getResponse(), getRodMessage(), getRodRevision(), getRodSlot(), 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 1051 of file crate.cxx.

References getRod(), and RODPresent().

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 2288 of file crate.cxx.

References 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 508 of file crate.cxx.

References configureBOC(), SctApi::Utility::decodeVme(), getRod(), RODPresent(), and SctApi::Crate::ucid().

Referenced by rodInitialiseThread().

Here is the call graph for this function:

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

Return number of RODs initialised.

Implements SctApi::Crate.

Definition at line 177 of file crate.cxx.

References config, initialiseTim(), rodCounter, rodInitialiseThread(), SctApi::Crate::ucid(), and SctConfiguration::ConfigurationException::what().

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 296 of file crate.cxx.

References config, and SctApi::Crate::ucid().

Referenced by rodInitialiseThread().

Here is the call graph for this function:

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

Return 0 for success.

Implements SctApi::Crate.

Definition at line 226 of file crate.cxx.

References SctConfiguration::TimConfig::baseAddress, config, SctApi::Utility::decodeVme(), SctConfiguration::TimConfig::resetFrequency, tim, SctApi::timMapSize, timRegLoad(), timSetFrequency(), SctConfiguration::TimConfig::trigFrequency, SctApi::Crate::ucid(), 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 1944 of file crate.cxx.

References rodMap.

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

Restore BOC to 40MHz mode.

Implements SctApi::Crate.

Definition at line 1728 of file crate.cxx.

References getRod(), and RODPresent().

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 1109 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1086 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1829 of file crate.cxx.

References config, getRod(), RODPresent(), setupScanRawTx(), setupScanTx(), SctApi::Crate::ucid(), and SctConfiguration::ConfigurationException::what().

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 1786 of file crate.cxx.

References getRod(), rodMap, setupScanRawTx(), and setupScanTx().

Here is the call graph for this function:

void SctApi::CrateImpl::modifyTIMParam unsigned int  type,
unsigned int  val
[virtual]
 

Modify parameter on TIM.

Implements SctApi::Crate.

Definition at line 1764 of file crate.cxx.

References SctApi::ConfigUtility::isTimRegister(), and tim.

Here is the call graph for this function:

void SctApi::CrateImpl::primListControl unsigned int  rod,
PLControl  function
 

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

Definition at line 788 of file crate.cxx.

References getRod(), and RODPresent().

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 1548 of file crate.cxx.

References getRod(), 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 1478 of file crate.cxx.

References getRod(), 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 1200 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1182 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1652 of file crate.cxx.

References SctConfiguration::BOCGlobalConfig::bpmClockPhase, SctConfiguration::BOCGlobalConfig::bregClockPhase, SctConfiguration::BOCGlobalConfig::clockControl, getRod(), getRodData(), SctConfiguration::BOCGlobalConfig::rxDacClear, SctConfiguration::BOCGlobalConfig::rxDataMode, SctApi::RodStatus::savedBocRegisters, SctConfiguration::BOCGlobalConfig::txDacClear, SctConfiguration::BOCGlobalConfig::validMask, SctConfiguration::BOCGlobalConfig::vernierClockPhase0, SctConfiguration::BOCGlobalConfig::vernierClockPhase1, and SctConfiguration::BOCGlobalConfig::vernierFinePhase.

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 1616 of file crate.cxx.

References SctConfiguration::BOCChannelConfig::current, SctConfiguration::BOCChannelConfig::delay, SctConfiguration::BOCChannelConfig::delay0, SctConfiguration::BOCChannelConfig::delay1, getRod(), getRodData(), SctConfiguration::BOCChannelConfig::markSpace, SctApi::RodStatus::savedBocSetup, SctApi::setup(), 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 2296 of file crate.cxx.

References m_enablePolling.

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

Check if a ROD has been configured.

Implements SctApi::Crate.

Definition at line 2280 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 1612 of file crate.cxx.

References currentBOCRegisters(), getRodData(), and SctApi::RodStatus::savedBocRegisters.

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 1608 of file crate.cxx.

References currentBOCSetup(), getRodData(), and SctApi::RodStatus::savedBocSetup.

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 687 of file crate.cxx.

References SctApi::RodStatus::currState, getRod(), getRodData(), SctApi::RodStatus::listQueue, m_stopPolling, SctApi::RodStatus::mutex, primQueue_mutex, primQueue_notEmpty, RODPresent(), and SctApi::Crate::ucid().

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 764 of file crate.cxx.

References listQueueAll, primQueue_mutex, primQueue_notEmpty, rodMap, and sendPrimList().

Here is the call graph for this function:

unsigned long SctApi::CrateImpl::sendTimBurst unsigned long  count,
int  random,
bool  external
[virtual]
 

Tell TIM to send a burst of triggers.

Implements SctApi::Crate.

Definition at line 2115 of file crate.cxx.

References tim, timGetResetFrequency(), timGetTriggerFrequency(), timRegRead(), and timSetFrequency().

Referenced by timRunSequence().

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 2333 of file crate.cxx.

References getRod().

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 2300 of file crate.cxx.

References config, getRod(), and SctApi::Crate::ucid().

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 2264 of file crate.cxx.

References getRodData(), RODPresent(), and SctApi::RodStatus::slaves.

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 2276 of file crate.cxx.

References getRodData(), and SctApi::RodStatus::slaves.

Here is the call graph for this function:

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 1157 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

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 1135 of file crate.cxx.

References getRod(), RODPresent(), and SctApi::Crate::ucid().

Here is the call graph for this function:

std::string SctApi::CrateImpl::status  )  [virtual]
 

Print status of rods on crate.

Implements SctApi::Crate.

Definition at line 1263 of file crate.cxx.

References mrs, Sct::UniqueCrateLevelIdentifierBase::partition(), rodMap, tim, and SctApi::Crate::ucid().

Referenced by awaitResponse(), and pollingLoop().

Here is the call graph for this function:

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

Stop the primitive list polling.

Implements SctApi::Crate.

Definition at line 2292 of file crate.cxx.

References m_enablePolling.

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

Stop the TIM generating regular triggers.

Implements SctApi::Crate.

Definition at line 2037 of file crate.cxx.

References tim.

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

Tell TIM to send Cal + L1A.

Implements SctApi::Crate.

Definition at line 2050 of file crate.cxx.

References tim.

double SctApi::CrateImpl::timGetResetFrequency  )  [virtual]
 

get tim reset frequency (Hz)

Implements SctApi::Crate.

Definition at line 1972 of file crate.cxx.

References tim.

Referenced by sendTimBurst(), and timSetFrequency().

double SctApi::CrateImpl::timGetTriggerFrequency  )  [virtual]
 

get tim trig frequency (kHz)

Implements SctApi::Crate.

Definition at line 1962 of file crate.cxx.

References tim.

Referenced by sendTimBurst(), and timSetFrequency().

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

Tell the TIM to send an L1A.

Implements SctApi::Crate.

Definition at line 2042 of file crate.cxx.

References tim.

void SctApi::CrateImpl::timLoadSequence const std::vector< unsigned > &  seq  )  [virtual]
 

load a TIM trigger sequence;

Implements SctApi::Crate.

Definition at line 2055 of file crate.cxx.

References timRegLoad().

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 2250 of file crate.cxx.

References tim.

Referenced by initialiseTim(), timBCR(), timECR(), timFER(), timLoadSequence(), timRunSequence(), and timSetFrequency().

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

Debug, read TIM register.

Implements SctApi::Crate.

Definition at line 2256 of file crate.cxx.

References tim.

Referenced by sendTimBurst(), and timSetFrequency().

long unsigned SctApi::CrateImpl::timRunSequence long unsigned  ntrigs,
int  random,
bool  external
[virtual]
 

run the tim sequencer

  • ntrigs - number of triggers to send (trigs, not cycles)
  • random - randomise the start-time of the sequence?
  • burst - use the tim burst register (rather than doing l1id polling)

Implements SctApi::Crate.

Definition at line 2073 of file crate.cxx.

References sendTimBurst(), tim, and timRegLoad().

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 1982 of file crate.cxx.

References tim, timGetResetFrequency(), timGetTriggerFrequency(), timRegLoad(), and timRegRead().

Referenced by initialiseTim(), and sendTimBurst().

Here is the call graph for this function:

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

Print all the Tim registers.

Implements SctApi::Crate.

Definition at line 2242 of file crate.cxx.

References tim.


Field Documentation

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

The configuration.

Definition at line 378 of file crateImpl.h.

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

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

Queue for prim lists to go to all RODs.

Definition at line 393 of file crateImpl.h.

Referenced by pollingLoop(), and sendPrimListAll().

RodMap SctApi::CrateImpl::rodMap [private]
 

Map to lookup RodModule objects.

Definition at line 372 of file crateImpl.h.

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

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

TIM module.

Definition at line 375 of file crateImpl.h.

Referenced by freeTriggers(), initialiseTim(), modifyTIMParam(), sendTimBurst(), status(), stopTriggers(), timBCR(), timCalL1A(), timECR(), timFER(), timGetResetFrequency(), timGetTriggerFrequency(), timL1A(), timRegLoad(), timRegRead(), timRunSequence(), timSetFrequency(), and timVerbose().

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

The vmeinterface that is used by all rods and tims.

Definition at line 381 of file crateImpl.h.

Referenced by CrateImpl(), and initialiseTim().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:04:33 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6