![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class implements the Chunk interface by using a 32Bit CRC for ensuring data integrity. More...
This concrete class implements the Chunk interface by using a 32Bit CRC for ensuring data integrity.
#include <CrcChunk.h>
Public Member Functions | |
| CrcChunk (RegionMedia ®ion) | |
| Constructor. | |
| void | start (Cpl::Dm::MailboxServer &myMbox) noexcept |
| See Cpl::Persistent::Chunk. | |
| void | stop () noexcept |
| See Cpl::Persistent::Chunk. | |
| bool | loadData (Payload &dstHandler, size_t index=0) noexcept |
| See Cpl::Persistent::Chunk. | |
| bool | updateData (Payload &srcHandler, size_t index=0, bool invalidate=false) noexcept |
| See Cpl::Persistent::Chunk. | |
| size_t | getMetadataLength () const noexcept |
| See Cpl::Persistent::Chunk. | |
Public Member Functions inherited from Cpl::Persistent::Chunk | |
| virtual | ~Chunk () |
| Virtual destructor. | |
Static Public Attributes | |
| static constexpr size_t | FRAME_OFFSET_DATA = sizeof( size_t ) |
| Start of data (aka overhead length) | |
| static constexpr size_t | CRC_SIZE = sizeof( uint32_t ) |
| The size of the CRC. | |
| static constexpr size_t | FRAME_OVERHEAD = FRAME_OFFSET_DATA + CRC_SIZE |
| Total overhead size. | |
Protected Member Functions | |
| virtual bool | pushToRecord (Payload &dstHandler) |
| Helper method. Encapsulates pushing data to the record. | |
| virtual size_t | pullFromRecord (Payload &srcHandler) |
| Helper method. Encapsulates retrieving data from the record. Returns the length of the data. | |
| virtual void | reset () |
| Helper method. Encapsulates actions that occur when there is NO VALID data. | |
Protected Attributes | |
| RegionMedia & | m_region |
| Region/Media. | |
| size_t | m_dataLen |
| Data Length for the record. | |
| Cpl::Persistent::CrcChunk::CrcChunk | ( | RegionMedia & | region | ) |
Constructor.
|
virtualnoexcept |
Implements Cpl::Persistent::Chunk.
|
virtualnoexcept |
Implements Cpl::Persistent::Chunk.
|
protectedvirtual |
Helper method. Encapsulates retrieving data from the record. Returns the length of the data.
|
protectedvirtual |
Helper method. Encapsulates pushing data to the record.
|
protectedvirtual |
Helper method. Encapsulates actions that occur when there is NO VALID data.
|
virtualnoexcept |
Implements Cpl::Persistent::Chunk.
|
virtualnoexcept |
Implements Cpl::Persistent::Chunk.
|
virtualnoexcept |
Implements Cpl::Persistent::Chunk.
|
staticconstexpr |
The size of the CRC.
|
staticconstexpr |
Start of data (aka overhead length)
|
staticconstexpr |
Total overhead size.
|
protected |
Data Length for the record.
|
protected |
Region/Media.