ICP
1
|
#include <nivisa.h>
Public Member Functions | |
NIVisa (DAEstatus &dstatus) | |
virtual | ~NIVisa () |
int | open (const char *device, DAEstatus &dstatus) |
int | openBackplane (const char *device_bp, DAEstatus &dstatus) |
int | lockDevice (int timeout, DAEstatus &dstatus) |
int | unlockDevice (DAEstatus &dstatus) |
void | lockInterface (int timeout, DAEstatus &dstatus) |
void | unlockInterface (DAEstatus &dstatus) |
int | readU16noRetry (unsigned long address, isisU16_t *data16, TransferProps props, DAEstatus &dstatus) |
int | readU32noRetry (unsigned long address, isisU32_t *data32, TransferProps props, DAEstatus &dstatus) |
int | readU16 (unsigned long address, isisU16_t *data16, TransferProps props, DAEstatus &dstatus) |
int | readU32 (unsigned long address, isisU32_t *data32, TransferProps props, DAEstatus &dstatus) |
int | readBlockU16 (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &dstatus) |
int | readBlockU32 (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &dstatus) |
int | readBlockU64 (unsigned long address, uint64_t *data64, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeU16 (unsigned long address, isisU16_t data16, TransferProps props, DAEstatus &dstatus) |
int | writeU32 (unsigned long address, isisU32_t data32, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU16 (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU32 (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU64 (unsigned long address, uint64_t *data64, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeBlock (unsigned long address, isisU32_t *data, long nitems, TransferProps props, DAEstatus &status) |
int | writeBlock (unsigned long address, uint64_t *data, long nitems, TransferProps props, DAEstatus &status) |
int | readBlock (unsigned long address, isisU32_t *data, long nitems, TransferProps props, DAEstatus &status) |
int | readBlock (unsigned long address, uint64_t *data, long nitems, TransferProps props, DAEstatus &status) |
int | close (DAEstatus &status) |
int | scanBus (DAEstatus &status) |
bool | resetBus (DAEstatus &status) |
bool | initOK () |
const char * | device () |
const char * | deviceBackplane () |
int | addJobid (ViJobId jobId, ViStatus vi_status) |
void | setTriggerFunc (trigger_func_t *func, void *arg) |
Public Member Functions inherited from ISISVME | |
virtual | ~ISISVME () |
Static Public Member Functions | |
static void | setEndianWorkaround (bool endian_workaround) |
Protected Types | |
typedef std::map< ViJobId, ViStatus > | jobid_map_t |
Protected Member Functions | |
int | printError (ViSession session, const char *func, ViStatus status, std::ostream &os) |
int | printError (ViSession session, const char *func, ViStatus status, unsigned long address, long nitems, std::ostream &os) |
int | addError (ViSession session, const char *func, ViStatus status, const std::string &message, DAEstatus &dstatus) |
int | addError (ViSession session, const char *func, ViStatus status, unsigned long address, long nitems, const std::string &message, DAEstatus &dstatus) |
bool | resetBusDevice (const char *name, DAEstatus &dstatus) |
int | setEndian (ViSession session, bool little_endian, DAEstatus &dstatus) |
int | enableBlockTransfers (ViSession session, DAEstatus &dstatus) |
int | disableBlockTransfers (ViSession session, DAEstatus &dstatus) |
int | restoreTransferMode (ViSession session, int mode, DAEstatus &dstatus) |
int | reinit (DAEstatus &dstatus) |
template<typename F , typename T > | |
int | retrySingle (F pFunc, unsigned long address, T data, TransferProps props, DAEstatus &dstatus) |
template<typename F , typename T > | |
int | retryBlock (F pFunc, unsigned long address, T data, long nitems, TransferProps props, DAEstatus &dstatus) |
int | readU16impl (unsigned long address, isisU16_t *data16, TransferProps props, DAEstatus &dstatus) |
int | readU32impl (unsigned long address, isisU32_t *data32, TransferProps props, DAEstatus &dstatus) |
int | readBlockU16impl (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &dstatus) |
int | readBlockU32impl (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &dstatus) |
int | readBlockU64impl (unsigned long address, uint64_t *data64, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeU16impl (unsigned long address, isisU16_t data16, TransferProps props, DAEstatus &dstatus) |
int | writeU32impl (unsigned long address, isisU32_t data32, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU16impl (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU32impl (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &dstatus) |
int | writeBlockU64impl (unsigned long address, uint64_t *data64, long nitems, TransferProps props, DAEstatus &dstatus) |
ViSession | getSession (TransferProps props) |
int | onTrigger (time_t the_secs, unsigned short the_ms, ViInt16 trig_id) |
Protected Member Functions inherited from ISIS::Base | |
Base (const std::string &logger_name="UNKNOWN") | |
void | setLoggerName (const std::string &logger_name) |
virtual | ~Base () |
virtual std::string | loggingPrefix () const |
void | setThisLoggerLevel (int level) |
Static Protected Member Functions | |
static ViStatus _VI_FUNCH | IOEventHandler (ViSession vi, ViEventType eventType, ViEvent context, ViAddr userHandle) |
static ViStatus _VI_FUNCH | TriggerHandler (ViSession vi, ViEventType eventType, ViEvent context, ViAddr userHandle) |
Static Protected Member Functions inherited from ISIS::Base | |
static void | setAllLoggerLevel (int level) |
Protected Attributes | |
bool | m_init_done |
bool | m_block_transfers |
ViSession | m_default_rm |
ViSession | m_instr_le |
ViSession | m_instr_be |
ViSession | m_instr_le_bt |
ViSession | m_instr_be_bt |
ViSession | m_instr_backplane |
std::string | m_device |
std::string | m_device_bp |
jobid_map_t | m_jobid_map |
CRITICAL_SECTION | m_job_critical |
CRITICAL_SECTION | m_visa_critical |
trigger_func_t * | m_trigger_func |
void * | m_trigger_func_arg |
Protected Attributes inherited from ISIS::Base | |
Poco::Logger * | m_logger |
Poco::LogStream * | m_logstr |
Poco::Mutex | m_logger_lock |
Static Protected Attributes | |
static bool | m_endian_workaround = true |
static const int | m_tries = 5 |
number of times to try a read/write More... | |
static const int | m_retry_time = 1000 |
milliseconds between retries More... | |
static char * | m_visa_lock_name = NULL |
Additional Inherited Members | |
Public Types inherited from ISISVME | |
enum | { Error = 0, Success = 1 } |
enum | TransferProp { TransferNoOptions = 0x0, TransferBlock = 0x1, TransferLittleEndian = 0x2, TransferMemorySpace = 0x4, TransferIORegisterSpace = 0x8, TransferLUTSpace = 0x10, TransferRunMemorySpace = 0x20 } |
typedef uint32_t | TransferProps |
combination of TransferProp values More... | |
|
protected |
NIVisa::NIVisa | ( | DAEstatus & | dstatus | ) |
Definition at line 79 of file nivisa.cpp.
References m_job_critical, m_visa_critical, reinit(), and ISIS::Base::setLoggerName().
|
virtual |
Definition at line 1241 of file nivisa.cpp.
References close(), m_default_rm, m_job_critical, and m_visa_critical.
|
protected |
Definition at line 1255 of file nivisa.cpp.
References DAEstatus::add(), ERRTYPE_NIVISA, FAC_NIVISA, printError(), and SEV_ERROR.
Referenced by disableBlockTransfers(), enableBlockTransfers(), lockDevice(), open(), openBackplane(), readBlockU16impl(), readBlockU32impl(), readU16impl(), readU32impl(), resetBus(), restoreTransferMode(), scanBus(), setEndian(), unlockDevice(), writeBlockU16impl(), writeBlockU32impl(), writeU16impl(), and writeU32impl().
|
protected |
Definition at line 1264 of file nivisa.cpp.
References DAEstatus::add(), ERRTYPE_NIVISA, FAC_NIVISA, printError(), and SEV_ERROR.
int NIVisa::addJobid | ( | ViJobId | jobId, |
ViStatus | vi_status | ||
) |
Definition at line 140 of file nivisa.cpp.
References m_job_critical, and m_jobid_map.
Referenced by IOEventHandler().
|
virtual |
Implements ISISVME.
Definition at line 1089 of file nivisa.cpp.
References m_init_done, m_instr_backplane, m_instr_be, m_instr_be_bt, m_instr_le, m_instr_le_bt, m_visa_critical, ISISVME::Success, TriggerHandler(), and unlockDevice().
|
inlinevirtual |
|
inline |
Definition at line 96 of file nivisa.h.
References m_device_bp.
|
protected |
Definition at line 1043 of file nivisa.cpp.
References addError(), ISISVME::Error, and ISISVME::Success.
|
protected |
Definition at line 1018 of file nivisa.cpp.
References addError(), ISISVME::Error, m_block_transfers, and ISISVME::Success.
Referenced by open().
|
protected |
Definition at line 655 of file nivisa.cpp.
References m_instr_be, m_instr_be_bt, m_instr_le, m_instr_le_bt, m_visa_critical, ISISVME::TransferBlock, and ISISVME::TransferLittleEndian.
Referenced by readBlockU16impl(), readBlockU32impl(), readU16impl(), readU32impl(), writeBlockU16impl(), writeBlockU32impl(), writeU16impl(), and writeU32impl().
|
virtual |
|
staticprotected |
|
virtual |
Implements ISISVME.
Definition at line 425 of file nivisa.cpp.
References addError(), ISISVME::Error, m_instr_le, m_visa_lock_name, and ISISVME::Success.
Referenced by open().
|
virtual |
Implements ISISVME.
Definition at line 69 of file nivisa.cpp.
References VisaAccessLock::lockExclusive().
|
protected |
Definition at line 182 of file nivisa.cpp.
References m_trigger_func, m_trigger_func_arg, and ISISVME::Success.
Referenced by TriggerHandler().
|
virtual |
Implements ISISVME.
Definition at line 194 of file nivisa.cpp.
References addError(), DAEstatus::addInfo(), DAEstatus::addInfoVa(), device(), enableBlockTransfers(), ISISVME::Error, FAC_DAE, IOEventHandler(), lockDevice(), m_block_transfers, m_default_rm, m_device, m_endian_workaround, m_instr_be, m_instr_be_bt, m_instr_le, m_instr_le_bt, m_visa_critical, and setEndian().
Referenced by reinit().
|
virtual |
Implements ISISVME.
Definition at line 355 of file nivisa.cpp.
References addError(), DAEstatus::addInfo(), ISISVME::Error, FAC_DAE, m_default_rm, m_device_bp, m_instr_backplane, m_visa_critical, ISISVME::Success, and TriggerHandler().
Referenced by reinit().
|
protected |
Definition at line 1274 of file nivisa.cpp.
Referenced by addError().
|
protected |
Definition at line 1288 of file nivisa.cpp.
|
virtual |
|
virtual |
|
virtual |
Implements ISISVME.
Definition at line 593 of file nivisa.cpp.
References readBlockU16impl(), and retryBlock().
|
protected |
Definition at line 601 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), nitems_max_default, and ISISVME::Success.
Referenced by readBlockU16().
|
virtual |
Implements ISISVME.
Definition at line 643 of file nivisa.cpp.
References readBlockU32impl(), and retryBlock().
Referenced by readBlock().
|
protected |
Definition at line 690 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), m_endian_workaround, m_job_critical, m_jobid_map, m_visa_critical, nitems_max_default, ISISVME::Success, and ISISVME::TransferLittleEndian.
Referenced by readBlockU32(), and readBlockU64impl().
int NIVisa::readBlockU64 | ( | unsigned long | address, |
uint64_t * | data64, | ||
long | nitems, | ||
TransferProps | props, | ||
DAEstatus & | dstatus | ||
) |
Definition at line 649 of file nivisa.cpp.
References readBlockU64impl(), and retryBlock().
Referenced by readBlock().
|
protected |
Definition at line 684 of file nivisa.cpp.
References readBlockU32impl().
Referenced by readBlockU64().
|
virtual |
Implements ISISVME.
Definition at line 535 of file nivisa.cpp.
References readU16impl(), and retrySingle().
|
protected |
Definition at line 546 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), and ISISVME::Success.
Referenced by readU16(), and readU16noRetry().
|
virtual |
|
virtual |
Implements ISISVME.
Definition at line 564 of file nivisa.cpp.
References readU32impl(), and retrySingle().
|
protected |
Definition at line 574 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), m_visa_critical, and ISISVME::Success.
Referenced by readU32(), and readU32noRetry().
|
virtual |
|
protected |
Definition at line 94 of file nivisa.cpp.
References DAEstatus::add(), DAEstatus::addInfo(), close(), ISISVME::Error, ERRTYPE_NIVISA, FAC_DAE, FAC_NIVISA, LOGSTR_ERROR, LOGSTR_INFORMATION, m_default_rm, m_device, m_device_bp, m_init_done, m_visa_critical, open(), openBackplane(), SEV_ERROR, and ISISVME::Success.
Referenced by NIVisa(), retryBlock(), and retrySingle().
|
virtual |
Implements ISISVME.
Definition at line 1156 of file nivisa.cpp.
References addError(), DAEstatus::addInfo(), FAC_NIVISA, m_instr_backplane, and m_visa_critical.
|
protected |
Definition at line 1195 of file nivisa.cpp.
References DAEstatus::add(), ERRTYPE_NIVISA, FAC_NIVISA, m_default_rm, m_visa_critical, and SEV_ERROR.
|
protected |
Definition at line 1068 of file nivisa.cpp.
References addError(), ISISVME::Error, and ISISVME::Success.
|
protected |
Definition at line 508 of file nivisa.cpp.
References ISISVME::Error, LOGSTR_WARNING, m_retry_time, m_tries, reinit(), DAEstatus::resetSeverityToAtLeast(), DAEstatus::resetSeverityToAtMost(), SEV_WARNING, DAEstatus::severity(), and ISISVME::Success.
Referenced by readBlockU16(), readBlockU32(), readBlockU64(), writeBlockU16(), writeBlockU32(), and writeBlockU64().
|
protected |
Definition at line 480 of file nivisa.cpp.
References ISISVME::Error, LOGSTR_WARNING, m_retry_time, m_tries, reinit(), DAEstatus::resetSeverityToAtLeast(), DAEstatus::resetSeverityToAtMost(), SEV_WARNING, DAEstatus::severity(), and ISISVME::Success.
Referenced by readU16(), readU32(), writeU16(), and writeU32().
|
virtual |
Implements ISISVME.
Definition at line 1126 of file nivisa.cpp.
References DAEstatus::add(), addError(), DAEstatus::addInfo(), ERRTYPE_NIVISA, FAC_NIVISA, m_default_rm, m_visa_critical, and SEV_ERROR.
|
protected |
Definition at line 984 of file nivisa.cpp.
References addError(), ISISVME::Error, and ISISVME::Success.
Referenced by open().
|
inlinestatic |
Definition at line 99 of file nivisa.h.
References m_endian_workaround.
Referenced by ISISDAE::ISISDAE().
|
inlinevirtual |
Implements ISISVME.
Definition at line 98 of file nivisa.h.
References m_trigger_func, and m_trigger_func_arg.
|
staticprotected |
Definition at line 159 of file nivisa.cpp.
References onTrigger().
Referenced by close(), and openBackplane().
|
virtual |
Implements ISISVME.
Definition at line 455 of file nivisa.cpp.
References addError(), ISISVME::Error, m_instr_le, and ISISVME::Success.
Referenced by close().
|
virtual |
Implements ISISVME.
Definition at line 74 of file nivisa.cpp.
References VisaAccessLock::unlockExclusive().
|
virtual |
|
virtual |
|
virtual |
Implements ISISVME.
Definition at line 850 of file nivisa.cpp.
References retryBlock(), and writeBlockU16impl().
|
protected |
Definition at line 858 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), nitems_max_default, and ISISVME::Success.
Referenced by writeBlockU16().
|
virtual |
Implements ISISVME.
Definition at line 900 of file nivisa.cpp.
References retryBlock(), and writeBlockU32impl().
Referenced by writeBlock().
|
protected |
Definition at line 916 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), m_endian_workaround, nitems_max_default, ISISVME::Success, and ISISVME::TransferLittleEndian.
Referenced by writeBlockU32(), and writeBlockU64impl().
int NIVisa::writeBlockU64 | ( | unsigned long | address, |
uint64_t * | data64, | ||
long | nitems, | ||
TransferProps | props, | ||
DAEstatus & | dstatus | ||
) |
Definition at line 905 of file nivisa.cpp.
References retryBlock(), and writeBlockU64impl().
Referenced by writeBlock().
|
protected |
Definition at line 910 of file nivisa.cpp.
References writeBlockU32impl().
Referenced by writeBlockU64().
|
virtual |
Implements ISISVME.
Definition at line 803 of file nivisa.cpp.
References retrySingle(), and writeU16impl().
|
protected |
Definition at line 808 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), and ISISVME::Success.
Referenced by writeU16().
|
virtual |
Implements ISISVME.
Definition at line 826 of file nivisa.cpp.
References retrySingle(), and writeU32impl().
|
protected |
Definition at line 831 of file nivisa.cpp.
References addError(), ISISVME::Error, getSession(), and ISISVME::Success.
Referenced by writeU32().
|
protected |
Definition at line 11 of file nivisa.h.
Referenced by enableBlockTransfers(), and open().
|
protected |
Definition at line 13 of file nivisa.h.
Referenced by open(), openBackplane(), reinit(), resetBusDevice(), scanBus(), and ~NIVisa().
|
protected |
|
protected |
Definition at line 20 of file nivisa.h.
Referenced by deviceBackplane(), openBackplane(), and reinit().
|
staticprotected |
Definition at line 12 of file nivisa.h.
Referenced by open(), readBlockU32impl(), setEndianWorkaround(), and writeBlockU32impl().
|
protected |
|
protected |
Definition at line 18 of file nivisa.h.
Referenced by close(), openBackplane(), and resetBus().
|
protected |
Definition at line 15 of file nivisa.h.
Referenced by close(), getSession(), and open().
|
protected |
Definition at line 17 of file nivisa.h.
Referenced by close(), getSession(), and open().
|
protected |
Definition at line 14 of file nivisa.h.
Referenced by close(), getSession(), lockDevice(), open(), and unlockDevice().
|
protected |
Definition at line 16 of file nivisa.h.
Referenced by close(), getSession(), and open().
|
protected |
Definition at line 25 of file nivisa.h.
Referenced by addJobid(), NIVisa(), readBlockU32impl(), and ~NIVisa().
|
protected |
Definition at line 24 of file nivisa.h.
Referenced by addJobid(), and readBlockU32impl().
|
staticprotected |
milliseconds between retries
Definition at line 22 of file nivisa.h.
Referenced by retryBlock(), and retrySingle().
|
staticprotected |
number of times to try a read/write
Definition at line 21 of file nivisa.h.
Referenced by retryBlock(), and retrySingle().
|
protected |
Definition at line 27 of file nivisa.h.
Referenced by onTrigger(), and setTriggerFunc().
|
protected |
Definition at line 28 of file nivisa.h.
Referenced by onTrigger(), and setTriggerFunc().
|
protected |
Definition at line 26 of file nivisa.h.
Referenced by close(), getSession(), NIVisa(), open(), openBackplane(), readBlockU32impl(), readU32impl(), reinit(), resetBus(), resetBusDevice(), scanBus(), and ~NIVisa().
|
staticprotected |
Definition at line 62 of file nivisa.h.
Referenced by lockDevice().