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

CCrateController Class Reference

#include <CCrateController.h>

List of all members.

Public Methods

 CCrateController (unsigned int b, unsigned int c)
 CCrateController (const CCrateController &rhs)
 ~CCrateController ()
 Destructor.

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

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

int operator!= (const CCrateController &rhs) const
CBD8210 getCBD8210 () const
CCamacModule getSlot28 () const
CCamacModule getSlot30 () const
CCamacModule getBroadcastSlot () const
CCamacModule getMulticastSlot () const
void Z ()
void C ()
long Lams ()
void WriteSnr (unsigned long nMask)
void UnInhibit ()
void DisableDemand ()
void Inhibit ()
void EnableDemand ()
bool isInhibited ()
bool isDemanding ()
bool isDemandEnabled ()
void BroadcastControl (unsigned int f, unsigned int a)
void BroadcastWrite (unsigned int f, unsigned int a, unsigned long d)
void MulticastControl (unsigned int f, unsigned int a, unsigned long nMask)
void MulticastWrite (unsigned int f, unsigned int a, unsigned long nMask, unsigned long nData)
void InitializeCrate ()

Private Attributes

CBD8210 m_myBranch
 Branch highway driver we live in.

CCamacModule m_Slot28
 C/Z happen via this slot.

CCamacModule m_Slot30
 Most other controller ops are here.

CCamacModule m_Broadcast
 Broadcast operations via this slot.

CCamacModule m_Multicast
 Multicast operations via SNR and this slot.


Detailed Description

Encapsulates a BiRa 1302 parallel branch highway crate controller. This controller answers in three slots: N28 - C/Z operations. N30 - Most of the other operations. N26 Broadcast FNAD N24 Multicast FNAD as pser the SNR.

Definition at line 302 of file CCrateController.h.


Constructor & Destructor Documentation

CCrateController::CCrateController unsigned int    b,
unsigned int    c
 

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

  • CCrateController object; are performed.
Parameters:
b  - branch the controller lives in.
c  - Crate the controller lives in.

Definition at line 290 of file CCrateController.cpp.

CCrateController::CCrateController const CCrateController &    rhs
 

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 304 of file CCrateController.cpp.

CCrateController::~CCrateController   [inline]
 

Destructor.

Definition at line 317 of file CCrateController.h.


Member Function Documentation

void CCrateController::BroadcastControl unsigned int    f,
unsigned int    a
 

Broadcasts the same control F.A to all modules in the crate. Note that F must be in the range of valid control functions.

Parameters:
f  - Function code to broadcast.
a  - Subaddress to broadcast at.
Exceptions:
CRangeError  - If F is not a control function [8-15,24-31], or A is not a valid subaddress [0,16).
Parameters:
unsigned  int f, unsigned int a

Definition at line 508 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Broadcast.

void CCrateController::BroadcastWrite unsigned int    f,
unsigned int    a,
unsigned long    d
 

Broadcasts the same write F and A to all modules in the crate.

Parameters:
f  - Function code to broadcast.
a  - Subaddress of broadcast.
d  - longword data to write.
Exceptions:
CRangeException  - if either f is not a write operation [16-24) or a is not a valid subaddress [0,16).
Parameters:
unsigned  int f, unsigned int a

Definition at line 531 of file CCrateController.cpp.

References m_Broadcast, and CCamacModule::Write().

void CCrateController::C  
 

Performs a Create C operations. The C line in the crate is strobed. This is N28.F26.A9

Definition at line 356 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot28.

Referenced by InitializeCrate().

void CCrateController::DisableDemand  
 

Disables the production of branch demands. A branch demand is created whenever the GL register is non-zero when enabled.

Definition at line 416 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot30.

Referenced by InitializeCrate().

void CCrateController::EnableDemand  
 

Enables the Branch demand from this crate. When the BD is enabled, anytime there's a non zero value in the Gl register, a branch demand is created.

Definition at line 439 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot30.

CCamacModule CCrateController::getBroadcastSlot   const [inline]
 

Definition at line 339 of file CCrateController.h.

CBD8210 CCrateController::getCBD8210   const [inline]
 

Definition at line 328 of file CCrateController.h.

CCamacModule CCrateController::getMulticastSlot   const [inline]
 

Definition at line 343 of file CCrateController.h.

CCamacModule CCrateController::getSlot28   const [inline]
 

Definition at line 331 of file CCrateController.h.

CCamacModule CCrateController::getSlot30   const [inline]
 

Definition at line 335 of file CCrateController.h.

void CCrateController::Inhibit  
 

Sets the data way inhibit.

Definition at line 427 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot30.

void CCrateController::InitializeCrate  
 

The crate is returned to a known configuration. This means that C/Z are done, the crate I is removed and branch demands are disabled.

Definition at line 603 of file CCrateController.cpp.

References C(), DisableDemand(), UnInhibit(), and Z().

Referenced by CamacTestThread::CamacTestThread().

bool CCrateController::isDemandEnabled  
 

Returns true if the Branch Demand is enabled. When the branch demand is enabled, this module can initiate branch demands whenever the GL register is nonzero. This function requires a n30.f27.a11 followed by a Q test in the branch controller. This operation is not gaurenteed to work if other threads or processes are concurrently accessing the branch.

Definition at line 487 of file CCrateController.cpp.

References CCamacModule::Control(), m_myBranch, m_Slot30, and CBD8210::Qtest().

bool CCrateController::isDemanding  
 

Returns true if the crate is currently issuing a demand. This funciton requires a n30.f24.a10 followed by a Qtest. If other processes or threads are concurrently accessing the crate this may return incorrect results.

Definition at line 470 of file CCrateController.cpp.

References CCamacModule::Control(), m_myBranch, m_Slot30, and CBD8210::Qtest().

bool CCrateController::isInhibited  
 

true if the crate is inhibited. Note that this operation invovles N30.f27.a9 followed by a Q test on the branch. If the multiple processes are accessing the same crate concurrently, this function is not reliable.

Definition at line 455 of file CCrateController.cpp.

References CCamacModule::Control(), m_myBranch, m_Slot30, and CBD8210::Qtest().

long CCrateController::Lams  
 

Returns the contents of the Create Graded LAM register. For NSCL configured controllers with the standard Graded LAM jumper header installed, the result is a bitmask which indicates which modules have LAMs set in them. N30.F0.A7

Definition at line 372 of file CCrateController.cpp.

References m_Slot30, and CCamacModule::Read().

void CCrateController::MulticastControl unsigned int    f,
unsigned int    a,
unsigned long    nMask
 

Multicasts the same control F.A to a set of modules. The modules are selected by a bitmask. Low order bit represents slot1. e.g. a mask value of: 0x15 multicasts to slots 1,3,5

Parameters:
f  - Function to broadcast. Must be a valid control function.
a  - Subaddress associated with the function.
nMask  - Mask of slots to which the operation is multicast.
Exceptions:
CRangeError  - if f not in {[8-16), [24,32)} or a is not in [0,16).
Note:
This operation is not atomic. It requires writing the Slot mask register and then performing the multicast. If more than one thread or process is concurrently accessing the crate, this operation is not reliable. this is especially true if the other threads/processes are also doing multicasts.

Definition at line 562 of file CCrateController.cpp.

References CCamacModule::Control(), m_Multicast, and WriteSnr().

void CCrateController::MulticastWrite unsigned int    f,
unsigned int    a,
unsigned long    nMask,
unsigned long    nData
 

Performs a multicast write. The specified data is written to the set of modules selected by a mask. See MulticastControl for information about the format of this mask.

Parameters:
f  - Function code to execute.
a  - Subaddress at which the function is done.
nMask  - Mask of slots describing the multicast.
nData  - 24 bit data to write.
Note:
This function is not atomic with respect to the crate. This means that if other threads or processes are concurrently attempting to multicast operations, this operation can fail.

Definition at line 588 of file CCrateController.cpp.

References m_Multicast, CCamacModule::Write(), and WriteSnr().

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

Definition at line 321 of file CCrateController.h.

References operator==().

CCrateController & CCrateController::operator= const CCrateController &    rhs
 

Assignment.

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

Definition at line 320 of file CCrateController.cpp.

References m_Broadcast, m_Multicast, m_myBranch, m_Slot28, and m_Slot30.

int CCrateController::operator== const CCrateController &    rhs const
 

Comparison for equality.

Referenced by operator!=().

void CCrateController::UnInhibit  
 

Removes the inhibit signal from the dataway. The state of the inhibit can be tested, and the I led on the module reflects it as well.

Definition at line 403 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot30.

Referenced by InitializeCrate().

void CCrateController::WriteSnr unsigned long    nMask
 

Writes the Station number mask register. The 1302 suports multicast operations. A multicast operation consists of selecting the modules to be affected by writing the SNR mask and then performing the desired F.A at N24. The member functions MulticastControl and MulticastWrite perform both of these operations and should be used.

Parameters:
unsigned  long nMask

Definition at line 390 of file CCrateController.cpp.

References m_Slot30, and CCamacModule::Write().

Referenced by MulticastControl(), and MulticastWrite().

void CCrateController::Z  
 

Performs a Crate Z operations. The Z line in the crate is strobed. This is an N28.F26.A8

Definition at line 342 of file CCrateController.cpp.

References CCamacModule::Control(), and m_Slot28.

Referenced by InitializeCrate().


Member Data Documentation

CCamacModule CCrateController::m_Broadcast [private]
 

Broadcast operations via this slot.

Definition at line 309 of file CCrateController.h.

Referenced by BroadcastControl(), BroadcastWrite(), and operator=().

CCamacModule CCrateController::m_Multicast [private]
 

Multicast operations via SNR and this slot.

Definition at line 310 of file CCrateController.h.

Referenced by MulticastControl(), MulticastWrite(), and operator=().

CBD8210 CCrateController::m_myBranch [private]
 

Branch highway driver we live in.

Definition at line 306 of file CCrateController.h.

Referenced by isDemandEnabled(), isDemanding(), isInhibited(), and operator=().

CCamacModule CCrateController::m_Slot28 [private]
 

C/Z happen via this slot.

Definition at line 307 of file CCrateController.h.

Referenced by C(), operator=(), and Z().

CCamacModule CCrateController::m_Slot30 [private]
 

Most other controller ops are here.

Definition at line 308 of file CCrateController.h.

Referenced by DisableDemand(), EnableDemand(), Inhibit(), isDemandEnabled(), isDemanding(), isInhibited(), Lams(), operator=(), UnInhibit(), and WriteSnr().


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