#include <crate.h>
Public Types | |
enum | PLControl { C_PL_STOP, C_PL_PAUSE, C_PL_RESUME, C_PL_CANCEL } |
C_PL_STOP Abort the current primitiveList C_PL_PAUSE Pause the current primitiveList C_PL_RESUME Resume the current primitiveList C_PL_CANCEL Cancel the recently sent primitiveList (only if not started execution). More... | |
Public Member Functions | |
Crate (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. | |
~Crate () | |
Delete all the RodModules and VmeInterface. | |
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, shared_ptr< PrimListWrapper > prim) |
Return 0 for success. | |
int | sendPrimListAll (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). | |
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, int &length) |
int | mdspBlockRead (unsigned int rod, long dspStart, unsigned long *buffer, long numWords) |
Proxy for RodModule method. | |
int | slvBlockRead (unsigned int rod, long dspStart, unsigned long *buffer, long numWords, long slaveNumber) |
Proxy for RodModule method. | |
int | slvBlockWrite (unsigned int rod, long dspStart, unsigned long *buffer, long numWords, long dspNumber) |
Proxy for RodModule method. | |
int | mdspBlockWrite (const unsigned int rod, const long dspStart, unsigned long *buffer, const 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. | |
void | printBOCRegisters (unsigned int rod) |
Print all BOC registers. | |
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 rod, unsigned int channel, unsigned int type, unsigned int val) |
Modify parameters on BOC (type undefined). | |
void | lasersOff () |
Turn all BOC laser currents to 0. | |
void | freeTriggers (SctPixelRod::TimMaskFrequency freq=SctPixelRod::TIM_MASK_TRIG_10_0KHZ) |
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. | |
bool | slavePresent (int rod, int index) const |
Check if a slave has been started. | |
bool | RODPresent (int rod) const |
Check if a ROD has been configured. | |
Private Types | |
typedef std::map< unsigned int, std::pair< RodStatus *, SctPixelRod::RodModule * > > | RodMap |
Shortcut for rod map. | |
Private Member Functions | |
Crate (const Crate &) | |
Crate & | operator= (const Crate &) |
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. | |
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 | stopPolling |
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 crate.h.
|
Shortcut for rod map.
|
|
C_PL_STOP Abort the current primitiveList C_PL_PAUSE Pause the current primitiveList C_PL_RESUME Resume the current primitiveList C_PL_CANCEL Cancel the recently sent primitiveList (only if not started execution).
|
|
|
|
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 |
|
Handle text messages sent by the RODs (print to stdout). If waiting longer than timeout seconds then return anyway |
|
Check BOC laser interlock.
|
|
Return 0 for success.
|
|
Get a text buffer from a ROD.
|
|
Proxy for RodModule method.
|
|
Proxy for RodModule method.
|
|
Setup BOC to sample at 20MHz.
|
|
Start the TIM generating regular triggers.
|
|
Return the response to the last primlist (a wrapped copy).
|
|
Return 0 if not found.
|
|
|
|
|
|
|
|
Return 0 for success.
|
|
Store object in local map. Return 0 for success |
|
Return 0 for success.
|
|
Turn all BOC laser currents to 0.
|
|
Restore BOC to 40MHz mode.
|
|
Proxy for RodModule method.
|
|
Proxy for RodModule method.
|
|
Modify parameters on BOC (type undefined).
|
|
|
|
Control the primitive list running on a rod (Untested).
|
|
Print all BOC registers.
|
|
Print all BOC paramters as set up.
|
|
Proxy for RodModule method.
|
|
Proxy for RodModule method.
|
|
Check if a ROD has been configured.
|
|
Return 0 for success.
|
|
Return 0 for success.
|
|
|
|
Check if a slave has been started.
|
|
Proxy for RodModule method.
|
|
Proxy for RodModule method.
|
|
Print status of rods on crate.
|
|
Stop the TIM generating regular triggers.
|
|
Tell TIM to send Cal + L1A.
|
|
Tell the TIM to send an L1A.
|
|
The configuration.
|
|
The id of this crate.
|
|
|
|
Which partition this crate is in.
|
|
Map to lookup RodModule objects.
|
|
|
|
TIM module.
|
|
The vmeinterface that is used by all rods and tims.
|