crc/crc16ccitt_false.h
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 /*
3  * CRC checksums implemented by https://github.com/madler/crcany
4  * Sources under the zlib license, permitting free commercial use.
5  * See https://github.com/madler/crcany and http://zlib.net/zlib_license.html
6  * for further details.
7  *
8  * This project uses algorithm "CRC-16/CCITT-FALSE" (crc16ccitt_false.c and crc16ccitt_false.h).
9  * Other crc checksum algorithms may be used if required.
10  */
11 
12 // The _bit, _byte, and _word routines return the CRC of the len bytes at mem,
13 // applied to the previous CRC value, crc. If mem is NULL, then the other
14 // arguments are ignored, and the initial CRC, i.e. the CRC of zero bytes, is
15 // returned. Those routines will all return the same result, differing only in
16 // speed and code complexity. The _rem routine returns the CRC of the remaining
17 // bits in the last byte, for when the number of bits in the message is not a
18 // multiple of eight. The high bits bits of the low byte of val are applied to
19 // crc. bits must be in 0..8.
20 
21 #include <stddef.h>
22 
23 // Compute the CRC a bit at a time.
24 unsigned crc16ccitt_false_bit(unsigned crc, void const *mem, size_t len);
25 
26 // Compute the CRC of the high bits bits in the low byte of val.
27 unsigned crc16ccitt_false_rem(unsigned crc, unsigned val, unsigned bits);
28 
29 // Compute the CRC a byte at a time.
30 unsigned crc16ccitt_false_byte(unsigned crc, void const *mem, size_t len);
31 
32 // Compute the CRC a word at a time.
33 unsigned crc16ccitt_false_word(unsigned crc, void const *mem, size_t len);
crc16ccitt_false_bit
unsigned crc16ccitt_false_bit(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:16
crc16ccitt_false_rem
unsigned crc16ccitt_false_rem(unsigned crc, unsigned val, unsigned bits)
Definition: crc16ccitt_false.cpp:29
crc16ccitt_false_byte
unsigned crc16ccitt_false_byte(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:278
crc16ccitt_false_word
unsigned crc16ccitt_false_word(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:297
sick_scan_base.h


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:08