ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | List of all members
TCRC_16_Base Class Referenceabstract

Cyclic redundancy check (CRC-16) base class. More...

#include <CRC_16_Base.h>

Inheritance diagram for TCRC_16_Base:
Inheritance graph
Collaboration diagram for TCRC_16_Base:
Collaboration graph

Public Member Functions

virtual U16 Init ()=0
 Get initial value of CRC. More...
 
BOOL Check (VOID *void_Data, U32 u32_Size, U16 u16_Expected_CRC)
 Check CRC of the data buffer. More...
 
virtual U16 Calculate (VOID *void_Data, U32 u32_Size)
 Calculate CRC of the data buffer. More...
 
virtual VOID Update (U16 &u16_CRC, U8 u8_Data)=0
 Update CRC with new data value. More...
 
virtual TRIL Test ()
 Test CRC calulation. More...
 

Detailed Description

Cyclic redundancy check (CRC-16) base class.

Member Function Documentation

◆ Calculate()

U16 TCRC_16_Base::Calculate ( VOID void_Data,
U32  u32_Size 
)
virtual

Calculate CRC of the data buffer.


Note
None
Parameters
[in]*void_Data- Pointer to the data buffer
[in]u32_Size- Size of the data buffer
Returns
U16 - Calculated CRC of the data buffer
Override
Not allowed
Attention
None
UML diagram
dot_TCRC_16_Base__Calculate.png

References Init(), and Update().

Referenced by Check(), TMODBUS_Response_PDU::Done(), and TMODBUS_Request_PDU::Is_CRC_Valid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Check()

BOOL TCRC_16_Base::Check ( VOID void_Data,
U32  u32_Size,
U16  u16_Expected_CRC 
)

Check CRC of the data buffer.


Note
None
Parameters
[in]*void_Data- Pointer to the data buffer
[in]u32_Size- Size of the data buffer
[in]u16_Expected_CRC- Expected CRC of the data buffer
Returns
BOOL - Data buffer CRC checking status
Return values
false- CRC of the buffer not match to expected CRC
true- CRC of the buffer match to expected CRC
Override
Not allowed
Attention
None
UML diagram
dot_TCRC_16_Base__Check.png

References Calculate().

Here is the call graph for this function:

◆ Init()

virtual U16 TCRC_16_Base::Init ( )
pure virtual

Get initial value of CRC.


Note
None
Returns
U16 - CRC initial value
Override
Requered
Attention
None
UML diagram

Implemented in TCRC_16_MODBUS, TCRC_16_DNP, and TCRC_16_CCITT.

Referenced by Calculate().

Here is the caller graph for this function:

◆ Test()

TRIL TCRC_16_Base::Test ( )
virtual

Test CRC calulation.


Note
None
Returns
TRIL - Test CRC calculation status
Return values
unset- Test method not implemented
false- Test CRC calculation failed
true- Test CRC calculation successed
Override
Not allowed
Attention
Don't call this method directly
UML diagram
dot_TCRC_16_Base__Test.png

Reimplemented in TCRC_16_MODBUS.

References unset.

◆ Update()

virtual VOID TCRC_16_Base::Update ( U16 u16_CRC,
U8  u8_Data 
)
pure virtual

Update CRC with new data value.


Note
None
Parameters
[in,out]&u16_CRC- Actual CRC value
[in]u8_Data- Data value
Returns
None
Override
Not allowed
Attention
None
UML diagram

Implemented in TCRC_16_MODBUS, TCRC_16_DNP, and TCRC_16_CCITT.

Referenced by Calculate().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: