ICP  1
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
QxtrmInterface Class Reference

#include <QxtrmInterface.h>

Inheritance diagram for QxtrmInterface:
Inheritance graph

Public Member Functions

 QxtrmInterface (DAEstatus &dstatus, uint32_t *dau_memory=NULL, uint32_t nwords_memory=0, uint32_t *dau_registers=NULL, uint32_t nwords_registers=0)
 
virtual ~QxtrmInterface ()
 
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 &dstatus)
 
int scanBus (DAEstatus &status)
 
bool resetBus (DAEstatus &status)
 
bool initOK ()
 
const char * device ()
 
const char * deviceBackplane ()
 
void setTriggerFunc (trigger_func_t *func, void *arg)
 
- Public Member Functions inherited from ISISVME
virtual ~ISISVME ()
 

Protected Member Functions

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)
 
template<typename T >
int readUimpl (unsigned long address, T *data, int nitems, TransferProps props, DAEstatus &dstatus)
 
template<typename T >
int writeUimpl (unsigned long address, T *data, int 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 propsn, 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)
 
- 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)
 

Protected Attributes

bool m_init_done
 
std::string m_device
 
CRITICAL_SECTION m_visa_critical
 
trigger_func_tm_trigger_func
 
void * m_trigger_func_arg
 
Qxtrm_driverm_qxtrm
 
Poco::SharedPtr< Qxtrm_channelm_rdma_mem
 
Poco::SharedPtr< Qxtrm_channelm_rdma_reg
 
uint32_t * m_dau_memory
 
uint32_t m_nwords_memory
 
uint32_t * m_dau_registers
 
uint32_t m_nwords_registers
 
- Protected Attributes inherited from ISIS::Base
Poco::Logger * m_logger
 
Poco::LogStream * m_logstr
 
Poco::Mutex m_logger_lock
 

Static Protected Attributes

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...
 

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...
 
- Static Protected Member Functions inherited from ISIS::Base
static void setAllLoggerLevel (int level)
 

Detailed Description

Definition at line 7 of file QxtrmInterface.h.

Constructor & Destructor Documentation

QxtrmInterface::QxtrmInterface ( DAEstatus dstatus,
uint32_t *  dau_memory = NULL,
uint32_t  nwords_memory = 0,
uint32_t *  dau_registers = NULL,
uint32_t  nwords_registers = 0 
)

Definition at line 5 of file QxtrmInterface.cpp.

References m_visa_critical, reinit(), and ISIS::Base::setLoggerName().

QxtrmInterface::~QxtrmInterface ( )
virtual

Definition at line 357 of file QxtrmInterface.cpp.

References close(), and m_visa_critical.

Member Function Documentation

int QxtrmInterface::close ( DAEstatus dstatus)
virtual

Implements ISISVME.

Definition at line 340 of file QxtrmInterface.cpp.

References m_init_done, m_qxtrm, m_rdma_mem, m_rdma_reg, m_visa_critical, ISISVME::Success, and unlockDevice().

Referenced by reinit(), and ~QxtrmInterface().

const char* QxtrmInterface::device ( )
inlinevirtual

Implements ISISVME.

Definition at line 78 of file QxtrmInterface.h.

References m_device.

Referenced by open().

const char* QxtrmInterface::deviceBackplane ( )
inline

Definition at line 79 of file QxtrmInterface.h.

bool QxtrmInterface::initOK ( )
virtual

Implements ISISVME.

Definition at line 14 of file QxtrmInterface.cpp.

References m_init_done.

int QxtrmInterface::lockDevice ( int  timeout,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 83 of file QxtrmInterface.cpp.

References ISISVME::Success.

void QxtrmInterface::lockInterface ( int  timeout,
DAEstatus dstatus 
)
inlinevirtual

Implements ISISVME.

Definition at line 56 of file QxtrmInterface.h.

int QxtrmInterface::open ( const char *  device,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 75 of file QxtrmInterface.cpp.

References device(), m_device, m_visa_critical, and ISISVME::Success.

Referenced by reinit().

int QxtrmInterface::openBackplane ( const char *  device_bp,
DAEstatus dstatus 
)
inlinevirtual

Implements ISISVME.

Definition at line 53 of file QxtrmInterface.h.

References ISISVME::Success.

int QxtrmInterface::readBlock ( unsigned long  address,
isisU32_t data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 330 of file QxtrmInterface.cpp.

References readBlockU32().

int QxtrmInterface::readBlock ( unsigned long  address,
uint64_t *  data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 335 of file QxtrmInterface.cpp.

References readBlockU64().

int QxtrmInterface::readBlockU16 ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 203 of file QxtrmInterface.cpp.

References readBlockU16impl(), and retryBlock().

int QxtrmInterface::readBlockU16impl ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 211 of file QxtrmInterface.cpp.

References readUimpl().

Referenced by readBlockU16().

int QxtrmInterface::readBlockU32 ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 217 of file QxtrmInterface.cpp.

References readBlockU32impl(), and retryBlock().

Referenced by readBlock().

int QxtrmInterface::readBlockU32impl ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 224 of file QxtrmInterface.cpp.

References readUimpl().

Referenced by readBlockU32(), and readBlockU64impl().

int QxtrmInterface::readBlockU64 ( unsigned long  address,
uint64_t *  data64,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)

Definition at line 309 of file QxtrmInterface.cpp.

References readBlockU64impl(), and retryBlock().

Referenced by readBlock().

int QxtrmInterface::readBlockU64impl ( unsigned long  address,
uint64_t *  data64,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 315 of file QxtrmInterface.cpp.

References readBlockU32impl().

Referenced by readBlockU64().

int QxtrmInterface::readU16 ( unsigned long  address,
isisU16_t data16,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 149 of file QxtrmInterface.cpp.

References readU16impl(), and retrySingle().

int QxtrmInterface::readU16impl ( unsigned long  address,
isisU16_t data16,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 183 of file QxtrmInterface.cpp.

References readUimpl().

Referenced by readU16(), and readU16noRetry().

int QxtrmInterface::readU16noRetry ( unsigned long  address,
isisU16_t data16,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 154 of file QxtrmInterface.cpp.

References readU16impl().

int QxtrmInterface::readU32 ( unsigned long  address,
isisU32_t data32,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 188 of file QxtrmInterface.cpp.

References readU32impl(), and retrySingle().

int QxtrmInterface::readU32impl ( unsigned long  address,
isisU32_t data32,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 198 of file QxtrmInterface.cpp.

References readUimpl().

Referenced by readU32(), and readU32noRetry().

int QxtrmInterface::readU32noRetry ( unsigned long  address,
isisU32_t data32,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 193 of file QxtrmInterface.cpp.

References readU32impl().

template<typename T >
int QxtrmInterface::readUimpl ( unsigned long  address,
T *  data,
int  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected
int QxtrmInterface::reinit ( DAEstatus dstatus)
protected
bool QxtrmInterface::resetBus ( DAEstatus status)
inlinevirtual

Implements ISISVME.

Definition at line 76 of file QxtrmInterface.h.

References ISISVME::Success.

template<typename F , typename T >
int QxtrmInterface::retryBlock ( pFunc,
unsigned long  address,
data,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected
template<typename F , typename T >
int QxtrmInterface::retrySingle ( pFunc,
unsigned long  address,
data,
TransferProps  props,
DAEstatus dstatus 
)
protected
int QxtrmInterface::scanBus ( DAEstatus status)
inlinevirtual

Implements ISISVME.

Definition at line 75 of file QxtrmInterface.h.

References ISISVME::Success.

void QxtrmInterface::setTriggerFunc ( trigger_func_t func,
void *  arg 
)
inlinevirtual

Implements ISISVME.

Definition at line 80 of file QxtrmInterface.h.

References m_trigger_func, and m_trigger_func_arg.

int QxtrmInterface::unlockDevice ( DAEstatus dstatus)
virtual

Implements ISISVME.

Definition at line 88 of file QxtrmInterface.cpp.

References ISISVME::Success.

Referenced by close().

void QxtrmInterface::unlockInterface ( DAEstatus dstatus)
inlinevirtual

Implements ISISVME.

Definition at line 57 of file QxtrmInterface.h.

int QxtrmInterface::writeBlock ( unsigned long  address,
isisU32_t data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 320 of file QxtrmInterface.cpp.

References writeBlockU32().

int QxtrmInterface::writeBlock ( unsigned long  address,
uint64_t *  data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 325 of file QxtrmInterface.cpp.

References writeBlockU64().

int QxtrmInterface::writeBlockU16 ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 274 of file QxtrmInterface.cpp.

References retryBlock(), and writeBlockU16impl().

int QxtrmInterface::writeBlockU16impl ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 282 of file QxtrmInterface.cpp.

References writeUimpl().

Referenced by writeBlockU16().

int QxtrmInterface::writeBlockU32 ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 288 of file QxtrmInterface.cpp.

References retryBlock(), and writeBlockU32impl().

Referenced by writeBlock().

int QxtrmInterface::writeBlockU32impl ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 294 of file QxtrmInterface.cpp.

References writeUimpl().

Referenced by writeBlockU32(), and writeBlockU64impl().

int QxtrmInterface::writeBlockU64 ( unsigned long  address,
uint64_t *  data64,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)

Definition at line 299 of file QxtrmInterface.cpp.

References retryBlock(), and writeBlockU64impl().

Referenced by writeBlock().

int QxtrmInterface::writeBlockU64impl ( unsigned long  address,
uint64_t *  data64,
long  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 304 of file QxtrmInterface.cpp.

References writeBlockU32impl().

Referenced by writeBlockU64().

int QxtrmInterface::writeU16 ( unsigned long  address,
isisU16_t  data16,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 229 of file QxtrmInterface.cpp.

References retrySingle(), and writeU16impl().

int QxtrmInterface::writeU16impl ( unsigned long  address,
isisU16_t  data16,
TransferProps  props,
DAEstatus dstatus 
)
protected

Definition at line 258 of file QxtrmInterface.cpp.

References writeUimpl().

Referenced by writeU16().

int QxtrmInterface::writeU32 ( unsigned long  address,
isisU32_t  data32,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 263 of file QxtrmInterface.cpp.

References retrySingle(), and writeU32impl().

int QxtrmInterface::writeU32impl ( unsigned long  address,
isisU32_t  data32,
TransferProps  propsn,
DAEstatus dstatus 
)
protected

Definition at line 268 of file QxtrmInterface.cpp.

References writeUimpl().

Referenced by writeU32().

template<typename T >
int QxtrmInterface::writeUimpl ( unsigned long  address,
T *  data,
int  nitems,
TransferProps  props,
DAEstatus dstatus 
)
protected

Member Data Documentation

uint32_t* QxtrmInterface::m_dau_memory
protected

Definition at line 23 of file QxtrmInterface.h.

Referenced by reinit().

uint32_t* QxtrmInterface::m_dau_registers
protected

Definition at line 25 of file QxtrmInterface.h.

Referenced by reinit().

std::string QxtrmInterface::m_device
protected

Definition at line 11 of file QxtrmInterface.h.

Referenced by device(), open(), and reinit().

bool QxtrmInterface::m_init_done
protected

Definition at line 10 of file QxtrmInterface.h.

Referenced by close(), initOK(), and reinit().

uint32_t QxtrmInterface::m_nwords_memory
protected

Definition at line 24 of file QxtrmInterface.h.

Referenced by reinit().

uint32_t QxtrmInterface::m_nwords_registers
protected

Definition at line 26 of file QxtrmInterface.h.

Referenced by reinit().

Qxtrm_driver* QxtrmInterface::m_qxtrm
protected

Definition at line 19 of file QxtrmInterface.h.

Referenced by close(), and reinit().

Poco::SharedPtr<Qxtrm_channel> QxtrmInterface::m_rdma_mem
protected

Definition at line 20 of file QxtrmInterface.h.

Referenced by close(), readUimpl(), reinit(), and writeUimpl().

Poco::SharedPtr<Qxtrm_channel> QxtrmInterface::m_rdma_reg
protected

Definition at line 21 of file QxtrmInterface.h.

Referenced by close(), readUimpl(), reinit(), and writeUimpl().

const int QxtrmInterface::m_retry_time = 1000
staticprotected

milliseconds between retries

Definition at line 16 of file QxtrmInterface.h.

Referenced by retryBlock(), and retrySingle().

const int QxtrmInterface::m_tries = 5
staticprotected

number of times to try a read/write

Definition at line 15 of file QxtrmInterface.h.

Referenced by retryBlock(), and retrySingle().

trigger_func_t* QxtrmInterface::m_trigger_func
protected

Definition at line 13 of file QxtrmInterface.h.

Referenced by setTriggerFunc().

void* QxtrmInterface::m_trigger_func_arg
protected

Definition at line 14 of file QxtrmInterface.h.

Referenced by setTriggerFunc().

CRITICAL_SECTION QxtrmInterface::m_visa_critical
protected

The documentation for this class was generated from the following files: