DUNE: Uniform Navigational Environment  2016.05.0
DUNE::Algorithms::FletcherChecksum Class Reference

Detailed Description

8-bit Fletcher Checksum Algorithm.

Implementation of the 8-bit Fletcher Checksum Algorithm as described in RFC 1146.

Static Public Member Functions

static void compute (const uint8_t *buffer, int length, uint8_t &a, uint8_t &b)
 

Member Function Documentation

static void DUNE::Algorithms::FletcherChecksum::compute ( const uint8_t *  buffer,
int  length,
uint8_t &  a,
uint8_t &  b 
)
inlinestatic

Compute the 8-bit Fletcher Checksum of a byte buffer D.

The result is returned in the accumulators A and B that should be initilized to 0 before calling this method.

Parameters
bufferbyte buffer.
lengthbyte buffer length.
aaccumulator A (sum of all bytes).
baccumulator B (sum of partial byte sums).
Collaboration diagram for DUNE::Algorithms::FletcherChecksum:
Collaboration graph