eRPC API Reference  Rev. 1.12.0
NXP Semiconductors
erpc_crc16.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _EMBEDDED_RPC__CRC16_H_
10 #define _EMBEDDED_RPC__CRC16_H_
11 
12 #include <cstdint>
13 
20 // Classes
23 
24 namespace erpc {
25 
29 class Crc16
30 {
31 public:
37  explicit Crc16(uint32_t crcStart);
38 
42  Crc16(void);
43 
47  ~Crc16(void);
48 
57  uint16_t computeCRC16(const uint8_t *data, uint32_t lengthInBytes);
58 
64  void setCrcStart(uint32_t crcStart);
65 
66 protected:
67  uint32_t m_crcStart;
68 };
69 
70 } // namespace erpc
71 
74 #endif // _EMBEDDED_RPC__CRC16_H_
~Crc16(void)
Crc16 destructor.
Definition: erpc_crc16.cpp:22
Crc16(void)
Constructor.
Definition: erpc_crc16.cpp:20
void setCrcStart(uint32_t crcStart)
Set crc start number.
Definition: erpc_crc16.cpp:51
uint32_t m_crcStart
Definition: erpc_crc16.hpp:67
Definition: erpc_arbitrated_client_manager.hpp:25
uint16_t computeCRC16(const uint8_t *data, uint32_t lengthInBytes)
Compute a ITU-CCITT CRC-16 over the provided data.
Definition: erpc_crc16.cpp:24
Class for compute crc16.
Definition: erpc_crc16.hpp:29