PIMap new functions
PIByteArray checksum crc some doc fixes
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user