146 void Write(
int byteOffset,
const ByteArray& data, uint32_t maxBytes);
Represents an error that occurred when reading or writing data in the Data reader/writer.
const char * what()
Override exception::what() to return the message we are tracking.
DataReaderWriterException(std::string msg)
Represents a data reader/writer to a caller.
uint32_t GetMemoryBlockByteSize()
Retrieve the size of the currently opened memory block in bytes.
std::string BufferToString(const ByteArray &data, uint32_t maxBytes, int indent)
Convert the specified data up to the specified number of bytes into a string by performing a "hex dum...
uint32_t _memoryBlockByteSize
void Write(int byteOffset, const ByteArray &data, uint32_t maxBytes)
Write a specified number of bytes.
const char * _GetBlockNameForBlockNumber(DataReaderWriter::MemoryBlockNumber blockNumber)
Given a block number, retrieve the corresponding block name.
ByteArray Read(int byteOffset, uint32_t maxBytes)
Read a specified number of bytes.
~DataReaderWriter()
Destructor.
MemoryBlockNumber
Represents the memory blocks that can be accessed. Hides how memory blocks are actually identified.
@ Memory_Block_0
First block.
@ Memory_Block_1
Second block.
@ Memory_Block_2
Third block.
Represents an error that occurred during initialization or shut down of the Data reader/writer.
DataReaderWriterInitException(std::string msg)
const char * what()
Override exception::what() to return the message we are tracking.
The namespace containing all Design Pattern Examples implemented in C++.
std::vector< uint8_t > ByteArray