Compare commits
6 Commits
2.8-alpha
...
stream_2_7
Author | SHA1 | Date | |
---|---|---|---|
d69c74bc8f | |||
e09506c2bb | |||
343eef324b | |||
a798cf2f21 | |||
23f3e806e2 | |||
56b6c9a627 |
@ -1,7 +0,0 @@
|
|||||||
O.*
|
|
||||||
*~
|
|
||||||
bin
|
|
||||||
lib
|
|
||||||
dbd
|
|
||||||
include
|
|
||||||
*.pdf
|
|
7
.gitignore
vendored
@ -1,7 +0,0 @@
|
|||||||
O.*
|
|
||||||
*~
|
|
||||||
bin
|
|
||||||
lib
|
|
||||||
dbd
|
|
||||||
include
|
|
||||||
*.pdf
|
|
43
GNUmakefile
@ -1,22 +1,38 @@
|
|||||||
ifeq ($(wildcard /ioc/tools/driver.makefile),)
|
# Remove this file if not using the PSI build system
|
||||||
$(warning It seems you do not have the PSI build environment. Remove GNUmakefile.)
|
|
||||||
include Makefile
|
|
||||||
else
|
|
||||||
include /ioc/tools/driver.makefile
|
include /ioc/tools/driver.makefile
|
||||||
EXCLUDE_VERSIONS = 3.13.2
|
EXCLUDE_VERSIONS = 3.13.2
|
||||||
PROJECT=stream
|
PROJECT=stream
|
||||||
BUILDCLASSES += Linux
|
BUILDCLASSES += Linux
|
||||||
|
|
||||||
DOCUDIR = documentation
|
#DOCUDIR = doc
|
||||||
|
|
||||||
PCRE=1
|
BUSSES += AsynDriver
|
||||||
ASYN=1
|
BUSSES += Dummy
|
||||||
-include src/CONFIG_STREAM
|
|
||||||
|
|
||||||
SOURCES += $(RECORDS:%=src/dev%Stream.c)
|
FORMATS += Enum
|
||||||
|
FORMATS += BCD
|
||||||
|
FORMATS += Raw
|
||||||
|
FORMATS += RawFloat
|
||||||
|
FORMATS += Binary
|
||||||
|
FORMATS += Checksum
|
||||||
|
FORMATS += Regexp
|
||||||
|
FORMATS += MantissaExponent
|
||||||
|
FORMATS += Timestamp
|
||||||
|
|
||||||
|
RECORDTYPES += aai aao
|
||||||
|
RECORDTYPES += ao ai
|
||||||
|
RECORDTYPES += bo bi
|
||||||
|
RECORDTYPES += mbbo mbbi
|
||||||
|
RECORDTYPES += mbboDirect mbbiDirect
|
||||||
|
RECORDTYPES += longout longin
|
||||||
|
RECORDTYPES += stringout stringin
|
||||||
|
RECORDTYPES += waveform
|
||||||
|
|
||||||
|
SOURCES += $(RECORDTYPES:%=src/dev%Stream.c)
|
||||||
SOURCES += $(FORMATS:%=src/%Converter.cc)
|
SOURCES += $(FORMATS:%=src/%Converter.cc)
|
||||||
SOURCES += $(BUSSES:%=src/%Interface.cc)
|
SOURCES += $(BUSSES:%=src/%Interface.cc)
|
||||||
SOURCES += $(STREAM_SRCS:%=src/%)
|
SOURCES += $(wildcard src/Stream*.cc)
|
||||||
|
SOURCES += src/StreamVersion.c
|
||||||
|
|
||||||
HEADERS += devStream.h
|
HEADERS += devStream.h
|
||||||
HEADERS += StreamFormat.h
|
HEADERS += StreamFormat.h
|
||||||
@ -24,7 +40,11 @@ HEADERS += StreamFormatConverter.h
|
|||||||
HEADERS += StreamBuffer.h
|
HEADERS += StreamBuffer.h
|
||||||
HEADERS += StreamError.h
|
HEADERS += StreamError.h
|
||||||
|
|
||||||
StreamCore.o: streamReferences
|
ifneq (${EPICS_BASETYPE},3.13)
|
||||||
|
RECORDTYPES += calcout
|
||||||
|
endif
|
||||||
|
|
||||||
|
StreamCore.o StreamCore.d: streamReferences
|
||||||
|
|
||||||
streamReferences:
|
streamReferences:
|
||||||
perl ../src/makeref.pl Interface $(BUSSES) > $@
|
perl ../src/makeref.pl Interface $(BUSSES) > $@
|
||||||
@ -34,4 +54,3 @@ export DBDFILES = streamSup.dbd
|
|||||||
streamSup.dbd:
|
streamSup.dbd:
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
perl ../src/makedbd.pl $(RECORDTYPES) > $@
|
perl ../src/makedbd.pl $(RECORDTYPES) > $@
|
||||||
endif
|
|
||||||
|
31
Makefile
@ -1,29 +1,24 @@
|
|||||||
TOP = ..
|
TOP = ..
|
||||||
|
|
||||||
|
DIRS = src
|
||||||
|
streamApp_DEPEND_DIRS = src
|
||||||
|
|
||||||
# Look if we have EPICS R3.13 or R3.14
|
# Look if we have EPICS R3.13 or R3.14
|
||||||
ifneq ($(wildcard $(TOP)/configure),)
|
ifeq ($(wildcard $(TOP)/configure),)
|
||||||
# EPICS R3.14
|
|
||||||
DIRS = configure
|
|
||||||
include $(TOP)/configure/CONFIG
|
|
||||||
else ifneq ($(wildcard $(TOP)/config),)
|
|
||||||
# EPICS R3.13
|
# EPICS R3.13
|
||||||
CONFIG = $(TOP)/config
|
|
||||||
DIRS = config
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
include $(TOP)/config/CONFIG_APP
|
||||||
|
CONFIG = $(TOP)/config
|
||||||
else
|
else
|
||||||
TOP = .
|
# EPICS R3.14
|
||||||
DIRS = configure
|
|
||||||
include $(TOP)/configure/CONFIG
|
include $(TOP)/configure/CONFIG
|
||||||
|
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
||||||
|
# with synApps calc module (contains scalcout)
|
||||||
|
DIRS += srcSynApps
|
||||||
|
srcSynApps_DEPEND_DIRS = src
|
||||||
|
streamApp_DEPEND_DIRS += srcSynApps
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DIRS += src
|
|
||||||
src_DEPEND_DIRS = configure
|
|
||||||
DIRS += streamApp
|
DIRS += streamApp
|
||||||
streamApp_DEPEND_DIRS = src
|
|
||||||
|
|
||||||
include $(CONFIG)/RULES_TOP
|
include $(CONFIG)/RULES_DIRS
|
||||||
|
|
||||||
documentation/stream.pdf: documentation/*.html documentation/*.css documentation/*.png
|
|
||||||
cd documentation; makepdf
|
|
||||||
|
|
||||||
install: documentation/stream.pdf
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#CONFIG
|
|
||||||
# Add any changes to make rules here
|
|
||||||
#CROSS_COMPILER_TARGET_ARCHS = mv167
|
|
@ -1,20 +0,0 @@
|
|||||||
#CONFIG_APP
|
|
||||||
include $(TOP)/config/RELEASE
|
|
||||||
-include $(TOP)/config/RELEASE.$(HOST_ARCH)
|
|
||||||
include $(EPICS_BASE)/config/CONFIG
|
|
||||||
INSTALL_LOCATION = $(TOP)
|
|
||||||
ifdef INSTALL_LOCATION_APP
|
|
||||||
INSTALL_LOCATION = $(INSTALL_LOCATION_APP)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef T_A
|
|
||||||
-include $(TOP)/config/O.$(T_A)/CONFIG_APP_INCLUDE
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Where to install databases
|
|
||||||
INSTALL_DB = $(INSTALL_LOCATION)/db
|
|
||||||
# dbst based database optimization (default: NO)
|
|
||||||
DB_OPT = NO
|
|
||||||
# May be overridden if not all databases should be installed
|
|
||||||
INSTALLDB = $(DB)
|
|
||||||
include $(TOP)/config/CONFIG
|
|
@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile,v 1.1.2.1 1999/07/15 19:55:30 jba Exp
|
|
||||||
#
|
|
||||||
|
|
||||||
TOP=..
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
|
||||||
|
|
||||||
include $(TOP)/config/RULES_ARCHS
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.Host,v 1.1.2.3 2001/09/14 19:39:14 anj Exp
|
|
||||||
#
|
|
||||||
|
|
||||||
TOP=../..
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
|
||||||
|
|
||||||
TARGETS = checkRelease CONFIG_APP_INCLUDE
|
|
||||||
|
|
||||||
include $(TOP)/config/RULES.Host
|
|
||||||
|
|
||||||
inc:: $(TARGETS)
|
|
||||||
|
|
||||||
CONFIG_APP_INCLUDE: $(wildcard $(TOP)/config/RELEASE*) $(TOP)/config/CONFIG_APP
|
|
||||||
$(PERL) $(TOP)/config/convertRelease.pl $@
|
|
||||||
|
|
||||||
checkRelease:
|
|
||||||
$(PERL) $(TOP)/config/convertRelease.pl $@
|
|
||||||
|
|
||||||
.PHONY :: checkRelease
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile.Vx,v 1.1.2.3 2001/09/14 19:39:15 anj Exp
|
|
||||||
#
|
|
||||||
|
|
||||||
TOP=../..
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
|
||||||
|
|
||||||
TARGETS = CONFIG_APP_INCLUDE
|
|
||||||
|
|
||||||
include $(TOP)/config/RULES.Vx
|
|
||||||
|
|
||||||
inc:: $(TARGETS)
|
|
||||||
|
|
||||||
CONFIG_APP_INCLUDE: $(wildcard $(TOP)/config/RELEASE*) $(TOP)/config/CONFIG_APP
|
|
||||||
$(PERL) $(TOP)/config/convertRelease.pl -h $(HOST_ARCH) $@
|
|
@ -1 +0,0 @@
|
|||||||
include $(TOP)/configure/RELEASE
|
|
203
config/RULES.Db
@ -1,203 +0,0 @@
|
|||||||
# RULES.Db,v 1.9.6.6 2003/03/25 23:13:22 jba Exp
|
|
||||||
#
|
|
||||||
# Rules for making things related to databases
|
|
||||||
#
|
|
||||||
MAKEBPT = $(EPICS_BASE_HOST_BIN)/makeBpt$(EXE)
|
|
||||||
DBLOADTEMPLATE = $(EPICS_BASE_HOST_BIN)/dbLoadTemplate$(EXE)
|
|
||||||
DBEXPAND = $(EPICS_BASE_HOST_BIN)/dbExpand$(EXE)
|
|
||||||
DBST = dbst
|
|
||||||
MAKEDBDEPENDS = $(PERL) $(TOP)/config/makeDbDepends.pl
|
|
||||||
REPLACEVAR = $(PERL) $(TOP)/config/replaceVAR.pl
|
|
||||||
ifndef WIN32
|
|
||||||
TOUCH = touch
|
|
||||||
else
|
|
||||||
TOUCH = $(PERL) $(TOP)/config/touch.pl
|
|
||||||
endif
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------
|
|
||||||
# if we are not building base add base dbd dirs
|
|
||||||
|
|
||||||
ifneq ($(EPICS_BASE),$(TOP))
|
|
||||||
ifneq ($(EPICS_BASE),$(INSTALL_LOCATION))
|
|
||||||
EPICS_DBDFLAGS += -I $(EPICS_BASE)/dbd
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
#---------------------------------------------------------------
|
|
||||||
# ----------------------------------------------------
|
|
||||||
# create names (lists) for installed things
|
|
||||||
# ----------------------------------------------------
|
|
||||||
|
|
||||||
INSTALL_BPTS = $(BPTS:%= $(INSTALL_DBD)/%)
|
|
||||||
INSTALL_DBDS = $(DBDINSTALL:%= $(INSTALL_DBD)/%)
|
|
||||||
INSTALL_DBDNAME = $(DBDNAME:%= $(INSTALL_DBD)/%)
|
|
||||||
INSTALL_DATA = $(INSTALLDB:%=$(INSTALL_DB)/%)
|
|
||||||
INSTALL_TEMPLATES = $(filter %.template,$(INSTALL_DATA))
|
|
||||||
|
|
||||||
#---------------------------------------------------------------
|
|
||||||
# Main targets
|
|
||||||
|
|
||||||
all:: install
|
|
||||||
|
|
||||||
inc:: $(INSTALL_DBDS) $(INSTALL_BPTS) $(INSTALL_TEMPLATES)
|
|
||||||
|
|
||||||
rebuild:: clean install
|
|
||||||
|
|
||||||
install:: inc buildInstall
|
|
||||||
|
|
||||||
buildInstall:: build $(INSTALL_DATA)
|
|
||||||
|
|
||||||
depends::
|
|
||||||
|
|
||||||
clean::
|
|
||||||
@echo "Cleaning"
|
|
||||||
@$(RM) $(DB) $(DBDNAME) *.template *.substitutions *.db.raw \
|
|
||||||
*.db-stamp *.edf esiread.cnf
|
|
||||||
|
|
||||||
##################################################### "Foreign" templates
|
|
||||||
|
|
||||||
TEMPLATE_LINKS = $(filter-out $(notdir $(USES_TEMPLATE)), $(USES_TEMPLATE))
|
|
||||||
TEMPLATE_FILES = $(filter $(notdir $(USES_TEMPLATE)), $(USES_TEMPLATE))
|
|
||||||
DB_STAMP = $(patsubst %.db, %.db-stamp, $(DB))
|
|
||||||
DB_REALTARGET = $(patsubst %.db-stamp, %.db, $@)
|
|
||||||
|
|
||||||
ifneq '$(TEMPLATE_LINKS)' ''
|
|
||||||
build:: $(notdir $(TEMPLATE_LINKS))
|
|
||||||
endif
|
|
||||||
build:: $(INSTALL_DBDNAME) $(TEMPLATE_FILES) $(DB_STAMP)
|
|
||||||
|
|
||||||
$(notdir $(TEMPLATE_LINKS)): %.template:
|
|
||||||
ifndef WIN32
|
|
||||||
@$(RM) $(notdir $(TEMPLATE_LINKS))
|
|
||||||
ln -s $(TEMPLATE_LINKS) .
|
|
||||||
# Workaround for dbLoadTemplate bug: terminate here if link target doesn't exist
|
|
||||||
@cat $(TEMPLATE_LINKS) > /dev/null
|
|
||||||
else
|
|
||||||
@$(RM) $(notdir $(TEMPLATE_LINKS))
|
|
||||||
$(CP) $(TEMPLATE_LINKS) .
|
|
||||||
endif
|
|
||||||
|
|
||||||
##################################################### Inflated or plain databases
|
|
||||||
|
|
||||||
$(INSTALL_DB)/%.db: %.db-stamp
|
|
||||||
@echo "Installing database $@"
|
|
||||||
@$(INSTALL) -d -m 644 $(patsubst %.db-stamp, %.db, $<) $(@D)
|
|
||||||
|
|
||||||
# Must have DBDNAME defined to use dbst optimization
|
|
||||||
ifndef DBDNAME
|
|
||||||
DB_OPT = NO
|
|
||||||
endif
|
|
||||||
|
|
||||||
# dbst based database optimization
|
|
||||||
ifeq '$(DB_OPT)' 'YES'
|
|
||||||
.PRECIOUS: %.db.raw
|
|
||||||
%.db-stamp: %.db.raw $(INSTALL_DBD)/$(DBDNAME)
|
|
||||||
@echo "Optimizing database $@"
|
|
||||||
$(DBST) $(INSTALL_DBD)/$(DBDNAME) $< -d > $(DB_REALTARGET)
|
|
||||||
@$(TOUCH) $@
|
|
||||||
%.db-stamp: %.t.db.raw $(INSTALL_DBD)/$(DBDNAME)
|
|
||||||
@echo "Optimizing database $@"
|
|
||||||
$(DBST) $(INSTALL_DBD)/$(DBDNAME) $< -d > $(DB_REALTARGET)
|
|
||||||
@$(TOUCH) $@
|
|
||||||
else
|
|
||||||
# NO optimization => move it and keep a stamp
|
|
||||||
%.db-stamp: %.db.raw
|
|
||||||
@$(MV) $< $(DB_REALTARGET)
|
|
||||||
@$(TOUCH) $@
|
|
||||||
@$(TOUCH) $<
|
|
||||||
%.db-stamp: %.t.db.raw
|
|
||||||
@$(MV) $< $(DB_REALTARGET)
|
|
||||||
@$(TOUCH) $@
|
|
||||||
@$(TOUCH) $<
|
|
||||||
endif
|
|
||||||
|
|
||||||
%.t.db.raw: %.substitutions
|
|
||||||
@echo "Inflating database from $<"
|
|
||||||
@$(RM) $@
|
|
||||||
@$(DBLOADTEMPLATE) $< > $@
|
|
||||||
|
|
||||||
##################################################### CapFast filter
|
|
||||||
|
|
||||||
%.edf:: ../%.sch $(DEPSCHS)
|
|
||||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
|
||||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
|
||||||
|
|
||||||
##################################################### Substitution files
|
|
||||||
|
|
||||||
$(INSTALL_DB)/%.substitutions: %.substitutions
|
|
||||||
@echo "Installing $@"
|
|
||||||
@$(INSTALL) -d -m 644 $(@F) $(@D)
|
|
||||||
|
|
||||||
%.substitutions:: ../%.substitutions
|
|
||||||
@$(CP) $< $@
|
|
||||||
|
|
||||||
ifdef CREATESUBSTITUTIONS
|
|
||||||
%.substitutions:: $(word $(words $(CREATESUBSTITUTIONS)),$(CREATESUBSTITUTIONS))
|
|
||||||
@$(CREATESUBSTITUTIONS) $*
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Better make it PRECIOUS (to get around make bug)
|
|
||||||
.PRECIOUS: %.substitutions
|
|
||||||
|
|
||||||
##################################################### Template databases
|
|
||||||
|
|
||||||
# Installed template files (dbLoadTemplate() on IOC side)
|
|
||||||
$(INSTALL_DB)/%.template: %.template
|
|
||||||
@echo "Installing $@"
|
|
||||||
@$(INSTALL) -d -m 644 $(@F) $(@D)
|
|
||||||
|
|
||||||
%.template:: ../%.template
|
|
||||||
@$(CP) $< $@
|
|
||||||
|
|
||||||
%.template: %.edf
|
|
||||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
|
|
||||||
@$(REPLACEVAR) < $@.VAR > $@
|
|
||||||
@$(RM) $@.VAR
|
|
||||||
|
|
||||||
##################################################### Flat databases
|
|
||||||
|
|
||||||
%.db.raw:: ../%.db
|
|
||||||
$(CP) $< $@
|
|
||||||
|
|
||||||
%.db.raw: %.edf
|
|
||||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
|
|
||||||
@$(REPLACEVAR) < $@.VAR > $@
|
|
||||||
@$(RM) $@.VAR
|
|
||||||
|
|
||||||
##################################################### DBD stuff
|
|
||||||
|
|
||||||
$(INSTALL_DBD)/%: %
|
|
||||||
@echo "Installing $@"
|
|
||||||
@$(INSTALL) -d -m 644 $< $(@D)
|
|
||||||
|
|
||||||
$(INSTALL_DBD)/%:: ../%
|
|
||||||
@echo "Installing $@"
|
|
||||||
@$(INSTALL) -d -m 644 $< $(@D)
|
|
||||||
|
|
||||||
bpt%.dbd: bpt%.data
|
|
||||||
$(RM) $@
|
|
||||||
$(MAKEBPT) $<
|
|
||||||
|
|
||||||
bpt%.dbd:: ../bpt%.data
|
|
||||||
$(RM) $@
|
|
||||||
$(MAKEBPT) $<
|
|
||||||
|
|
||||||
# Patch for old applications
|
|
||||||
ifdef USER_DBDFLAGS
|
|
||||||
DBDFLAGS = $(USER_DBDFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef DBDEXPAND
|
|
||||||
$(DBDNAME): ../$(DBDEXPAND)
|
|
||||||
@echo "Expanding dbd"
|
|
||||||
@$(RM) $@
|
|
||||||
$(DBEXPAND) $(DBDFLAGS) $< > dbExpand.tmp
|
|
||||||
$(MV) dbExpand.tmp $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
##################################################### Dependencies
|
|
||||||
|
|
||||||
DEPENDS: $(filter $(patsubst %.db, %.substitutions, $(DB)), $(wildcard *.substitutions))
|
|
||||||
@$(MAKEDBDEPENDS) $^
|
|
||||||
|
|
||||||
-include DEPENDS
|
|
@ -1,3 +0,0 @@
|
|||||||
#RULES.Host
|
|
||||||
|
|
||||||
include $(EPICS_BASE)/config/RULES.Host
|
|
@ -1,7 +0,0 @@
|
|||||||
#RULES.Vx
|
|
||||||
include $(EPICS_BASE)/config/RULES.Vx
|
|
||||||
inc:: $(INSTALL_INCREC)
|
|
||||||
|
|
||||||
# Library should be rebuilt because LIBOBJS may have changed.
|
|
||||||
$(LIBNAME): ../Makefile.Vx
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
#RULES.ioc
|
|
||||||
include $(EPICS_BASE)/config/RULES_DIRS
|
|
||||||
buildInstall:: cdCommands
|
|
||||||
|
|
||||||
cdCommands: Makefile $(wildcard $(TOP)/config/RELEASE*)
|
|
||||||
@$(PERL) $(TOP)/config/convertRelease.pl -a $(ARCH) -h $(HOST_ARCH) $@
|
|
||||||
|
|
||||||
clean::
|
|
||||||
@$(RM) cdCommands
|
|
@ -1,4 +0,0 @@
|
|||||||
#RULES.iocBoot
|
|
||||||
DIRS += $(wildcard ioc*)
|
|
||||||
DIRS += $(wildcard as*)
|
|
||||||
include $(EPICS_BASE)/config/RULES_DIRS
|
|
@ -1,14 +0,0 @@
|
|||||||
MUNCH = $(PERL) $(INSTALL_LOCATION)/bin/$(HOST_ARCH)/munch.pl
|
|
||||||
|
|
||||||
# The original 3.13.10 munching rule does not really work well
|
|
||||||
|
|
||||||
build:: $(LIBNAME).munch
|
|
||||||
|
|
||||||
buildInstall:: $(INSTALL_BIN)/$(LIBNAME).munch
|
|
||||||
|
|
||||||
%.munch: %
|
|
||||||
$(RM) $*_ctct.o $*_ctdt.c
|
|
||||||
$(NM) $< | $(MUNCH) > $*_ctdt.c
|
|
||||||
$(GCC) -traditional $(CFLAGS) -fdollars-in-identifiers -c $(SOURCE_FLAG) $*_ctdt.c
|
|
||||||
$(LINK.c) $@ $< $*_ctdt.o
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
#RULES_ARCHS
|
|
||||||
include $(EPICS_BASE)/config/RULES_ARCHS
|
|
@ -1,2 +0,0 @@
|
|||||||
#RULES_DIRS
|
|
||||||
include $(EPICS_BASE)/config/RULES_DIRS
|
|
@ -1,5 +0,0 @@
|
|||||||
#RULES_TOP
|
|
||||||
include $(EPICS_BASE)/config/RULES_TOP
|
|
||||||
|
|
||||||
uninstall::
|
|
||||||
@$(RMDIR) $(INSTALL_DB)
|
|
@ -1,186 +0,0 @@
|
|||||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
|
||||||
if $running_under_some_shell; # convertRelease.pl
|
|
||||||
#
|
|
||||||
# convertRelease.pl,v 1.1.2.1 2001/09/14 19:39:15 anj Exp
|
|
||||||
#
|
|
||||||
# Parse config/RELEASE file(s) and generate a derived output file.
|
|
||||||
#
|
|
||||||
# This tool replaces makeConfigAppInclude.pl and makeIocCdCommands.pl
|
|
||||||
# and adds consistency checks for RELEASE files.
|
|
||||||
#
|
|
||||||
|
|
||||||
use Cwd;
|
|
||||||
use Getopt::Std;
|
|
||||||
|
|
||||||
$cwd = cwd();
|
|
||||||
$cwd =~ s/\/tmp_mnt//; # hack for sun4
|
|
||||||
$cwd =~ s/\\/\//g; # hack for win32
|
|
||||||
|
|
||||||
getopt "aht";
|
|
||||||
|
|
||||||
if ($opt_a) {
|
|
||||||
$arch = $opt_a;
|
|
||||||
} else { # Look for O.<arch> in current path
|
|
||||||
$_ = $cwd;
|
|
||||||
($arch) = /.*\/O.([\w-]+)$/;
|
|
||||||
}
|
|
||||||
|
|
||||||
$hostarch = $arch;
|
|
||||||
$hostarch = $opt_h if ($opt_h);
|
|
||||||
|
|
||||||
if ($opt_t) {
|
|
||||||
$top = $opt_t;
|
|
||||||
} else { # Find $top from current path
|
|
||||||
$top = $cwd;
|
|
||||||
$top =~ s/\/iocBoot.*//;
|
|
||||||
$top =~ s/\/config\/O\..*//;
|
|
||||||
}
|
|
||||||
|
|
||||||
unless (@ARGV == 1) {
|
|
||||||
print "Usage: convertRelease.pl [-a arch] [-h hostarch] [-t top] outfile\n";
|
|
||||||
print " where outfile is be one of:\n";
|
|
||||||
print "\tcheckRelease - checks consistency with support apps\n";
|
|
||||||
print "\tcdCommands - generate cd path strings for IOC use\n";
|
|
||||||
print "\tCONFIG_APP_INCLUDE - additional build variables\n";
|
|
||||||
exit 2;
|
|
||||||
}
|
|
||||||
$outfile = $ARGV[0];
|
|
||||||
|
|
||||||
# TOP refers to this application
|
|
||||||
%macros = (TOP => $top);
|
|
||||||
@apps = (TOP); # Provides the order of apps in RELEASE file
|
|
||||||
|
|
||||||
# Read the RELEASE file(s)
|
|
||||||
$relfile = "$top/config/RELEASE";
|
|
||||||
die "Can't find config/RELEASE file" unless (-r $relfile);
|
|
||||||
&readRelease($relfile, \%macros, \@apps);
|
|
||||||
|
|
||||||
if ($hostarch) {
|
|
||||||
$relfile .= ".$hostarch";
|
|
||||||
&readRelease($relfile, \%macros, \@apps) if (-r $relfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is a perl switch statement:
|
|
||||||
for ($outfile) {
|
|
||||||
/CONFIG_APP_INCLUDE/ and do { &configAppInclude; last; };
|
|
||||||
/cdCommands/ and do { &cdCommands; last; };
|
|
||||||
/checkRelease/ and do { &checkRelease; last; };
|
|
||||||
die "Output file type \'$outfile\' not supported";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub readRelease {
|
|
||||||
my ($file, $Rmacros, $Rapps) = @_;
|
|
||||||
# $Rmacros is a reference to a hash, $Rapps a ref to an array
|
|
||||||
my ($pre, $macro, $post, $path);
|
|
||||||
local *IN;
|
|
||||||
open(IN, $file) or die "Can't open $file: $!\n";
|
|
||||||
while (<IN>) {
|
|
||||||
chomp;
|
|
||||||
s/\s*#.*$//; # Remove trailing comments
|
|
||||||
next if /^\s*$/; # Skip blank lines
|
|
||||||
|
|
||||||
# Expand all macros in the line:
|
|
||||||
while (($pre,$macro,$post) = /(.*)\$\((\w+)\)(.*)/, $macro ne "") {
|
|
||||||
$_ = $pre . $Rmacros->{$macro} . $post;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Handle "<macro> = <path>"
|
|
||||||
($macro, $path) = /^\s*(\w+)\s*=\s*(.*)/;
|
|
||||||
if ($macro ne "") {
|
|
||||||
$Rmacros->{$macro} = $path;
|
|
||||||
push @$Rapps, $macro;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
# Handle "include <path>" syntax
|
|
||||||
($path) = /^\s*include\s+(.*)/;
|
|
||||||
&readRelease($path, $Rmacros, $Rapps) if (-r $path);
|
|
||||||
}
|
|
||||||
close IN;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub configAppInclude {
|
|
||||||
@includes = grep !/^(TOP|TEMPLATE_TOP)$/, @apps;
|
|
||||||
|
|
||||||
unlink($outfile);
|
|
||||||
open(OUT,">$outfile") or die "$! creating $outfile";
|
|
||||||
print OUT "# Do not modify this file, changes made here will\n";
|
|
||||||
print OUT "# be lost when the application is next rebuilt.\n\n";
|
|
||||||
|
|
||||||
if ($arch) {
|
|
||||||
foreach $app (@includes) {
|
|
||||||
$path = $macros{$app};
|
|
||||||
next unless (-d "$path/bin/$arch");
|
|
||||||
print OUT "${app}_BIN = \$($app)/bin/$arch\n";
|
|
||||||
}
|
|
||||||
foreach $app (@includes) {
|
|
||||||
$path = $macros{$app};
|
|
||||||
next unless (-d "$path/lib/$arch");
|
|
||||||
print OUT "${app}_LIB = \$($app)/lib/$arch\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach $app (@includes) {
|
|
||||||
$path = $macros{$app};
|
|
||||||
next unless (-d "$path/include");
|
|
||||||
print OUT "EPICS_INCLUDES += -I\$($app)/include\n";
|
|
||||||
}
|
|
||||||
foreach $app (@includes) {
|
|
||||||
$path = $macros{$app};
|
|
||||||
next unless (-d "$path/dbd");
|
|
||||||
print OUT "EPICS_DBDFLAGS += -I \$($app)/dbd\n";
|
|
||||||
}
|
|
||||||
close OUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub cdCommands {
|
|
||||||
die "Architecture not set (use -a option)" unless ($arch);
|
|
||||||
@includes = grep !/^TEMPLATE_TOP$/, @apps;
|
|
||||||
|
|
||||||
# if -t <top> was given, substitute it in the startup path
|
|
||||||
$startup = $cwd;
|
|
||||||
$startup =~ s/.*(\/iocBoot\/.*)/$top$1/ if ($opt_t);
|
|
||||||
|
|
||||||
unlink($outfile);
|
|
||||||
open(OUT,">$outfile") or die "$! creating $outfile";
|
|
||||||
print OUT "startup = \"$startup\"\n";
|
|
||||||
print OUT "appbin = \"$top/bin/$arch\"\n"; # compatibility with R3.13.1
|
|
||||||
|
|
||||||
foreach $app (@includes) {
|
|
||||||
$path = $macros{$app};
|
|
||||||
$lcapp = lc($app);
|
|
||||||
print OUT "$lcapp = \"$path\"\n" if (-d $path);
|
|
||||||
print OUT "${lcapp}bin = \"$path/bin/$arch\"\n" if (-d "$path/bin/$arch");
|
|
||||||
}
|
|
||||||
close OUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub checkRelease {
|
|
||||||
$status = 0;
|
|
||||||
delete $macros{TOP};
|
|
||||||
delete $macros{TEMPLATE_TOP};
|
|
||||||
|
|
||||||
while (($app, $path) = each %macros) {
|
|
||||||
%check = (TOP => $path);
|
|
||||||
@order = ();
|
|
||||||
$relfile = "$path/config/RELEASE";
|
|
||||||
&readRelease($relfile, \%check, \@order) if (-r $relfile);
|
|
||||||
if ($hostarch) {
|
|
||||||
$relfile .= ".$hostarch";
|
|
||||||
&readRelease($relfile, \%check, \@order) if (-r $relfile);
|
|
||||||
}
|
|
||||||
delete $check{TOP};
|
|
||||||
|
|
||||||
while (($parent, $ppath) = each %check) {
|
|
||||||
if (exists $macros{$parent} && ($macros{$parent} ne $ppath)) {
|
|
||||||
print "\n" unless ($status);
|
|
||||||
print "Definition of $parent conflicts with $app support.\n";
|
|
||||||
print "In this application config/RELEASE defines\n";
|
|
||||||
print "\t$parent = $macros{$parent}\n";
|
|
||||||
print "but $app at $path has\n";
|
|
||||||
print "\t$parent = $ppath\n";
|
|
||||||
$status = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print "\n" if ($status);
|
|
||||||
exit $status;
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
|
||||||
if $running_under_some_shell; # makeDbDepends.pl
|
|
||||||
|
|
||||||
# Called from within the object directory.
|
|
||||||
# Searches the .substitutions files (from the command line) for
|
|
||||||
# "file xxx {" entries to create a .DEPENDS file
|
|
||||||
|
|
||||||
open(OUT, ">.DEPENDS") or die "Cannot open .DEPENDS: $!";
|
|
||||||
|
|
||||||
foreach $file (@ARGV) {
|
|
||||||
open(IN, "<$file") or die "Cannot open $file: $!";
|
|
||||||
@substfile = <IN>;
|
|
||||||
close IN or die "Cannot close $file: $!";
|
|
||||||
|
|
||||||
@depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @substfile;
|
|
||||||
chomp @depends;
|
|
||||||
|
|
||||||
if (@depends) {
|
|
||||||
$file =~ s/\.substitutions/\.t.db.raw/;
|
|
||||||
print OUT "${file}:: @depends\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close OUT or die "Cannot close $file: $!";
|
|
@ -1,12 +0,0 @@
|
|||||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
|
||||||
if $running_under_some_shell; # replaceVAR.pl
|
|
||||||
|
|
||||||
# Called from within the object directory
|
|
||||||
# Replaces VAR(xxx) with $(xxx)
|
|
||||||
# and VAR_xxx_ with $(xxx)
|
|
||||||
|
|
||||||
while (<STDIN>) {
|
|
||||||
s/VAR\(/\$\(/g;
|
|
||||||
s/VAR_([^_]*)_/\$\($1\)/g;
|
|
||||||
print;
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# unix touch in Perl
|
|
||||||
|
|
||||||
use File::Copy;
|
|
||||||
use File::Basename;
|
|
||||||
|
|
||||||
sub Usage
|
|
||||||
{
|
|
||||||
my ($txt) = @_;
|
|
||||||
|
|
||||||
print "Usage:\n";
|
|
||||||
print "\ttouch file [ file2 file3 ...]\n";
|
|
||||||
print "\nError: $txt\n" if $txt;
|
|
||||||
|
|
||||||
exit 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
# need at least one arg: ARGV[0]
|
|
||||||
Usage("need more args") if $#ARGV < 0;
|
|
||||||
|
|
||||||
@targets=@ARGV[0..$#ARGV];
|
|
||||||
|
|
||||||
foreach $file ( @targets )
|
|
||||||
{
|
|
||||||
open(OUT,">$file") or die "$! creating $file";
|
|
||||||
#print OUT "NUL\n";
|
|
||||||
close OUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
# EOF touch.pl
|
|
@ -1,14 +0,0 @@
|
|||||||
#CONFIG
|
|
||||||
include $(TOP)/configure/CONFIG_APP
|
|
||||||
# Add any changes to make definitions here
|
|
||||||
|
|
||||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
|
||||||
#CROSS_COMPILER_TARGET_ARCHS =
|
|
||||||
|
|
||||||
# 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>
|
|
@ -1,27 +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
|
|
||||||
HOST_OPT=NO
|
|
@ -1,15 +0,0 @@
|
|||||||
# Makefile
|
|
||||||
|
|
||||||
TOP=..
|
|
||||||
|
|
||||||
include $(TOP)/configure/CONFIG
|
|
||||||
|
|
||||||
# Set the following to NO to disable consistency checking of
|
|
||||||
# the support applications defined in $(TOP)/configure/RELEASE
|
|
||||||
CHECK_RELEASE = YES
|
|
||||||
|
|
||||||
TARGETS = $(CONFIG_TARGETS)
|
|
||||||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
|
|
||||||
|
|
||||||
include $(TOP)/configure/RULES
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
#RELEASE Location of external products
|
|
||||||
# Run "gnumake clean uninstall install" in the application
|
|
||||||
# top directory each time this file is changed.
|
|
||||||
#
|
|
||||||
# NOTE: The build does not check dependancies on files
|
|
||||||
# external to this application. Thus you should run
|
|
||||||
# "gnumake clean uninstall install" in the top directory
|
|
||||||
# each time EPICS_BASE, SNCSEQ, or any other external
|
|
||||||
# module defined in the RELEASE file is rebuilt.
|
|
||||||
|
|
||||||
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
|
||||||
|
|
||||||
# If you don't want to install into $(TOP) then
|
|
||||||
# define INSTALL_LOCATION_APP here
|
|
||||||
#INSTALL_LOCATION_APP=<fullpathname>
|
|
||||||
|
|
||||||
EPICS_BASE=/usr/local/epics/base-3.14.12
|
|
||||||
ASYN=~/top/asyn4-30
|
|
||||||
CALC=~/top/SynApps/calc-2-8
|
|
||||||
PCRE=~/top/pcre-7.2
|
|
||||||
|
|
||||||
#3.14.8 does not understand ~
|
|
||||||
#EPICS_BASE=/usr/local/epics/base-3.14.8
|
|
||||||
#ASYN=/afs/psi.ch/user/z/zimoch/top/asyn-4.10
|
|
||||||
|
|
||||||
##Example 3.13 build
|
|
||||||
#EPICS_BASE=/usr/local/epics/base-3.13.10
|
|
||||||
#ASYN=/afs/psi.ch/user/z/zimoch/top_3.13/4-6
|
|
||||||
#COMPAT=/afs/psi.ch/user/z/zimoch/top_3.13
|
|
@ -1,9 +0,0 @@
|
|||||||
#CONFIG
|
|
||||||
ifneq ($(wildcard $(EPICS_BASE)/configure),)
|
|
||||||
include $(EPICS_BASE)/configure/RULES
|
|
||||||
else
|
|
||||||
include $(EPICS_BASE)/config/RULES_ARCHS
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Library should be rebuilt because LIBOBJS may have changed.
|
|
||||||
$(LIBNAME): ../Makefile
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@ -266,11 +266,6 @@ The empty string matches.
|
|||||||
With the <code>#</code> flag <code>%s</code> matches a sequence of not-null
|
With the <code>#</code> flag <code>%s</code> matches a sequence of not-null
|
||||||
characters instead of non-whitespace characters.
|
characters instead of non-whitespace characters.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
|
||||||
With the <code>0</code> flag <code>%s</code> pads with 0 bytes instead of
|
|
||||||
spaces.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<a name="cset"></a>
|
<a name="cset"></a>
|
||||||
<h2>6. Standard Charset STRING Converter (<code>%[<em>charset</em>]</code>)</h2>
|
<h2>6. Standard Charset STRING Converter (<code>%[<em>charset</em>]</code>)</h2>
|
||||||
@ -454,17 +449,8 @@ With the <code>#</code> flag, the byte order is changed to <em>little
|
|||||||
endian</em>, i.e. least significant byte first.
|
endian</em>, i.e. least significant byte first.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <code>0</code> flag changes the checksum representation to
|
The <code>0</code> flag changes the checksum representation from
|
||||||
to hexadecimal ASCII (2 chars per checksum byte).
|
binary to hexadecimal ASCII (2 bytes per checksum byte).
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <code>-</code> flag changes the checksum representation to
|
|
||||||
"poor man's hex": 0x30 ... 0x3f (2 chars per checksum byte).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <code>+</code> flag changes the checksum representation to
|
|
||||||
decimal ASCII (formatted with %d).
|
|
||||||
</p>
|
|
||||||
<!--
|
<!--
|
||||||
In output, the case of the ASCII checksum matches the case of first
|
In output, the case of the ASCII checksum matches the case of first
|
||||||
letter of the function name.
|
letter of the function name.
|
||||||
@ -576,15 +562,10 @@ in architecture specific RELEASE.Common.<em>arch</em> files.
|
|||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
If the regular expression is not anchored, i.e. does not start with
|
If the regular expression is not anchored, i.e. does not start with
|
||||||
<code>^</code>, leading non-matching input is skipped.
|
<code>^</code>, leading non-matching input is skipped.
|
||||||
To match in multiline mode (across newlines) add <code>(?m)</code>
|
|
||||||
at the beginning of the pattern.
|
|
||||||
To match case insensitive, add <code>(?i)</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
A maximum of <em>width</em> bytes is matched, if specified.
|
A maximum of <em>width</em> bytes is matched, if specified.
|
||||||
If <em>precision</em> is given, it specifies the sub-expression whose match
|
If <em>precision</em> is given, it specifies the sub-expression whose match
|
||||||
is returned.
|
is retuned.
|
||||||
Otherwise the complete match is returned.
|
Otherwise the complete match is returned.
|
||||||
In any case, the complete match is consumed from the input buffer.
|
In any case, the complete match is consumed from the input buffer.
|
||||||
If the expression contains a <code>/</code> it must be escaped like <code>\/</code>.
|
If the expression contains a <code>/</code> it must be escaped like <code>\/</code>.
|
@ -1,11 +1,3 @@
|
|||||||
#/bin/sh
|
|
||||||
if ! wkhtmltopdf -V >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
echo "wkhtmltopdf not installed."
|
|
||||||
echo "See https://wkhtmltopdf.org"
|
|
||||||
exit 1
|
|
||||||
fi >&2
|
|
||||||
|
|
||||||
PAGES="
|
PAGES="
|
||||||
index.html
|
index.html
|
||||||
setup.html
|
setup.html
|
@ -29,7 +29,7 @@ before the final <code>return(0)</code>:
|
|||||||
</p>
|
</p>
|
||||||
<pre class="box">
|
<pre class="box">
|
||||||
if(pscalcoutDSET->init_record ) {
|
if(pscalcoutDSET->init_record ) {
|
||||||
return (*pscalcoutDSET->init_record)(pcalc);
|
return (*pscalcoutDSET->init_record)(pcalc);
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
@ -20,7 +20,6 @@ pre {
|
|||||||
border:1px solid #000000;
|
border:1px solid #000000;
|
||||||
white-space:pre;
|
white-space:pre;
|
||||||
margin:2ex;
|
margin:2ex;
|
||||||
page-break-inside:avoid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kbd {
|
kbd {
|
@ -260,7 +260,7 @@ When asked "<code>CURRENT?</code>", the device send something like
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<code>
|
<code>
|
||||||
read_current {out "CURRENT?"; in "CURRENT %f A"; @mismatch {in "%(\$1)39c";}}
|
read_current {out "CURRENT?"; in "CURRENT %f A"; @mismatch {in "%(\1)39c";}}
|
||||||
</code>
|
</code>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
@ -562,13 +562,7 @@ connectToAsynPort()
|
|||||||
clientName(), connected ? "already" : "not yet");
|
clientName(), connected ? "already" : "not yet");
|
||||||
if (!connected)
|
if (!connected)
|
||||||
{
|
{
|
||||||
printf ("%s: AsynDriverInterface::connectToAsynPort: "
|
|
||||||
"pasynCommon->connect(%p, %p)\n",
|
|
||||||
clientName(), pvtCommon, pasynUser);
|
|
||||||
status = pasynCommon->connect(pvtCommon, pasynUser);
|
status = pasynCommon->connect(pvtCommon, pasynUser);
|
||||||
printf ("%s: AsynDriverInterface::connectToAsynPort: "
|
|
||||||
"pasynCommon->connect(%p, %p) = %s\n",
|
|
||||||
clientName(), pvtCommon, pasynUser, asynStatusStr[status]);
|
|
||||||
debug("AsynDriverInterface::connectToAsynPort(%s): "
|
debug("AsynDriverInterface::connectToAsynPort(%s): "
|
||||||
"status=%s\n",
|
"status=%s\n",
|
||||||
clientName(), asynStatusStr[status]);
|
clientName(), asynStatusStr[status]);
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
|
|
||||||
# You may add more record interfaces
|
# You may add more record interfaces
|
||||||
# This requires the naming conventions
|
# This requires the naming conventions
|
||||||
# dev$(RECORDTYPE)Stream.c
|
# dev$(RECORD)Stream.c
|
||||||
|
|
||||||
RECORDTYPES += ao ai
|
RECORDS += ao ai
|
||||||
RECORDTYPES += bo bi
|
RECORDS += bo bi
|
||||||
RECORDTYPES += mbbo mbbi
|
RECORDS += mbbo mbbi
|
||||||
RECORDTYPES += mbboDirect mbbiDirect
|
RECORDS += mbboDirect mbbiDirect
|
||||||
RECORDTYPES += longout longin
|
RECORDS += longout longin
|
||||||
RECORDTYPES += stringout stringin
|
RECORDS += stringout stringin
|
||||||
RECORDTYPES += waveform
|
RECORDS += waveform
|
||||||
RECORDTYPES += calcout
|
RECORDS += calcout
|
||||||
RECORDTYPES += aai aao
|
RECORDS += aai aao
|
||||||
|
|
||||||
# Do you have synApps and want support for scalcout?
|
# Do you have synApps and want support for scalcout?
|
||||||
# Then define CALC or SYNAPPS in your RELEASE file
|
# Then define CALC or SYNAPPS in your RELEASE file
|
||||||
@ -21,23 +21,18 @@ RECORDTYPES += aai aao
|
|||||||
# Due to strange cross dependencies in synApps
|
# Due to strange cross dependencies in synApps
|
||||||
# you have to build the 'sscan' and 'genSub'
|
# you have to build the 'sscan' and 'genSub'
|
||||||
# modules before building 'calc'.
|
# modules before building 'calc'.
|
||||||
# The 'calc' version must be 2-4 or higher.
|
# See doc/scalcout.html for a required fix in scalcout.
|
||||||
# Up to version 2-6 (synApps 5.1) the 'calc' module needs a fix.
|
|
||||||
# See doc/scalcout.html for details.
|
SYNAPPS_RECORDS += scalcout
|
||||||
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
|
||||||
RECORDTYPES += scalcout
|
|
||||||
endif
|
|
||||||
|
|
||||||
# You may add more bus interfaces
|
# You may add more bus interfaces
|
||||||
# This requires the naming convention
|
# This requires the naming convention
|
||||||
# $(BUS)Interface.cc
|
# $(BUS)Interface.cc
|
||||||
# asynDriver interface is added if ASYN is defined in your RELEASE file.
|
# asynDriver interface is added automatically
|
||||||
|
# if ASYN is defined in your RELEASE file.
|
||||||
|
|
||||||
BUSSES += Debug
|
BUSSES += Debug
|
||||||
BUSSES += Dummy
|
BUSSES += Dummy
|
||||||
ifdef ASYN
|
|
||||||
BUSSES += AsynDriver
|
|
||||||
endif
|
|
||||||
|
|
||||||
# You may add more format converters
|
# You may add more format converters
|
||||||
# This requires the naming convention
|
# This requires the naming convention
|
||||||
|
17
src/Makefile
@ -18,7 +18,7 @@
|
|||||||
# #
|
# #
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
TOP:=../$(TOP)
|
TOP=../..
|
||||||
|
|
||||||
# Look if we have EPICS R3.13 or R3.14
|
# Look if we have EPICS R3.13 or R3.14
|
||||||
ifeq ($(wildcard $(TOP)/configure),)
|
ifeq ($(wildcard $(TOP)/configure),)
|
||||||
@ -40,8 +40,13 @@ DBD += $(LIBRARY_DEFAULT).dbd
|
|||||||
|
|
||||||
ifdef ASYN
|
ifdef ASYN
|
||||||
LIB_LIBS += asyn
|
LIB_LIBS += asyn
|
||||||
else
|
BUSSES += AsynDriver
|
||||||
$(warning Asyn not included! Didn't you set ASYN in your RELEASE file?)
|
endif
|
||||||
|
|
||||||
|
ifdef T_A
|
||||||
|
ifndef BUSSES
|
||||||
|
$(error No bus interface defined! Didn't you set ASYN in your RELEASE file?)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(LOADABLE_MODULE),YES)
|
ifeq ($(LOADABLE_MODULE),YES)
|
||||||
@ -49,7 +54,7 @@ SRCS += $(LIBRARY_DEFAULT)_registerRecordDeviceDriver.cpp
|
|||||||
endif
|
endif
|
||||||
SRCS += $(BUSSES:%=%Interface.cc)
|
SRCS += $(BUSSES:%=%Interface.cc)
|
||||||
SRCS += $(FORMATS:%=%Converter.cc)
|
SRCS += $(FORMATS:%=%Converter.cc)
|
||||||
SRCS += $(RECORDTYPES:%=dev%Stream.c)
|
SRCS += $(RECORDS:%=dev%Stream.c)
|
||||||
SRCS += $(STREAM_SRCS)
|
SRCS += $(STREAM_SRCS)
|
||||||
|
|
||||||
# find system wide or local PCRE header and library
|
# find system wide or local PCRE header and library
|
||||||
@ -84,9 +89,9 @@ streamReferences: ../CONFIG_STREAM
|
|||||||
$(PERL) ../makeref.pl Interface $(BUSSES) > $@
|
$(PERL) ../makeref.pl Interface $(BUSSES) > $@
|
||||||
$(PERL) ../makeref.pl Converter $(FORMATS) >> $@
|
$(PERL) ../makeref.pl Converter $(FORMATS) >> $@
|
||||||
|
|
||||||
# create stream.dbd from all RECORDTYPES
|
# create stream.dbd from all RECORDS
|
||||||
$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM
|
$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../CONFIG_STREAM
|
||||||
$(PERL) ../makedbd.pl $(RECORDTYPES) > $@
|
$(PERL) ../makedbd.pl $(RECORDS) > $@
|
||||||
|
|
||||||
$(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM
|
$(LIBRARY_DEFAULT).dbd$(DEP): ../CONFIG_STREAM
|
||||||
echo $(LIBRARY_DEFAULT).dbd: $< > $@
|
echo $(LIBRARY_DEFAULT).dbd: $< > $@
|
||||||
|
@ -18,11 +18,14 @@
|
|||||||
# #
|
# #
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
TOP := ../../$(TOP)
|
TOP = ../../..
|
||||||
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
include $(TOP)/config/CONFIG_APP
|
||||||
include ../CONFIG_STREAM
|
include ../CONFIG_STREAM
|
||||||
|
|
||||||
|
# In 3.13, calcout has no device support
|
||||||
|
RECORDS_3_13 = $(filter-out calcout,$(RECORDS))
|
||||||
|
|
||||||
DBDNAME = stream.dbd
|
DBDNAME = stream.dbd
|
||||||
|
|
||||||
INC += devStream.h
|
INC += devStream.h
|
||||||
@ -32,9 +35,8 @@ INC += devStream.h
|
|||||||
CONFIGS = RULES.munch
|
CONFIGS = RULES.munch
|
||||||
SCRIPTS = munch.pl
|
SCRIPTS = munch.pl
|
||||||
|
|
||||||
include $(EPICS_BASE)/config/RULES.Host
|
include $(TOP)/config/RULES.Host
|
||||||
|
|
||||||
# create stream.dbd from all RECORDTYPES
|
# create stream.dbd from all RECORDS
|
||||||
# In 3.13, calcout has no device support
|
|
||||||
stream.dbd: ../CONFIG_STREAM
|
stream.dbd: ../CONFIG_STREAM
|
||||||
$(PERL) ../makedbd.pl -3.13 $(filter-out calcout,$(RECORDTYPES)) > $@
|
$(PERL) ../makedbd.pl -3.13 $(RECORDS_3_13) > $@
|
||||||
|
@ -18,23 +18,29 @@
|
|||||||
# #
|
# #
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
TOP := ../../$(TOP)
|
TOP = ../../..
|
||||||
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
include $(TOP)/config/CONFIG_APP
|
||||||
include ../CONFIG_STREAM
|
include ../CONFIG_STREAM
|
||||||
|
|
||||||
LIBNAME = streamLib
|
LIBNAME = streamLib
|
||||||
|
|
||||||
|
# In 3.13, calcout has no device support
|
||||||
|
RECORDS_3_13 = $(filter-out calcout,$(RECORDS))
|
||||||
|
|
||||||
|
ifdef ASYN
|
||||||
|
BUSSES += AsynDriver
|
||||||
|
endif
|
||||||
|
|
||||||
SRCS.cc += $(patsubst %,../%,$(filter %.cc,$(STREAM_SRCS)))
|
SRCS.cc += $(patsubst %,../%,$(filter %.cc,$(STREAM_SRCS)))
|
||||||
SRCS.cc += $(BUSSES:%=../%Interface.cc)
|
SRCS.cc += $(BUSSES:%=../%Interface.cc)
|
||||||
SRCS.cc += $(FORMATS:%=../%Converter.cc)
|
SRCS.cc += $(FORMATS:%=../%Converter.cc)
|
||||||
SRCS.c += $(patsubst %,../%,$(filter %.c,$(STREAM_SRCS)))
|
SRCS.c += $(patsubst %,../%,$(filter %.c,$(STREAM_SRCS)))
|
||||||
# In 3.13, calcout has no device support
|
SRCS.c += $(RECORDS_3_13:%=../dev%Stream.c)
|
||||||
SRCS.c += $(patsubst %,../dev%Stream.c,$(filter-out calcout,$(RECORDTYPES)))
|
|
||||||
|
|
||||||
LIBOBJS = $(patsubst ../%,%.o,$(basename $(SRCS.cc) $(SRCS.c)))
|
LIBOBJS = $(patsubst ../%,%.o,$(basename $(SRCS.cc) $(SRCS.c)))
|
||||||
|
|
||||||
include $(EPICS_BASE)/config/RULES.Vx
|
include $(TOP)/config/RULES.Vx
|
||||||
include $(TOP)/config/RULES.munch
|
include $(TOP)/config/RULES.munch
|
||||||
|
|
||||||
build:: depends
|
build:: depends
|
||||||
|
@ -223,7 +223,7 @@ static void regsubst(const StreamFormat& fmt, StreamBuffer& buffer, long start)
|
|||||||
}
|
}
|
||||||
buffer.replace(start+c+ovector[0], l, s);
|
buffer.replace(start+c+ovector[0], l, s);
|
||||||
length += s.length() - l;
|
length += s.length() - l;
|
||||||
c += s.length();
|
c += ovector[0] + s.length();
|
||||||
if (n == fmt.prec) // max match reached
|
if (n == fmt.prec) // max match reached
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
#if defined(__vxworks) || defined(vxWorks) || defined(_WIN32) || defined(__rtems__)
|
#if defined(__vxworks) || defined(vxWorks) || defined(_WIN32) || defined(__rtems__)
|
||||||
// These systems have no vsnprintf
|
// These systems have no vsnprintf
|
||||||
#define vsnprintf(p,l,f,v) vsprintf(p,f,v)
|
#include <epicsStdio.h>
|
||||||
|
#define vsnprintf epicsVsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define P PRINTF_SIZE_T_PREFIX
|
#define P PRINTF_SIZE_T_PREFIX
|
||||||
@ -313,7 +314,7 @@ dump() const
|
|||||||
StreamBuffer result(256+cap*5);
|
StreamBuffer result(256+cap*5);
|
||||||
result.append("\033[0m");
|
result.append("\033[0m");
|
||||||
size_t i;
|
size_t i;
|
||||||
result.print("%" P "d,%" P "d,%" P "d:\033[37m", offs, len, cap);
|
result.print("%"P"d,%"P"d,%"P"d:\033[37m", offs, len, cap);
|
||||||
for (i = 0; i < cap; i++)
|
for (i = 0; i < cap; i++)
|
||||||
{
|
{
|
||||||
if (i == offs) result.append("\033[34m[\033[0m");
|
if (i == offs) result.append("\033[34m[\033[0m");
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
#define __attribute__(x)
|
#define __attribute__(x)
|
||||||
#endif
|
#endif
|
||||||
|
@ -997,7 +997,7 @@ readCallback(StreamIoStatus status,
|
|||||||
finishProtocol(ReplyTimeout);
|
finishProtocol(ReplyTimeout);
|
||||||
return 0;
|
return 0;
|
||||||
case StreamIoFault:
|
case StreamIoFault:
|
||||||
error("%s: I/O error after reading %" P "d byte%s: \"%s%s\"\n",
|
error("%s: I/O error after reading %"P"d byte%s: \"%s%s\"\n",
|
||||||
name(),
|
name(),
|
||||||
inputBuffer.length(), inputBuffer.length()==1 ? "" : "s",
|
inputBuffer.length(), inputBuffer.length()==1 ? "" : "s",
|
||||||
inputBuffer.length() > 20 ? "..." : "",
|
inputBuffer.length() > 20 ? "..." : "",
|
||||||
@ -1006,7 +1006,7 @@ readCallback(StreamIoStatus status,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
inputBuffer.append(input, size);
|
inputBuffer.append(input, size);
|
||||||
debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %" P "d\n",
|
debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %"P"d\n",
|
||||||
name(), inputBuffer.expand()(), inputBuffer.length());
|
name(), inputBuffer.expand()(), inputBuffer.length());
|
||||||
if (*activeCommand != in_cmd)
|
if (*activeCommand != in_cmd)
|
||||||
{
|
{
|
||||||
@ -1657,11 +1657,7 @@ timerCallback()
|
|||||||
bool StreamCore::
|
bool StreamCore::
|
||||||
evalExec()
|
evalExec()
|
||||||
{
|
{
|
||||||
if (!formatOutput())
|
formatOutput();
|
||||||
{
|
|
||||||
finishProtocol(FormatError);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
debug ("StreamCore::evalExec: command = \"%s\"\n", outputLine.expand()());
|
debug ("StreamCore::evalExec: command = \"%s\"\n", outputLine.expand()());
|
||||||
// release bus
|
// release bus
|
||||||
if (flags & BusOwner)
|
if (flags & BusOwner)
|
||||||
|
@ -196,8 +196,12 @@ extern "C" long streamReload(char* recordname)
|
|||||||
dbCommon* record;
|
dbCommon* record;
|
||||||
long status;
|
long status;
|
||||||
|
|
||||||
|
int oldStreamError = streamError;
|
||||||
|
streamError = 1;
|
||||||
|
|
||||||
if(!pdbbase) {
|
if(!pdbbase) {
|
||||||
error("No database has been loaded\n");
|
error("No database has been loaded\n");
|
||||||
|
streamError = oldStreamError;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
debug("streamReload(%s)\n", recordname);
|
debug("streamReload(%s)\n", recordname);
|
||||||
@ -234,6 +238,7 @@ extern "C" long streamReload(char* recordname)
|
|||||||
}
|
}
|
||||||
dbFinishEntry(&dbentry);
|
dbFinishEntry(&dbentry);
|
||||||
StreamProtocolParser::free();
|
StreamProtocolParser::free();
|
||||||
|
streamError = oldStreamError;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,6 +413,7 @@ long streamInit(int after)
|
|||||||
{
|
{
|
||||||
if (after)
|
if (after)
|
||||||
{
|
{
|
||||||
|
streamError = 0; // Switch off errors after init in order not to spam messages when a device is down.
|
||||||
StreamProtocolParser::free();
|
StreamProtocolParser::free();
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
@ -1121,7 +1127,7 @@ bool Stream::
|
|||||||
matchValue(const StreamFormat& format, const void* fieldaddress)
|
matchValue(const StreamFormat& format, const void* fieldaddress)
|
||||||
{
|
{
|
||||||
// this function must increase consumedInput
|
// this function must increase consumedInput
|
||||||
long consumed = 0;
|
long consumed;
|
||||||
long lval;
|
long lval;
|
||||||
double dval;
|
double dval;
|
||||||
char* buffer;
|
char* buffer;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int streamDebug = 0;
|
int streamDebug = 0;
|
||||||
int streamError = 0;
|
int streamError = 1;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
__declspec(dllexport)
|
__declspec(dllexport)
|
||||||
|
@ -31,7 +31,7 @@ typedef enum {
|
|||||||
skip_flag = 0x20,
|
skip_flag = 0x20,
|
||||||
default_flag = 0x40,
|
default_flag = 0x40,
|
||||||
compare_flag = 0x80,
|
compare_flag = 0x80,
|
||||||
fix_width_flag = 0x100
|
fix_width_flag = 0x100,
|
||||||
} StreamFormatFlag;
|
} StreamFormatFlag;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -442,11 +442,10 @@ int StdStringConverter::
|
|||||||
parse(const StreamFormat& fmt, StreamBuffer& info,
|
parse(const StreamFormat& fmt, StreamBuffer& info,
|
||||||
const char*& source, bool scanFormat)
|
const char*& source, bool scanFormat)
|
||||||
{
|
{
|
||||||
if (fmt.flags & sign_flag)
|
if (fmt.flags & (sign_flag|zero_flag))
|
||||||
{
|
{
|
||||||
error("Use of modifier '+'"
|
error("Use of modifiers '+', '0'"
|
||||||
"not allowed with %%%c conversion\n",
|
"not allowed with %%s conversion\n");
|
||||||
fmt.conv);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (scanFormat && fmt.prec >= 0)
|
if (scanFormat && fmt.prec >= 0)
|
||||||
@ -464,22 +463,7 @@ parse(const StreamFormat& fmt, StreamBuffer& info,
|
|||||||
bool StdStringConverter::
|
bool StdStringConverter::
|
||||||
printString(const StreamFormat& fmt, StreamBuffer& output, const char* value)
|
printString(const StreamFormat& fmt, StreamBuffer& output, const char* value)
|
||||||
{
|
{
|
||||||
if (fmt.flags & zero_flag && fmt.width)
|
output.print(fmt.info, value);
|
||||||
{
|
|
||||||
size_t l;
|
|
||||||
if (fmt.prec > -1)
|
|
||||||
{
|
|
||||||
char* p = (char*)memchr(value, 0, fmt.prec);
|
|
||||||
if (p) l = p - value;
|
|
||||||
else l = fmt.prec;
|
|
||||||
}
|
|
||||||
else l = strlen(value);
|
|
||||||
if (!(fmt.flags & left_flag)) output.append('\0', fmt.width-l);
|
|
||||||
output.append(value, l);
|
|
||||||
if (fmt.flags & left_flag) output.append('\0', fmt.width-l);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
output.print(fmt.info, value);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,20 +512,31 @@ Each time newline is read, line is incremented.
|
|||||||
buffer(token));
|
buffer(token));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (c == '$' && buffer[-1] == '\\')
|
|
||||||
{
|
|
||||||
// quoted variable reference
|
|
||||||
// terminate string here and do variable in next pass
|
|
||||||
buffer[-1] = quote;
|
|
||||||
ungetc(c, file);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
buffer.append(c);
|
buffer.append(c);
|
||||||
if (c == quote && buffer[-2] != '\\')
|
if (c == quote)
|
||||||
{
|
{
|
||||||
quote = false;
|
quote = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (c == '\\')
|
||||||
|
{
|
||||||
|
c = getc(file);
|
||||||
|
if (c == '$')
|
||||||
|
{
|
||||||
|
// quoted variable reference
|
||||||
|
// terminate string here and do variable in next pass
|
||||||
|
buffer[-1] = quote;
|
||||||
|
ungetc(c, file);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (c == EOF || c == '\n')
|
||||||
|
{
|
||||||
|
error(line, filename(), "Backslash at end of line: %s\n",
|
||||||
|
buffer(token));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
buffer.append(c);
|
||||||
|
}
|
||||||
c = getc(file);
|
c = getc(file);
|
||||||
}
|
}
|
||||||
buffer.append('\0').append(&l, sizeof(l)); // append line number
|
buffer.append('\0').append(&l, sizeof(l)); // append line number
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#define devStream_h
|
#define devStream_h
|
||||||
|
|
||||||
#define STREAM_MAJOR 2
|
#define STREAM_MAJOR 2
|
||||||
#define STREAM_MINOR 8
|
#define STREAM_MINOR 7
|
||||||
#define STREAM_PATCHLEVEL 0
|
#define STREAM_PATCHLEVEL 12
|
||||||
|
|
||||||
#if defined(__vxworks) || defined(vxWorks)
|
#if defined(__vxworks) || defined(vxWorks)
|
||||||
#include <vxWorks.h>
|
#include <vxWorks.h>
|
||||||
|
@ -18,28 +18,34 @@
|
|||||||
* *
|
* *
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
#include <menuConvert.h>
|
||||||
#include <aiRecord.h>
|
#include <aiRecord.h>
|
||||||
#include "devStream.h"
|
#include "devStream.h"
|
||||||
#ifdef EPICS_3_13
|
#include <epicsExport.h>
|
||||||
|
|
||||||
|
#ifdef vxWorks
|
||||||
#include <private/mathP.h>
|
#include <private/mathP.h>
|
||||||
#define isinf(x) isInf(x)
|
#define isinf(x) isInf(x)
|
||||||
#define isnan(x) isNan(x)
|
#define isnan(x) isNan(x)
|
||||||
#else
|
|
||||||
#include <epicsMath.h>
|
|
||||||
#endif
|
#endif
|
||||||
#include <epicsExport.h>
|
|
||||||
|
|
||||||
static long readData (dbCommon *record, format_t *format)
|
static long readData (dbCommon *record, format_t *format)
|
||||||
{
|
{
|
||||||
aiRecord *ai = (aiRecord *) record;
|
aiRecord *ai = (aiRecord *) record;
|
||||||
double val;
|
|
||||||
|
|
||||||
switch (format->type)
|
switch (format->type)
|
||||||
{
|
{
|
||||||
case DBF_DOUBLE:
|
case DBF_DOUBLE:
|
||||||
{
|
{
|
||||||
|
double val;
|
||||||
if (streamScanf (record, format, &val)) return ERROR;
|
if (streamScanf (record, format, &val)) return ERROR;
|
||||||
break;
|
if (ai->aslo != 0.0 && ai->aslo != 1.0) val *= ai->aslo;
|
||||||
|
val += ai->aoff;
|
||||||
|
if (!(ai->smoo == 0.0 || ai->init || ai->udf || isinf(ai->val) || isnan(ai->val)))
|
||||||
|
val = ai->val * ai->smoo + val * (1.0 - ai->smoo);
|
||||||
|
ai->val = val;
|
||||||
|
return DO_NOT_CONVERT;
|
||||||
}
|
}
|
||||||
case DBF_ULONG:
|
case DBF_ULONG:
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
@ -47,56 +53,51 @@ static long readData (dbCommon *record, format_t *format)
|
|||||||
long rval;
|
long rval;
|
||||||
if (streamScanf (record, format, &rval)) return ERROR;
|
if (streamScanf (record, format, &rval)) return ERROR;
|
||||||
ai->rval = rval;
|
ai->rval = rval;
|
||||||
if (ai->linr == 0)
|
if (ai->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow integers with more than 32 bits */
|
/* allow integers with more than 32 bits */
|
||||||
|
double val;
|
||||||
if (format->type == DBF_ULONG)
|
if (format->type == DBF_ULONG)
|
||||||
val = (unsigned long)rval;
|
val = (unsigned long)rval;
|
||||||
else
|
else
|
||||||
val = rval;
|
val = rval;
|
||||||
break;
|
if (ai->aslo != 0.0 && ai->aslo != 1.0) val *= ai->aslo;
|
||||||
|
ai->val = val + ai->aoff;
|
||||||
|
return DO_NOT_CONVERT;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
return ERROR;
|
|
||||||
}
|
}
|
||||||
if (ai->aslo != 0.0 && ai->aslo != 1.0) val *= ai->aslo;
|
return ERROR;
|
||||||
val += ai->aoff;
|
|
||||||
if (!(ai->smoo == 0.0 || ai->init || ai->udf || isinf(ai->val) || isnan(ai->val)))
|
|
||||||
val = ai->val * ai->smoo + val * (1.0 - ai->smoo);
|
|
||||||
ai->val = val;
|
|
||||||
return DO_NOT_CONVERT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static long writeData (dbCommon *record, format_t *format)
|
static long writeData (dbCommon *record, format_t *format)
|
||||||
{
|
{
|
||||||
aiRecord *ai = (aiRecord *) record;
|
aiRecord *ai = (aiRecord *) record;
|
||||||
|
|
||||||
double val = ai->val - ai->aoff;
|
|
||||||
if (ai->aslo != 0.0 && ai->aslo != 1.0) val /= ai->aslo;
|
|
||||||
|
|
||||||
switch (format->type)
|
switch (format->type)
|
||||||
{
|
{
|
||||||
case DBF_DOUBLE:
|
case DBF_DOUBLE:
|
||||||
{
|
{
|
||||||
|
double val = ai->val - ai->aoff;
|
||||||
|
if (ai->aslo != 0.0 && ai->aslo != 1.0) val /= ai->aslo;
|
||||||
return streamPrintf (record, format, val);
|
return streamPrintf (record, format, val);
|
||||||
}
|
}
|
||||||
case DBF_ULONG:
|
case DBF_ULONG:
|
||||||
{
|
{
|
||||||
if (ai->linr == 0)
|
if (ai->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow more bits than 32 */
|
/* allow more bits than 32 */
|
||||||
return streamPrintf (record, format, (unsigned long)val);
|
return streamPrintf (record, format, (unsigned long)ai->val);
|
||||||
}
|
}
|
||||||
return streamPrintf (record, format, (unsigned long)ai->rval);
|
return streamPrintf (record, format, (unsigned long)ai->rval);
|
||||||
}
|
}
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
{
|
{
|
||||||
if (ai->linr == 0)
|
if (ai->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow more bits than 32 */
|
/* allow more bits than 32 */
|
||||||
return streamPrintf (record, format, (long)val);
|
return streamPrintf (record, format, (long)ai->val);
|
||||||
}
|
}
|
||||||
return streamPrintf (record, format, (long)ai->rval);
|
return streamPrintf (record, format, (long)ai->rval);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
* *
|
* *
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
|
#include <menuConvert.h>
|
||||||
#include <aoRecord.h>
|
#include <aoRecord.h>
|
||||||
#include "devStream.h"
|
#include "devStream.h"
|
||||||
#include <epicsExport.h>
|
#include <epicsExport.h>
|
||||||
@ -25,14 +26,16 @@
|
|||||||
static long readData (dbCommon *record, format_t *format)
|
static long readData (dbCommon *record, format_t *format)
|
||||||
{
|
{
|
||||||
aoRecord *ao = (aoRecord *) record;
|
aoRecord *ao = (aoRecord *) record;
|
||||||
double val;
|
|
||||||
|
|
||||||
switch (format->type)
|
switch (format->type)
|
||||||
{
|
{
|
||||||
case DBF_DOUBLE:
|
case DBF_DOUBLE:
|
||||||
{
|
{
|
||||||
|
double val;
|
||||||
if (streamScanf (record, format, &val)) return ERROR;
|
if (streamScanf (record, format, &val)) return ERROR;
|
||||||
break;
|
if (ao->aslo != 0.0 && ao->aslo != 1.0) val *= ao->aslo;
|
||||||
|
ao->val = val + ao->aoff;
|
||||||
|
return DO_NOT_CONVERT;
|
||||||
}
|
}
|
||||||
case DBF_ULONG:
|
case DBF_ULONG:
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
@ -41,23 +44,22 @@ static long readData (dbCommon *record, format_t *format)
|
|||||||
if (streamScanf (record, format, &rval)) return ERROR;
|
if (streamScanf (record, format, &rval)) return ERROR;
|
||||||
ao->rbv = rval;
|
ao->rbv = rval;
|
||||||
ao->rval = rval;
|
ao->rval = rval;
|
||||||
if (ao->linr == 0)
|
if (ao->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow integers with more than 32 bits */
|
/* allow integers with more than 32 bits */
|
||||||
|
double val;
|
||||||
if (format->type == DBF_ULONG)
|
if (format->type == DBF_ULONG)
|
||||||
val = (unsigned long)rval;
|
val = (unsigned long)rval;
|
||||||
else
|
else
|
||||||
val = rval;
|
val = rval;
|
||||||
break;
|
if (ao->aslo != 0.0 && ao->aslo != 1.0) val *= ao->aslo;
|
||||||
|
ao->val = val + ao->aoff;
|
||||||
|
return DO_NOT_CONVERT;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
return ERROR;
|
|
||||||
}
|
}
|
||||||
if (ao->aslo != 0.0 && ao->aslo != 1.0) val *= ao->aslo;
|
return ERROR;
|
||||||
ao->val = val + ao->aoff;
|
|
||||||
return DO_NOT_CONVERT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static long writeData (dbCommon *record, format_t *format)
|
static long writeData (dbCommon *record, format_t *format)
|
||||||
@ -75,7 +77,7 @@ static long writeData (dbCommon *record, format_t *format)
|
|||||||
}
|
}
|
||||||
case DBF_ULONG:
|
case DBF_ULONG:
|
||||||
{
|
{
|
||||||
if (ao->linr == 0)
|
if (ao->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow integers with more than 32 bits */
|
/* allow integers with more than 32 bits */
|
||||||
return streamPrintf (record, format, (unsigned long)val);
|
return streamPrintf (record, format, (unsigned long)val);
|
||||||
@ -84,7 +86,7 @@ static long writeData (dbCommon *record, format_t *format)
|
|||||||
}
|
}
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
{
|
{
|
||||||
if (ao->linr == 0)
|
if (ao->linr == menuConvertNO_CONVERSION)
|
||||||
{
|
{
|
||||||
/* allow integers with more than 32 bits */
|
/* allow integers with more than 32 bits */
|
||||||
return streamPrintf (record, format, (long)val);
|
return streamPrintf (record, format, (long)val);
|
||||||
|
@ -81,7 +81,7 @@ static long initRecord (dbCommon *record)
|
|||||||
Thus make sure the record is never left in INVALID_ALARM status.
|
Thus make sure the record is never left in INVALID_ALARM status.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static long write_mbbo(dbCommon *record)
|
static long write(dbCommon *record)
|
||||||
{
|
{
|
||||||
long status = streamWrite(record);
|
long status = streamWrite(record);
|
||||||
if (record->nsev == INVALID_ALARM) record->nsev = MAJOR_ALARM;
|
if (record->nsev == INVALID_ALARM) record->nsev = MAJOR_ALARM;
|
||||||
@ -102,7 +102,7 @@ struct {
|
|||||||
streamInit,
|
streamInit,
|
||||||
initRecord,
|
initRecord,
|
||||||
streamGetIointInfo,
|
streamGetIointInfo,
|
||||||
write_mbbo
|
write
|
||||||
};
|
};
|
||||||
|
|
||||||
epicsExportAddress(dset,devmbboDirectStream);
|
epicsExportAddress(dset,devmbboDirectStream);
|
||||||
|
@ -193,7 +193,6 @@ static long writeData (dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
case DBF_ULONG:
|
|
||||||
case DBF_ENUM:
|
case DBF_ENUM:
|
||||||
{
|
{
|
||||||
switch (wf->ftvl)
|
switch (wf->ftvl)
|
||||||
|
23
srcSynApps/Makefile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
TOP=../..
|
||||||
|
|
||||||
|
include $(TOP)/configure/CONFIG
|
||||||
|
|
||||||
|
-include ../src/CONFIG_STREAM
|
||||||
|
-include ../../src/CONFIG_STREAM
|
||||||
|
|
||||||
|
LIBRARY_DEFAULT = streamSynApps
|
||||||
|
|
||||||
|
DBD += $(LIBRARY_DEFAULT).dbd
|
||||||
|
|
||||||
|
ifeq ($(LOADABLE_MODULE),YES)
|
||||||
|
SRCS += $(LIBRARY_DEFAULT)_registerRecordDeviceDriver.cpp
|
||||||
|
endif
|
||||||
|
SRCS += $(SYNAPPS_RECORDS:%=dev%Stream.c)
|
||||||
|
|
||||||
|
LIB_LIBS += stream $(EPICS_BASE_IOC_LIBS)
|
||||||
|
|
||||||
|
include $(TOP)/configure/RULES
|
||||||
|
|
||||||
|
# create streamSynApps.dbd from all SYNAPPS_RECORDS
|
||||||
|
$(COMMON_DIR)/$(LIBRARY_DEFAULT).dbd: ../../src/CONFIG_STREAM
|
||||||
|
$(PERL) ../../src/makedbd.pl $(SYNAPPS_RECORDS) > $@
|
@ -1,4 +1,4 @@
|
|||||||
TOP:=../$(TOP)
|
TOP=../..
|
||||||
|
|
||||||
# Look if we have EPICS R3.13 or R3.14
|
# Look if we have EPICS R3.13 or R3.14
|
||||||
ifeq ($(wildcard $(TOP)/configure),)
|
ifeq ($(wildcard $(TOP)/configure),)
|
||||||
@ -20,7 +20,7 @@ streamApp_DBD += base.dbd
|
|||||||
|
|
||||||
# In 3.14.12 aaiRecord.dbd and aaoRecord.dbd are part of base.dbd
|
# In 3.14.12 aaiRecord.dbd and aaoRecord.dbd are part of base.dbd
|
||||||
# In earlier versions, these records are buggy and not included by default
|
# In earlier versions, these records are buggy and not included by default
|
||||||
streamApp_DBD += aaiRecord.dbd aaoRecord.dbd
|
#streamApp_DBD += aaiRecord.dbd aaoRecord.dbd
|
||||||
|
|
||||||
PROD_SRCS += streamApp_registerRecordDeviceDriver.cpp
|
PROD_SRCS += streamApp_registerRecordDeviceDriver.cpp
|
||||||
PROD_SRCS_DEFAULT = streamAppMain.cc
|
PROD_SRCS_DEFAULT = streamAppMain.cc
|
||||||
@ -41,9 +41,11 @@ endif
|
|||||||
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
ifneq ($(words $(CALC) $(SYNAPPS)), 0)
|
||||||
# With synApps scalcout record
|
# With synApps scalcout record
|
||||||
streamApp_DBD += calcSupport.dbd
|
streamApp_DBD += calcSupport.dbd
|
||||||
|
streamApp_DBD += streamSynApps.dbd
|
||||||
PROD_LIBS += calc
|
PROD_LIBS += calc
|
||||||
# older calc versions require sscan
|
# older calc versions require sscan
|
||||||
#PROD_LIBS += sscan
|
#PROD_LIBS += sscan
|
||||||
|
PROD_LIBS_DEFAULT += streamSynApps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
streamApp_DBD += stream.dbd
|
streamApp_DBD += stream.dbd
|
||||||
@ -66,7 +68,13 @@ CPPFLAGS += -DDEBUGFILE=StreamDebug.log
|
|||||||
|
|
||||||
include $(TOP)/configure/RULES
|
include $(TOP)/configure/RULES
|
||||||
|
|
||||||
clean::
|
ifeq ($(BASE_3_14), YES)
|
||||||
|
clean:: myclean
|
||||||
|
else
|
||||||
|
clean: myclean
|
||||||
|
endif
|
||||||
|
|
||||||
|
myclean:
|
||||||
$(RM) core* StreamDebug.log
|
$(RM) core* StreamDebug.log
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
TOP := ../../$(TOP)
|
TOP = ../../..
|
||||||
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
include $(TOP)/config/CONFIG_APP
|
||||||
|
|
||||||
include $(EPICS_BASE)/config/RULES.Host
|
DBDEXPAND = streamAppInclude-3-13.dbd
|
||||||
|
DBDNAME = streamApp.dbd
|
||||||
|
|
||||||
|
include $(TOP)/config/RULES.Host
|
||||||
|
@ -1,24 +1,19 @@
|
|||||||
TOP := ../../$(TOP)
|
TOP = ../../..
|
||||||
|
|
||||||
include $(TOP)/config/CONFIG_APP
|
include $(TOP)/config/CONFIG_APP
|
||||||
|
|
||||||
LIBNAME = streamApp
|
LIBNAME = streamApp
|
||||||
|
|
||||||
LDLIBS += $(TOP)/bin/$(T_A)/streamLib
|
LDLIBS += $(COMPAT_BIN)/compatLib
|
||||||
LDLIBS += $(ASYN)/bin/$(T_A)/asynLib
|
LDLIBS += $(ASYN_BIN)/asynLib
|
||||||
LDLIBS += $(COMPAT)/bin/$(T_A)/compatLib
|
LDLIBS += $(INSTALL_BIN)/streamLib
|
||||||
|
|
||||||
include ../base-3-13LIBOBJS
|
include ../base-3-13LIBOBJS
|
||||||
|
|
||||||
streamApp_DBD += base-3-13.dbd
|
|
||||||
streamApp_DBD += stream.dbd
|
|
||||||
DBDNAME = streamApp.dbd
|
|
||||||
DBDEXPAND = streamAppInclude-3-13.dbd
|
|
||||||
|
|
||||||
# Write StreamDevice debug output to this file
|
# Write StreamDevice debug output to this file
|
||||||
#CPPFLAGS += -DDEBUGFILE=StreamDebug.log
|
CPPFLAGS += -DDEBUGFILE=StreamDebug.log
|
||||||
|
|
||||||
include $(EPICS_BASE)/config/RULES.Vx
|
include $(TOP)/config/RULES.Vx
|
||||||
include $(TOP)/config/RULES.munch
|
include $(TOP)/config/RULES.munch
|
||||||
|
|
||||||
# Rebuild when LIBOBJS change
|
# Rebuild when LIBOBJS change
|
||||||
|