19 static constexpr std::size_t cTableSize{256};
20 static volatile std::atomic_bool mCrcTableInitialized;
21 static std::array<uint8_t, cTableSize> mCrcTable;
23 const uint8_t cCounterMax{0x0e};
25 uint8_t mProtectingCounter;
26 uint8_t mCheckingCounter;
28 static void initializeCrcTable(uint8_t crcPoly)
noexcept;
29 static uint8_t calculateCrc(
30 const std::vector<uint8_t> &data, std::size_t offset = 0);
36 const std::vector<uint8_t> &unprotectedData,
37 std::vector<uint8_t> &protectedData)
override;
40 const std::vector<uint8_t> &unprotectedData,
41 std::vector<uint8_t> &protectedData)
override;
44 const std::vector<uint8_t> &protectedData)
override;
E2E Profile11 variant A implementation.
Definition: profile11.h:17
bool TryForward(const std::vector< uint8_t > &unprotectedData, std::vector< uint8_t > &protectedData) override
Try to protect a message payload by inserting a CRC header while replicating the E2E status.
Definition: profile11.cpp:92
CheckStatusType Check(const std::vector< uint8_t > &protectedData) override
Check whether a message is received correctly or not.
Definition: profile11.cpp:99
bool TryProtect(const std::vector< uint8_t > &unprotectedData, std::vector< uint8_t > &protectedData) override
Try to protect a message payload by inserting a CRC header.
Definition: profile11.cpp:58
E2E protection profile abstract class.
Definition: profile.h:26
CheckStatusType
Definition: profile.h:16