Index: src/ChecksumConverter.cc =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/src/ChecksumConverter.cc,v retrieving revision 1.19 diff -c -r1.19 ChecksumConverter.cc *** src/ChecksumConverter.cc 8 Aug 2007 11:40:52 -0000 1.19 --- src/ChecksumConverter.cc 14 Aug 2007 08:10:42 -0000 *************** *** 465,476 **** {"sum8", sum, 0x00, 0x00, 1}, // 0xDD {"sum16", sum, 0x0000, 0x0000, 2}, // 0x01DD {"sum32", sum, 0x00000000, 0x00000000, 4}, // 0x000001DD ! {"nsum", sum, 0xff, 0xff, 1}, // 0x23 ! {"negsum", sum, 0xff, 0xff, 1}, // 0x23 ! {"-sum", sum, 0xff, 0xff, 1}, // 0x23 ! {"notsum", sum, 0x00, 0xff, 1}, // 0x22 ! {"~sum", sum, 0x00, 0xff, 1}, // 0x22 {"xor", xor8, 0x00, 0x00, 1}, // 0x31 {"xor7", xor7, 0x00, 0x00, 1}, // 0x31 {"crc8", crc_0x07, 0x00, 0x00, 1}, // 0xF4 {"ccitt8", crc_0x31, 0x00, 0x00, 1}, // 0xA1 --- 465,486 ---- {"sum8", sum, 0x00, 0x00, 1}, // 0xDD {"sum16", sum, 0x0000, 0x0000, 2}, // 0x01DD {"sum32", sum, 0x00000000, 0x00000000, 4}, // 0x000001DD ! {"nsum", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"negsum", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"-sum", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"nsum8", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"negsum8", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"-sum8", sum, 0xFF, 0xFF, 1}, // 0x23 ! {"nsum16", sum, 0xFFFF, 0xFFFF, 2}, // 0xFE23 ! {"negsum16",sum, 0xFFFF, 0xFFFF, 2}, // 0xFE23 ! {"-sum16", sum, 0xFFFF, 0xFFFF, 2}, // 0xFE23 ! {"nsum32", sum, 0xFFFFFFFF, 0xFFFFFFFF, 4}, // 0xFFFFFE23 ! {"negsum32",sum, 0xFFFFFFFF, 0xFFFFFFFF, 4}, // 0xFFFFFE23 ! {"-sum32", sum, 0xFFFFFFFF, 0xFFFFFFFF, 4}, // 0xFFFFFE23 ! {"notsum", sum, 0x00, 0xFF, 1}, // 0x22 ! {"~sum", sum, 0x00, 0xFF, 1}, // 0x22 {"xor", xor8, 0x00, 0x00, 1}, // 0x31 + {"xor8", xor8, 0x00, 0x00, 1}, // 0x31 {"xor7", xor7, 0x00, 0x00, 1}, // 0x31 {"crc8", crc_0x07, 0x00, 0x00, 1}, // 0xF4 {"ccitt8", crc_0x31, 0x00, 0x00, 1}, // 0xA1 *************** *** 500,506 **** const char* p = strchr(source, '>'); if (!p) { ! error ("Missing terminating '>' in checksum format.\n"); return false; } --- 510,516 ---- const char* p = strchr(source, '>'); if (!p) { ! error ("Missing closing '>' in checksum format.\n"); return false; } Index: doc/formats.html =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/doc/formats.html,v retrieving revision 1.10 diff -c -r1.10 formats.html *** doc/formats.html 8 Aug 2007 10:16:45 -0000 1.10 --- doc/formats.html 14 Aug 2007 08:22:54 -0000 *************** *** 352,406 ****

Implemented checksum functions

!
%<SUM> or %<SUM8>
One byte. The sum of all characters modulo 28.
!
%<SUM16>
Two bytes. The sum of all characters modulo 216.
!
%<SUM32>
Four bytes. The sum of all characters modulo 232.
!
%<NEGSUM> or %<NSUM> or %<-SUM>
One byte. The negative of the sum of all characters modulo 28.
!
%<NOTSUM> or %<~SUM>
One byte. The bitwise inverse of the sum of all characters modulo 28.
!
%<XOR>
One byte. All characters xor'ed.
!
%<XOR7>
One byte. All characters xor'ed & 0x7F.
!
%<CRC8>
!
One byte. An often used 8 bit CRC checksum (poly=0x07, init=0x00, xorout=0x00).
!
%<CCITT8>
!
One byte. The CCITT standard 8 bit CRC checksum (poly=0x31, init=0x00, xorout=0x00).
!
%<CRC16>
!
Two bytes. An often used 16 bit CRC checksum (poly=0x8005, init=0x0000, xorout=0x0000).
!
%<CRC16R>
!
Two bytes. An often used reflected 16 bit CRC checksum (poly=0x8005, init=0x0000, xorout=0x0000).
!
%<CCITT16>
Two bytes. The usual (but wrong?) ! implementation of the CCITT standard 16 bit CRC checksum (poly=0x1021, init=0xFFFF, xorout=0x0000).
!
%<CCITT16A>
Two bytes. The unusual (but correct?) ! implementation of the CCITT standard 16 bit CRC checksum with augment. (poly=0x1021, init=0x1D0F, xorout=0x0000).
!
%<CRC32>
!
Four bytes. The standard 32 bit CRC checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0xFFFFFFFF).
!
%<CRC32R>
!
Four bytes. The standard reflected 32 bit CRC checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0xFFFFFFFF).
!
%<JAMCRC>
!
Four bytes. Another reflected 32 bit CRC checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0x00000000).
!
%<ADLER32>
Four bytes. The Adler32 checksum according to RFC 1950.
!
%<HEXSUM8>
One byte. The sum of all hex digits. (Other characters are ignored.)
--- 352,410 ----

Implemented checksum functions

!
%<sum> or %<sum8>
One byte. The sum of all characters modulo 28.
!
%<sum16>
Two bytes. The sum of all characters modulo 216.
!
%<sum32>
Four bytes. The sum of all characters modulo 232.
!
%<negsum>, %<nsum>, %<-sum>, %<negsum8>, %<nsum8>, or %<-sum8>
One byte. The negative of the sum of all characters modulo 28.
!
%<negsum16>, %<nsum16>, or %<-sum16>
!
Two bytes. The negative of the sum of all characters modulo 216.
!
%<negsum32>, %<nsum32>, or %<-sum32>
!
Four bytes. The negative of the sum of all characters modulo 232.
!
%<notsum> or %<~sum>
One byte. The bitwise inverse of the sum of all characters modulo 28.
!
%<xor>
One byte. All characters xor'ed.
!
%<xor7>
One byte. All characters xor'ed & 0x7F.
!
%<crc8>
!
One byte. An often used 8 bit crc checksum (poly=0x07, init=0x00, xorout=0x00).
!
%<ccitt8>
!
One byte. The CCITT standard 8 bit crc checksum (poly=0x31, init=0x00, xorout=0x00).
!
%<crc16>
!
Two bytes. An often used 16 bit crc checksum (poly=0x8005, init=0x0000, xorout=0x0000).
!
%<crc16r>
!
Two bytes. An often used reflected 16 bit crc checksum (poly=0x8005, init=0x0000, xorout=0x0000).
!
%<ccitt16>
Two bytes. The usual (but wrong?) ! implementation of the CCITT standard 16 bit crc checksum (poly=0x1021, init=0xFFFF, xorout=0x0000).
!
%<ccitt16a>
Two bytes. The unusual (but correct?) ! implementation of the CCITT standard 16 bit crc checksum with augment. (poly=0x1021, init=0x1D0F, xorout=0x0000).
!
%<crc32>
!
Four bytes. The standard 32 bit crc checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0xFFFFFFFF).
!
%<crc32r>
!
Four bytes. The standard reflected 32 bit crc checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0xFFFFFFFF).
!
%<jamcrc>
!
Four bytes. Another reflected 32 bit crc checksum. (poly=0x04C11DB7, init=0xFFFFFFFF, xorout=0x00000000).
!
%<adler32>
Four bytes. The Adler32 checksum according to RFC 1950.
!
%<hexsum8>
One byte. The sum of all hex digits. (Other characters are ignored.)