From b122fae04cd22237d3e925fb08396918c21aeebc Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Thu, 11 Jul 2024 14:03:00 +0200 Subject: [PATCH] Updated license headers --- lib/AmsDecoder/include/crc.h | 1 - lib/AmsDecoder/src/crc.cpp | 19 ------------------- .../include/ImpulseAmsData.h | 6 ++++++ lib/MeterCommunicators/include/KmpTalker.h | 6 ++++++ lib/MeterCommunicators/src/ImpulseAmsData.cpp | 6 ++++++ .../src/KmpCommunicator.cpp | 6 ++++++ .../src/PulseMeterCommunicator.cpp | 6 ++++++ 7 files changed, 30 insertions(+), 20 deletions(-) diff --git a/lib/AmsDecoder/include/crc.h b/lib/AmsDecoder/include/crc.h index 4a2c84d1..b054cd2c 100644 --- a/lib/AmsDecoder/include/crc.h +++ b/lib/AmsDecoder/include/crc.h @@ -12,6 +12,5 @@ uint16_t crc16(const uint8_t* p, int len); uint16_t crc16_x25(const uint8_t* p, int len); -uint16_t crc16_1021(const uint8_t* p, int len); #endif diff --git a/lib/AmsDecoder/src/crc.cpp b/lib/AmsDecoder/src/crc.cpp index af3018bf..6788ce32 100644 --- a/lib/AmsDecoder/src/crc.cpp +++ b/lib/AmsDecoder/src/crc.cpp @@ -33,22 +33,3 @@ uint16_t crc16 (const uint8_t *p, int len) { return crc; } - -uint16_t crc16_1021(const uint8_t *p, int len) { - uint32_t crc = 0x0000; - for(int i = 0; i < len; i++) { - int mask = 0x80; - while(mask > 0) { - crc <<= 1; - if (p[i] & mask){ - crc |= 1; - } - mask>>=1; - if (crc & 0x10000) { - crc &= 0xffff; - crc ^= 0x1021; - } - } - } - return crc; -} diff --git a/lib/MeterCommunicators/include/ImpulseAmsData.h b/lib/MeterCommunicators/include/ImpulseAmsData.h index d1e64d23..c243e984 100644 --- a/lib/MeterCommunicators/include/ImpulseAmsData.h +++ b/lib/MeterCommunicators/include/ImpulseAmsData.h @@ -1,3 +1,9 @@ +/** + * @copyright Utilitech AS 2023 + * License: Fair Source + * + */ + #ifndef _IMPULSEAMSDATA_H #define _IMPULSEAMSDATA_H diff --git a/lib/MeterCommunicators/include/KmpTalker.h b/lib/MeterCommunicators/include/KmpTalker.h index 4d93bf5d..4ddd0ecf 100644 --- a/lib/MeterCommunicators/include/KmpTalker.h +++ b/lib/MeterCommunicators/include/KmpTalker.h @@ -1,3 +1,9 @@ +/** + * @copyright Utilitech AS 2023 + * License: All rights reserved + * + */ + #pragma once #include diff --git a/lib/MeterCommunicators/src/ImpulseAmsData.cpp b/lib/MeterCommunicators/src/ImpulseAmsData.cpp index 2bcc1c6c..ce37ef11 100644 --- a/lib/MeterCommunicators/src/ImpulseAmsData.cpp +++ b/lib/MeterCommunicators/src/ImpulseAmsData.cpp @@ -1,3 +1,9 @@ +/** + * @copyright Utilitech AS 2023 + * License: Fair Source + * + */ + #include "ImpulseAmsData.h" #include "Uptime.h" diff --git a/lib/MeterCommunicators/src/KmpCommunicator.cpp b/lib/MeterCommunicators/src/KmpCommunicator.cpp index 09cb5bcf..6e5cab21 100644 --- a/lib/MeterCommunicators/src/KmpCommunicator.cpp +++ b/lib/MeterCommunicators/src/KmpCommunicator.cpp @@ -1,3 +1,9 @@ +/** + * @copyright Utilitech AS 2023 + * License: Fair Source + * + */ + #include "KmpCommunicator.h" #include "Uptime.h" #include "crc.h" diff --git a/lib/MeterCommunicators/src/PulseMeterCommunicator.cpp b/lib/MeterCommunicators/src/PulseMeterCommunicator.cpp index 161079a5..c8d61fc5 100644 --- a/lib/MeterCommunicators/src/PulseMeterCommunicator.cpp +++ b/lib/MeterCommunicators/src/PulseMeterCommunicator.cpp @@ -1,3 +1,9 @@ +/** + * @copyright Utilitech AS 2023 + * License: Fair Source + * + */ + #include "PulseMeterCommunicator.h" #include "Uptime.h"