ICP  1
Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
VMESimulation< DAEPolicy > Class Template Reference

#include <vme_simulation.h>

Inheritance diagram for VMESimulation< DAEPolicy >:
Inheritance graph

Public Member Functions

int getCardIds (std::vector< int > &card_ids)
 
 VMESimulation (DAEstatus &status)
 
virtual ~VMESimulation ()
 
int open (const char *device, DAEstatus &status)
 
int openBackplane (const char *device_bp, DAEstatus &status)
 
int lockDevice (int timeout, DAEstatus &status)
 
int unlockDevice (DAEstatus &status)
 
void lockInterface (int, DAEstatus &)
 
void unlockInterface (DAEstatus &)
 
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 &status)
 
int readU32 (unsigned long address, isisU32_t *data32, TransferProps props, DAEstatus &status)
 
int readBlockU16 (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &status)
 
int readBlockU32 (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &status)
 
int writeU16 (unsigned long address, isisU16_t data16, TransferProps props, DAEstatus &status)
 
int writeU32 (unsigned long address, isisU32_t data32, TransferProps props, DAEstatus &status)
 
int writeBlockU16 (unsigned long address, isisU16_t *data16, long nitems, TransferProps props, DAEstatus &status)
 
int writeBlockU32 (unsigned long address, isisU32_t *data32, long nitems, TransferProps props, DAEstatus &status)
 
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 ()
 
bool shutdownRequested ()
 
void simulation_routineImpl ()
 
bool isCrateVetoing ()
 
bool isCrateRunning ()
 
int frameNumberImpl ()
 
int incrementDetectorCardPeriod ()
 
int resetDetectorCardPeriod ()
 
const char * device ()
 
void setTriggerFunc (trigger_func_t *func, void *arg)
 
int onTrigger (time_t the_secs, unsigned short the_ms, int trig_id)
 
int simulateRead (TransferProps props, unsigned long address, isisU16_t *data16, long nitems, DAEstatus &status)
 
int simulateRead (TransferProps props, unsigned long address, isisU32_t *data32, long nitems, DAEstatus &status)
 
int simulateRead (TransferProps props, unsigned long address, uint64_t *data64, long nitems, DAEstatus &status)
 
int simulateWrite (TransferProps props, unsigned long address, isisU16_t *data16, long nitems, DAEstatus &status)
 
int simulateWrite (TransferProps props, unsigned long address, isisU32_t *data32, long nitems, DAEstatus &status)
 
int simulateWrite (TransferProps props, unsigned long address, uint64_t *data64, long nitems, DAEstatus &status)
 
- Public Member Functions inherited from VMESimulationIface
virtual ~VMESimulationIface ()
 
- Public Member Functions inherited from ISISVME
virtual ~ISISVME ()
 

Public Attributes

std::vector< MySIMDetectorCard * > m_det_card_list
 
std::vector< MySIMEnvPeriodCard * > m_env_card_list
 
CRITICAL_SECTION m_critical
 
bool m_shutdown_requested
 

Private Types

typedef SIMEnvCard< typename
DAEPolicy::env_t > 
MySIMEnvCard
 
typedef SIMEnvPeriodCard
< typename DAEPolicy::env_t > 
MySIMEnvPeriodCard
 
typedef SIMDetectorCard
< typename DAEPolicy::det_t > 
MySIMDetectorCard
 
typedef SIMDAE2Card< typename
DAEPolicy::card_t > 
MySIMDAE2Card
 

Private Attributes

trigger_func_tm_trigger_func
 
void * m_trigger_func_arg
 

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 Public Member Functions inherited from VMESimulationIface
static bool isVetoing ()
 
static bool isRunning ()
 
static int frameNumber ()
 
static void simulation_routine (void *arg)
 
- 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 inherited from ISIS::Base
static void setAllLoggerLevel (int level)
 
- Protected Attributes inherited from ISIS::Base
Poco::Logger * m_logger
 
Poco::LogStream * m_logstr
 
Poco::Mutex m_logger_lock
 
- Static Protected Attributes inherited from VMESimulationIface
static std::vector
< VMESimulationIface * > 
m_sim_vme
 

Detailed Description

template<class DAEPolicy>
class VMESimulation< DAEPolicy >

Definition at line 53 of file vme_simulation.h.

Member Typedef Documentation

template<class DAEPolicy>
typedef SIMDAE2Card<typename DAEPolicy::card_t> VMESimulation< DAEPolicy >::MySIMDAE2Card
private

Definition at line 61 of file vme_simulation.h.

template<class DAEPolicy>
typedef SIMDetectorCard<typename DAEPolicy::det_t> VMESimulation< DAEPolicy >::MySIMDetectorCard
private

Definition at line 60 of file vme_simulation.h.

template<class DAEPolicy>
typedef SIMEnvCard<typename DAEPolicy::env_t> VMESimulation< DAEPolicy >::MySIMEnvCard
private

Definition at line 58 of file vme_simulation.h.

template<class DAEPolicy>
typedef SIMEnvPeriodCard<typename DAEPolicy::env_t> VMESimulation< DAEPolicy >::MySIMEnvPeriodCard
private

Definition at line 59 of file vme_simulation.h.

Constructor & Destructor Documentation

template<class DAEPolicy >
VMESimulation< DAEPolicy >::VMESimulation ( DAEstatus status)
template<class DAEPolicy >
VMESimulation< DAEPolicy >::~VMESimulation ( )
virtual

Definition at line 152 of file vme_simulation.cpp.

Member Function Documentation

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::close ( DAEstatus status)
virtual

Implements ISISVME.

Definition at line 294 of file vme_simulation.cpp.

References DAEstatus::addInfo(), FAC_SIMDAE, and ISISVME::Success.

template<class DAEPolicy>
const char* VMESimulation< DAEPolicy >::device ( )
inlinevirtual

Implements ISISVME.

Definition at line 111 of file vme_simulation.h.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::frameNumberImpl ( )
virtual

Implements VMESimulationIface.

Definition at line 422 of file vme_simulation.cpp.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::getCardIds ( std::vector< int > &  card_ids)
virtual

Implements VMESimulationIface.

Definition at line 82 of file vme_simulation.cpp.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::incrementDetectorCardPeriod ( )
virtual

Implements VMESimulationIface.

Definition at line 171 of file vme_simulation.cpp.

template<class DAEPolicy >
bool VMESimulation< DAEPolicy >::initOK ( )
virtual

Implements ISISVME.

Definition at line 202 of file vme_simulation.cpp.

template<class DAEPolicy >
bool VMESimulation< DAEPolicy >::isCrateRunning ( )
virtual

Implements VMESimulationIface.

Definition at line 440 of file vme_simulation.cpp.

template<class DAEPolicy >
bool VMESimulation< DAEPolicy >::isCrateVetoing ( )
virtual

Implements VMESimulationIface.

Definition at line 384 of file vme_simulation.cpp.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::lockDevice ( int  timeout,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 222 of file vme_simulation.cpp.

References ISISVME::Success.

template<class DAEPolicy>
void VMESimulation< DAEPolicy >::lockInterface ( int  ,
DAEstatus  
)
inlinevirtual

Implements ISISVME.

Definition at line 79 of file vme_simulation.h.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::onTrigger ( time_t  the_secs,
unsigned short  the_ms,
int  trig_id 
)

Definition at line 139 of file vme_simulation.cpp.

References ISISVME::Success.

Referenced by VMESimulation< DAEPolicy >::simulation_routineImpl().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::open ( const char *  device,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 208 of file vme_simulation.cpp.

References DAEstatus::addInfoVa(), FAC_SIMDAE, and ISISVME::Success.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::openBackplane ( const char *  device_bp,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 215 of file vme_simulation.cpp.

References DAEstatus::addInfoVa(), FAC_SIMDAE, and ISISVME::Success.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readBlock ( unsigned long  address,
isisU32_t data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 543 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readBlock ( unsigned long  address,
uint64_t *  data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 549 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readBlockU16 ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 259 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readBlockU32 ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 266 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readU16 ( unsigned long  address,
isisU16_t data16,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 234 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readU16noRetry ( unsigned long  address,
isisU16_t data16,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 240 of file vme_simulation.cpp.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readU32 ( unsigned long  address,
isisU32_t data32,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 246 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::readU32noRetry ( unsigned long  address,
isisU32_t data32,
TransferProps  props,
DAEstatus dstatus 
)
virtual

Implements ISISVME.

Definition at line 252 of file vme_simulation.cpp.

template<class DAEPolicy >
bool VMESimulation< DAEPolicy >::resetBus ( DAEstatus status)
virtual

Implements ISISVME.

Definition at line 307 of file vme_simulation.cpp.

References DAEstatus::addInfo(), and FAC_SIMDAE.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::resetDetectorCardPeriod ( )
virtual

Implements VMESimulationIface.

Definition at line 186 of file vme_simulation.cpp.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::scanBus ( DAEstatus status)
virtual

Implements ISISVME.

Definition at line 300 of file vme_simulation.cpp.

References DAEstatus::addInfo(), and FAC_SIMDAE.

template<class DAEPolicy>
void VMESimulation< DAEPolicy >::setTriggerFunc ( trigger_func_t func,
void *  arg 
)
inlinevirtual
template<class DAEPolicy>
bool VMESimulation< DAEPolicy >::shutdownRequested ( )
inlinevirtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateRead ( TransferProps  props,
unsigned long  address,
isisU16_t data16,
long  nitems,
DAEstatus status 
)
virtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateRead ( TransferProps  props,
unsigned long  address,
isisU32_t data32,
long  nitems,
DAEstatus status 
)
virtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateRead ( TransferProps  props,
unsigned long  address,
uint64_t *  data64,
long  nitems,
DAEstatus status 
)
virtual

Implements VMESimulationIface.

Definition at line 488 of file vme_simulation.cpp.

References simulateRead().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateWrite ( TransferProps  props,
unsigned long  address,
isisU16_t data16,
long  nitems,
DAEstatus status 
)
virtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateWrite ( TransferProps  props,
unsigned long  address,
isisU32_t data32,
long  nitems,
DAEstatus status 
)
virtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::simulateWrite ( TransferProps  props,
unsigned long  address,
uint64_t *  data64,
long  nitems,
DAEstatus status 
)
virtual

Implements VMESimulationIface.

Definition at line 525 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
void VMESimulation< DAEPolicy >::simulation_routineImpl ( )
virtual
template<class DAEPolicy >
int VMESimulation< DAEPolicy >::unlockDevice ( DAEstatus status)
virtual

Implements ISISVME.

Definition at line 228 of file vme_simulation.cpp.

References ISISVME::Success.

template<class DAEPolicy>
void VMESimulation< DAEPolicy >::unlockInterface ( DAEstatus )
inlinevirtual

Implements ISISVME.

Definition at line 80 of file vme_simulation.h.

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeBlock ( unsigned long  address,
isisU32_t data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 531 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeBlock ( unsigned long  address,
uint64_t *  data,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 537 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeBlockU16 ( unsigned long  address,
isisU16_t data16,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 282 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeBlockU32 ( unsigned long  address,
isisU32_t data32,
long  nitems,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 288 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeU16 ( unsigned long  address,
isisU16_t  data16,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 271 of file vme_simulation.cpp.

References simulateWrite().

template<class DAEPolicy >
int VMESimulation< DAEPolicy >::writeU32 ( unsigned long  address,
isisU32_t  data32,
TransferProps  props,
DAEstatus status 
)
virtual

Implements ISISVME.

Definition at line 276 of file vme_simulation.cpp.

References simulateWrite().

Member Data Documentation

template<class DAEPolicy>
CRITICAL_SECTION VMESimulation< DAEPolicy >::m_critical
template<class DAEPolicy>
std::vector<MySIMDetectorCard*> VMESimulation< DAEPolicy >::m_det_card_list
template<class DAEPolicy>
std::vector<MySIMEnvPeriodCard*> VMESimulation< DAEPolicy >::m_env_card_list
template<class DAEPolicy>
bool VMESimulation< DAEPolicy >::m_shutdown_requested

Definition at line 70 of file vme_simulation.h.

Referenced by VMESimulation< DAEPolicy >::shutdownRequested().

template<class DAEPolicy>
trigger_func_t* VMESimulation< DAEPolicy >::m_trigger_func
private

Definition at line 56 of file vme_simulation.h.

Referenced by VMESimulation< DAEPolicy >::setTriggerFunc().

template<class DAEPolicy>
void* VMESimulation< DAEPolicy >::m_trigger_func_arg
private

Definition at line 57 of file vme_simulation.h.

Referenced by VMESimulation< DAEPolicy >::setTriggerFunc().


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