Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
94721c2b0e | |||
bf0e755913 | |||
51e4a0749d | |||
4cdace3ffe | |||
d19b16d096 | |||
b1e0d63c6b | |||
d1b43b879c | |||
6b0ee5e946 | |||
a0d1b35862 | |||
dfbd308d46 |
@ -1,14 +1,29 @@
|
||||
#CONFIG
|
||||
include $(TOP)/configure/CONFIG_APP
|
||||
# Add any changes to make definitions here
|
||||
# CONFIG - Load build configuration data
|
||||
#
|
||||
# Do not make changes to this file!
|
||||
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS =
|
||||
# Allow user to override where the build rules come from
|
||||
RULES = $(EPICS_BASE)
|
||||
|
||||
# Use this when your IOC and the host use different paths
|
||||
# to access the application. Typically this will be
|
||||
# used with the Microsoft FTP server or with NFS mounts. Use
|
||||
# is indicated by failure of the cdCommands script on
|
||||
# vxWorks. You must rebuild in the iocBoot directory
|
||||
# before this takes effect.
|
||||
#IOCS_APPL_TOP = <the top of the application as seen by the IOC>
|
||||
# RELEASE files point to other application tops
|
||||
include $(TOP)/configure/RELEASE
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH)
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/RELEASE.Common.$(T_A)
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
endif
|
||||
|
||||
CONFIG = $(RULES)/configure
|
||||
include $(CONFIG)/CONFIG
|
||||
|
||||
# Override the Base definition:
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
|
||||
# CONFIG_SITE files contain other build configuration settings
|
||||
include $(TOP)/configure/CONFIG_SITE
|
||||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
|
||||
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
endif
|
||||
|
@ -1,26 +0,0 @@
|
||||
# CONFIG_APP
|
||||
|
||||
include $(TOP)/configure/RELEASE
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH)
|
||||
-include $(TOP)/configure/RELEASE.Common.$(T_A)
|
||||
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
ifneq ($(wildcard $(EPICS_BASE)/configure),)
|
||||
CONFIG=$(EPICS_BASE)/configure
|
||||
else
|
||||
CONFIG=$(EPICS_BASE)/config
|
||||
DIRS += config
|
||||
endif
|
||||
include $(CONFIG)/CONFIG
|
||||
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
ifdef INSTALL_LOCATION_APP
|
||||
INSTALL_LOCATION = $(INSTALL_LOCATION_APP)
|
||||
endif
|
||||
|
||||
ifdef T_A
|
||||
-include $(TOP)/configure/O.$(T_A)/CONFIG_APP_INCLUDE
|
||||
endif
|
||||
|
||||
# dbst based database optimization (default: NO)
|
||||
DB_OPT = NO
|
40
configure/CONFIG_SITE
Normal file
40
configure/CONFIG_SITE
Normal file
@ -0,0 +1,40 @@
|
||||
# CONFIG_SITE
|
||||
|
||||
-include $(SUPPORT)/configure/CONFIG_SITE
|
||||
|
||||
# Make any application-specific changes to the EPICS build
|
||||
# configuration variables in this file.
|
||||
#
|
||||
# Host/target specific settings can be specified in files named
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
|
||||
# CONFIG_SITE.Common.$(T_A)
|
||||
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
# CHECK_RELEASE controls the consistency checking of the support
|
||||
# applications pointed to by the RELEASE* files.
|
||||
# Normally CHECK_RELEASE should be set to YES.
|
||||
# Set CHECK_RELEASE to NO to disable checking completely.
|
||||
# Set CHECK_RELEASE to WARN to perform consistency checking but
|
||||
# continue building even if conflicts are found.
|
||||
CHECK_RELEASE = YES
|
||||
|
||||
# Set this when you only want to compile this application
|
||||
# for a subset of the cross-compiled target architectures
|
||||
# that Base is built for.
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
|
||||
|
||||
# To install files into a location other than $(TOP) define
|
||||
# INSTALL_LOCATION here.
|
||||
#INSTALL_LOCATION=</absolute/path/to/install/top>
|
||||
|
||||
# Set this when the IOC and build host use different paths
|
||||
# to the install location. This may be needed to boot from
|
||||
# a Microsoft FTP server say, or on some NFS configurations.
|
||||
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
|
||||
|
||||
# These allow developers to override the CONFIG_SITE variable
|
||||
# settings without having to modify the configure/CONFIG_SITE
|
||||
# file itself.
|
||||
-include $(TOP)/../CONFIG_SITE.local
|
||||
-include $(TOP)/../configure/CONFIG_SITE.local
|
||||
-include $(TOP)/configure/CONFIG_SITE.local
|
@ -2,7 +2,7 @@
|
||||
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/configure/CONFIG_APP
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
# Set the following to NO to disable consistency checking of
|
||||
# the support applications defined in $(TOP)/configure/RELEASE
|
||||
|
64
src/ChecksumConverter.cc
Executable file → Normal file
64
src/ChecksumConverter.cc
Executable file → Normal file
@ -45,14 +45,20 @@
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(vxWorks) || defined(_WIN32) || defined(__rtems__)
|
||||
// These systems have no strncasecmp
|
||||
static int strncasecmp(const char *s1, const char *s2, size_t n)
|
||||
#ifdef _MSC_VER
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
#if defined(vxWorks) || defined(__rtems__)
|
||||
// These systems have no strncasecmp at the moment
|
||||
// But avoid compiler errors in case strncasecmp exists in future versions
|
||||
static int mystrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
int r=0;
|
||||
while (n && (r = toupper(*s1)-toupper(*s2)) == 0) { n--; s1++; s2++; };
|
||||
return r;
|
||||
}
|
||||
#define strncasecmp mystrncasecmp
|
||||
#endif
|
||||
|
||||
#include "StreamFormatConverter.h"
|
||||
@ -83,6 +89,33 @@ static uint32_t xor7(const uint8_t* data, size_t len, uint32_t sum)
|
||||
return xor8(data, len, sum) & 0x7F;
|
||||
}
|
||||
|
||||
static uint32_t bitsum(const uint8_t* data, size_t len, uint32_t sum)
|
||||
{
|
||||
// number of set bits in each byte
|
||||
const uint8_t table[256] = {
|
||||
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
|
||||
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
|
||||
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
|
||||
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
|
||||
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
|
||||
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
|
||||
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
|
||||
4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8};
|
||||
while (len--)
|
||||
{
|
||||
sum += table[*data++];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
static uint32_t crc_0x07(const uint8_t* data, size_t len, uint32_t crc)
|
||||
{
|
||||
// x^8 + x^2 + x^1 + x^0 (0x07)
|
||||
@ -612,7 +645,11 @@ static checksum checksumMap[] =
|
||||
{"leybold", leybold, 0x00, 0x00, 1}, // 0x22
|
||||
{"brksCryo",brksCryo, 0x00, 0x00, 1}, // 0x4A
|
||||
{"lrc", lrc, 0x00, 0x00, 1}, // 0x23
|
||||
{"hexlrc", hexlrc, 0x00, 0x00, 1} // 0xA7
|
||||
{"hexlrc", hexlrc, 0x00, 0x00, 1}, // 0xA7
|
||||
{"bitsum", bitsum, 0x00, 0x00, 1}, // 0x21
|
||||
{"bitsum8", bitsum, 0x00, 0x00, 1}, // 0x21
|
||||
{"bitsum16",bitsum, 0x0000, 0x0000, 2}, // 0x0021
|
||||
{"bitsum32",bitsum, 0x00000000, 0x00000000, 4}, // 0x00000021
|
||||
};
|
||||
|
||||
static uint32_t mask[5] = {0, 0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
|
||||
@ -697,8 +734,13 @@ printPseudo(const StreamFormat& format, StreamBuffer& output)
|
||||
uint_fast8_t fnum = extract<uint8_t>(info);
|
||||
|
||||
size_t start = format.width;
|
||||
size_t length = output.length()-format.width;
|
||||
if (format.prec > 0) length -= format.prec;
|
||||
size_t length = output.length();
|
||||
if (length >= start) length -= start;
|
||||
else length = 0;
|
||||
if (format.prec > 0) {
|
||||
if (length >= (size_t)format.prec) length -= format.prec;
|
||||
else length = 0;
|
||||
}
|
||||
|
||||
debug("ChecksumConverter %s: output to check: \"%s\"\n",
|
||||
checksumMap[fnum].name, output.expand(start,length)());
|
||||
@ -771,9 +813,13 @@ scanPseudo(const StreamFormat& format, StreamBuffer& input, size_t& cursor)
|
||||
uint32_t xorout = extract<uint32_t>(info);
|
||||
size_t start = format.width;
|
||||
uint_fast8_t fnum = extract<uint8_t>(info);
|
||||
size_t length = cursor-format.width;
|
||||
|
||||
if (format.prec > 0) length -= format.prec;
|
||||
size_t length = cursor;
|
||||
if (length >= start) length -= start;
|
||||
else length = 0;
|
||||
if (format.prec > 0) {
|
||||
if (length >= (size_t)format.prec) length -= format.prec;
|
||||
else length = 0;
|
||||
}
|
||||
|
||||
debug("ChecksumConverter %s: input to check: \"%s\n",
|
||||
checksumMap[fnum].name, input.expand(start,length)());
|
||||
|
39
src/Makefile
39
src/Makefile
@ -27,12 +27,12 @@ include $(TOP)/configure/CONFIG
|
||||
-include CONFIG_STREAM
|
||||
-include ../CONFIG_STREAM
|
||||
|
||||
LIBRARY_DEFAULT = stream
|
||||
LIBRARY_IOC = stream
|
||||
|
||||
DBD += $(LIBRARY_DEFAULT).dbd
|
||||
DBD += $(LIBRARY_DEFAULT)-base.dbd
|
||||
ifdef CALC
|
||||
DBD += $(LIBRARY_DEFAULT)-scalcout.dbd
|
||||
DBD += stream.dbd
|
||||
DBD += stream-base.dbd
|
||||
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
||||
DBD += stream-scalcout.dbd
|
||||
endif
|
||||
|
||||
ifdef ASYN
|
||||
@ -42,7 +42,7 @@ $(warning Asyn not included! Didn't you set ASYN in your RELEASE file?)
|
||||
endif
|
||||
|
||||
ifeq ($(LOADABLE_MODULE),YES)
|
||||
SRCS += $(LIBRARY_DEFAULT)_registerRecordDeviceDriver.cpp
|
||||
SRCS += stream_registerRecordDeviceDriver.cpp
|
||||
endif
|
||||
SRCS += $(BUSSES:%=%Interface.cc)
|
||||
SRCS += $(FORMATS:%=%Converter.cc)
|
||||
@ -60,6 +60,9 @@ ifneq ($(words $(PCRE_LIB) $(PCRE_INCLUDE)),0)
|
||||
LIB_SYS_LIBS_DEFAULT += pcre
|
||||
LIB_SYS_LIBS_WIN32 += $(PCRE_LIB)\\pcre
|
||||
SHRLIB_DEPLIB_DIRS += $(PCRE_LIB)
|
||||
ifdef ENABLE_STATIC
|
||||
CPPFLAGS += -DPCRE_STATIC
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -98,28 +101,28 @@ streamReferences: ../CONFIG_STREAM
|
||||
$(PERL) ../makeref.pl Converter $(FORMATS) >> $@
|
||||
|
||||
# create stream-base.dbd from all RECORDTYPES except scalcout record
|
||||
$(COMMON_DIR)/$(LIBRARY_DEFAULT)-base.dbd: ../CONFIG_STREAM
|
||||
$(COMMON_DIR)/stream-base.dbd: ../CONFIG_STREAM
|
||||
$(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(filter-out scalcout, $(RECORDTYPES)) > $@
|
||||
|
||||
$(LIBRARY_DEFAULT)-base.dbd$(DEP): ../CONFIG_STREAM
|
||||
echo $(LIBRARY_DEFAULT)-base.dbd: $< > $@
|
||||
stream-base.dbd$(DEP): ../CONFIG_STREAM
|
||||
echo stream-base.dbd: $< > $@
|
||||
|
||||
STREAM_DBD_FILES = $(LIBRARY_DEFAULT)-base.dbd
|
||||
STREAM_DBD_FILES = stream-base.dbd
|
||||
|
||||
ifdef CALC
|
||||
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
||||
# create stream-scalcout.dbd for scalcout record
|
||||
$(COMMON_DIR)/$(LIBRARY_DEFAULT)-scalcout.dbd: ../CONFIG_STREAM
|
||||
$(COMMON_DIR)/stream-scalcout.dbd: ../CONFIG_STREAM
|
||||
$(PERL) ../makedbd.pl --rec-only scalcout > $@
|
||||
|
||||
$(LIBRARY_DEFAULT)-scalcout.dbd$(DEP): ../CONFIG_STREAM
|
||||
echo $(LIBRARY_DEFAULT)-scalcout.dbd: $< > $@
|
||||
stream-scalcout.dbd$(DEP): ../CONFIG_STREAM
|
||||
echo stream-scalcout.dbd: $< > $@
|
||||
|
||||
STREAM_DBD_FILES += $(LIBRARY_DEFAULT)-scalcout.dbd
|
||||
STREAM_DBD_FILES += stream-scalcout.dbd
|
||||
endif
|
||||
|
||||
# create stream.dbd for all record types
|
||||
$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM
|
||||
$(COMMON_DIR)/stream.dbd: ../CONFIG_STREAM
|
||||
$(PERL) ../makedbd.pl $(if $(ASYN),--with-asyn) $(if $(BASE_3_14),,-3.13) $(RECORDTYPES) > $@
|
||||
|
||||
$(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM
|
||||
echo $(LIBRARY_DEFAULT).dbd: $< > $@
|
||||
stream.dbd$(DEP): ../CONFIG_STREAM
|
||||
echo stream.dbd: $< > $@
|
||||
|
@ -435,6 +435,14 @@ long streamReportRecord(const char* recordname)
|
||||
return OK;
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static const char* epicsThreadGetNameSelfWrapper(void)
|
||||
{
|
||||
return epicsThreadGetNameSelf();
|
||||
}
|
||||
#define epicsThreadGetNameSelf epicsThreadGetNameSelfWrapper
|
||||
#endif
|
||||
|
||||
long Stream::
|
||||
drvInit()
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ static long readData(dbCommon *record, format_t *format)
|
||||
strncmp(so->oval, so->val, sizeof(so->val)))
|
||||
{
|
||||
monitor_mask |= DBE_VALUE | DBE_LOG;
|
||||
strncpy(so->oval, so->val, sizeof(so->val));
|
||||
strncpy(so->oval, so->val, sizeof(so->oval));
|
||||
}
|
||||
if (monitor_mask)
|
||||
db_post_events(record, so->val, monitor_mask);
|
||||
|
@ -78,6 +78,13 @@ endif
|
||||
|
||||
PROD_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
# Some linux systems moved RPC related symbols to libtirpc
|
||||
# Define TIRPC in configure/CONFIG_SITE in this case
|
||||
ifeq ($(TIRPC),YES)
|
||||
USR_INCLUDES_Linux += -I/usr/include/tirpc
|
||||
PROD_SYS_LIBS_DEFAULT += tirpc
|
||||
endif
|
||||
|
||||
# switch off annoying rset warnings in 3.16+
|
||||
CPPFLAGS += -DUSE_TYPED_RSET
|
||||
|
||||
|
@ -52,7 +52,11 @@ set protocol {
|
||||
out "jamcrc %s %9.1<jamcrc>"; in "jamcrc %=s %9.1<jamcrc>";
|
||||
out "adler32 %s %9.1<adler32>"; in "adler32 %=s %9.1<adler32>";
|
||||
out "hexsum8 %s %9.1<hexsum8>"; in "hexsum8 %=s %9.1<hexsum8>";
|
||||
|
||||
out "bitsum %s %9.1<bitsum>"; in "bitsum %=s %9.1<bitsum>";
|
||||
out "bitsum8 %s %9.1<bitsum8>"; in "bitsum8 %=s %9.1<bitsum8>";
|
||||
out "bitsum16 %s %9.1<bitsum16>"; in "bitsum16 %=s %9.1<bitsum16>";
|
||||
out "bitsum32 %s %9.1<bitsum32>"; in "bitsum32 %=s %9.1<bitsum32>";
|
||||
|
||||
out "sum %s %09.1<sum>"; in "sum %=s %09.1<sum>";
|
||||
out "sum8 %s %09.1<sum8>"; in "sum8 %=s %09.1<sum8>";
|
||||
out "sum16 %s %09.1<sum16>"; in "sum16 %=s %09.1<sum16>";
|
||||
@ -88,6 +92,10 @@ set protocol {
|
||||
out "jamcrc %s %09.1<jamcrc>"; in "jamcrc %=s %09.1<jamcrc>";
|
||||
out "adler32 %s %09.1<adler32>"; in "adler32 %=s %09.1<adler32>";
|
||||
out "hexsum8 %s %09.1<hexsum8>"; in "hexsum8 %=s %09.1<hexsum8>";
|
||||
out "bitsum %s %09.1<bitsum>"; in "bitsum %=s %09.1<bitsum>";
|
||||
out "bitsum8 %s %09.1<bitsum8>"; in "bitsum8 %=s %09.1<bitsum8>";
|
||||
out "bitsum16 %s %09.1<bitsum16>"; in "bitsum16 %=s %09.1<bitsum16>";
|
||||
out "bitsum32 %s %09.1<bitsum32>"; in "bitsum32 %=s %09.1<bitsum32>";
|
||||
|
||||
out "sum %s %-9.1<sum>"; in "sum %=s %-9.1<sum>";
|
||||
out "sum8 %s %-9.1<sum8>"; in "sum8 %=s %-9.1<sum8>";
|
||||
@ -124,6 +132,10 @@ set protocol {
|
||||
out "jamcrc %s %-9.1<jamcrc>"; in "jamcrc %=s %-9.1<jamcrc>";
|
||||
out "adler32 %s %-9.1<adler32>"; in "adler32 %=s %-9.1<adler32>";
|
||||
out "hexsum8 %s %-9.1<hexsum8>"; in "hexsum8 %=s %-9.1<hexsum8>";
|
||||
out "bitsum %s %-9.1<bitsum>"; in "bitsum %=s %-9.1<bitsum>";
|
||||
out "bitsum8 %s %-9.1<bitsum8>"; in "bitsum8 %=s %-9.1<bitsum8>";
|
||||
out "bitsum16 %s %-9.1<bitsum16>"; in "bitsum16 %=s %-9.1<bitsum16>";
|
||||
out "bitsum32 %s %-9.1<bitsum32>"; in "bitsum32 %=s %-9.1<bitsum32>";
|
||||
|
||||
out "sum %s %#9.1<sum>"; in "sum %=s %#9.1<sum>";
|
||||
out "sum8 %s %#9.1<sum8>"; in "sum8 %=s %#9.1<sum8>";
|
||||
@ -160,7 +172,11 @@ set protocol {
|
||||
out "jamcrc %s %#9.1<jamcrc>"; in "jamcrc %=s %#9.1<jamcrc>";
|
||||
out "adler32 %s %#9.1<adler32>"; in "adler32 %=s %#9.1<adler32>";
|
||||
out "hexsum8 %s %#9.1<hexsum8>"; in "hexsum8 %=s %#9.1<hexsum8>";
|
||||
|
||||
out "bitsum %s %#9.1<bitsum>"; in "bitsum %=s %#9.1<bitsum>";
|
||||
out "bitsum8 %s %#9.1<bitsum8>"; in "bitsum8 %=s %#9.1<bitsum8>";
|
||||
out "bitsum16 %s %#9.1<bitsum16>"; in "bitsum16 %=s %#9.1<bitsum16>";
|
||||
out "bitsum32 %s %#9.1<bitsum32>"; in "bitsum32 %=s %#9.1<bitsum32>";
|
||||
|
||||
out "sum %s %#09.1<sum>"; in "sum %=s %#09.1<sum>";
|
||||
out "sum8 %s %#09.1<sum8>"; in "sum8 %=s %#09.1<sum8>";
|
||||
out "sum16 %s %#09.1<sum16>"; in "sum16 %=s %#09.1<sum16>";
|
||||
@ -196,7 +212,11 @@ set protocol {
|
||||
out "jamcrc %s %#09.1<jamcrc>"; in "jamcrc %=s %#09.1<jamcrc>";
|
||||
out "adler32 %s %#09.1<adler32>"; in "adler32 %=s %#09.1<adler32>";
|
||||
out "hexsum8 %s %#09.1<hexsum8>"; in "hexsum8 %=s %#09.1<hexsum8>";
|
||||
|
||||
out "bitsum %s %#09.1<bitsum>"; in "bitsum %=s %#09.1<bitsum>";
|
||||
out "bitsum8 %s %#09.1<bitsum8>"; in "bitsum8 %=s %#09.1<bitsum8>";
|
||||
out "bitsum16 %s %#09.1<bitsum16>"; in "bitsum16 %=s %#09.1<bitsum16>";
|
||||
out "bitsum32 %s %#09.1<bitsum32>"; in "bitsum32 %=s %#09.1<bitsum32>";
|
||||
|
||||
out "sum %s %#-9.1<sum>"; in "sum %=s %#-9.1<sum>";
|
||||
out "sum8 %s %#-9.1<sum8>"; in "sum8 %=s %#-9.1<sum8>";
|
||||
out "sum16 %s %#-9.1<sum16>"; in "sum16 %=s %#-9.1<sum16>";
|
||||
@ -232,6 +252,10 @@ set protocol {
|
||||
out "jamcrc %s %#-9.1<jamcrc>"; in "jamcrc %=s %#-9.1<jamcrc>";
|
||||
out "adler32 %s %#-9.1<adler32>"; in "adler32 %=s %#-9.1<adler32>";
|
||||
out "hexsum8 %s %#-9.1<hexsum8>"; in "hexsum8 %=s %#-9.1<hexsum8>";
|
||||
out "bitsum %s %#-9.1<bitsum>"; in "bitsum %=s %#-9.1<bitsum>";
|
||||
out "bitsum8 %s %#-9.1<bitsum8>"; in "bitsum8 %=s %#-9.1<bitsum8>";
|
||||
out "bitsum16 %s %#-9.1<bitsum16>"; in "bitsum16 %=s %#-9.1<bitsum16>";
|
||||
out "bitsum32 %s %#-9.1<bitsum32>"; in "bitsum32 %=s %#-9.1<bitsum32>";
|
||||
out "DONE";
|
||||
}
|
||||
}
|
||||
@ -313,7 +337,15 @@ assure "adler32 123456789 \x09\x1E\x01\xDE\n"
|
||||
send "adler32 123456789 \x09\x1E\x01\xDE\n"
|
||||
assure "hexsum8 123456789 \x2D\n"
|
||||
send "hexsum8 123456789 \x2D\n"
|
||||
|
||||
assure "bitsum 123456789 \x21\n"
|
||||
send "bitsum 123456789 \x21\n"
|
||||
assure "bitsum8 123456789 \x21\n"
|
||||
send "bitsum8 123456789 \x21\n"
|
||||
assure "bitsum16 123456789 \x00\x21\n"
|
||||
send "bitsum16 123456789 \x00\x21\n"
|
||||
assure "bitsum32 123456789 \x00\x00\x00\x21\n"
|
||||
send "bitsum32 123456789 \x00\x00\x00\x21\n"
|
||||
|
||||
assure "sum 123456789 DD\n"
|
||||
send "sum 123456789 DD\n"
|
||||
assure "sum8 123456789 DD\n"
|
||||
@ -384,7 +416,15 @@ assure "adler32 123456789 091E01DE\n"
|
||||
send "adler32 123456789 091E01DE\n"
|
||||
assure "hexsum8 123456789 2D\n"
|
||||
send "hexsum8 123456789 2D\n"
|
||||
|
||||
assure "bitsum 123456789 21\n"
|
||||
send "bitsum 123456789 21\n"
|
||||
assure "bitsum8 123456789 21\n"
|
||||
send "bitsum8 123456789 21\n"
|
||||
assure "bitsum16 123456789 0021\n"
|
||||
send "bitsum16 123456789 0021\n"
|
||||
assure "bitsum32 123456789 00000021\n"
|
||||
send "bitsum32 123456789 00000021\n"
|
||||
|
||||
assure "sum 123456789 \x3D\x3D\n"
|
||||
send "sum 123456789 \x3D\x3D\n"
|
||||
assure "sum8 123456789 \x3D\x3D\n"
|
||||
@ -455,7 +495,15 @@ assure "adler32 123456789 \x30\x39\x31\x3E\x30\x31\x3D\x3E\n"
|
||||
send "adler32 123456789 \x30\x39\x31\x3E\x30\x31\x3D\x3E\n"
|
||||
assure "hexsum8 123456789 \x32\x3D\n"
|
||||
send "hexsum8 123456789 \x32\x3D\n"
|
||||
|
||||
assure "bitsum 123456789 \x32\x31\n"
|
||||
send "bitsum 123456789 \x32\x31\n"
|
||||
assure "bitsum8 123456789 \x32\x31\n"
|
||||
send "bitsum8 123456789 \x32\x31\n"
|
||||
assure "bitsum16 123456789 \x30\x30\x32\x31\n"
|
||||
send "bitsum16 123456789 \x30\x30\x32\x31\n"
|
||||
assure "bitsum32 123456789 \x30\x30\x30\x30\x30\x30\x32\x31\n"
|
||||
send "bitsum32 123456789 \x30\x30\x30\x30\x30\x30\x32\x31\n"
|
||||
|
||||
assure "sum 123456789 \xDD\n"
|
||||
send "sum 123456789 \xDD\n"
|
||||
assure "sum8 123456789 \xDD\n"
|
||||
@ -526,7 +574,15 @@ assure "adler32 123456789 \xDE\x01\x1E\x09\n"
|
||||
send "adler32 123456789 \xDE\x01\x1E\x09\n"
|
||||
assure "hexsum8 123456789 \x2D\n"
|
||||
send "hexsum8 123456789 \x2D\n"
|
||||
|
||||
assure "bitsum 123456789 \x21\n"
|
||||
send "bitsum 123456789 \x21\n"
|
||||
assure "bitsum8 123456789 \x21\n"
|
||||
send "bitsum8 123456789 \x21\n"
|
||||
assure "bitsum16 123456789 \x21\x00\n"
|
||||
send "bitsum16 123456789 \x21\x00\n"
|
||||
assure "bitsum32 123456789 \x21\x00\x00\x00\n"
|
||||
send "bitsum32 123456789 \x21\x00\x00\x00\n"
|
||||
|
||||
assure "sum 123456789 DD\n"
|
||||
send "sum 123456789 DD\n"
|
||||
assure "sum8 123456789 DD\n"
|
||||
@ -597,7 +653,15 @@ assure "adler32 123456789 DE011E09\n"
|
||||
send "adler32 123456789 DE011E09\n"
|
||||
assure "hexsum8 123456789 2D\n"
|
||||
send "hexsum8 123456789 2D\n"
|
||||
|
||||
assure "bitsum 123456789 21\n"
|
||||
send "bitsum 123456789 21\n"
|
||||
assure "bitsum8 123456789 21\n"
|
||||
send "bitsum8 123456789 21\n"
|
||||
assure "bitsum16 123456789 2100\n"
|
||||
send "bitsum16 123456789 2100\n"
|
||||
assure "bitsum32 123456789 21000000\n"
|
||||
send "bitsum32 123456789 21000000\n"
|
||||
|
||||
assure "sum 123456789 \x3D\x3D\n"
|
||||
send "sum 123456789 \x3D\x3D\n"
|
||||
assure "sum8 123456789 \x3D\x3D\n"
|
||||
@ -668,6 +732,14 @@ assure "adler32 123456789 \x3D\x3E\x30\x31\x31\x3E\x30\x39\n"
|
||||
send "adler32 123456789 \x3D\x3E\x30\x31\x31\x3E\x30\x39\n"
|
||||
assure "hexsum8 123456789 \x32\x3D\n"
|
||||
send "hexsum8 123456789 \x32\x3D\n"
|
||||
assure "bitsum 123456789 \x32\x31\n"
|
||||
send "bitsum 123456789 \x32\x31\n"
|
||||
assure "bitsum8 123456789 \x32\x31\n"
|
||||
send "bitsum8 123456789 \x32\x31\n"
|
||||
assure "bitsum16 123456789 \x32\x31\x30\x30\n"
|
||||
send "bitsum16 123456789 \x32\x31\x30\x30\n"
|
||||
assure "bitsum32 123456789 \x32\x31\x30\x30\x30\x30\x30\x30\n"
|
||||
send "bitsum32 123456789 \x32\x31\x30\x30\x30\x30\x30\x30\n"
|
||||
assure "DONE\n"
|
||||
|
||||
finish
|
||||
|
Reference in New Issue
Block a user