ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
ChimeraTK::DummyRegisterRawAccessor Class Reference

Accessor for raw 32 bit integer access to the underlying memory space. More...

#include <DummyRegisterAccessor.h>

+ Collaboration diagram for ChimeraTK::DummyRegisterRawAccessor:

Public Member Functions

 operator int32_t & ()
 Implicit type conversion to int32_t.
 
 DummyRegisterRawAccessor (boost::shared_ptr< DeviceBackend > const &backend, std::string const &module, std::string const &name)
 
 DummyRegisterRawAccessor (const DummyRegisterRawAccessor &)=default
 
void operator= (const DummyRegisterRawAccessor &rightHandSide) const =delete
 remove assignment operator since it will be confusing
 
DummyRegisterRawAccessoroperator= (int32_t rhs)
 
int32_t & operator[] (unsigned int index)
 Get or set register content by [] operator.
 
unsigned int getNumberOfElements () const
 return number of elements
 
std::unique_lock< std::mutex > getBufferLock ()
 Get a lock to safely modify the buffer.
 

Protected Attributes

boost::shared_ptr< DummyBackend_backend
 pointer to dummy backend
 
NumericAddressedRegisterInfo registerInfo
 register map information
 
int32_t * buffer
 raw buffer of this accessor
 

Detailed Description

Accessor for raw 32 bit integer access to the underlying memory space.

Usually you want the interpreted version, but for debugging the converters themselves and functionality of the NumericAddressedBackendRegisterAccessor we directly want to write to the registers, without having to mess with absolute addresses (we still depend on the map file parser, but the whole dummy does. The address translation is re-done in the dummy, we are not using the one from the regular accessors.)

WARNING: You must not touch any data content of the accessor without holding a lock to the memory mutex for the internal data buffer (see getBufferLock()).

Definition at line 325 of file DummyRegisterAccessor.h.

Constructor & Destructor Documentation

◆ DummyRegisterRawAccessor() [1/2]

ChimeraTK::DummyRegisterRawAccessor::DummyRegisterRawAccessor ( boost::shared_ptr< DeviceBackend > const &  backend,
std::string const &  module,
std::string const &  name 
)
inline

Definition at line 332 of file DummyRegisterAccessor.h.

◆ DummyRegisterRawAccessor() [2/2]

ChimeraTK::DummyRegisterRawAccessor::DummyRegisterRawAccessor ( const DummyRegisterRawAccessor )
default

Member Function Documentation

◆ getBufferLock()

std::unique_lock< std::mutex > ChimeraTK::DummyRegisterRawAccessor::getBufferLock ( )
inline

Get a lock to safely modify the buffer.

You have to release it as soon as possible because it will block all other functionality of the Dummy. This is a really low low level debugging interface!

Definition at line 364 of file DummyRegisterAccessor.h.

◆ getNumberOfElements()

unsigned int ChimeraTK::DummyRegisterRawAccessor::getNumberOfElements ( ) const
inline

return number of elements

Definition at line 359 of file DummyRegisterAccessor.h.

◆ operator int32_t &()

ChimeraTK::DummyRegisterRawAccessor::operator int32_t & ( )
inline

Implicit type conversion to int32_t.

This basically covers all operators for single integers.

Definition at line 330 of file DummyRegisterAccessor.h.

◆ operator=() [1/2]

void ChimeraTK::DummyRegisterRawAccessor::operator= ( const DummyRegisterRawAccessor rightHandSide) const
delete

remove assignment operator since it will be confusing

◆ operator=() [2/2]

DummyRegisterRawAccessor & ChimeraTK::DummyRegisterRawAccessor::operator= ( int32_t  rhs)
inline

Definition at line 350 of file DummyRegisterAccessor.h.

◆ operator[]()

int32_t & ChimeraTK::DummyRegisterRawAccessor::operator[] ( unsigned int  index)
inline

Get or set register content by [] operator.

Definition at line 356 of file DummyRegisterAccessor.h.

Member Data Documentation

◆ _backend

boost::shared_ptr<DummyBackend> ChimeraTK::DummyRegisterRawAccessor::_backend
protected

pointer to dummy backend

Definition at line 368 of file DummyRegisterAccessor.h.

◆ buffer

int32_t* ChimeraTK::DummyRegisterRawAccessor::buffer
protected

raw buffer of this accessor

Definition at line 374 of file DummyRegisterAccessor.h.

◆ registerInfo

NumericAddressedRegisterInfo ChimeraTK::DummyRegisterRawAccessor::registerInfo
protected

register map information

Definition at line 371 of file DummyRegisterAccessor.h.


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