|
|
|
|
发表人:匿名 |
发表时间:2001/12/26 22:15:00 |
|
|
The Block Check Code (BCC) is calculated as follows:
; assume:
; msg_length = Number of bytes in message over which the BCC
is calculated.
; msg_ptr = Pointer to the first byte (start of message char) of
; the message.
VAR
i : integer; snp_bcc : byte;
BODY
i = 0;
snp_bcc = 0;
while ( i < msg_length)
snp_bcc = snp_bcc XOR (byte contents at (msg_ptr + i))
rotate snp_bcc left by 1; 8-bit rotate (ROTATE HIGH BIT TO LOW BIT)
i = i+1
end while
END BODY
谁可解释一下上面的校验码计算程序。尤其下面二句:
snp_bcc = snp_bcc XOR (byte contents at (msg_ptr + i))
rotate snp_bcc left by 1; 8-bit rotate (ROTATE HIGH BIT TO LOW BIT)
计算结果是奇、偶还是和校验。最后结果在snp_bcc中吗?我对语言不太熟。
|
|
以下是关于《SNP协议中校验码》论题的回复(共1篇) |
|
回复:SNP协议中校验码
它是GE SNP/SNP-X协议中最后的奇偶效验。我有些SNP协议资料可以提供给你,如果需要的化。
sunflowe@21cn.com <sunflowe@21cn.com>
|
|
|