Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CBD8210 Class Reference

#include <CBD8210.h>

Inheritance diagram for CBD8210:

CCamacModule List of all members.

Public Methods

 CBD8210 (unsigned int b)
 Default constructor.

 CBD8210 (const CBD8210 &rhs)
 Copy constructor.

 ~CBD8210 ()
 Destructor.

CBD8210 & operator= (const CBD8210 &rhs)
 Assignment.

int operator== (const CBD8210 &rhs) const
 Comparison for equality.

int operator!= (const CBD8210 &rhs) const
volatile unsigned short * getCsr () const
volatile unsigned short * getITF ()
volatile unsigned short * getCAR ()
volatile unsigned short * getBTB ()
volatile unsigned short * getBZ ()
volatile unsigned long * getGL ()
bool Xtest () const
bool Qtest () const
bool TimedOut () const
bool BranchDemand () const
void MNoX (bool fSet=true)
void MTo (bool fSet=true)
void MLAM (bool fSet=true)
void MIT2 (bool fSet=true)
void MIT4 (bool fSet=true)
bool IT2 () const
bool IT4 () const
unsigned short ReadCsr () const
void WriteCsr (unsigned short nMask)
void WriteIFR (unsigned short nMask)
unsigned short ReadBTB () const
unsigned long ReadGl () const
void InitBranch () const

Private Attributes

volatile unsigned short * m_pCsr
 Pointer to the Control Status Register.

volatile unsigned short * m_pITF
 Pointer to the Interrupt flag register.

volatile unsigned short * m_pCAR
 Pointer to the Crate Address Register.

volatile unsigned short * m_pBTB
 Pointer to the branch timing register.

volatile unsigned short * m_pBZ
 Pointer to the Branch Zero register.

volatile unsigned long * m_pGL
 Graded LAM register.


Detailed Description

Encapsulates a single CES CBD 8210 branch highway driver. This appears as a module in slot 29 of crate 0. The function codes correspond to device registers. Some of the function codes do data transfer which should not do data transfer. If that bothers you, then just think of the F.N as a way to describe a VME address rather than as F.N's.

Definition at line 298 of file CBD8210.h.


Constructor & Destructor Documentation

CBD8210::CBD8210 unsigned int    b
 

Default constructor.

Default constructor. This is called when declarations of the form e.g.:

  • CBD8210 object; are performed.

Definition at line 307 of file CBD8210.cpp.

References m_pBTB, m_pBZ, m_pCAR, m_pCsr, m_pGL, m_pITF, and CCamacModule::MakePointer().

CBD8210::CBD8210 const CBD8210 &    rhs
 

Copy constructor.

Copy construction. This is invoked when e.g. an object is passed by value to a function. The copy constructor makes a clone of the rhs object.

Definition at line 333 of file CBD8210.cpp.

CBD8210::~CBD8210   [inline]
 

Destructor.

Definition at line 313 of file CBD8210.h.


Member Function Documentation

bool CBD8210::BranchDemand   const
 

Returns true if a global demand is pending on the branch.

Definition at line 433 of file CBD8210.cpp.

References csrBD.

volatile unsigned short* CBD8210::getBTB   [inline]
 

Definition at line 336 of file CBD8210.h.

References m_pBTB.

volatile unsigned short* CBD8210::getBZ   [inline]
 

Definition at line 340 of file CBD8210.h.

References m_pBZ.

volatile unsigned short* CBD8210::getCAR   [inline]
 

Definition at line 332 of file CBD8210.h.

References m_pCAR.

volatile unsigned short* CBD8210::getCsr   const [inline]
 

Definition at line 324 of file CBD8210.h.

References m_pCsr.

volatile unsigned long* CBD8210::getGL   [inline]
 

Definition at line 344 of file CBD8210.h.

References m_pGL.

volatile unsigned short* CBD8210::getITF   [inline]
 

Definition at line 328 of file CBD8210.h.

References m_pITF.

void CBD8210::InitBranch   const
 

Performs a BZ cycle on the branch.

Definition at line 669 of file CBD8210.cpp.

References m_pBZ.

Referenced by CamacTestThread::CamacTestThread().

bool CBD8210::IT2   const
 

Returns true if the IT2 bit is set in the CSR. This bit is set to indicate that the IT2 input has received a falling edge. To reset the edge, you must write the IFR with the IT2 bit.

Definition at line 571 of file CBD8210.cpp.

References csrIT2.

Referenced by CCAMACTrigger::operator()().

bool CBD8210::IT4   const
 

True if the IT4 bit is set in the CSR. This bit indicates that a falling NIM edge was presented to the IT4 input of the module. To clear this latched bit the IFR must be written with the IT4 bit.

Definition at line 587 of file CBD8210.cpp.

References csrIT4.

void CBD8210::MIT2 bool    fset = true
 

When clear, a NIM true on the IT2 will create a VME interrupt at IPL2. This bit should normally be set as there is no time efficient way to catch VME interrupts at process level.

Parameters:
fset  - If true MIT2 is set.

Definition at line 524 of file CBD8210.cpp.

References csrMIT2, and m_pCsr.

void CBD8210::MIT4 bool    fset = true
 

When clear, a NIM true on IT4 will produce a VME bus interrupt at IPL4. Since there's no good time efficient way to catch these interrupts at process level, this bit should be set.

Parameters:
fset  - If true, the MIT4 bit will be set.

Definition at line 548 of file CBD8210.cpp.

References csrIT4, and m_pCsr.

void CBD8210::MLAM bool    fset = true
 

Controls the state of the MLAM bit in the CSR. When this bit is clear, a LAM produces an VME interrupt at IPL3. This bit should normally be set as there is no time efficient way to catch these interrupts at process level.

Parameters:
fset  - When true the MLAM bit will be set.

Definition at line 500 of file CBD8210.cpp.

References csrMLAM, and m_pCsr.

void CBD8210::MNoX bool    fset = true
 

Sets the state of the MNox bit in the status register. When this bit is clear, operations which don't provoke an X response result in a VME bus error. In general, this bit should be set disabling this bus error.

Parameters:
fSet  - true if the bit should be set.

Definition at line 449 of file CBD8210.cpp.

References csrMNOX, and m_pCsr.

void CBD8210::MTo bool    fset = true
 

Controls the state of the MTO bit in the control status register. When this bit is clear, Branch timeouts (accesses to nonexistent cratss) result in bus errors on the VME bus. This bit should normally be set as there's no way to catch these bus errors as an inline trap.

Parameters:
fset  - true to set the bit.

Definition at line 474 of file CBD8210.cpp.

References csrMTO, and m_pCsr.

int CBD8210::operator!= const CBD8210 &    rhs const [inline]
 

Definition at line 317 of file CBD8210.h.

References operator==().

CBD8210 & CBD8210::operator= const CBD8210 &    aCBD8210
 

Assignment.

Assignment operation. This member function supports assignment of an object of this class to an object of the same class.

Definition at line 349 of file CBD8210.cpp.

References m_pBTB, m_pBZ, m_pCAR, m_pCsr, m_pGL, m_pITF, and CCamacModule::operator=().

int CBD8210::operator== const CBD8210 &    rhs const
 

Comparison for equality.

Equality test:

Definition at line 368 of file CBD8210.cpp.

References m_pBTB, m_pBZ, m_pCAR, m_pCsr, m_pGL, m_pITF, and CCamacModule::operator==().

Referenced by operator!=().

bool CBD8210::Qtest   const
 

Returns true if the last operation on this branch returned a valid Q. The meaning of the Q bit depends on the module and the function being performned. Q's are often used to send the result of a test function back (e.g. test for lam), indicate the end of a block transfer and other module specific functions.

Definition at line 407 of file CBD8210.cpp.

References csrQ.

Referenced by CCrateController::isDemandEnabled(), CCrateController::isDemanding(), and CCrateController::isInhibited().

unsigned short CBD8210::ReadBTB   const
 

Returns the value of the BTB register. In practice, the bits in this register specify which crates are powered up and online. The map of these bits is:

7 6 5 4 3 2 1 0 +-----------------------------------------------------------------+ | ... Cr7 | Cr6 | Cr5 | Cr4 | Cr3 | Cr2 | Cr1 | 0| +------------------------------------------------------------------+

Definition at line 645 of file CBD8210.cpp.

unsigned short CBD8210::ReadCsr   const
 

Returns the current value of the CSR.

Definition at line 598 of file CBD8210.cpp.

unsigned long CBD8210::ReadGl   const
 

Returns the current value of the branch graded demand. This may have nothing to do with crate LAMs. To get a crate LAM, you should read the individual crate GL registers.

Definition at line 660 of file CBD8210.cpp.

bool CBD8210::TimedOut   const
 

Returns true if the last operation on the branch timed out (The TO bit is set in the CSR). This usually indicates that a crate which was offline was addressed.

Definition at line 421 of file CBD8210.cpp.

References csrTO.

void CBD8210::WriteCsr unsigned short    nMask
 

Writes the CSR with the mask of bits supplied:

Parameters:
nMask  - The mask of bits to write.

Definition at line 611 of file CBD8210.cpp.

References m_pCsr.

void CBD8210::WriteIFR unsigned short    nMask
 

Writes the IFR (interrupt flag register) with the specified mask. The bits in this register reset the IT2 and IT4 bits in the CSR.

Parameters:
nMask  - Mask to write in the IFR.

Definition at line 626 of file CBD8210.cpp.

References m_pITF.

Referenced by CCAMACTrigger::operator()().

bool CBD8210::Xtest   const
 

Returns true if the last operation on this branch returned an X response. The X response indicates that the module has 'responded' to the function code.

Definition at line 389 of file CBD8210.cpp.

References csrX.


Member Data Documentation

volatile unsigned short* CBD8210::m_pBTB [private]
 

Pointer to the branch timing register.

Definition at line 304 of file CBD8210.h.

Referenced by CBD8210(), getBTB(), operator=(), and operator==().

volatile unsigned short* CBD8210::m_pBZ [private]
 

Pointer to the Branch Zero register.

Definition at line 305 of file CBD8210.h.

Referenced by CBD8210(), getBZ(), InitBranch(), operator=(), and operator==().

volatile unsigned short* CBD8210::m_pCAR [private]
 

Pointer to the Crate Address Register.

Definition at line 303 of file CBD8210.h.

Referenced by CBD8210(), getCAR(), operator=(), and operator==().

volatile unsigned short* CBD8210::m_pCsr [private]
 

Pointer to the Control Status Register.

Definition at line 301 of file CBD8210.h.

Referenced by CBD8210(), getCsr(), MIT2(), MIT4(), MLAM(), MNoX(), MTo(), operator=(), operator==(), and WriteCsr().

volatile unsigned long* CBD8210::m_pGL [private]
 

Graded LAM register.

Definition at line 306 of file CBD8210.h.

Referenced by CBD8210(), getGL(), operator=(), and operator==().

volatile unsigned short* CBD8210::m_pITF [private]
 

Pointer to the Interrupt flag register.

Definition at line 302 of file CBD8210.h.

Referenced by CBD8210(), getITF(), operator=(), operator==(), and WriteIFR().


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 13:37:10 2002 for Event Readout system. by doxygen1.2.16