CNimout Class Reference

#include <Nimout.h>

Inheritance diagram for CNimout:

CVmeModule List of all members.

Public Types

enum  Register { DATA, STROBE, TIMING, CONTROL }

Public Member Functions

 CNimout (UInt_t base)
 CNimout (CVME< UShort_t > &am_CVME)
 CNimout (const CNimout &aCNimout)
virtual ~CNimout ()
CNimoutoperator= (const CNimout &aCNimout)
Int_t operator== (const CNimout &aCNimout)
void ClearAll ()
void WriteRegister (Register reg, UShort_t pattern)
Bool_t SetStrobeLength (DFloat_t time_in_ns)
void StrobeAll ()
void OrRegister (Register reg, UShort_t or_pattern)
void AndRegister (Register reg, UShort_t and_pattern)
Bool_t SetBit (Register reg, UInt_t bit_num)
Bool_t ClearBit (Register reg, UInt_t bit_num)
void TransferData ()
void SetTBit ()
void ClearCBit ()
void ClearTBit ()
UShort_t ReadRegister (Register reg)
Bool_t ModuleReady ()
Bool_t TBitSet ()
void PrintAll ()

Private Types

enum  { LENGTH = 64 }

Private Attributes

UShort_t * m_pBase
UShort_t * m_pStrobeRegister
UShort_t * m_pControlRegister

Detailed Description

Definition at line 302 of file Nimout.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
LENGTH 

Definition at line 304 of file Nimout.h.

enum CNimout::Register

Enumerator:
DATA 
STROBE 
TIMING 
CONTROL 

Definition at line 313 of file Nimout.h.


Constructor & Destructor Documentation

CNimout::CNimout ( UInt_t  base  ) 

Definition at line 312 of file Nimout.cpp.

References CONTROL, CVME< T >::getgenptr(), m_pBase, m_pControlRegister, m_pStrobeRegister, and STROBE.

CNimout::CNimout ( CVME< UShort_t > &  am_CVME  ) 

CNimout::CNimout ( const CNimout aCNimout  ) 

Definition at line 333 of file Nimout.cpp.

virtual CNimout::~CNimout (  )  [inline, virtual]

Definition at line 328 of file Nimout.h.


Member Function Documentation

CNimout & CNimout::operator= ( const CNimout aCNimout  ) 

Definition at line 347 of file Nimout.cpp.

References CVmeModule::operator=().

Int_t CNimout::operator== ( const CNimout aCNimout  ) 

Purpose: operator== Equality operator.

Parameters:
const CNimout& aCNimout - the object to check for equality with
Returns:
1 if they are equal 0 if they are not equal

Definition at line 366 of file Nimout.cpp.

void CNimout::ClearAll (  ) 

Purpose: Clears all contents of all registers

Definition at line 378 of file Nimout.cpp.

References CONTROL, DATA, CVmeModule::pokew(), STROBE, and TIMING.

void CNimout::WriteRegister ( Register  reg,
UShort_t  pattern 
)

Definition at line 398 of file Nimout.cpp.

References m_pBase.

Bool_t CNimout::SetStrobeLength ( DFloat_t  time_in_ns  ) 

Purpose: Sets the strobe timing register to a value which corresponds to the parameter in nanoseconds. This may require a write to the T bit of the control status register.

Note: The smallest possible value for time_in_ns is 62.5nS, and all possible values are multiples of 62.5nS (if the T bit is deasserted) or 4096uS (if the T bit is high). If the parameter is NOT an even multiple of 62.5 (or 4096), then the time will be ROUNDED to the nearest multiple of 62.5 (or 4096). If the nearest multiple is 0 or is greater than 268.43136sec, then function returns the value 0.

Parameters:
DFloat_t time_in_ns - the time (in nanoseconds) to set the strobe timing register to.
Returns:
1 if the function was successful 0 if the function was unsuccessful (see above note)

Definition at line 428 of file Nimout.cpp.

References CONTROL, CVmeModule::peekw(), CVmeModule::pokew(), and TIMING.

void CNimout::StrobeAll (  ) 

Definition at line 469 of file Nimout.cpp.

References m_pStrobeRegister.

void CNimout::OrRegister ( Register  reg,
UShort_t  or_pattern 
)

Definition at line 487 of file Nimout.cpp.

References CVmeModule::peekw(), and CVmeModule::pokew().

void CNimout::AndRegister ( Register  reg,
UShort_t  and_pattern 
)

Purpose: Logically and's the bit pattern held by register 'reg' with the parameter and_pattern. Throws a CRangeError exception if there is a range error.

Parameters:
Register reg - enumeration indicating which register to 'and' UShort_t and_pattern - the bit pattern to and with the pattern contained in the register 'reg'.

Definition at line 511 of file Nimout.cpp.

References CVmeModule::peekw(), and CVmeModule::pokew().

Bool_t CNimout::SetBit ( Register  reg,
UInt_t  bit_num 
)

Definition at line 537 of file Nimout.cpp.

References CVmeModule::peekw(), and CVmeModule::pokew().

Bool_t CNimout::ClearBit ( Register  reg,
UInt_t  bit_num 
)

Definition at line 565 of file Nimout.cpp.

References CVmeModule::peekw(), and CVmeModule::pokew().

void CNimout::TransferData (  ) 

Purpose: Asserts the C/S bit of the Control Status Register. Data is transferred when the C/S bit is set. The module is ready for new data when the status bit reads zero.

Definition at line 591 of file Nimout.cpp.

References m_pControlRegister.

void CNimout::SetTBit (  ) 

Purpose: Asserts the T bit of the Control Status Register. When the T bit is low, the bit weight of the register is 62.5ns, and full scale is 4096us. When the T bit is high, the bit weight of the register is 4096us, and full scale is 268.43146 sec.

Definition at line 609 of file Nimout.cpp.

References CONTROL, CVmeModule::peekw(), and CVmeModule::pokew().

void CNimout::ClearCBit (  ) 

Purpose: Deasserts the C bit of the control/status register.

Definition at line 622 of file Nimout.cpp.

References CONTROL, CVmeModule::peekw(), and CVmeModule::pokew().

void CNimout::ClearTBit (  ) 

Purpose: Deasserts the timing bit (T) of the control/status register.

Definition at line 635 of file Nimout.cpp.

References CONTROL, CVmeModule::peekw(), and CVmeModule::pokew().

UShort_t CNimout::ReadRegister ( Register  reg  ) 

Purpose: Reads the contents of register 'reg' from the Bira Nimout and returns the result. Throws a CRangeError exception if there is a range error.

Parameters:
Register reg - the register enumeration indicating the register to read from.
Returns:
The contents of the register

Definition at line 655 of file Nimout.cpp.

References CVmeModule::peekw().

Referenced by PrintAll().

Bool_t CNimout::ModuleReady (  ) 

Purpose: Reads the contents of register CONTROL and determines whether or not the control/status bit is set. Returns 1 if it is not set.

Returns:
The value of the control/status bit (1 or 0)

Definition at line 676 of file Nimout.cpp.

References CONTROL, and CVmeModule::peekw().

Bool_t CNimout::TBitSet (  ) 

Purpose: Reads the contents of register CONTROL and determines whether or not the timing bit is set. Returns 1 if the timing bit is set.

Returns:
The value of the timing bit (1 or 0)

Definition at line 692 of file Nimout.cpp.

References CONTROL, and CVmeModule::peekw().

void CNimout::PrintAll (  ) 

Definition at line 704 of file Nimout.cpp.

References CONTROL, DATA, ReadRegister(), STROBE, and TIMING.


Member Data Documentation

UShort_t* CNimout::m_pBase [private]

Definition at line 305 of file Nimout.h.

Referenced by CNimout(), and WriteRegister().

UShort_t* CNimout::m_pStrobeRegister [private]

Definition at line 306 of file Nimout.h.

Referenced by CNimout(), and StrobeAll().

UShort_t* CNimout::m_pControlRegister [private]

Definition at line 307 of file Nimout.h.

Referenced by CNimout(), and TransferData().


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