ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::SubdeviceRegisterAccessor Class Reference

#include <SubdeviceRegisterAccessor.h>

+ Inheritance diagram for ChimeraTK::SubdeviceRegisterAccessor:
+ Collaboration diagram for ChimeraTK::SubdeviceRegisterAccessor:

Public Member Functions

 SubdeviceRegisterAccessor (boost::shared_ptr< SubdeviceBackend > backend, const std::string &registerPathName, boost::shared_ptr< NDRegisterAccessor< int32_t >> accAddress, boost::shared_ptr< NDRegisterAccessor< int32_t >> accDataArea, boost::shared_ptr< NDRegisterAccessor< int32_t >> accStatus, size_t byteOffset, size_t numberOfWords)
 
void doReadTransferSynchronously () override
 
bool doWriteTransfer (ChimeraTK::VersionNumber versionNumber) override
 
void doPreRead (TransferType type) override
 
void doPostRead (TransferType type, bool hasNewData) override
 
void doPreWrite (TransferType type, VersionNumber) override
 
void doPostWrite (TransferType type, VersionNumber) override
 
bool mayReplaceOther (const boost::shared_ptr< TransferElement const > &) const override
 
bool isReadOnly () const override
 
bool isReadable () const override
 
bool isWriteable () const override
 
- Public Member Functions inherited from ChimeraTK::NDRegisterAccessor< int32_t >
 NDRegisterAccessor (std::string const &name, AccessModeFlags accessModeFlags, std::string const &unit=std::string(TransferElement::unitNotSet), std::string const &description=std::string())
 Creates an NDRegisterAccessor with the specified name (passed on to the transfer element). More...
 
int32_t & accessData (size_t sample)
 Get or set register accessor's buffer content (1D version). More...
 
const int32_t & accessData (size_t sample) const
 
int32_t & accessData (unsigned int channel, unsigned int sample)
 Get or set register accessor's buffer content (2D version). More...
 
const int32_t & accessData (unsigned int channel, unsigned int sample) const
 
std::vector< int32_t > & accessChannel (unsigned int channel)
 Get or set register accessor's channel vector. More...
 
const std::vector< int32_t > & accessChannel (unsigned int channel) const
 
std::vector< std::vector< int32_t > > & accessChannels ()
 Get or set register accessor's 2D channel vector. More...
 
const std::vector< std::vector< int32_t > > & accessChannels () const
 
unsigned int getNumberOfSamples () const
 Return number of elements per channel. More...
 
unsigned int getNumberOfChannels () const
 Return number of channels. More...
 
const std::type_info & getValueType () const override
 
COOKED_TYPE getAsCooked (unsigned int channel, unsigned int sample) const
 
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (getAsCooked_impl, T const (unsigned int, unsigned int))
 
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (setAsCooked_impl, void(unsigned int, unsigned int, T))
 
COOKED_TYPE getAsCooked_impl (unsigned int channel, unsigned int sample) const
 
void setAsCooked (unsigned int channel, unsigned int sample, COOKED_TYPE value)
 
void setAsCooked_impl (unsigned int channel, unsigned int sample, COOKED_TYPE value)
 
boost::shared_ptr< TransferElementmakeCopyRegisterDecorator () override
 

Protected Member Functions

std::vector< boost::shared_ptr< TransferElement > > getHardwareAccessingElements () override
 
std::list< boost::shared_ptr< TransferElement > > getInternalElements () override
 
void replaceTransferElement (boost::shared_ptr< TransferElement > newElement) override
 
- Protected Member Functions inherited from ChimeraTK::NDRegisterAccessor< int32_t >
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER (NDRegisterAccessor< int32_t >, getAsCooked_impl, 2)
 
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER (NDRegisterAccessor< int32_t >, setAsCooked_impl, 3)
 

Protected Attributes

boost::shared_ptr< SubdeviceBackend_backend
 Pointer to the backend. More...
 
boost::shared_ptr< NDRegisterAccessor< int32_t > > _accAddress
 Pointers to the three accessors. More...
 
boost::shared_ptr< NDRegisterAccessor< int32_t > > _accDataArea
 
boost::shared_ptr< NDRegisterAccessor< int32_t > > _accStatus
 
size_t _startAddress
 start address and length More...
 
size_t _numberOfWords
 
std::vector< int32_t > _buffer
 internal buffer More...
 
- Protected Attributes inherited from ChimeraTK::NDRegisterAccessor< int32_t >
std::vector< std::vector< int32_t > > buffer_2D
 Buffer of converted data elements. More...
 

Detailed Description

Definition at line 14 of file SubdeviceRegisterAccessor.h.

Constructor & Destructor Documentation

◆ SubdeviceRegisterAccessor()

ChimeraTK::SubdeviceRegisterAccessor::SubdeviceRegisterAccessor ( boost::shared_ptr< SubdeviceBackend backend,
const std::string &  registerPathName,
boost::shared_ptr< NDRegisterAccessor< int32_t >>  accAddress,
boost::shared_ptr< NDRegisterAccessor< int32_t >>  accDataArea,
boost::shared_ptr< NDRegisterAccessor< int32_t >>  accStatus,
size_t  byteOffset,
size_t  numberOfWords 
)

Definition at line 12 of file SubdeviceRegisterAccessor.cc.

Member Function Documentation

◆ doPostRead()

void ChimeraTK::SubdeviceRegisterAccessor::doPostRead ( TransferType  type,
bool  hasNewData 
)
override

Definition at line 109 of file SubdeviceRegisterAccessor.cc.

◆ doPostWrite()

void ChimeraTK::SubdeviceRegisterAccessor::doPostWrite ( TransferType  type,
VersionNumber   
)
override

Definition at line 142 of file SubdeviceRegisterAccessor.cc.

◆ doPreRead()

void ChimeraTK::SubdeviceRegisterAccessor::doPreRead ( TransferType  type)
override

Definition at line 103 of file SubdeviceRegisterAccessor.cc.

◆ doPreWrite()

void ChimeraTK::SubdeviceRegisterAccessor::doPreWrite ( TransferType  type,
VersionNumber   
)
override

Definition at line 115 of file SubdeviceRegisterAccessor.cc.

◆ doReadTransferSynchronously()

void ChimeraTK::SubdeviceRegisterAccessor::doReadTransferSynchronously ( )
override

Definition at line 26 of file SubdeviceRegisterAccessor.cc.

◆ doWriteTransfer()

bool ChimeraTK::SubdeviceRegisterAccessor::doWriteTransfer ( ChimeraTK::VersionNumber  versionNumber)
override

Definition at line 32 of file SubdeviceRegisterAccessor.cc.

+ Here is the call graph for this function:

◆ getHardwareAccessingElements()

std::vector< boost::shared_ptr< TransferElement > > ChimeraTK::SubdeviceRegisterAccessor::getHardwareAccessingElements ( )
overrideprotected

Definition at line 172 of file SubdeviceRegisterAccessor.cc.

◆ getInternalElements()

std::list< boost::shared_ptr< TransferElement > > ChimeraTK::SubdeviceRegisterAccessor::getInternalElements ( )
overrideprotected

Definition at line 178 of file SubdeviceRegisterAccessor.cc.

◆ isReadable()

bool ChimeraTK::SubdeviceRegisterAccessor::isReadable ( ) const
override

Definition at line 160 of file SubdeviceRegisterAccessor.cc.

◆ isReadOnly()

bool ChimeraTK::SubdeviceRegisterAccessor::isReadOnly ( ) const
override

Definition at line 154 of file SubdeviceRegisterAccessor.cc.

◆ isWriteable()

bool ChimeraTK::SubdeviceRegisterAccessor::isWriteable ( ) const
override

Definition at line 166 of file SubdeviceRegisterAccessor.cc.

◆ mayReplaceOther()

bool ChimeraTK::SubdeviceRegisterAccessor::mayReplaceOther ( const boost::shared_ptr< TransferElement const > &  ) const
override

Definition at line 148 of file SubdeviceRegisterAccessor.cc.

◆ replaceTransferElement()

void ChimeraTK::SubdeviceRegisterAccessor::replaceTransferElement ( boost::shared_ptr< TransferElement newElement)
overrideprotected

Definition at line 184 of file SubdeviceRegisterAccessor.cc.

Member Data Documentation

◆ _accAddress

boost::shared_ptr<NDRegisterAccessor<int32_t> > ChimeraTK::SubdeviceRegisterAccessor::_accAddress
protected

Pointers to the three accessors.

Definition at line 46 of file SubdeviceRegisterAccessor.h.

◆ _accDataArea

boost::shared_ptr<NDRegisterAccessor<int32_t> > ChimeraTK::SubdeviceRegisterAccessor::_accDataArea
protected

Definition at line 47 of file SubdeviceRegisterAccessor.h.

◆ _accStatus

boost::shared_ptr<NDRegisterAccessor<int32_t> > ChimeraTK::SubdeviceRegisterAccessor::_accStatus
protected

Definition at line 48 of file SubdeviceRegisterAccessor.h.

◆ _backend

boost::shared_ptr<SubdeviceBackend> ChimeraTK::SubdeviceRegisterAccessor::_backend
protected

Pointer to the backend.

Definition at line 43 of file SubdeviceRegisterAccessor.h.

◆ _buffer

std::vector<int32_t> ChimeraTK::SubdeviceRegisterAccessor::_buffer
protected

internal buffer

Definition at line 54 of file SubdeviceRegisterAccessor.h.

◆ _numberOfWords

size_t ChimeraTK::SubdeviceRegisterAccessor::_numberOfWords
protected

Definition at line 51 of file SubdeviceRegisterAccessor.h.

◆ _startAddress

size_t ChimeraTK::SubdeviceRegisterAccessor::_startAddress
protected

start address and length

Definition at line 51 of file SubdeviceRegisterAccessor.h.


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