ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::DummyMultiplexedRegisterAccessor< T > Class Template Reference

Register accessor for accessing multiplexed 2D array registers internally of a DummyBackend implementation. More...

#include <DummyBackend.h>

+ Inheritance diagram for ChimeraTK::DummyMultiplexedRegisterAccessor< T >:
+ Collaboration diagram for ChimeraTK::DummyMultiplexedRegisterAccessor< T >:

Public Member Functions

 DummyMultiplexedRegisterAccessor (DummyBackend *dev, std::string const &module, std::string const &name)
 Constructor should normally be called in the constructor of the DummyBackend implementation. More...
 
void operator= (const DummyMultiplexedRegisterAccessor &rightHandSide) const =delete
 remove assignment operator since it will be confusing More...
 
 DummyMultiplexedRegisterAccessor (const DummyMultiplexedRegisterAccessor &)=default
 
unsigned int getNumberOfElements ()
 return number of elements per sequence More...
 
unsigned int getNumberOfSequences ()
 return number of sequences More...
 
proxies::DummyRegisterSequence< T > operator[] (unsigned int sequence)
 Get or set register content by [] operators. More...
 
DummyBackendgetBackend () const
 Return the backend. More...
 
const RegisterPathgetRegisterPath () const
 Return the register path. More...
 
const NumericAddressedRegisterInfogetRegisterInfo ()
 

Protected Attributes

DummyBackend_dev
 pointer to VirtualDevice More...
 
NumericAddressedRegisterInfo registerInfo
 register map information More...
 
RegisterPath _path
 path of the register More...
 
std::vector< FixedPointConverterfpc
 pointer to fixed point converter More...
 
std::vector< uint32_t > offsets
 offsets in bytes for sequences More...
 
std::vector< uint32_t > nbytes
 number of bytes per word for sequences More...
 
int pitch = {0}
 pitch in bytes (distance between samples of the same sequence) More...
 
unsigned int nElements
 number of elements per sequence More...
 

Detailed Description

template<typename T>
class ChimeraTK::DummyMultiplexedRegisterAccessor< T >

Register accessor for accessing multiplexed 2D array registers internally of a DummyBackend implementation.

This accessor is similar to the DummyRegister accessor but works with multiplexed registers. The interface is similar to the DummyRegister, it just introduces a second level of the [] operator. The first [] operator takes the sequence number (aka. channel number) as an argument, the second [] operator needs the index (aka. sample numeber) inside the sequence. Returned is then again a temporary proxy element of the same type as for the DummyRegister accessor, so it can again be used mostly like a variable of the type T.

Definition at line 23 of file DummyBackend.h.

Constructor & Destructor Documentation

◆ DummyMultiplexedRegisterAccessor() [1/2]

template<typename T >
ChimeraTK::DummyMultiplexedRegisterAccessor< T >::DummyMultiplexedRegisterAccessor ( DummyBackend dev,
std::string const &  module,
std::string const &  name 
)
inline

Constructor should normally be called in the constructor of the DummyBackend implementation.

dev must be the pointer to the DummyBackend to be accessed. A raw pointer is needed, as used inside the DummyBackend itself. module and name denominate the register entry in the map file. Note: The string "AREA_MULTIPLEXED_SEQUENCE_" will be prepended to the name when searching for the register.

Definition at line 229 of file DummyRegisterAccessor.h.

◆ DummyMultiplexedRegisterAccessor() [2/2]

Member Function Documentation

◆ getBackend()

template<typename T >
DummyBackend& ChimeraTK::DummyMultiplexedRegisterAccessor< T >::getBackend ( ) const
inline

Return the backend.

Definition at line 281 of file DummyRegisterAccessor.h.

◆ getNumberOfElements()

template<typename T >
unsigned int ChimeraTK::DummyMultiplexedRegisterAccessor< T >::getNumberOfElements ( )
inline

return number of elements per sequence

Definition at line 260 of file DummyRegisterAccessor.h.

◆ getNumberOfSequences()

template<typename T >
unsigned int ChimeraTK::DummyMultiplexedRegisterAccessor< T >::getNumberOfSequences ( )
inline

return number of sequences

Definition at line 263 of file DummyRegisterAccessor.h.

◆ getRegisterInfo()

template<typename T >
const NumericAddressedRegisterInfo& ChimeraTK::DummyMultiplexedRegisterAccessor< T >::getRegisterInfo ( )
inline

Definition at line 286 of file DummyRegisterAccessor.h.

◆ getRegisterPath()

template<typename T >
const RegisterPath& ChimeraTK::DummyMultiplexedRegisterAccessor< T >::getRegisterPath ( ) const
inline

Return the register path.

Definition at line 284 of file DummyRegisterAccessor.h.

◆ operator=()

template<typename T >
void ChimeraTK::DummyMultiplexedRegisterAccessor< T >::operator= ( const DummyMultiplexedRegisterAccessor< T > &  rightHandSide) const
delete

remove assignment operator since it will be confusing

◆ operator[]()

template<typename T >
proxies::DummyRegisterSequence<T> ChimeraTK::DummyMultiplexedRegisterAccessor< T >::operator[] ( unsigned int  sequence)
inline

Get or set register content by [] operators.

The first [] denotes the sequence (aka. channel number), the second [] indicates the sample inside the sequence. This means that in a sense the first index is the faster counting index. Example: myMuxRegister[3][987] will give you the 988th sample of the 4th channel.

Definition at line 270 of file DummyRegisterAccessor.h.

Member Data Documentation

◆ _dev

template<typename T >
DummyBackend* ChimeraTK::DummyMultiplexedRegisterAccessor< T >::_dev
protected

pointer to VirtualDevice

Definition at line 290 of file DummyRegisterAccessor.h.

◆ _path

template<typename T >
RegisterPath ChimeraTK::DummyMultiplexedRegisterAccessor< T >::_path
protected

path of the register

Definition at line 296 of file DummyRegisterAccessor.h.

◆ fpc

template<typename T >
std::vector<FixedPointConverter> ChimeraTK::DummyMultiplexedRegisterAccessor< T >::fpc
protected

pointer to fixed point converter

Definition at line 299 of file DummyRegisterAccessor.h.

◆ nbytes

template<typename T >
std::vector<uint32_t> ChimeraTK::DummyMultiplexedRegisterAccessor< T >::nbytes
protected

number of bytes per word for sequences

Definition at line 305 of file DummyRegisterAccessor.h.

◆ nElements

template<typename T >
unsigned int ChimeraTK::DummyMultiplexedRegisterAccessor< T >::nElements
protected

number of elements per sequence

Definition at line 311 of file DummyRegisterAccessor.h.

◆ offsets

template<typename T >
std::vector<uint32_t> ChimeraTK::DummyMultiplexedRegisterAccessor< T >::offsets
protected

offsets in bytes for sequences

Definition at line 302 of file DummyRegisterAccessor.h.

◆ pitch

template<typename T >
int ChimeraTK::DummyMultiplexedRegisterAccessor< T >::pitch = {0}
protected

pitch in bytes (distance between samples of the same sequence)

Definition at line 308 of file DummyRegisterAccessor.h.

◆ registerInfo

template<typename T >
NumericAddressedRegisterInfo ChimeraTK::DummyMultiplexedRegisterAccessor< T >::registerInfo
protected

register map information

Definition at line 293 of file DummyRegisterAccessor.h.


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