#include <crateImpl.h>
Inheritance diagram for SctApi::CrateImpl:
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::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. | |
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::BOCChannelConfig > | currentBOCSetup (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) |
Save BOC channel setup. | |
void | saveBOCRegisters (unsigned int rod) |
Save BOC register setup. | |
void | restoreBOCSetup (unsigned int rod) |
Restore BOC channel setup. | |
void | restoreBOCRegisters (unsigned int rod) |
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. | |
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. | |
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 &) | |
CrateImpl & | operator= (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::RodModule * | getRod (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::TimModule * | tim |
TIM module. | |
boost::shared_ptr< SctConfiguration::Configuration > | config |
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 |
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.
|
Shortcut for rod map.
Definition at line 341 of file crateImpl.h. |
|
Tell this crate which partition it belongs to. This creates a VmeInterface. |
|
Delete all the RodModules and VmeInterface.
|
|
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. |
|
Handle text messages sent by the RODs (print to stdout). If waiting longer than timeout seconds then return anyway Implements SctApi::Crate. |
|
Check BOC laser interlock.
Implements SctApi::Crate. |
|
Return 0 for success.
Implements SctApi::Crate. |
|
Return global registers as stored in BOC.
Implements SctApi::Crate. |
|
Return channel parameters as stored in BOC.
Implements SctApi::Crate. |
|
Get a text buffer from a ROD.
|
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Setup BOC to sample at 20MHz.
Implements SctApi::Crate. |
|
Start the TIM generating regular triggers.
Implements SctApi::Crate. |
|
Return the response to the last primlist (a wrapped copy).
Implements SctApi::Crate. |
|
Return 0 if not found.
|
|
Implements SctApi::Crate. |
|
Get ROD Revision.
Implements SctApi::Crate. |
|
Return 0 for success.
Implements SctApi::Crate. |
|
Return number of RODs initialised.
Implements SctApi::Crate. |
|
Store object in local map. Return 0 for success Implements SctApi::Crate. |
|
Return 0 for success.
Implements SctApi::Crate. |
|
Turn all BOC laser currents to 0.
Implements SctApi::Crate. |
|
Restore BOC to 40MHz mode.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Modify parameter on BOC channel.
Implements SctApi::Crate. |
|
Implements SctApi::Crate. |
|
Control the primitive list running on a rod (Untested).
Implements SctApi::Crate. |
|
Print all BOC registers.
Implements SctApi::Crate. |
|
Print all BOC paramters as set up.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Restore BOC register setup.
Implements SctApi::Crate. |
|
Restore BOC channel setup.
Implements SctApi::Crate. |
|
Restart the primitive list polling.
Implements SctApi::Crate. |
|
Check if a ROD has been configured.
Implements SctApi::Crate. |
|
Save BOC register setup.
Implements SctApi::Crate. |
|
Save BOC channel setup.
Implements SctApi::Crate. |
|
Return 0 for success.
Implements SctApi::Crate. |
|
Return 0 for success.
Implements SctApi::Crate. |
|
Tell TIM to send a burst of triggers.
Implements SctApi::Crate. |
|
Turn off all tx channels except channel (Don't map the channel numbers).
|
|
Turn off all tx channels except channel.
|
|
Check if a slave has been started.
Implements SctApi::Crate. |
|
Notify that slave was started externally...
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Proxy for RodModule method.
Implements SctApi::Crate. |
|
Print status of rods on crate.
Implements SctApi::Crate. |
|
Stop the primitive list polling.
Implements SctApi::Crate. |
|
Stop the TIM generating regular triggers.
Implements SctApi::Crate. |
|
Tell TIM to send Cal + L1A.
Implements SctApi::Crate. |
|
Tell the TIM to send an L1A.
Implements SctApi::Crate. |
|
Debug, load TIM register.
Implements SctApi::Crate. |
|
Debug, read TIM register.
Implements SctApi::Crate. |
|
Implements SctApi::Crate. |
|
Print all the Tim registers.
Implements SctApi::Crate. |
|
The configuration.
Definition at line 350 of file crateImpl.h. |
|
The id of this crate.
Definition at line 359 of file crateImpl.h. |
|
Queue for prim lists to go to all RODs.
Definition at line 371 of file crateImpl.h. |
|
Which partition this crate is in.
Definition at line 356 of file crateImpl.h. |
|
Map to lookup RodModule objects.
Definition at line 344 of file crateImpl.h. |
|
TIM module.
Definition at line 347 of file crateImpl.h. |
|
The vmeinterface that is used by all rods and tims.
Definition at line 353 of file crateImpl.h. |