########################################################################## # This is an example and debug protocol file for StreamDevice. # # (C) 2010 Dirk Zimoch (dirk.zimoch@psi.ch) # # This file is part of StreamDevice. # # StreamDevice is free software: You can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # StreamDevice is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with StreamDevice. If not, see https://www.gnu.org/licenses/. #########################################################################/ Terminator = NL; # Output string, checksum name and checksum value # Format checksums as ascii hex (%0 flag) # Ignore the 12 chars (.12) between the sting (%s) and the checksum (%<...) write { out "%s sum %0.12"; out "%s sum8 %0.12"; out "%s ~sum %0.12<~sum>"; out "%s notsum %0.12"; out "%s -sum %0.12<-sum>"; out "%s negsum %0.12"; out "%s sum16 %0.12"; out "%s sum32 %0.12"; out "%s xor %0.12"; out "%s xor8 %0.12"; out "%s xor7 %0.12"; out "%s crc8 %0.12"; out "%s ccitt8 %0.12"; out "%s crc16 %0.12"; out "%s crc16r %0.12"; out "%s modbus %0.12"; out "%s ccitt16 %0.12"; out "%s ccitt16a %0.12"; out "%s ccitt16x %0.12"; out "%s crc16c %0.12"; out "%s xmodem %0.12"; out "%s crc32 %0.12"; out "%s crc32r %0.12"; out "%s jamcrc %0.12"; out "%s adler32 %0.12"; out "%s hexsum8 %0.12"; out "%s cpi %0.12"; out "%s leybold %0.12"; out "%s lrc %0.12"; out "%s hexlrc %0.12"; }