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... | |
| std::string | uri () const |
| Ping the target for this client. More... | |
| void | dispatch () |
| Method to dispatch all IPbus packets which are in the queue of IPbusPacketInfo's and wait until all queued packets are flushed. 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... | |
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... | |
Friends | |
| class | IPbusCore |
An abstract base class for defining the interface to the various IPbus clients as well as providing the generalized packing functionality.
Definition at line 92 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 66 of file ClientInterface.cpp.
|
private |
Copy Constructor.
| aClientInterface | a ClientInterface to copy |
Definition at line 81 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 335 of file ClientInterface.cpp.
References uhal::Debug, dispatchExceptionHandler(), getMaxReplySize(), getMaxSendSize(), implementDispatch(), 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 497 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 509 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 503 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 451 of file ClientInterface.cpp.
References mBufferMutex, mBuffers, and mCurrentBuffers.
Referenced by dispatchExceptionHandler(), operator=(), and ~ClientInterface().
| void uhal::ClientInterface::dispatch | ( | ) |
Method to dispatch all IPbus packets which are in the queue of IPbusPacketInfo's and wait until all queued packets are flushed.
Definition at line 186 of file ClientInterface.cpp.
References dispatchExceptionHandler(), Flush(), implementDispatch(), uhal::Info, uhal::Integer(), mBufferMutex, mCurrentBuffers, mUserSideMutex, and predispatch().
Referenced by uhal::tests::for(), uhal::tests::PerfTester::runValidationTest(), 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 490 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 227 of file ClientInterface.cpp.
Referenced by dispatch().
|
protected |
A method to retrieve the timeout period currently being used.
Definition at line 626 of file ClientInterface.cpp.
References mTimeoutPeriod.
|
protectedpure virtual |
Return the maximum number of packets in flight.
Implemented in uhal::IPbus< 2, IPbus_minor >, and uhal::IPbus< 1, IPbus_minor >.
|
protectedpure virtual |
Return the maximum size of reply packet based on the buffer size in the target.
Referenced by checkBufferSpace().
|
protectedpure virtual |
Return the maximum size to be sent based on the buffer size in the target.
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 254 of file ClientInterface.cpp.
| uint64_t uhal::ClientInterface::getTimeoutPeriod | ( | ) |
A method to retrieve the timeout period currently being used.
Definition at line 619 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 110 of file ClientInterface.cpp.
References mId.
|
protectedpure virtual |
Send a byte order transaction.
Implemented in uhal::IPbusCore.
|
protectedpure virtual |
Pure virtual function which actually performs the dispatch operation.
| aBuffers | the buffer to be dispatched |
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.
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.
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.
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.
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.
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.
Referenced by writeBlock().
|
privatevirtual |
Assignment operator.
| aClientInterface | a ClientInterface to copy |
Definition at line 95 of file ClientInterface.cpp.
References deleteBuffers(), mId, mTimeoutPeriod, and mUri.
|
protectedvirtual |
Add a preamble to an IPbus buffer.
Reimplemented in uhal::IPbus< 2, IPbus_minor >, and uhal::IPbus< 1, IPbus_minor >.
Definition at line 260 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 263 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 563 of file ClientInterface.cpp.
References implementRead(), and mUserSideMutex.
Referenced by uhal::tests::DummyHardwareFixture< type >::DummyHardwareFixture(), uhal::tests::for(), uhal::Node::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().
| 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 570 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 577 of file ClientInterface.cpp.
References implementReadBlock(), and mUserSideMutex.
Referenced by uhal::Node::readBlock(), uhal::Node::readBlockOffset(), uhal::tests::PerfTester::runValidationTest(), uhal::tests::PerfTester::validation_test_block_write_read(), and uhal::tests::PerfTester::validation_test_write_rmwsum_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 268 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::PCIe(), 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 283 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 299 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 315 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 586 of file ClientInterface.cpp.
References implementRMWbits(), and mUserSideMutex.
Referenced by uhal::tests::for(), uhal::tests::PerfTester::runValidationTest(), uhal::tests::PerfTester::validation_test_write_rmwbits_read(), and uhal::tests::PerfTester::validation_test_write_rmwsum_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 596 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 605 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 423 of file ClientInterface.cpp.
References getMaxSendSize(), mBufferMutex, mBuffers, mCurrentBuffers, and preamble().
Referenced by checkBufferSpace().
| std::string uhal::ClientInterface::uri | ( | ) | const |
Ping the target for this client.
Return the url of the target for this client
Definition at line 142 of file ClientInterface.cpp.
References uhal::tests::if(), uhal::URI::mArguments, uhal::URI::mExtension, uhal::URI::mHostname, uhal::URI::mPath, uhal::URI::mPort, uhal::URI::mProtocol, and mUri.
Referenced by uhal::tests::PerfTester::runValidationTest(), uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES(), 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 231 of file ClientInterface.cpp.
References returnBufferToPool().
Referenced by uhal::PCIe::disconnect(), uhal::Mmap::read(), uhal::PCIe::read(), uhal::UDP< InnerProtocol >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::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 >, and uhal::IPbusCore.
| 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 516 of file ClientInterface.cpp.
References implementWrite(), and mUserSideMutex.
Referenced by uhal::tests::for(), 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 523 of file ClientInterface.cpp.
References implementRMWbits(), uhal::Integer(), 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 552 of file ClientInterface.cpp.
References implementWriteBlock(), and mUserSideMutex.
Referenced by uhal::tests::PerfTester::runValidationTest(), uhal::tests::PerfTester::validation_test_block_write_read(), uhal::tests::PerfTester::validation_test_write_rmwsum_read(), uhal::Node::writeBlock(), and uhal::Node::writeBlockOffset().
|
friend |
Definition at line 421 of file ClientInterface.hpp.
|
private |
A MutEx lock used to make sure the access to the buffers is thread safe.
Definition at line 401 of file ClientInterface.hpp.
Referenced by deleteBuffers(), dispatch(), returnBufferToPool(), and updateCurrentBuffers().
|
private |
A memory pool of buffers which will be dispatched.
Definition at line 404 of file ClientInterface.hpp.
Referenced by deleteBuffers(), returnBufferToPool(), and updateCurrentBuffers().
|
private |
A pointer to a buffer-wrapper object.
Definition at line 413 of file ClientInterface.hpp.
Referenced by checkBufferSpace(), deleteBuffers(), dispatch(), and updateCurrentBuffers().
|
private |
the identifier of the target for this client
Definition at line 416 of file ClientInterface.hpp.
Referenced by id(), and operator=().
|
private |
Timeout period for transactions.
Definition at line 419 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 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 398 of file ClientInterface.hpp.
Referenced by dispatch(), getTimeoutPeriod(), read(), readBlock(), uhal::IPbusCore::readConfigurationSpace(), rmw_bits(), rmw_sum(), setTimeoutPeriod(), write(), and writeBlock().
1.8.13