33 #ifndef STEAM_ENGINE_TESTFRAME_H 34 #define STEAM_ENGINE_TESTFRAME_H 37 #include "lib/integral.hpp" 71 CREATED, EMITTED, DISCARDED
74 static constexpr
size_t BUFFSIZ = 1024;
75 using _Arr = std::array<char,BUFFSIZ>;
76 using _A64 = std::array<uint64_t, BUFFSIZ/
sizeof(uint64_t)>;
85 Meta (uint seq, uint family);
87 bool operator== (
Meta const&)
const;
114 static bool isAlive (
void* memLocation);
118 static bool isDead (
void* memLocation);
120 bool isAlive()
const;
123 bool isValid()
const;
124 bool isPristine()
const;
126 bool operator== (
void* memLocation)
const;
128 friend bool operator== (
TestFrame const& f1,
TestFrame const& f2) {
return f1.contentEquals(f2); }
129 friend bool operator!= (
TestFrame const& f1,
TestFrame const& f2) {
return !f1.contentEquals(f2); }
132 _Arr&
data() {
return * std::launder (reinterpret_cast<_Arr* > (&
buffer_)); }
133 _Arr
const&
data()
const {
return * std::launder (reinterpret_cast<_Arr const*> (&
buffer_)); }
134 _A64& data64() {
return * std::launder (reinterpret_cast<_A64* > (&
buffer_)); }
135 _A64
const& data64()
const {
return * std::launder (reinterpret_cast<_A64 const*> (&
buffer_)); }
139 Meta& accessHeader();
140 Meta const& accessHeader()
const;
141 bool contentEquals (
TestFrame const& o)
const;
143 StageOfLife currStage()
const;
145 bool hasValidChecksum()
const;
Mock data frame for simulated rendering.
_Arr & data()
Array-style direct access to the payload data.
Meta header_
Metadata record located behind the data buffer.
void buildData()
Generate baseline data content based on the Meta::distinction seed.
std::byte buffer_[sizeof(_Arr)]
inline storage buffer for the payload media data
Steam-Layer implementation namespace root.
Lumiera GTK UI implementation root.
Hash value types and utilities.
bool matchDistinction() const
verify the current data was not touched since initialisation
size_t HashVal
a STL compatible hash value
static void reseed()
discard all cached #testData and recalibrate data generation
HashVal markChecksum()
recompute and store checksum based on current contents
TestFrame & testData(uint seqNr, uint chanNr)
Helper to access a specific frame of test data at a fixed memory location.
HashVal computeChecksum() const