livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
Loading...
Searching...
No Matches
livox::mid360::crc Namespace Reference

CRC-16 and CRC-32 as defined by the Mid-360 communication protocol (crc.hpp). More...

Functions

constexpr std::uint16_t crc16_ccitt_false (std::span< const std::byte > data, std::uint16_t state=0xFFFF) noexcept
 Incremental CRC-16/CCITT-FALSE. Pass the previous result as state to continue.
constexpr std::uint32_t crc32 (std::span< const std::byte > data, std::uint32_t state=0) noexcept
 Incremental CRC-32 (zlib-compatible).

Detailed Description

CRC-16 and CRC-32 as defined by the Mid-360 communication protocol (crc.hpp).

Function Documentation

◆ crc32()

std::uint32_t livox::mid360::crc::crc32 ( std::span< const std::byte > data,
std::uint32_t state = 0 )
nodiscardconstexprnoexcept

Incremental CRC-32 (zlib-compatible).

Pass the previous final result as state to continue, exactly like zlib's crc32(). A fresh computation starts from 0.