CBD8210 Class Reference

#include <CBD8210.h>

Inheritance diagram for CBD8210:

CCamacModule List of all members.

Public Member Functions

 CBD8210 (unsigned int b)
 Default constructor.
 CBD8210 (const CBD8210 &rhs)
 Copy constructor.
 ~CBD8210 ()
 Destructor.
CBD8210operator= (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

Static Public Attributes

static const int IT2BIT = 2
static const int IT4BIT = 1

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.:

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 318 of file CBD8210.h.


Member Function Documentation

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, and m_pITF.

Referenced by operator!=().

int CBD8210::operator!= ( const CBD8210 rhs  )  const [inline]

Definition at line 322 of file CBD8210.h.

References operator==().

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

Definition at line 329 of file CBD8210.h.

References m_pCsr.

volatile unsigned short* CBD8210::getITF (  )  [inline]

Definition at line 333 of file CBD8210.h.

References m_pITF.

volatile unsigned short* CBD8210::getCAR (  )  [inline]

Definition at line 337 of file CBD8210.h.

References m_pCAR.

volatile unsigned short* CBD8210::getBTB (  )  [inline]

Definition at line 341 of file CBD8210.h.

References m_pBTB.

volatile unsigned short* CBD8210::getBZ (  )  [inline]

Definition at line 345 of file CBD8210.h.

References m_pBZ.

volatile unsigned long* CBD8210::getGL (  )  [inline]

Definition at line 349 of file CBD8210.h.

References m_pGL.

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, and m_pCsr.

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, and m_pCsr.

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

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, and m_pCsr.

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, 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.

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::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.

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, and m_pCsr.

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, and m_pCsr.

unsigned short CBD8210::ReadCsr (  )  const

Returns the current value of the CSR.

Definition at line 598 of file CBD8210.cpp.

References m_pCsr.

Referenced by CCAMACTrigger::operator()().

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()().

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.

References m_pBTB.

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.

References m_pGL.

void CBD8210::InitBranch (  )  const

Performs a BZ cycle on the branch.

Definition at line 669 of file CBD8210.cpp.

References m_pBZ.


Member Data Documentation

const int CBD8210::IT2BIT = 2 [static]

Definition at line 303 of file CBD8210.h.

Referenced by CCAMACTrigger::operator()().

const int CBD8210::IT4BIT = 1 [static]

Definition at line 304 of file CBD8210.h.

Referenced by CCAMACTrigger::operator()().

volatile unsigned short* CBD8210::m_pCsr [private]

Pointer to the Control Status Register.

Definition at line 306 of file CBD8210.h.

Referenced by BranchDemand(), CBD8210(), getCsr(), IT2(), IT4(), MIT2(), MIT4(), MLAM(), MNoX(), MTo(), operator=(), operator==(), Qtest(), ReadCsr(), TimedOut(), WriteCsr(), and Xtest().

volatile unsigned short* CBD8210::m_pITF [private]

Pointer to the Interrupt flag register.

Definition at line 307 of file CBD8210.h.

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

volatile unsigned short* CBD8210::m_pCAR [private]

Pointer to the Crate Address Register.

Definition at line 308 of file CBD8210.h.

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

volatile unsigned short* CBD8210::m_pBTB [private]

Pointer to the branch timing register.

Definition at line 309 of file CBD8210.h.

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

volatile unsigned short* CBD8210::m_pBZ [private]

Pointer to the Branch Zero register.

Definition at line 310 of file CBD8210.h.

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

volatile unsigned long* CBD8210::m_pGL [private]

Graded LAM register.

Definition at line 311 of file CBD8210.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Sep 17 08:38:11 2008 for NSCL Device support. by  doxygen 1.5.1