new checksums added
This commit is contained in:
15
streamApp/checksums.cmd
Executable file
15
streamApp/checksums.cmd
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
exec O.$EPICS_HOST_ARCH/streamApp $0
|
||||
dbLoadDatabase "O.Common/streamApp.dbd"
|
||||
streamApp_registerRecordDeviceDriver
|
||||
|
||||
drvAsynIPPortConfigure "terminal", "localhost:40000"
|
||||
|
||||
dbLoadRecords checksums.db
|
||||
|
||||
#log debug output to file
|
||||
#streamSetLogfile StreamDebug.log
|
||||
var streamError 1
|
||||
|
||||
iocInit
|
||||
#var streamDebug 1
|
7
streamApp/checksums.db
Normal file
7
streamApp/checksums.db
Normal file
@ -0,0 +1,7 @@
|
||||
record (stringout, "DZ:checksums")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@checksums.proto write terminal")
|
||||
field (VAL, "123456789")
|
||||
field (PINI, "YES")
|
||||
}
|
37
streamApp/checksums.proto
Normal file
37
streamApp/checksums.proto
Normal file
@ -0,0 +1,37 @@
|
||||
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<sum>";
|
||||
out "%s sum8 %0.12<sum8>";
|
||||
out "%s ~sum %0.12<~sum>";
|
||||
out "%s notsum %0.12<notsum>";
|
||||
out "%s -sum %0.12<-sum>";
|
||||
out "%s negsum %0.12<negsum>";
|
||||
out "%s sum16 %0.12<sum16>";
|
||||
out "%s sum32 %0.12<sum32>";
|
||||
out "%s xor %0.12<xor>";
|
||||
out "%s xor8 %0.12<xor8>";
|
||||
out "%s xor7 %0.12<xor7>";
|
||||
out "%s crc8 %0.12<crc8>";
|
||||
out "%s ccitt8 %0.12<ccitt8>";
|
||||
out "%s crc16 %0.12<crc16>";
|
||||
out "%s crc16r %0.12<crc16r>";
|
||||
out "%s modbus %0.12<modbus>";
|
||||
out "%s ccitt16 %0.12<ccitt16>";
|
||||
out "%s ccitt16a %0.12<ccitt16a>";
|
||||
out "%s ccitt16x %0.12<ccitt16x>";
|
||||
out "%s crc16c %0.12<crc16c>";
|
||||
out "%s xmodem %0.12<xmodem>";
|
||||
out "%s crc32 %0.12<crc32>";
|
||||
out "%s crc32r %0.12<crc32r>";
|
||||
out "%s jamcrc %0.12<jamcrc>";
|
||||
out "%s adler32 %0.12<adler32>";
|
||||
out "%s adler32b %0.12<adler32b>";
|
||||
out "%s hexsum8 %0.12<hexsum8>";
|
||||
out "%s cpi %0.12<cpi>";
|
||||
out "%s leybold %0.12<leybold>";
|
||||
}
|
@ -20,6 +20,11 @@ record (stringout, "$(P):request")
|
||||
record (stringin, "$(P):reply")
|
||||
{
|
||||
}
|
||||
record (stringout, "$(P):checksum")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
field (OUT, "@test.proto checksum($(CHKSUM=sum)) terminal")
|
||||
}
|
||||
record (stringin, "$(P):spy")
|
||||
{
|
||||
field (DTYP, "stream")
|
||||
@ -134,3 +139,4 @@ record (waveform, "$(P):spybin")
|
||||
field (NELM, "2000")
|
||||
field (SCAN, "I/O Intr")
|
||||
}
|
||||
|
||||
|
@ -23,3 +23,6 @@ spybin {
|
||||
extraInput=ignore;
|
||||
in "%r";
|
||||
}
|
||||
checksum {
|
||||
out "%s %0.1<\$1>";
|
||||
}
|
||||
|
Reference in New Issue
Block a user