# VectorNav C++ Library: include/vn/error_detection.h Source File

error_detection.h
#ifndef _VNDATA_ERROR_DETECTION_H_
#define _VNDATA_ERROR_DETECTION_H_
#include <cstddef>
#include <string>
#include "int.h"
namespace vn {
namespace data {
namespace integrity {
class Checksum8
{
// Public Methods /////////////////////////////////////////////////////////
public:
static uint8_t compute(const char data[], size_t length);
};
class Crc16
{
// Public Methods /////////////////////////////////////////////////////////
public:
static uint16_t compute(const char data[], size_t length);
};
}
}
}
#endif
int.h
vn::data::integrity::Checksum8
Helpful class for working with 8-bit checksums.
Definition: error_detection.h:14
vn::data::integrity::Checksum8::compute
static uint8_t compute(const char data[], size_t length)
Computes the 8-bit checksum of the provided data.
vn::data::integrity::Crc16
Helpful class for working with 16-bit CRCs.
Definition: error_detection.h:32
vn::data::integrity::Crc16::compute
static uint16_t compute(const char data[], size_t length)
Computes the 16-bit CRC of the provided data.
vn
Definition: attitude.h:8