Public message_size_Upload (42) als Byte
Allgemeines crc_value = 0
Allgemeines bitvalue als Byte ()
Allgemeines bitcrc als Byte ()
Allgemeines Const POLY als ganze Zahl = &H8005
Allgemeines len_upload als Schnur = 80
Allgemeines msg_size_Upload als Byte = len_upload
Funktion CRC_Check_Table_Upload (ByVal msg_size_Upload als ganze Zahl) als ganze Zahl
I als ganze Zahl verdunkeln
J als ganze Zahl verdunkeln
Msg als ganze Zahl verdunkeln
crc_value = 0
message_size_Upload (0) = 97
message_size_Upload (1) = 140
message_size_Upload (2) = 105
message_size_Upload (3) = 188
message_size_Upload (4) = 51
message_size_Upload (5) = 79
message_size_Upload (6) = 99
message_size_Upload (7) = 92
message_size_Upload (8) = 64
message_size_Upload (9) = 162
message_size_Upload (10) = 19
message_size_Upload (11) = 109
message_size_Upload (12) = 76
message_size_Upload (12) = 48
message_size_Upload (14) = 48
message_size_Upload (15) = 49
message_size_Upload (16) = 55
message_size_Upload (17) = 57
message_size_Upload (18) = 6
message_size_Upload (19) = 76
message_size_Upload (20) = 48
message_size_Upload (21) = 48
message_size_Upload (22) = 49
message_size_Upload (23) = 55
message_size_Upload (24) = 57
message_size_Upload (25) = 56
message_size_Upload (26) = 49
message_size_Upload (27) = 51
message_size_Upload (28) = 69
message_size_Upload (29) = 69
message_size_Upload (30) = 54
message_size_Upload (31) = 129
message_size_Upload (32) = 16
message_size_Upload (33) = 89
message_size_Upload (34) = 62
message_size_Upload (35) = 230
message_size_Upload (6) = 1
message_size_Upload (37) = 213
message_size_Upload (38) = 107
message_size_Upload (39) = 21
message_size_Upload (40) = 82
'Schleifen durch Mitteilung des Bytes
Für i = 0 zum msg_size_Upload - 1
Msg = (message_size_Upload (40))
Msg = (Msg << 8) und &HFFFF
'Schleife durch die Mitteilung der Spitzen
Für J = 0 bis 7
Wenn ((Msg Xor crc_value) >> 15) > 0 dann
'verschiebt die Blockprüfungs-Spitzenwerte und vergleicht mit POLY
crc_value = ((crc_value << 1) Xor POLY) und &HFFFF
Sonst
crc_value <<= 1
'die Blockprüfungs-Spitzenwerte verschieben
crc_value = (crc_value) und &HFFFF
Beenden wenn
Msg <<= 1
Msg = (Msg) und &HFFFF
Folgendes J
Zunächst I
'bringt den Blockprüfungs-Wert im dezimalen (Zahl) Format zurück
bitcrc = BitConverter.GetBytes (crc_value)
Zurückgehen (crc_value Xor 0)
Funktion beenden
|