ICP
1
|
#include <period_card.h>
Public Member Functions | |
PeriodCard (int position, ISISVME *vme, DAEstatus &status) | |
void | printStatus (std::ostream &os, DAEstatus &status) |
int | getCurrentPeriodNumber (DAEstatus &status) |
bool | inDwellPeriod (DAEstatus &status) |
int | setNumberOfPeriods (isisU16_t n, DAEstatus &status) |
int | getNumberOfPeriods (DAEstatus &status) |
int | getCurrentPeriodSequence (DAEstatus &status) |
int | clearVetoCounters (DAEstatus &status) |
int | getExtractTriggerVetoCountLow (isisU16_t *value, DAEstatus &status) |
int | getExtractTriggerVetoCountHigh (isisU16_t *value, DAEstatus &status) |
int | getExtractTriggerVetoCount (isisU32_t *value, DAEstatus &status) |
int | enableExtractTriggerVeto (DAEstatus &status) |
int | disableExtractTriggerVeto (DAEstatus &status) |
int | resetCard (DAEstatus &status) |
int | clearPeriodCounters (DAEstatus &status) |
int | enable50HzVeto (DAEstatus &status) |
int | disable50HzVeto (DAEstatus &status) |
int | setInternalPeriodClockMode (DAEstatus &status) |
int | setExternalPeriodClockMode (DAEstatus &status) |
int | setSinglePeriodSequenceMode (DAEstatus &status) |
int | setMultiplePeriodSequenceMode (DAEstatus &status) |
int | setInternalPeriodControlMode (DAEstatus &status) |
int | setExternalPeriodControlMode (DAEstatus &status) |
int | enablePeriodMode (DAEstatus &status) |
int | disablePeriodMode (DAEstatus &status) |
int | endRunAfterSequenceCompletes (DAEstatus &status) |
bool | isRunEndedAndSequenceComplete (DAEstatus &status) |
int | programPERLUT (isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status) |
int | programOUTLUT (isisU32_t *outputs, int nperiod, DAEstatus &status) |
int | readPERLUT (isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status) |
int | readOUTLUT (isisU32_t *outputs, int nperiod, DAEstatus &status) |
int | getPeriodRawFrames (int period, isisU32_t *frames, DAEstatus &status) |
int | getPeriodGoodFrames (int period, isisU32_t *frames, DAEstatus &status) |
int | zeroPeriodFrameCounters (DAEstatus &status) |
int | setPeriodControlBits (isisU32_t mask, bool preserve, DAEstatus &status) |
int | startDataCollection (DAEstatus &status) |
int | stopDataCollection (DAEstatus &status) |
void | abortSequenceCompleteWait (DAEstatus &status) |
Public Member Functions inherited from DAE2Card< DAECardPolicy > | |
DAE2Card (int position, ISISVME *vme, DAEstatus &status) | |
int | setRegisterBits (unsigned long address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false) |
int | clearRegisterBits (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false) |
int | setAndClearRegisterBits (unsigned long address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false) |
int | changeRegisterBits (unsigned long address, isisU32_t mask, bool set, bool check, DAEstatus &status, bool little_endian=false) |
bool | registerBitsSet (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false) |
bool | registerBitsClear (unsigned long address, isisU32_t mask, DAEstatus &status, bool little_endian=false) |
int | setAndClearRegisterBits (const unused_t &address, isisU32_t mask, bool preserve, DAEstatus &status, bool little_endian=false) |
int | readRegister (unsigned long address, isisU32_t *value, DAEstatus &status, bool little_endian=false, bool retry=true) |
int | writeRegister (unsigned long address, isisU32_t value, DAEstatus &status, bool little_endian=false) |
int | readRegister (unsigned long address, isisU16_t *value, DAEstatus &status, bool little_endian=false, bool retry=true) |
int | writeRegister16 (unsigned long address, isisU16_t value, DAEstatus &status, bool little_endian=false) |
int | readRegister16As32 (unsigned long address0, unsigned long address1, isisU32_t *value, DAEstatus &status, bool little_endian=false) |
int | writeRegister32As16 (unsigned long address0, unsigned long address1, isisU32_t value, DAEstatus &status, bool little_endian=false) |
int | readRegister (const unused_t &address, isisU32_t *value, DAEstatus &status, bool little_endian=false, bool retry=true) |
int | writeRegister (const unused_t &address, isisU32_t value, DAEstatus &status, bool little_endian=false) |
int | writeRegister16 (const unused_t &address, isisU16_t value, DAEstatus &status, bool little_endian=false) |
int | position () const |
std::string | daeDevice () const |
std::string | getFirmwareVersionAsString (DAEstatus &status) |
virtual | ~DAE2Card () |
void | printRegister (const char *name, unsigned long address, std::ostream &os, bool print_bits_set=false) |
virtual int | resetCardState (DAEstatus &status)=0 |
template<typename T > | |
int | readMemory (unsigned long address, typename T *buffer, int len, ISISVME::TransferProps props, DAEstatus &status) |
template<typename T > | |
int | readMemoryChunked (unsigned long address, T *buffer, int len, int chunk_len, ISISVME::TransferProps props, DAEstatus &status) |
template<typename T > | |
int | writeMemory (unsigned long address, T *buffer, int len, uint64_t read_check_mask, ISISVME::TransferProps props, DAEstatus &status) |
template<typename T > | |
int | zeroMemory (unsigned long start, int len, uint64_t read_check_mask, ISISVME::TransferProps props, DAEstatus &status) |
Public Member Functions inherited from DAE2CardIntf | |
DAE2CardIntf () | |
virtual | ~DAE2CardIntf () |
Protected Member Functions | |
int | clearPeriodControlBits (isisU32_t mask, DAEstatus &status) |
int | setAndClearPeriodControlBits (isisU32_t mask, bool preserve, DAEstatus &status) |
int | getRawFrames (int period_start, int nperiod, isisU32_t frames[], DAEstatus &status) |
int | getGoodFrames (int period_start, int nperiod, isisU32_t frames[], DAEstatus &status) |
int | getPeriodRequestedFrames (int period, isisU32_t *frames, DAEstatus &status) |
int | getRequestedFrames (int period_start, int nperiod, isisU32_t frames[], DAEstatus &status) |
int | lookupAccessOUTLUT (DAEstatus &status) |
int | lookupAccessPERLUT (DAEstatus &status) |
int | lookupFinished (DAEstatus &status) |
Protected Member Functions inherited from DAE2Card< DAECardPolicy > | |
void | reverseEndian (isisU32_t *value) |
void | reverseEndian (isisU16_t *value) |
std::string | loggingPrefix () const |
virtual unsigned long | makeAddress (unsigned long address) |
Protected Member Functions inherited from ISIS::Base | |
Base (const std::string &logger_name="UNKNOWN") | |
void | setLoggerName (const std::string &logger_name) |
virtual | ~Base () |
void | setThisLoggerLevel (int level) |
Additional Inherited Members | |
Public Types inherited from DAE2CardIntf | |
enum | CardType { EmptySlot = 0, UnknownCard = 1, EnvCard = 2, EnvPeriodCard = 3, NeutronDetectorCard = 4, MuonDetectorCard = 5, MuonPeriodCard = 6 } |
Static Public Member Functions inherited from DAE2Card< DAECardPolicy > | |
static bool | isCardPresent (int position, ISISVME *vme, DAEstatus &status) |
static CardType | getCardType (int position, ISISVME *vme, DAEstatus &dstatus) |
static unsigned long | makeAddress (int position, unsigned long address) |
Static Protected Member Functions inherited from DAE2Card< DAECardPolicy > | |
static int | getFirmwareVersion (int position, ISISVME *vme, firmware_version *fw, DAEstatus &status) |
static const char * | yesNoStr (bool b) |
Static Protected Member Functions inherited from ISIS::Base | |
static void | setAllLoggerLevel (int level) |
Protected Attributes inherited from DAE2Card< DAECardPolicy > | |
int | m_position |
ISISVME * | m_vme |
Protected Attributes inherited from ISIS::Base | |
Poco::Logger * | m_logger |
Poco::LogStream * | m_logstr |
Poco::Mutex | m_logger_lock |
Definition at line 68 of file period_card.h.
Definition at line 5 of file period_card.cpp.
References DAEstatus::addInfo(), FAC_ENVCARD, and printStatus().
void PeriodCard::abortSequenceCompleteWait | ( | DAEstatus & | status | ) |
Definition at line 267 of file period_card.cpp.
References clearPeriodControlBits(), and PCENDAFTER.
Definition at line 88 of file period_card.cpp.
References DAE2Card< DAECardPolicy >::clearRegisterBits(), and PCREG.
Referenced by abortSequenceCompleteWait(), disable50HzVeto(), disableExtractTriggerVeto(), disablePeriodMode(), isRunEndedAndSequenceComplete(), setInternalPeriodClockMode(), setInternalPeriodControlMode(), and setSinglePeriodSequenceMode().
int PeriodCard::clearPeriodCounters | ( | DAEstatus & | status | ) |
Definition at line 191 of file period_card.cpp.
References PCCLRPC, and setAndClearPeriodControlBits().
int PeriodCard::clearVetoCounters | ( | DAEstatus & | status | ) |
Definition at line 98 of file period_card.cpp.
References PCCLRVETO, and setAndClearPeriodControlBits().
int PeriodCard::disable50HzVeto | ( | DAEstatus & | status | ) |
Definition at line 202 of file period_card.cpp.
References clearPeriodControlBits(), and PC50HZENAB.
int PeriodCard::disableExtractTriggerVeto | ( | DAEstatus & | status | ) |
Definition at line 123 of file period_card.cpp.
References clearPeriodControlBits(), and PCEXTTRIG.
int PeriodCard::disablePeriodMode | ( | DAEstatus & | status | ) |
Definition at line 242 of file period_card.cpp.
References clearPeriodControlBits(), and PCENAB.
int PeriodCard::enable50HzVeto | ( | DAEstatus & | status | ) |
Definition at line 197 of file period_card.cpp.
References PC50HZENAB, and setPeriodControlBits().
int PeriodCard::enableExtractTriggerVeto | ( | DAEstatus & | status | ) |
Definition at line 118 of file period_card.cpp.
References PCEXTTRIG, and setPeriodControlBits().
int PeriodCard::enablePeriodMode | ( | DAEstatus & | status | ) |
Definition at line 237 of file period_card.cpp.
References PCENAB, and setPeriodControlBits().
int PeriodCard::endRunAfterSequenceCompletes | ( | DAEstatus & | status | ) |
Definition at line 247 of file period_card.cpp.
References PCENDAFTER, and setPeriodControlBits().
int PeriodCard::getCurrentPeriodNumber | ( | DAEstatus & | status | ) |
Definition at line 143 of file period_card.cpp.
References MPCNT, and DAE2Card< DAECardPolicy >::readRegister().
Referenced by printStatus().
int PeriodCard::getCurrentPeriodSequence | ( | DAEstatus & | status | ) |
Definition at line 177 of file period_card.cpp.
References PSCNT, and DAE2Card< DAECardPolicy >::readRegister().
Referenced by getGoodFrames(), and getRawFrames().
Definition at line 113 of file period_card.cpp.
References EXTTRIGVC0, EXTTRIGVC1, and DAE2Card< DAECardPolicy >::readRegister16As32().
Referenced by printStatus().
Definition at line 108 of file period_card.cpp.
References EXTTRIGVC1, and DAE2Card< DAECardPolicy >::readRegister().
Definition at line 103 of file period_card.cpp.
References EXTTRIGVC0, and DAE2Card< DAECardPolicy >::readRegister().
|
protected |
Definition at line 393 of file period_card.cpp.
References getCurrentPeriodSequence(), getRequestedFrames(), GFCNT0START, DAE2Card< DAECardPolicy >::readMemory(), and DAEstatus::result().
Referenced by getPeriodGoodFrames(), and printStatus().
int PeriodCard::getNumberOfPeriods | ( | DAEstatus & | status | ) |
Definition at line 163 of file period_card.cpp.
References MAX_NUM_PERIODS, MPLIM, and DAE2Card< DAECardPolicy >::readRegister().
Referenced by printStatus().
Definition at line 355 of file period_card.cpp.
References getGoodFrames().
Definition at line 350 of file period_card.cpp.
References getRawFrames().
|
protected |
Definition at line 360 of file period_card.cpp.
References getRequestedFrames().
|
protected |
Definition at line 378 of file period_card.cpp.
References getCurrentPeriodSequence(), getRequestedFrames(), DAE2Card< DAECardPolicy >::readMemory(), DAEstatus::result(), and RFCNT0START.
Referenced by getPeriodRawFrames(), and printStatus().
|
protected |
Definition at line 365 of file period_card.cpp.
References lookupAccessPERLUT(), lookupFinished(), PERLUTSTART, and DAE2Card< DAECardPolicy >::readMemory().
Referenced by getGoodFrames(), getPeriodRequestedFrames(), and getRawFrames().
bool PeriodCard::inDwellPeriod | ( | DAEstatus & | status | ) |
Definition at line 151 of file period_card.cpp.
References MPCNT, and DAE2Card< DAECardPolicy >::readRegister().
Referenced by printStatus().
bool PeriodCard::isRunEndedAndSequenceComplete | ( | DAEstatus & | status | ) |
Definition at line 252 of file period_card.cpp.
References clearPeriodControlBits(), PCENDAFTER, PCENDSEQCOMP, PCREG, and DAE2Card< DAECardPolicy >::readRegister().
|
protected |
Definition at line 128 of file period_card.cpp.
References LOOKTAR, TAROUTLUT, and DAE2Card< DAECardPolicy >::writeRegister16().
Referenced by programOUTLUT(), and readOUTLUT().
|
protected |
Definition at line 133 of file period_card.cpp.
References LOOKTAR, TARPERLUT, and DAE2Card< DAECardPolicy >::writeRegister16().
Referenced by getRequestedFrames(), programPERLUT(), and readPERLUT().
|
protected |
Definition at line 138 of file period_card.cpp.
References LOOKTAR, and DAE2Card< DAECardPolicy >::writeRegister16().
Referenced by getRequestedFrames(), programOUTLUT(), programPERLUT(), readOUTLUT(), and readPERLUT().
|
virtual |
Reimplemented from DAE2Card< DAECardPolicy >.
Definition at line 32 of file period_card.cpp.
References period_modes::bit, getCurrentPeriodNumber(), getExtractTriggerVetoCount(), getGoodFrames(), getNumberOfPeriods(), getRawFrames(), inDwellPeriod(), MAT_1, mode_list, PCREG, DAE2Card< DAECardPolicy >::printStatus(), PSCNT, readOUTLUT(), readPERLUT(), DAE2Card< DAECardPolicy >::readRegister(), period_modes::set, and period_modes::unset.
Referenced by PeriodCard().
Definition at line 314 of file period_card.cpp.
References lookupAccessOUTLUT(), lookupFinished(), OUTLUTSIZE, OUTLUTSTART, DAE2Card< DAECardPolicy >::writeMemory(), and DAE2Card< DAECardPolicy >::zeroMemory().
int PeriodCard::programPERLUT | ( | isisU16_t * | dwell_flags, |
isisU16_t * | frames, | ||
int | nperiod, | ||
DAEstatus & | status | ||
) |
Definition at line 273 of file period_card.cpp.
References lookupAccessPERLUT(), lookupFinished(), PERLUTSIZE, PERLUTSTART, DAE2Card< DAECardPolicy >::writeMemory(), and DAE2Card< DAECardPolicy >::zeroMemory().
Definition at line 329 of file period_card.cpp.
References lookupAccessOUTLUT(), lookupFinished(), OUTLUTSTART, and DAE2Card< DAECardPolicy >::readMemory().
Referenced by printStatus().
int PeriodCard::readPERLUT | ( | isisU16_t * | dwell_flags, |
isisU16_t * | frames, | ||
int | nperiod, | ||
DAEstatus & | status | ||
) |
Definition at line 296 of file period_card.cpp.
References lookupAccessPERLUT(), lookupFinished(), PERLUTSTART, and DAE2Card< DAECardPolicy >::readMemory().
Referenced by printStatus().
int PeriodCard::resetCard | ( | DAEstatus & | status | ) |
Definition at line 184 of file period_card.cpp.
References MAT_1, PCRESET, setAndClearPeriodControlBits(), and DAE2Card< DAECardPolicy >::writeRegister().
|
protected |
Definition at line 93 of file period_card.cpp.
References PCREG, and DAE2Card< DAECardPolicy >::setAndClearRegisterBits().
Referenced by clearPeriodCounters(), clearVetoCounters(), and resetCard().
int PeriodCard::setExternalPeriodClockMode | ( | DAEstatus & | status | ) |
Definition at line 212 of file period_card.cpp.
References PCEXTPERCLK, and setPeriodControlBits().
int PeriodCard::setExternalPeriodControlMode | ( | DAEstatus & | status | ) |
Definition at line 232 of file period_card.cpp.
References PCEXTENAB, and setPeriodControlBits().
int PeriodCard::setInternalPeriodClockMode | ( | DAEstatus & | status | ) |
Definition at line 207 of file period_card.cpp.
References clearPeriodControlBits(), and PCEXTPERCLK.
int PeriodCard::setInternalPeriodControlMode | ( | DAEstatus & | status | ) |
Definition at line 227 of file period_card.cpp.
References clearPeriodControlBits(), and PCEXTENAB.
int PeriodCard::setMultiplePeriodSequenceMode | ( | DAEstatus & | status | ) |
Definition at line 222 of file period_card.cpp.
References PCMULENAB, and setPeriodControlBits().
Definition at line 158 of file period_card.cpp.
References MPLIM, and DAE2Card< DAECardPolicy >::writeRegister16().
Definition at line 83 of file period_card.cpp.
References PCREG, and DAE2Card< DAECardPolicy >::setRegisterBits().
Referenced by enable50HzVeto(), enableExtractTriggerVeto(), enablePeriodMode(), endRunAfterSequenceCompletes(), setExternalPeriodClockMode(), setExternalPeriodControlMode(), and setMultiplePeriodSequenceMode().
int PeriodCard::setSinglePeriodSequenceMode | ( | DAEstatus & | status | ) |
Definition at line 217 of file period_card.cpp.
References clearPeriodControlBits(), and PCMULENAB.
int PeriodCard::startDataCollection | ( | DAEstatus & | status | ) |
Definition at line 408 of file period_card.cpp.
References MAT_1, and DAE2Card< DAECardPolicy >::setRegisterBits().
int PeriodCard::stopDataCollection | ( | DAEstatus & | status | ) |
Definition at line 413 of file period_card.cpp.
References DAE2Card< DAECardPolicy >::clearRegisterBits(), and MAT_1.
int PeriodCard::zeroPeriodFrameCounters | ( | DAEstatus & | status | ) |
Definition at line 343 of file period_card.cpp.
References GFCNT0SIZE, GFCNT0START, RFCNT0SIZE, RFCNT0START, and DAE2Card< DAECardPolicy >::zeroMemory().