PIMap new functions

PIByteArray checksum crc
some doc fixes
This commit is contained in:
Бычков Андрей
2022-08-04 20:20:08 +03:00
parent 54cc6c55b2
commit 170a713357
8 changed files with 436 additions and 81 deletions

View File

@@ -20,6 +20,7 @@
#include "pibytearray.h"
#include "pistringlist.h"
#include <iostream>
#include "picrc.h"
//! \class PIByteArray pibytearray.h
//! \~\details
@@ -292,6 +293,19 @@ uchar PIByteArray::checksumPlain8(bool inverse) const {
}
uchar PIByteArray::checksumCRC8() const {
return standardCRC_8().calculate(data(), size());
}
ushort PIByteArray::checksumCRC16() const {
return standardCRC_16().calculate(data(), size());
}
uint PIByteArray::checksumCRC32() const {
return standardCRC_32().calculate(data(), size());
}
//! \~\details
//! \~english
//! This is sum of all bytes multiplied by index+1, if inverse then add 1 and inverse.