#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Sun, 17 Mar 2019 00:00:38 +0100
changeset 4861 7a69e6afd632
parent 4860 aba42206dea6
child 4862 461bb4a4a396
#REFACTORING by cg class: CRC16Stream class comment/format in: #newDNP #newModbus changed: #newCCITT
CRC16Stream.st
--- a/CRC16Stream.st	Sat Mar 16 23:59:56 2019 +0100
+++ b/CRC16Stream.st	Sun Mar 17 00:00:38 2019 +0100
@@ -165,32 +165,32 @@
         x16 + x13 + x12 + x11 + x10 + x8 + x6 + x5 + x2 + 1 "
 
     "/ 16r1021 bitReversed16 => 16r8408
-    ^ self generatorPolynomMSB:16r1021 initValue:16rFFFF xorOut:16rFFFF
+    ^ self generatorPolynomMSB:16r1021 initValue:16rFFFF xorOut:0
 
     "Created: / 16-03-2019 / 21:13:11 / Claus Gittinger"
-    "Modified (format): / 16-03-2019 / 23:08:57 / Claus Gittinger"
+    "Modified: / 16-03-2019 / 23:50:58 / Claus Gittinger"
 !
 
 newDNP
     "return an instance of the DNP CRC-16
         2r11110101100101
-          3210 8 65  2 0
         x16 + x13 + x12 + x11 + x10 + x8 + x6 + x5 + x2 + 1 "
 
     ^ self generatorPolynomMSB:16r3d65 initValue:0 xorOut:16rFFFF
 
     "Created: / 16-03-2019 / 20:50:03 / Claus Gittinger"
+    "Modified (comment): / 17-03-2019 / 00:00:18 / Claus Gittinger"
 !
 
 newModbus
     "return an instance of the Modbus CRC-16
         2r11110101100101
-          3210 8 65  2 0
         x16 + x13 + x12 + x11 + x10 + x8 + x6 + x5 + x2 + 1 "
 
     ^ self generatorPolynomMSB:16r8005 initValue:16rFFFF xorOut:0
 
     "Created: / 16-03-2019 / 21:15:26 / Claus Gittinger"
+    "Modified (comment): / 17-03-2019 / 00:00:23 / Claus Gittinger"
 ! !
 
 !CRC16Stream methodsFor:'initialization'!