#include <Nimout.h>
Inheritance diagram for CNimout:
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 () |
CNimout & | operator= (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 |
Definition at line 302 of file Nimout.h.
enum CNimout::Register |
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.
Int_t CNimout::operator== | ( | const CNimout & | aCNimout | ) |
Purpose: operator== Equality operator.
const | CNimout& aCNimout - the object to check for equality with |
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 | |||
) |
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.
DFloat_t | time_in_ns - the time (in nanoseconds) to set the strobe timing register to. |
Definition at line 428 of file Nimout.cpp.
References CONTROL, CVmeModule::peekw(), CVmeModule::pokew(), and TIMING.
void CNimout::StrobeAll | ( | ) |
void CNimout::OrRegister | ( | Register | reg, | |
UShort_t | or_pattern | |||
) |
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.
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 | |||
) |
Bool_t CNimout::ClearBit | ( | Register | reg, | |
UInt_t | bit_num | |||
) |
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.
Register | reg - the register enumeration indicating the register to read from. |
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.
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.
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.
UShort_t* CNimout::m_pBase [private] |
UShort_t* CNimout::m_pStrobeRegister [private] |
UShort_t* CNimout::m_pControlRegister [private] |