An abstract base class for defining the interface to the various IPbus clients as well as providing the generalized packing functionality. More...
#include <uhal/ClientInterface.hpp>
Public Member Functions | |
virtual | ~ClientInterface () |
Destructor. More... | |
const std::string & | id () const |
Return the identifier of the target for this client. More... | |
const std::string & | uri () const |
Return the url of the target for this client. More... | |
void | dispatch () |
Method to dispatch all queued transactions, and wait until all corresponding responses have been received. More... | |
void | setTimeoutPeriod (const uint32_t &aTimeoutPeriod=0) |
A method to modify the timeout period for any pending or future transactions. More... | |
uint64_t | getTimeoutPeriod () |
A method to retrieve the timeout period currently being used. More... | |
ValHeader | write (const uint32_t &aAddr, const uint32_t &aValue) |
Write a single, unmasked word to a register. More... | |
ValHeader | write (const uint32_t &aAddr, const uint32_t &aValue, const uint32_t &aMask) |
Write a single, masked word to a register. More... | |
ValHeader | writeBlock (const uint32_t &aAddr, const std::vector< uint32_t > &aValues, const defs::BlockReadWriteMode &aMode=defs::INCREMENTAL) |
Write a block of data to a block of registers or a block-write port. More... | |
ValWord< uint32_t > | read (const uint32_t &aAddr) |
Read a single, unmasked, unsigned word. More... | |
ValWord< uint32_t > | read (const uint32_t &aAddr, const uint32_t &aMask) |
Read a single, masked, unsigned word. More... | |
ValVector< uint32_t > | readBlock (const uint32_t &aAddr, const uint32_t &aSize, const defs::BlockReadWriteMode &aMode=defs::INCREMENTAL) |
Read a block of unsigned data from a block of registers or a block-read port. More... | |
ValWord< uint32_t > | rmw_bits (const uint32_t &aAddr, const uint32_t &aANDterm, const uint32_t &aORterm) |
Read the value of a register, apply the AND-term, apply the OR-term, set the register to this new value and return a copy of the original value to the user. More... | |
ValWord< uint32_t > | rmw_sum (const uint32_t &aAddr, const int32_t &aAddend) |
Read the value of a register, add the addend, set the register to this new value and return a copy of the original value to the user. More... | |
Protected Member Functions | |
ClientInterface (const std::string &aId, const URI &aUri, const boost::posix_time::time_duration &aTimeoutPeriod) | |
Constructor. More... | |
const boost::posix_time::time_duration & | getBoostTimeoutPeriod () |
A method to retrieve the timeout period currently being used. More... | |
virtual void | implementDispatch (boost::shared_ptr< Buffers > aBuffers)=0 |
Pure virtual function which actually performs the dispatch operation. More... | |
virtual void | Flush () |
Virtual function to dispatch all buffers and block until all replies are received. More... | |
virtual ValHeader | implementBOT ()=0 |
Send a byte order transaction. More... | |
virtual ValHeader | implementWrite (const uint32_t &aAddr, const uint32_t &aValue)=0 |
Write a single, unmasked word to a register. More... | |
virtual ValHeader | implementWriteBlock (const uint32_t &aAddr, const std::vector< uint32_t > &aValues, const defs::BlockReadWriteMode &aMode=defs::INCREMENTAL)=0 |
Write a block of data to a block of registers or a block-write port. More... | |
virtual ValWord< uint32_t > | implementRead (const uint32_t &aAddr, const uint32_t &aMask=defs::NOMASK)=0 |
Read a single, masked, unsigned word. More... | |
virtual ValVector< uint32_t > | implementReadBlock (const uint32_t &aAddr, const uint32_t &aSize, const defs::BlockReadWriteMode &aMode=defs::INCREMENTAL)=0 |
Read a block of unsigned data from a block of registers or a block-read port. More... | |
virtual ValWord< uint32_t > | implementRMWbits (const uint32_t &aAddr, const uint32_t &aANDterm, const uint32_t &aORterm)=0 |
Read the value of a register, apply the AND-term, apply the OR-term, set the register to this new value and return a copy of the new value to the user. More... | |
virtual ValWord< uint32_t > | implementRMWsum (const uint32_t &aAddr, const int32_t &aAddend)=0 |
Read the value of a register, add the addend, set the register to this new value and return a copy of the new value to the user. More... | |
virtual void | preamble (boost::shared_ptr< Buffers > aBuffers) |
Add a preamble to an IPbus buffer. More... | |
virtual uint32_t | getPreambleSize () |
Return the size of the preamble. More... | |
virtual void | predispatch (boost::shared_ptr< Buffers > aBuffers) |
Finalize the buffer before it is transmitted. More... | |
std::pair< ValHeader, _ValHeader_ * > | CreateValHeader () |
Helper function to create a ValHeader object. More... | |
std::pair< ValWord< uint32_t >, _ValWord_< uint32_t > * > | CreateValWord (const uint32_t &aValue, const uint32_t &aMask=defs::NOMASK) |
Helper function to create a ValWord object. More... | |
std::pair< ValVector< uint32_t >, _ValVector_< uint32_t > * > | CreateValVector (const uint32_t &aSize) |
Helper function to create a ValVector object. More... | |
virtual exception::exception * | validate (boost::shared_ptr< Buffers > aBuffers) |
Function which dispatch calls when the reply is received to check that the headers are as expected. More... | |
virtual exception::exception * | validate (uint8_t *aSendBufferStart, uint8_t *aSendBufferEnd, std::deque< std::pair< uint8_t *, uint32_t > >::iterator aReplyStartIt, std::deque< std::pair< uint8_t *, uint32_t > >::iterator aReplyEndIt)=0 |
Function which the dispatch calls when the reply is received to check that the headers are as expected. More... | |
virtual void | dispatchExceptionHandler () |
Function which is called when an exception is thrown. More... | |
void | returnBufferToPool (boost::shared_ptr< Buffers > &aBuffers) |
Function to return a buffer to the buffer pool. More... | |
void | returnBufferToPool (std::deque< boost::shared_ptr< Buffers > > &aBuffers) |
Function to return a collection of buffers to the buffer pool. More... | |
void | returnBufferToPool (std::vector< boost::shared_ptr< Buffers > > &aBuffers) |
Function to return a collection of buffers to the buffer pool. More... | |
void | returnBufferToPool (std::deque< std::vector< boost::shared_ptr< Buffers > > > &aBuffers) |
Function to return a collection of buffers to the buffer pool. More... | |
virtual boost::shared_ptr< Buffers > | checkBufferSpace (const uint32_t &aSendSize, const uint32_t &aReplySize, uint32_t &aAvailableSendSize, uint32_t &aAvailableReplySize) |
Function which checks the available space in the currently filling buffer against requested send and receive sizes and, if there is insufficient space in the currently filling buffer, then dispatch it and create a new buffer. More... | |
virtual uint32_t | getMaxNumberOfBuffers ()=0 |
Return the maximum number of packets in flight. More... | |
virtual uint32_t | getMaxSendSize ()=0 |
Return the maximum size to be sent based on the buffer size in the target. More... | |
virtual uint32_t | getMaxReplySize ()=0 |
Return the maximum size of reply packet based on the buffer size in the target. More... | |
Protected Attributes | |
URI | mUri |
a struct containing the full URI of the target for this client More... | |
std::string | mUriString |
Private Member Functions | |
ClientInterface () | |
Default Constructor. More... | |
ClientInterface (const ClientInterface &aClientInterface) | |
Copy Constructor. More... | |
virtual ClientInterface & | operator= (const ClientInterface &aClientInterface) |
Assignment operator. More... | |
void | updateCurrentBuffers () |
If the current buffer is null, allocate a buffer from the buffer pool for it If the buffer pool is empty, create 10 new buffers. More... | |
void | deleteBuffers () |
Private Attributes | |
boost::mutex | mUserSideMutex |
A MutEx lock used to make sure the access functions are thread safe. More... | |
boost::mutex | mBufferMutex |
A MutEx lock used to make sure the access to the buffers is thread safe. More... | |
std::deque< boost::shared_ptr< Buffers > > | mBuffers |
A memory pool of buffers which will be dispatched. More... | |
boost::shared_ptr< Buffers > | mCurrentBuffers |
A pointer to a buffer-wrapper object. More... | |
std::string | mId |
the identifier of the target for this client More... | |
boost::posix_time::time_duration | mTimeoutPeriod |
Timeout period for transactions. More... | |
boost::weak_ptr< Node > | mNode |
Friends | |
class | IPbusCore |
class | HwInterface |
std::string | detail::getAddressDescription (const ClientInterface &, const uint32_t, const size_t &) |
An abstract base class for defining the interface to the various IPbus clients as well as providing the generalized packing functionality.
Definition at line 99 of file ClientInterface.hpp.
|
protected |
Constructor.
aId | the uinique identifier that the client will be given. |
aUri | a struct containing the full URI of the target. |
aTimeoutPeriod | the default timeout period for the protocol |
Definition at line 51 of file ClientInterface.cpp.
|
private |
Default Constructor.
Definition at line 64 of file ClientInterface.cpp.
|
private |
Copy Constructor.
aClientInterface | a ClientInterface to copy |
Definition at line 77 of file ClientInterface.cpp.
|
virtual |
|
protectedvirtual |
Function which checks the available space in the currently filling buffer against requested send and receive sizes and, if there is insufficient space in the currently filling buffer, then dispatch it and create a new buffer.
aSendSize | the amount of data that the current instruction wishes to send |
aReplySize | the amount of data that the current instruction expects to receive |
aAvailableSendSize | return the amount of space available for outgoing IPbus packets |
aAvailableReplySize | return the amount of space available for incoming IPbus packets |
Definition at line 285 of file ClientInterface.cpp.
References uhal::Debug, dispatchExceptionHandler(), getMaxReplySize(), getMaxSendSize(), implementDispatch(), uhal::log(), mCurrentBuffers, predispatch(), and updateCurrentBuffers().
Referenced by uhal::IPbusCore::implementBOT(), uhal::IPbusCore::implementRead(), uhal::IPbusCore::implementReadBlock(), uhal::IPbusCore::implementReadConfigurationSpace(), uhal::IPbusCore::implementRMWbits(), uhal::IPbusCore::implementRMWsum(), uhal::IPbusCore::implementWrite(), and uhal::IPbusCore::implementWriteBlock().
|
protected |
Helper function to create a ValHeader object.
Definition at line 391 of file ClientInterface.cpp.
References uhal::ValHeader::mMembers.
Referenced by uhal::IPbusCore::implementBOT(), uhal::IPbusCore::implementWrite(), and uhal::IPbusCore::implementWriteBlock().
|
protected |
Helper function to create a ValVector object.
aSize | the size of the ValVector |
Definition at line 405 of file ClientInterface.cpp.
References uhal::ValVector< T >::mMembers.
Referenced by uhal::IPbusCore::implementReadBlock().
|
protected |
Helper function to create a ValWord object.
aValue | an initial value |
aMask | a bit-mask for selecting a subset of bits in the word |
Definition at line 398 of file ClientInterface.cpp.
References uhal::ValWord< T >::mMembers.
Referenced by uhal::IPbusCore::implementRead(), uhal::IPbusCore::implementReadConfigurationSpace(), uhal::IPbusCore::implementRMWbits(), and uhal::IPbusCore::implementRMWsum().
|
private |
Definition at line 368 of file ClientInterface.cpp.
References mBufferMutex, mBuffers, and mCurrentBuffers.
Referenced by dispatchExceptionHandler(), operator=(), and ~ClientInterface().
void uhal::ClientInterface::dispatch | ( | ) |
Method to dispatch all queued transactions, and wait until all corresponding responses have been received.
Definition at line 144 of file ClientInterface.cpp.
References dispatchExceptionHandler(), Flush(), implementDispatch(), uhal::Info, uhal::Integer(), uhal::log(), mBufferMutex, mCurrentBuffers, mUserSideMutex, and predispatch().
Referenced by uhal::tests::PerfTester::runValidationTest(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), uhal::tests::PerfTester::validation_test_block_write_read(), uhal::tests::PerfTester::validation_test_single_write_read(), uhal::tests::PerfTester::validation_test_write_rmwbits_read(), and uhal::tests::PerfTester::validation_test_write_rmwsum_read().
|
protectedvirtual |
Function which is called when an exception is thrown.
Reimplemented in uhal::IPbus< 2, IPbus_minor >, uhal::IPbusCore, and uhal::IPbus< 1, IPbus_minor >.
Definition at line 385 of file ClientInterface.cpp.
References deleteBuffers().
Referenced by checkBufferSpace(), dispatch(), and uhal::IPbusCore::dispatchExceptionHandler().
|
protectedvirtual |
Virtual function to dispatch all buffers and block until all replies are received.
Definition at line 184 of file ClientInterface.cpp.
Referenced by dispatch().
|
protected |
A method to retrieve the timeout period currently being used.
Definition at line 520 of file ClientInterface.cpp.
References mTimeoutPeriod.
|
protectedpure virtual |
Return the maximum number of packets in flight.
Implemented in uhal::IPbus< 2, IPbus_minor >, uhal::IPbus< 1, IPbus_minor >, and uhal::tests::DummyClient.
|
protectedpure virtual |
Return the maximum size of reply packet based on the buffer size in the target.
Implemented in uhal::tests::DummyClient.
Referenced by checkBufferSpace().
|
protectedpure virtual |
Return the maximum size to be sent based on the buffer size in the target.
Implemented in uhal::tests::DummyClient.
Referenced by checkBufferSpace(), and updateCurrentBuffers().
|
protectedvirtual |
Return the size of the preamble.
Reimplemented in uhal::IPbus< 2, IPbus_minor >, and uhal::IPbus< 1, IPbus_minor >.
Definition at line 206 of file ClientInterface.cpp.
uint64_t uhal::ClientInterface::getTimeoutPeriod | ( | ) |
A method to retrieve the timeout period currently being used.
Definition at line 513 of file ClientInterface.cpp.
References mTimeoutPeriod, and mUserSideMutex.
const std::string & uhal::ClientInterface::id | ( | ) | const |
Return the identifier of the target for this client.
Definition at line 106 of file ClientInterface.cpp.
References mId.
|
protectedpure virtual |
Send a byte order transaction.
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
|
protectedpure virtual |
Pure virtual function which actually performs the dispatch operation.
aBuffers | the buffer to be dispatched |
Implemented in uhal::tests::DummyClient.
Referenced by checkBufferSpace(), and dispatch().
|
protectedpure virtual |
Read a single, masked, unsigned word.
aAddr | the address of the register to read |
aMask | the mask to apply to the value after reading |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by read().
|
protectedpure virtual |
Read a block of unsigned data from a block of registers or a block-read port.
aAddr | the lowest address in the block of registers or the address of the block-read port |
aSize | the number of words to read |
aMode | whether we are reading from a block of registers (INCREMENTAL) or a block-read port (NON_INCREMENTAL) |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by readBlock().
|
protectedpure virtual |
Read the value of a register, apply the AND-term, apply the OR-term, set the register to this new value and return a copy of the new value to the user.
aAddr | the address of the register to read, modify, write |
aANDterm | the AND-term to apply to existing value in the target register |
aORterm | the OR-term to apply to existing value in the target register |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by rmw_bits(), and write().
|
protectedpure virtual |
Read the value of a register, add the addend, set the register to this new value and return a copy of the new value to the user.
aAddr | the address of the register to read, modify, write |
aAddend | the addend to add to the existing value in the target register |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by rmw_sum().
|
protectedpure virtual |
Write a single, unmasked word to a register.
aAddr | the address of the register to write |
aValue | the value to write to the register |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by write().
|
protectedpure virtual |
Write a block of data to a block of registers or a block-write port.
aAddr | the address of the register to write |
aValues | the values to write to the registers or a block-write port |
aMode | whether we are writing to a block of registers (INCREMENTAL) or a block-write port (NON_INCREMENTAL) |
Implemented in uhal::IPbusCore, and uhal::tests::DummyClient.
Referenced by writeBlock().
|
privatevirtual |
Assignment operator.
aClientInterface | a ClientInterface to copy |
Definition at line 90 of file ClientInterface.cpp.
References deleteBuffers(), mId, mTimeoutPeriod, mUri, and mUriString.
|
protectedvirtual |
Add a preamble to an IPbus buffer.
Reimplemented in uhal::IPbus< 2, IPbus_minor >, and uhal::IPbus< 1, IPbus_minor >.
Definition at line 212 of file ClientInterface.cpp.
Referenced by updateCurrentBuffers().
|
protectedvirtual |
Finalize the buffer before it is transmitted.
aBuffers | the buffer to finalize before dispatch |
Reimplemented in uhal::IPbus< 2, IPbus_minor >, and uhal::IPbus< 1, IPbus_minor >.
Definition at line 216 of file ClientInterface.cpp.
Referenced by checkBufferSpace(), and dispatch().
ValWord< uint32_t > uhal::ClientInterface::read | ( | const uint32_t & | aAddr | ) |
Read a single, unmasked, unsigned word.
aAddr | the address of the register to read |
Definition at line 458 of file ClientInterface.cpp.
References implementRead(), and mUserSideMutex.
Referenced by uhal::tests::DummyHardwareFixture< type >::DummyHardwareFixture(), uhal::Node::read(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), uhal::tests::PerfTester::validation_test_single_write_read(), uhal::tests::PerfTester::validation_test_write_rmwbits_read(), and uhal::tests::PerfTester::validation_test_write_rmwsum_read().
ValWord< uint32_t > uhal::ClientInterface::read | ( | const uint32_t & | aAddr, |
const uint32_t & | aMask | ||
) |
Read a single, masked, unsigned word.
aAddr | the address of the register to read |
aMask | the mask to apply to the value after reading |
Definition at line 465 of file ClientInterface.cpp.
References implementRead(), and mUserSideMutex.
ValVector< uint32_t > uhal::ClientInterface::readBlock | ( | const uint32_t & | aAddr, |
const uint32_t & | aSize, | ||
const defs::BlockReadWriteMode & | aMode = defs::INCREMENTAL |
||
) |
Read a block of unsigned data from a block of registers or a block-read port.
aAddr | the lowest address in the block of registers or the address of the block-read port |
aSize | the number of words to read |
aMode | whether we are reading from a block of registers (INCREMENTAL) or a block-read port (NON_INCREMENTAL) |
Definition at line 472 of file ClientInterface.cpp.
References implementReadBlock(), and mUserSideMutex.
Referenced by uhal::tests::PerfTester::runValidationTest(), and uhal::tests::PerfTester::validation_test_block_write_read().
|
protected |
Function to return a buffer to the buffer pool.
aBuffers | a shared-pointer to a buffer to be returned to the buffer pool |
Definition at line 221 of file ClientInterface.cpp.
References mBufferMutex, and mBuffers.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::UDP< InnerProtocol >::dispatchExceptionHandler(), uhal::Mmap::dispatchExceptionHandler(), uhal::PCIe::dispatchExceptionHandler(), validate(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP(), and uhal::UDP< InnerProtocol >::~UDP().
|
protected |
Function to return a collection of buffers to the buffer pool.
aBuffers | a collection of shared-pointers to a buffer to be returned to the buffer pool |
Definition at line 233 of file ClientInterface.cpp.
References mBufferMutex, and mBuffers.
|
protected |
Function to return a collection of buffers to the buffer pool.
aBuffers | a collection of shared-pointers to a buffer to be returned to the buffer pool |
Definition at line 265 of file ClientInterface.cpp.
References mBufferMutex, and mBuffers.
|
protected |
Function to return a collection of buffers to the buffer pool.
aBuffers | a collection of shared-pointers to a buffer to be returned to the buffer pool |
Definition at line 249 of file ClientInterface.cpp.
References mBufferMutex, and mBuffers.
ValWord< uint32_t > uhal::ClientInterface::rmw_bits | ( | const uint32_t & | aAddr, |
const uint32_t & | aANDterm, | ||
const uint32_t & | aORterm | ||
) |
Read the value of a register, apply the AND-term, apply the OR-term, set the register to this new value and return a copy of the original value to the user.
aAddr | the address of the register to read, modify, write |
aANDterm | the AND-term to apply to existing value in the target register |
aORterm | the OR-term to apply to existing value in the target register |
Definition at line 481 of file ClientInterface.cpp.
References implementRMWbits(), and mUserSideMutex.
Referenced by uhal::tests::PerfTester::runValidationTest(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), and uhal::tests::PerfTester::validation_test_write_rmwbits_read().
ValWord< uint32_t > uhal::ClientInterface::rmw_sum | ( | const uint32_t & | aAddr, |
const int32_t & | aAddend | ||
) |
Read the value of a register, add the addend, set the register to this new value and return a copy of the original value to the user.
aAddr | the address of the register to read, modify, write |
aAddend | the addend to add to the existing value in the target register |
Definition at line 490 of file ClientInterface.cpp.
References implementRMWsum(), and mUserSideMutex.
Referenced by uhal::tests::PerfTester::runValidationTest(), and uhal::tests::PerfTester::validation_test_write_rmwsum_read().
void uhal::ClientInterface::setTimeoutPeriod | ( | const uint32_t & | aTimeoutPeriod = 0 | ) |
A method to modify the timeout period for any pending or future transactions.
aTimeoutPeriod | the desired timeout period in milliseconds |
Definition at line 498 of file ClientInterface.cpp.
References mTimeoutPeriod, and mUserSideMutex.
|
private |
If the current buffer is null, allocate a buffer from the buffer pool for it If the buffer pool is empty, create 10 new buffers.
Definition at line 344 of file ClientInterface.cpp.
References getMaxSendSize(), mBufferMutex, mBuffers, mCurrentBuffers, and preamble().
Referenced by checkBufferSpace().
const std::string & uhal::ClientInterface::uri | ( | ) | const |
Return the url of the target for this client.
Definition at line 138 of file ClientInterface.cpp.
References mUriString.
Referenced by uhal::exception::IPbusCoreResponseCodeSet::IPbusCoreResponseCodeSet(), uhal::tests::PerfTester::runValidationTest(), uhal::IPbusCore::validate(), uhal::tests::PerfTester::validation_test_write_rmwbits_read(), and uhal::tests::PerfTester::validation_test_write_rmwsum_read().
|
protectedvirtual |
Function which dispatch calls when the reply is received to check that the headers are as expected.
aBuffers | the buffer to validate when it is propagated with replies |
Definition at line 188 of file ClientInterface.cpp.
References returnBufferToPool().
Referenced by uhal::Mmap::read(), uhal::PCIe::read(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::UDP< InnerProtocol >::read_callback().
|
protectedpure virtual |
Function which the dispatch calls when the reply is received to check that the headers are as expected.
aSendBufferStart | a pointer to the start of the first word of IPbus data which was sent (i.e. with no preamble) |
aSendBufferEnd | a pointer to the end of the last word of IPbus data which was sent |
aReplyStartIt | an iterator to the start of the list of memory locations in to which the reply was written |
aReplyEndIt | an iterator to the end (one past last valid entry) of the list of memory locations in to which the reply was written |
Implemented in uhal::IPbus< 2, IPbus_minor >, uhal::IPbusCore, and uhal::tests::DummyClient.
ValHeader uhal::ClientInterface::write | ( | const uint32_t & | aAddr, |
const uint32_t & | aValue | ||
) |
Write a single, unmasked word to a register.
aAddr | the address of the register to write |
aValue | the value to write to the register |
Definition at line 413 of file ClientInterface.cpp.
References implementWrite(), and mUserSideMutex.
Referenced by uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), uhal::tests::PerfTester::validation_test_single_write_read(), uhal::tests::PerfTester::validation_test_write_rmwbits_read(), uhal::tests::PerfTester::validation_test_write_rmwsum_read(), and uhal::Node::write().
ValHeader uhal::ClientInterface::write | ( | const uint32_t & | aAddr, |
const uint32_t & | aValue, | ||
const uint32_t & | aMask | ||
) |
Write a single, masked word to a register.
aAddr | the address of the register to write |
aValue | the value to write to the register |
aMask | the mask to apply to the value |
Definition at line 420 of file ClientInterface.cpp.
References implementRMWbits(), uhal::Integer(), uhal::log(), mUserSideMutex, and uhal::utilities::TrailingRightBits().
ValHeader uhal::ClientInterface::writeBlock | ( | const uint32_t & | aAddr, |
const std::vector< uint32_t > & | aValues, | ||
const defs::BlockReadWriteMode & | aMode = defs::INCREMENTAL |
||
) |
Write a block of data to a block of registers or a block-write port.
aAddr | the address of the register to write |
aValues | the values to write to the registers or a block-write port |
aMode | whether we are writing to a block of registers (INCREMENTAL) or a block-write port (NON_INCREMENTAL) |
Definition at line 449 of file ClientInterface.cpp.
References implementWriteBlock(), and mUserSideMutex.
Referenced by uhal::tests::PerfTester::runValidationTest(), and uhal::tests::PerfTester::validation_test_block_write_read().
|
friend |
|
friend |
Definition at line 418 of file ClientInterface.hpp.
|
friend |
Definition at line 417 of file ClientInterface.hpp.
|
private |
A MutEx lock used to make sure the access to the buffers is thread safe.
Definition at line 396 of file ClientInterface.hpp.
Referenced by deleteBuffers(), dispatch(), returnBufferToPool(), and updateCurrentBuffers().
|
private |
A memory pool of buffers which will be dispatched.
Definition at line 399 of file ClientInterface.hpp.
Referenced by deleteBuffers(), returnBufferToPool(), and updateCurrentBuffers().
|
private |
A pointer to a buffer-wrapper object.
Definition at line 407 of file ClientInterface.hpp.
Referenced by checkBufferSpace(), deleteBuffers(), dispatch(), and updateCurrentBuffers().
|
private |
the identifier of the target for this client
Definition at line 410 of file ClientInterface.hpp.
Referenced by id(), and operator=().
|
private |
Definition at line 415 of file ClientInterface.hpp.
Referenced by uhal::detail::getAddressDescription().
|
private |
Timeout period for transactions.
Definition at line 413 of file ClientInterface.hpp.
Referenced by getBoostTimeoutPeriod(), getTimeoutPeriod(), operator=(), and setTimeoutPeriod().
|
protected |
a struct containing the full URI of the target for this client
Definition at line 424 of file ClientInterface.hpp.
Referenced by operator=().
|
protected |
Definition at line 426 of file ClientInterface.hpp.
Referenced by operator=(), and uri().
|
private |
A MutEx lock used to make sure the access functions are thread safe.
Definition at line 393 of file ClientInterface.hpp.
Referenced by dispatch(), getTimeoutPeriod(), read(), readBlock(), uhal::IPbusCore::readConfigurationSpace(), rmw_bits(), rmw_sum(), setTimeoutPeriod(), write(), and writeBlock().