A class which wraps a single word of data and marks whether or not it is valid. More...
#include <uhal/ValMem.hpp>
Public Member Functions | |
| ValWord (const T &aValue, const uint32_t &aMask=defs::NOMASK) | |
| Constructor.  More... | |
| ValWord (const ValWord< T > &aVal) | |
| Copy constructor.  More... | |
| ValWord () | |
| Default constructor.  More... | |
| bool | valid () | 
| Return whether the Validated memory is marked as valid.  More... | |
| void | valid (bool aValid) | 
| Change the validatity state of the Validated memory.  More... | |
| ValWord & | operator= (const T &aValue) | 
| Assignment operator - no check on whether the data has previously been marked as valid.  More... | |
| operator T () | |
| Return the value of the validated memory with check on validity.  More... | |
| T | value () const | 
| Return the value of the validated memory with check on validity.  More... | |
| void | value (const T &aValue) | 
| If the memory has not previously been marked as valid, set the value.  More... | |
| const uint32_t & | mask () const | 
| Return the mask used by this validated memory.  More... | |
| void | mask (const uint32_t &aMask) | 
| Set the mask used by this validated memory.  More... | |
Private Attributes | |
| std::shared_ptr< _ValWord_< T > > | mMembers | 
| A shared pointer to a ValWord struct, so that every copy of this ValWord points to the same underlying memory.  More... | |
Friends | |
| class | ClientInterface | 
| Make ClientInterface a friend so that it can access the members to get the info associated with the raw data space.  More... | |
| class | ValHeader | 
| Make the ValHeader class a friend so we can downcast the members.  More... | |
A class which wraps a single word of data and marks whether or not it is valid.
Definition at line 188 of file ValMem.hpp.
| uhal::ValWord< T >::ValWord | ( | const T & | aValue, | 
| const uint32_t & | aMask = defs::NOMASK  | 
        ||
| ) | 
Constructor.
| aValue | a value to which the validated memory will be initialized | 
| aMask | a mask for modifying returned values | 
Definition at line 91 of file ValMem.cpp.
| uhal::ValWord< T >::ValWord | ( | const ValWord< T > & | aVal | ) | 
| uhal::ValWord< T >::ValWord | 
Default constructor.
Definition at line 105 of file ValMem.cpp.
| const uint32_t & uhal::ValWord< T >::mask | 
Return the mask used by this validated memory.
Definition at line 173 of file ValMem.cpp.
| void uhal::ValWord< T >::mask | ( | const uint32_t & | aMask | ) | 
Set the mask used by this validated memory.
| aMask | the mask to be used by this validated memory | 
Definition at line 180 of file ValMem.cpp.
| uhal::ValWord< T >::operator T | 
Return the value of the validated memory with check on validity.
Definition at line 134 of file ValMem.cpp.
| ValWord< T > & uhal::ValWord< T >::operator= | ( | const T & | aValue | ) | 
Assignment operator - no check on whether the data has previously been marked as valid.
| aValue | Change the value stored in the Validated memory | 
Definition at line 126 of file ValMem.cpp.
References uhal::ValWord< T >::value().
| bool uhal::ValWord< T >::valid | 
Return whether the Validated memory is marked as valid.
Definition at line 112 of file ValMem.cpp.
Referenced by pycohal::get_dummy_ValWord(), uhal::tests::job_multiple(), and uhal::tests::UHAL_TESTS_DEFINE_CLIENT_TEST_CASES().
| void uhal::ValWord< T >::valid | ( | bool | aValid | ) | 
Change the validatity state of the Validated memory.
| aValid | the new validity state of the Validated memory | 
Definition at line 119 of file ValMem.cpp.
| T uhal::ValWord< T >::value | 
Return the value of the validated memory with check on validity.
Definition at line 141 of file ValMem.cpp.
References uhal::log(), and uhal::utilities::TrailingRightBits().
Referenced by pycohal::convert_to_string(), pycohal::get_dummy_ValWord(), pycohal::hex_string(), uhal::ValWord< T >::operator=(), 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().
| void uhal::ValWord< T >::value | ( | const T & | aValue | ) | 
If the memory has not previously been marked as valid, set the value.
| aValue | the value of the validated memory | 
Definition at line 157 of file ValMem.cpp.
References uhal::log().
      
  | 
  friend | 
Make ClientInterface a friend so that it can access the members to get the info associated with the raw data space.
Definition at line 192 of file ValMem.hpp.
      
  | 
  friend | 
Make the ValHeader class a friend so we can downcast the members.
Definition at line 195 of file ValMem.hpp.
      
  | 
  private | 
A shared pointer to a ValWord struct, so that every copy of this ValWord points to the same underlying memory.
Definition at line 265 of file ValMem.hpp.
Referenced by uhal::ClientInterface::CreateValWord().