Compare commits

...

69 Commits

Author SHA1 Message Date
Andrew Johnson
1f573172b3 Creating 3.14.12.3-pre1 2012-11-19 15:02:22 -06:00
Andrew Johnson
d6f72900f8 Update release notes. 2012-11-19 13:19:04 -06:00
Andrew Johnson
5b1d3a7725 conigure: Fix iOS build warning.
from Tom Palaia.
2012-11-19 10:48:24 -06:00
Andrew Johnson
7d79a83519 Apple iOS updates from Tom Pelaia
Adds iOS 6.0, which is now the default.
- changed the default iOS SDK to version 6.0
- use xcrun to locate the selected compiler
- added armv7s as an option for architecture
- made armv7 + armv7s the default architecture
- renamed the LLVM compiler option to LLVM_GNU for clarity
  since LLVM is naturally associated with CLANG
2012-11-17 13:18:16 -06:00
Andrew Johnson
6fd9fb3066 libCom: Removed epicsSingleton workaround
This undoes commit 11565, "workaround for archaic T202 g++ bug"
which doesn't actually seem to be necessary for T202 compilation.
It also replaces 'typename' with 'class', for another compiler.

Modification provided by Dirk Zimoch.
2012-11-16 16:14:13 -06:00
Andrew Johnson
28c7fe12f3 configure: Added Guobao Shen's comments on using MacPorts GCC 2012-11-16 12:54:29 -06:00
Andrew Johnson
36be0aa783 rec: Fix minor string in + out issue.
Undo strncmp+strncpy to strcmp+strcpy change in r12048.
The 'n' versions are needed because device support was
never explicitly required to Nil-terminate the string.
The dbAccess routines do enforce termination though.
2012-11-16 12:40:57 -06:00
Andrew Johnson
69d8be78d3 startup: Recognize 64-bit Windows
For 64-bit versions of Perl on Windows, the EpicsHostArch.pl
script will now return the host architecture "windows-x64".
2012-11-01 14:57:36 -05:00
Andrew Johnson
fc61cc34ce iocLogServer fix for unsigned char arch's
Reported by Guy Jennings
2012-10-31 13:56:12 -05:00
Andrew Johnson
e889336458 db: Undefined alarm limits should return NaN
Where the record doesn't provide get_alarm_double() or for fields
where the default applies, we were still returning 0.
2012-10-17 18:08:39 -05:00
Michael Davidsaver
7cac267a4b db: Fix possible error handling in dbPut 2012-10-11 18:10:00 -05:00
Andrew Johnson
71079ede4b rec/aSub: Fixes from Michael Davidsaver
* Changing the number of elements in a VALx array triggers monitors
* Post monitors on the NEVx fields, following EFLG
* Remove artificial limit on array sizes
2012-10-11 17:51:00 -05:00
Michael Davidsaver
26173c1e0d devLib: add compatibility typedef for VME table type 2012-10-10 15:52:34 -05:00
Andrew Johnson
9c1b8ba952 rec: Fix problem with NAN in MLST/ALST fields
If MLST or ALST became NAN the associated monitor would never trigger.
Now a NAN will cause it to always trigger.
2012-10-06 21:48:01 -05:00
Andrew Johnson
c574722a9b catools: Fix syntax error from vxWorks gcc. 2012-09-11 15:19:29 -05:00
Andrew Johnson
4790578953 tools: Try harder to collapse ../ components in AbsPath
Idea from Angus Gratton, ANU
2012-09-11 12:11:55 -05:00
Ralph Lange
7e6e38060f catools: Change behaviour of camonitor when printing array of chars as string
camonitor was using strlen() to find out the length of the array to print as %s string,
which led to printing old buffer contents when the array-string was not null terminated.
Now uses the minimum of strlen(), elements received, and elements requested.

Suggested by Mark Rivers on tech-talk (11 Sep 2012)
2012-09-11 16:58:43 +02:00
Ralph Lange
709b6ef2f3 catools: Fix off-by-one bug in caput
An internal buffer was allocated one char too short, when caput was used
with the '-S' (send string as array of chars) option.

Reported by J. Lewis Muir (tech-talk on 17-Aug-2012)
2012-09-03 21:25:44 +02:00
Andrew Johnson
169b30081a Fix for vxWorks 6.x LED_ID
Use LED_ID in epicsReadline.c
Provide a typedef for vxWorks 5.x where it doesn't exist.
2012-08-31 16:05:14 -05:00
Andrew Johnson
a19e1d21da libCom: Fix epicsSnprintf() under MinGW
Use the Microsoft _vscprintf() function which was just missing
a prototype in earlier versions of MinGW's stdio.h header.
2012-08-31 15:57:59 -05:00
Andrew Johnson
1ac8ff6378 as: Make asSetFilename() warn on relative paths
Tell the user if they try this.  They'll get an error from
asInit() later, but it gets lost easily in other noise.
2012-08-28 16:35:52 -05:00
Janet Anderson
5c2ef73c4a Fixed X11 include definitions, X11_INC and XPM_INC. 2012-08-20 12:27:39 -05:00
Andrew Johnson
958aa02320 Change build defaults for darwin-x86
* Use clang and clang++
* Build for x86_64 only
2012-08-20 10:03:50 -05:00
Andrew Johnson
c93c7b5e36 configure: Fix test rules dependency 2012-08-07 10:37:13 -05:00
Andrew Johnson
b993e29fad configure: Minor fixes
Don't add extraneous characters when SHRLIB_VERSION or GNU_TARGET
are empty.  The addprefix or addsuffix functions only include the
prefix/suffix part if the list argument is not empty.

This fixes issues naming libCap5.so at build-time.
2012-08-07 09:41:21 -05:00
Andrew Johnson
e03d10857c tools: Delete makeDbDepends.pl from Makefile 2012-07-31 14:09:02 -05:00
Andrew Johnson
bdbada28a8 makeBaseApp: Remove bad characters from user names
Also warns about some bad characters in record names, but only
the ones that are known to cause known bad behaviour.
2012-07-31 13:47:23 -05:00
Janet Anderson
20c9fa2e8a Added template file as dependency for .db.d file 2012-07-31 10:50:51 -05:00
Janet Anderson
b1ac0c18c4 Fixed typo 2012-07-31 10:48:01 -05:00
Janet Anderson
4133b666a0 Added die if no target file argument 2012-07-31 10:44:33 -05:00
Andrew Johnson
dabd0a969b Release notes update. 2012-07-31 10:03:57 -05:00
Andrew Johnson
1864ac41fb Add support for native linux-arm builds. 2012-07-30 17:50:30 -05:00
Janet Anderson
1649ce6f79 Replaced makeDbDepends with mkmf 2012-07-30 17:10:57 -05:00
Andrew Johnson
93bc78d2ed configure: Don't override CROSS_COMPILER_TARGET_ARCHS on Cygwin
All other host architectures have this setting commented out in
their host-specific CONFIG_SITE.<host>.Common files, so the user
doesn't get confused.
2012-06-21 12:09:04 -05:00
Andrew Johnson
32f556637d libCom/osi: Fixed all epicsThreadSleep() implementations
All are now robust against overflow, NAN or negative argument.
Passing seconds=0 calls the OS scheduler, offering to yield.
Passing seconds>0 delays at least the requested time, up to a
limit which usually depends on the OS tick rate.
2012-06-18 14:52:03 -05:00
Andrew Johnson
146520d035 dbStatic: Fix dbReportDeviceConfig() overflow.
Reported by Hinko Kocevar.
2012-05-21 15:43:03 -05:00
Kate Feng
ea8d19e727 RTEMS: Make nfsMount() globally visible. 2012-05-16 12:25:27 -05:00
Andrew Johnson
39ca40fc33 configure: Move GNU_DIR setting for linux-xscale_be
All site-specific values should be set in CONFIG_SITE files.
2012-05-16 11:57:17 -05:00
Andrew Johnson
b5e1b0117c configure: Added linux-microblaze target files 2012-05-16 11:56:14 -05:00
Andrew Johnson
c1cebc89bf rsrv: Add epicsShareFunc to casStatsFetch()
Fixes lp:999167
2012-05-14 11:16:33 -05:00
Andrew Johnson
4982a6308b db: Don't call epicsPrintf() from callbackRequest()
The callbackRequest() routine can be called from an ISR,
so use epicsInterruptContextMessage() to print errors.
2012-05-04 17:34:48 -05:00
Andrew Johnson
243baddbf6 Add an Init stat to all thread control variables
This makes the uninitilized value not the Run state.
2012-05-04 13:38:59 -05:00
Andrew Johnson
45348ad6ca configure: Replace COMMENT with NOP in ECHO
Using COMMENT the ECHO command drops the whole line under -s,
whereas using NOP (':') only drops up to the next ';' terminator.
2012-05-01 10:15:45 -05:00
Andrew Johnson
dde8c61ad8 registry: Cleanup
Delete spurious global symbols
Remove unnecessary casts
Fix (c) headers
Added missing #include guard
Remove unnecessary #includes
Prettified.
2012-04-30 17:40:43 -05:00
Andrew Johnson
0a0302daad documentation: Update the Converting from 3.13 document. 2012-04-04 11:57:45 -05:00
Andrew Johnson
8ed86967d1 Don't build command-line programs for iOS targets. 2012-03-30 15:52:19 -05:00
Andrew Johnson
129710f149 configure: Redo Jason Abernathy's SHRLIB fix
Now works properly on Darwin where the version number comes
before the .dylib extension.  This also makes Windows-specific
conditional tests fully generic.
2012-03-30 14:40:58 -05:00
Andrew Johnson
bcd604e40b configure: Expand description of the LINKER_USE_RPATH setting 2012-03-30 13:53:45 -05:00
Andrew Johnson
dffe203856 db: Another modification to fix lp:907761
From Dirk Zimoch.
2012-03-19 12:31:11 -05:00
Jason Abernathy
6f8f61db64 Only remove last occurrence of shrlib version string. 2012-03-09 11:55:20 -06:00
Andrew Johnson
e48ca8a688 rec: Fix timestamps from calcout and seq records
Update record timestamp before calling db_post_events()
2012-03-08 09:47:38 -06:00
Andrew Johnson
7435a9831b db: Reject trailing space in numeric => enum/menu/device conversion
This is really a workaround for a Win32/MinGW bug in sscanf, which
will only set the %n argument for the format "%u %n" when there is
a space following the unsigned number.

This changes the IOC's behavior very slightly.
2012-03-06 14:14:39 -06:00
Andrew Johnson
10e7bced84 libCom/test: epicsTimeTest reworked a bit
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run.  Also cleaned up a few extraneous
variables.
2012-03-06 12:54:54 -06:00
Andrew Johnson
df7fa22a15 libCom/test: Add more tests of the CALC engine
Some of the isnan(Inf) tests were failing on mingw.
This change doesn't fix them, it adds related examples.
2012-02-29 17:11:08 -06:00
Andrew Johnson
140845fb14 configure: Cleanup MacOS and iOS build settings
Makes it easy for users to select which compiler to use.
2012-02-27 14:40:07 -06:00
Andrew Johnson
3dec8f8c78 configure: Removed _ARM_NWFP_
Apparently this hasn't been needed for quite a while.
2012-02-20 09:52:54 -06:00
Andrew Johnson
6f9f5498b4 libCom/test: Add diagnostic to epicsStdioTest on vxWorks
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
2012-02-03 16:12:06 -06:00
Andrew Johnson
f5bc02393e libCom: Increase stack sizes for Windows and Posix
Windows stack sizes were the same as vxWorks - tiny.
The stack sizes are now multiples of sizeof(void*).
On 32-bit systems they give 256KB, 512KB and 1MB;
64-bit systems get twice those numbers.

Fixes lp:903448
2012-02-02 18:14:01 -06:00
Andrew Johnson
f86cf730e9 db: fix dbpf to enum from integer bug 2012-01-27 09:41:37 -06:00
Janet Anderson
73768aae9a Allow install of *.H header files. 2012-01-20 10:50:10 -06:00
Andrew Johnson
adfa1257f5 makeBaseApp: caMonitor example should use ca_create_subscription()
It was calling ca_add_event(), which is a deprecated API.
2012-01-16 16:40:37 -06:00
Andrew Johnson
7cc8a552a3 db: Allow single-char accesses as long strings
Clients try to use long string support to fetch DBF_STRING
fields use DBF_CTRL_CHAR with a 1-element array, but the IOC
was rejecting that.  This permits it, and also ensures that
the resulting strings are zero-terminated.

Fixes lp:907761
2012-01-11 16:47:37 -06:00
Andrew Johnson
afaebfbeb1 libCom: Fix iocsh comment recognition
Merged J. Lewis Muir's fix for comments introduced by macro.
Added fixes to allow comments to be indented too, which used
to work if the '#' was followed by white-space or any argument
separator character.
2012-01-11 15:12:15 -06:00
J. Lewis Muir
ee2a2dfffc libCom/iocsh: Ignore comment lines after macro expansion
The handling of comment lines is only performed before macro
expansion, thus lines with macros that expand to comment lines will
not be correctly handled as comment lines.

By chance this kind of worked sometimes because a "#" command that
does nothing is internally added to the command registry to make it
show up in the help output.  Relying on this is broken.  Furthermore,
if the line starts with '#' followed by a non-separator character
(e.g. "##", "#whatever", etc.) it will not work (i.e. it will produce
a command-not-found error).

This fix checks to see if the first character of the line after macro
expansion is '#'.  If it is, it considers the line to be a comment.
2012-01-11 11:40:30 -06:00
Janet Anderson
2d6f8c585a Move DarwinPorts and Fink usage definitions to a CONFIG_SITE file 2012-01-05 10:45:20 -06:00
Janet Anderson
c538fc8ccc Added -I$(COMMON_DIR) to DBFLAGS and DBDFLAGS definitions. 2011-12-22 11:33:41 -06:00
Andrew Johnson
c32997ffa1 tools: Fix dependency file problem.
Reported by Eric.
2011-12-20 16:30:41 -06:00
Jeff Hill
d8f7c3731d fixed various archaic sun pro build failures repoted by Dirk 2011-12-12 16:10:24 -07:00
Janet Anderson
0c67efd50a R3.14.12.2-DEV 2011-12-12 14:37:04 -06:00
99 changed files with 1228 additions and 848 deletions

View File

@@ -14,8 +14,8 @@ define RELEASE_FLAGS_template
SHRLIB_SEARCH_DIRS += $$($(1)_LIB)
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include/os/$$(OS_CLASS)))
RELEASE_INCLUDES += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/include))
RELEASE_DBDFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/dbd))
RELEASE_DBFLAGS += $$(addprefix -I,$$(wildcard $$(strip $$($(1)))/db))
RELEASE_DBD_DIRS += $$(wildcard $$(strip $$($(1)))/dbd)
RELEASE_DB_DIRS += $$(wildcard $$(strip $$($(1)))/db)
RELEASE_PERL_MODULE_DIRS += $$(wildcard $$($(1)_LIB)/perl)
endef
$(foreach top, $(RELEASE_TOPS), $(eval $(call RELEASE_FLAGS_template,$(top)) ))

View File

@@ -1,5 +1,5 @@
#*************************************************************************
# Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
# Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
@@ -30,11 +30,11 @@ EPICS_MODIFICATION = 12
# EPICS_PATCH_LEVEL must be a number (win32 resource file requirement)
# Not included if zero
EPICS_PATCH_LEVEL = 2
EPICS_PATCH_LEVEL = 3
# This will end in -DEV between official releases
#EPICS_DEV_SNAPSHOT=-DEV
#EPICS_DEV_SNAPSHOT=-pre1
EPICS_DEV_SNAPSHOT=-pre1
#EPICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-pre2
#EPICS_DEV_SNAPSHOT=-pre2-DEV
@@ -42,7 +42,7 @@ EPICS_PATCH_LEVEL = 2
#EPICS_DEV_SNAPSHOT=-rc1-DEV
#EPICS_DEV_SNAPSHOT=-rc2
#EPICS_DEV_SNAPSHOT=-rc2-DEV
EPICS_DEV_SNAPSHOT=
#EPICS_DEV_SNAPSHOT=
# No changes should be needed below here

View File

@@ -81,8 +81,8 @@ COMMON_DIR = ../O.Common
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
COMMENT = \#
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(COMMENT),echo)
NOP = :
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
#-------------------------------------------------------
ifdef T_A

View File

@@ -183,7 +183,9 @@ EPICS_SITE_VERSION =
# between the various stages of compilation.
GCC_PIPE = NO
# Include RPATH when linking executables and libraries.
# must be either YES or NO
LINKER_USE_RPATH=YES
# Set RPATH when linking executables and libraries.
# Must be either YES or NO. If you set this to NO you must also provide a
# way for Base executables to find their shared libraries when they are
# run at build-time, e.g. set the LD_LIBRARY_PATH environment variable.
LINKER_USE_RPATH = YES

View File

@@ -21,11 +21,11 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
##################################################### dbdflags
# dbExpand
INSTALL_DBDFLAGS += -I $(INSTALL_DBD)
INSTALL_DBFLAGS += -I $(INSTALL_DB)
DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
DBD_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DBD) $(RELEASE_DBD_DIRS)
DB_SEARCH_DIRS = . .. $(COMMON_DIR) $(SRC_DIRS) $(INSTALL_DB) $(RELEASE_DB_DIRS)
DBDFLAGS = $(USR_DBDFLAGS) $(addprefix -I,$(DBD_SEARCH_DIRS))
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) $(addprefix -I,$(DB_SEARCH_DIRS))
#####################################################
# To allow os specific dbd files AND have the -j option work properly,
@@ -100,7 +100,7 @@ ACF_CPPFLAGS = $(ACF_CPPFLAGS_$(GNU))
ACF_INCLUDES = -I. $(TARGET_INCLUDES) $(USR_INCLUDES)\
$(SRC_INCLUDES) -I$(INSTALL_DB)
ACFDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(subst -I,,$(ACF_INCLUDES)) $@ $<
ACFDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(ACF_INCLUDES) $@ $<
ACF_CMD = $(CPP) $(ACF_CPPFLAGS) $(ACF_INCLUDES) $< > $@
##################################################### dependancies
@@ -112,16 +112,13 @@ DBDDEPENDS_FILES += $(addsuffix $(DEP),$(HINC) \
$(patsubst $(COMMON_DIR)/%,%,$(COMMON_DBS)) \
$(patsubst $(COMMON_DIR)/%,%,$(COMMON_DBDS)))
DBDDEPENDS_FLAGS = $(subst -I,,$(filter-out -S%,$(DBDFLAGS)))
DBDDEPENDS_FLAGS = $(filter-out -S%,$(DBDFLAGS))
DBDDEPENDS_CMD = -$(MKMF) -m $(notdir $@)$(DEP) $(DBDDEPENDS_FLAGS) $@ $<
MAKEDBDEPENDS = $(PERL) $(TOOLS)/makeDbDepends.pl
#####################################################
ifndef T_A
ECHO := $(if $(findstring s,$(MAKEFLAGS)),$(COMMENT),@echo)
COMMON_DIR = .
INSTALL_DBDS =
INSTALL_DBS =
@@ -309,8 +306,9 @@ $(COMMON_DIR)/%.db$(RAW): $(COMMON_DIR)/%.edf
$(COMMON_DIR)/%.db$(RAW): %.substitutions
@$(RM) $(notdir $@)$(DEP)
@$(MAKEDBDEPENDS) $@ $< $(TEMPLATE_FILENAME) >> $(notdir $@)$(DEP)
@$(MKMF) -m$(notdir $@)$(DEP) $(DBFLAGS) $@ $< $(TEMPLATE_FILENAME)
echo "$@ : $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
echo "$(notdir $@)$(DEP): $(TEMPLATE_FILENAME)" >> $(notdir $@)$(DEP)
$(ECHO) "Inflating database from $< $(TEMPLATE_FILENAME)"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) -S$< $(TEMPLATE_FILENAME) > $*.tmp
@@ -318,7 +316,7 @@ $(COMMON_DIR)/%.db$(RAW): %.substitutions
$(COMMON_DIR)/%.db$(RAW): %.template
@$(RM) $(notdir $@)$(DEP)
@$(MAKEDBDEPENDS) $@ $^ >> $(notdir $@)$(DEP)
@$(MKMF) -m$(notdir $@)$(DEP) $(DBFLAGS) $@ $< $(TEMPLATE_FILENAME)
$(ECHO) "Inflating database from $<"
@$(RM) $@ $*.tmp
$(MSI) $(DBFLAGS) $< > $*.tmp

View File

@@ -22,6 +22,7 @@ vpath %.cpp $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.C $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.rc $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.h $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.H $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.skel.static $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.y $(USR_VPATH) $(ALL_SRC_DIRS)
vpath %.l $(USR_VPATH) $(ALL_SRC_DIRS)
@@ -321,10 +322,10 @@ $(OBJLIB_MUNCHNAME):%.munch : %_ctdt$(OBJ) %$(OBJ)
@$(RM) $@
$(MUNCH_CMD)
runtests: $(TESTSCRIPTS_$(BUILD_CLASS))
runtests: $(TESTSCRIPTS)
-$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^
testspec: $(TESTSCRIPTS_$(BUILD_CLASS))
testspec: $(TESTSCRIPTS)
@$(RM) $@
@echo OS-class: $(OS_CLASS) > $@
@echo Target-arch: $(T_A) >> $@
@@ -383,10 +384,10 @@ $(INSTALL_LIB)/%.lib: %.lib
$(INSTALL_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing shared library $@"
@$(INSTALL_LIBRARY) -d -m $(LIB_PERMISSIONS) $< $(INSTALL_SHRLIB)
ifneq ($(SHRLIB_SUFFIX),.dll)
ifneq ($(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE))
ifneq (,$(strip $(SHRLIB_VERSION)))
@$(RM) $(subst .$(SHRLIB_VERSION),,$@)
ln -s $< $(subst .$(SHRLIB_VERSION),,$@)
@$(RM) $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
ln -s $< $(subst $(SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
endif # SHRLIB_VERSION
endif # SHRLIB_SUFFIX
@@ -407,10 +408,12 @@ $(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
$(ECHO) "Installing loadable shared library $@"
@$(INSTALL_LIBRARY) -d -m 555 $< $(INSTALL_SHRLIB)
ifneq ($(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE))
ifneq (,$(strip $(LOADABLE_SHRLIB_VERSION)))
@$(RM) $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
ln -s $< $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
@$(RM) $(subst $(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
ln -s $< $(subst $(LOADABLE_SHRLIB_SUFFIX),$(SHRLIB_SUFFIX_BASE),$@)
endif # LOADABLE_SHRLIB_VERSION
endif # LOADABLE_SHRLIB_SUFFIX
$(INSTALL_CONFIG)/%: %
$(ECHO) "Installing config file $@"

View File

@@ -19,8 +19,9 @@ OBJ = .o
#Library prefix and suffixes
LIB_PREFIX = lib
LIB_SUFFIX = .a
SHRLIB_SUFFIX = .so$(addprefix .,$(SHRLIB_VERSION))
LOADABLE_SHRLIB_SUFFIX = .so$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
SHRLIB_SUFFIX_BASE = .so
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)$(addprefix .,$(SHRLIB_VERSION))
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
LOADABLE_SHRLIB_PREFIX = lib
#-------------------------------------------------------

View File

@@ -48,11 +48,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -41,10 +41,7 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#--------------------------------------------------
# Operating system flags
OP_SYS_CFLAGS += -isysroot $(SDK_DIR) -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200
#--------------------------------------------------
# Don't try to use precompiled headers when converting sequencer files
CPPSNCFLAGS += -no-cpp-precomp
OP_SYS_LDFLAGS += -isysroot $(SDK_DIR)
#--------------------------------------------------
# Always compile in debugging symbol table information
@@ -54,23 +51,33 @@ OPT_CXXFLAGS_YES += -g
#-------------------------------------------------------
# Compiler definitions:
# Use clang instead of gcc
CC = $(GNU_BIN)/clang
CCC = $(GNU_BIN)/clang++
GNU_LDLIBS_YES =
CC_GNU = gcc
CCC_GNU = g++
CC_LLVM_GNU = llvm-gcc
CCC_LLVM_GNU = llvm-g++
CC_CLANG = clang
CCC_CLANG = clang++
# Convert the iOS platform to lowercase for passing to xcrun's sdk parameter
XCRUN_SDK_BASE = $(shell echo $(IOS_PLATFORM) | tr A-Z a-z)
#-------------------------------------------------------
# Linker flags
GNU_LDLIBS_YES =
OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib -L$(SDK_DIR)/usr/lib/system
#-------------------------------------------------------
# Shared libraries
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
SHRLIB_SUFFIX = .$(SHRLIB_VERSION).dylib
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress
@@ -89,13 +96,14 @@ vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS)
#--------------------------------------------------
# Header dependency file generation
#
# Use compiler when ARCH_CLASS is a single arch value
# otherwise use perl script command
SINGLE_ARCH=$(filter 1,$(words $(ARCH_CLASS)))
HDEPENDS_CFLAGS = $(if $(SINGLE_ARCH),$(HDEPENDS_CFLAGS_$(HDEPENDS)))
HDEPENDS_METHOD = $(if $(SINGLE_ARCH),CFLAGS,CMD)
HDEPENDS_METHOD = CMD
#--------------------------------------------------
# Allow site overrides
-include $(CONFIG)/os/CONFIG_SITE.Common.iosCommon
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).iosCommon
#--------------------------------------------------
# Find the Xcode compilers for the specified SDK just once
CC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CC_$(COMPILER)))
CCC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CCC_$(COMPILER)))

View File

@@ -11,9 +11,6 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = arm
# Set a special definition for network order of Netwinder ARM floating point
ARCH_DEP_CPPFLAGS += -D_ARM_NWFP_
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = arm-linux

View File

@@ -0,0 +1,21 @@
# CONFIG.Common.linux-microblaze
#
# This file is maintained by the build community.
#
# Definitions for Xilinx MicroBlaze FPGA Soft Core Processor target builds.
# This target has been tested with the Xilinx Spartan 6 MicroBlaze.
# Site-specific overrides of these definitions should be made in the file
# CONFIG_SITE.Common.linux-microblaze
#-------------------------------------------------------
# Include definitions common to all Linux targets
include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = microblaze
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = microblazeel-unknown-linux-gnu
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))
endif

View File

@@ -5,7 +5,8 @@
# Definitions for linux-xscale_be (big-endian) target builds.
# This target has been tested with the MOXA UC-7408-LX Plus.
# Sites may override these definitions in CONFIG_SITE.Common.linux-xscale_be
# Site-specific overrides of these definitions should be made in the file
# CONFIG_SITE.Common.linux-xscale_be
#-------------------------------------------------------
# Include definitions common to all Linux targets
@@ -13,11 +14,6 @@ include $(CONFIG)/os/CONFIG.Common.linuxCommon
ARCH_CLASS = xscale
#
# The vendor's tool chain needs to be located here
#
GNU_DIR=/usr/local/xscale_be
ifeq ($(BUILD_CLASS),CROSS)
VALID_BUILDS = Ioc
GNU_TARGET = xscale_be

View File

@@ -55,11 +55,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -49,11 +49,12 @@ STATIC_CXXFLAGS_NO= $(VISC_DLL) -D_DLL
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_PREFIX=
SHRLIB_SUFFIX=.dll
SHRLIB_PREFIX =
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIB_PREFIX=
LOADABLE_SHRLIB_SUFFIX=.dll
LOADABLE_SHRLIB_PREFIX =
LOADABLE_SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(LOADABLE_SHRLIB_SUFFIX))
#

View File

@@ -36,11 +36,6 @@ ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS)
#
OP_SYS_CFLAGS += -fno-common
#
# Don't try to use precompiled headers when converting sequencer files
#
CPPSNCFLAGS += -no-cpp-precomp
#
# Darwin os definition
#
@@ -52,20 +47,6 @@ OP_SYS_CPPFLAGS += -Ddarwin
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
#
# The following two definitions enable the use of DarwinPorts packages.
#
OP_SYS_INCLUDES += -I/opt/local/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
#
# The following two definitions enable the use of Fink packages.
#
OP_SYS_INCLUDES += -I/sw/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))
#
# Libraries for command-line editing.
#
@@ -86,10 +67,11 @@ CCC = $(GNU_BIN)/c++
#
SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
-install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
-current_version $(SHRLIB_VERSION)
SHRLIB_SUFFIX = .$(SHRLIB_VERSION).dylib
SHRLIB_SUFFIX_BASE = .dylib
SHRLIB_SUFFIX = .$(SHRLIB_VERSION)$(SHRLIB_SUFFIX_BASE)
LOADABLE_SHRLIB_LDFLAGS = -bundle -flat_namespace -undefined suppress

View File

@@ -0,0 +1,10 @@
# CONFIG.linux-arm.Common
#
# $Revision-Id$
#
# Definitions for linux-arm host builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.Common
#-------------------------------------------------------
#Include definitions common to unix hosts
include $(CONFIG)/os/CONFIG.UnixCommon.Common

View File

@@ -0,0 +1,10 @@
# CONFIG.linux-arm.linux-arm
#
# $Revision-Id$
#
# Definitions for native linux-arm builds
# Sites may override these definitions in CONFIG_SITE.linux-arm.linux-arm
#-------------------------------------------------------
# Include common gnu compiler definitions
include $(CONFIG)/CONFIG.gnuCommon

View File

@@ -12,7 +12,7 @@ MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
NOP = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -176,7 +176,8 @@ LINK.shrlib+= $(DLL_DEF_FLAG),$(LIBRARY_LD_RESS)
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_SUFFIX=.dll
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))

View File

@@ -15,7 +15,7 @@ MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
NOP = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -12,7 +12,7 @@ MV = $(PERL) -MExtUtils::Command -e mv
RM = $(PERL) -MExtUtils::Command -e rm_f
MKDIR = $(PERL) -MExtUtils::Command -e mkpath
RMDIR = $(PERL) -MExtUtils::Command -e rm_rf
COMMENT = $(PERL) -e ''
NOP = $(PERL) -e ''
WIND_HOST_TYPE = x86-win32
OSITHREAD_USE_DEFAULT_STACK = NO

View File

@@ -212,7 +212,8 @@ MUNCH_CMD = $(CCC) /Fo $@ $^
# But: if there are no objects LIBRARY_LD_OBJS to include
# in this library (may be for e.g. base/src/libCompat
# on some archs), don't define (and build) any library!
SHRLIB_SUFFIX=.dll
SHRLIB_SUFFIX_BASE = .dll
SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE)
SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))
LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX))

View File

@@ -7,17 +7,31 @@
#-------------------------------------------------------
# Select which CPU architecture(s) to include in your MacOS binaries:
# i386
# x86_64 - Needs MacOS 10.4 with the Universal SDK, or 10.5 and later
# i386, x86_64, or both (fat binaries).
ARCH_CLASS = i386
#ARCH_CLASS = x86_64
#ARCH_CLASS = i386
ARCH_CLASS = x86_64
#ARCH_CLASS = i386 x86_64
#
# Uncomment the followings lines to build with CLANG instead of GCC.
# Comment out the following 3 lines to build with Apple's GCC instead of CLANG.
#
#CC = clang
#CCC = clang++
#GNU_LDLIBS_YES =
CC = clang
CCC = clang++
GNU = NO
# To use MacPorts GCC, comment out ALL the settings above this line,
# then uncomment (and modify if necessary) the following instead:
#GNU_DIR = /opt/local
#CC = $(GNU_BIN)/gcc -m64
#CCC = $(GNU_BIN)/g++ -m64
# If you see this or similar errors while building in the src/cap5 directory
# gcc: error: unrecognized option '-no-cpp-precomp'
# the problem is due to the ccflags configuration that your version of Perl
# was built with. You can replace the Cap5_CFLAGS setting in the Makefile
# with a hand-edited set of flags for building that Perl library, or ignore
# this problem if you don't need to use Channel Access from Perl.

View File

@@ -1,28 +1,26 @@
# CONFIG_SITE.Common.ios-arm
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Site-specific settings for ios-arm target builds
#-------------------------------------------------------
# Which ARM instruction set(s) to generate code for:
# Most iOS devices can run programs compiled for both the
# ARMv6 and ARMv7 instruction sets. ARMv7 code is usually
# more efficient, but the older devices listed below can only
# use the ARMv6 instruction set. Including both architectures
# generates a Universal binary, which is larger and takes
# longer to compile but runs efficiently on all devices.
# Most iOS devices can run programs compiled for older
# instruction sets, although the newer instructions are
# more efficient.
#
# ARMv6-only devices: iPhone 1 or 3G, iPod Touch Gen 1 or 2
# Apple's compilers can build for multiple architectures,
# generating a Universal binary. This is larger and takes
# longer to compile, but runs efficiently on all devices.
#
ARCH_CLASS = armv7
# Xcode 4.5 dropped support for the ARMv6.
#
# ARMv7s devices: iPhone 5
# ARMv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2
# All other devices are ARMv7
ARCH_CLASS = armv7 armv7s
#ARCH_CLASS = armv7
#ARCH_CLASS = armv6 armv7
#ARCH_CLASS = armv6
# Uncomment these two definitions to use g++ instead of clang++
# which may be needed in some circumstances:
#
#CCC = $(GNU_BIN)/c++
#GNU_LDLIBS_YES = -lgcc

View File

@@ -1,7 +1,6 @@
# CONFIG_SITE.Common.iosCommon
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Site-specific settings for Apple iOS builds
#-------------------------------------------------------
@@ -10,17 +9,31 @@
#IOS_VERSION = 3.2
#IOS_VERSION = 4.1
#IOS_VERSION = 4.2
#IOS_VERSION = 4.3
IOS_VERSION = 5.0
#IOS_VERSION = 5.0
#IOS_VERSION = 5.1
IOS_VERSION = 6.0
# Most sites will want shared libraries
# Which compiler to use:
# CLANG is preferred for recent versions of Xcode
# LLVM_GNU uses the llvm-gcc and llvm-g++ compilers
# GNU is needed for older versions of Xcode
STATIC_BUILD=NO
SHARED_LIBRARIES=YES
COMPILER = CLANG
#COMPILER = LLVM_GNU
#COMPILER = GNU
# Platform path, this is probably correct
# Most sites will want to build shared libraries (which is the
# default), but if you get an error from ld while building libCom,
# try uncommenting this, which is needed for some compiler versions:
#SHARED_LIBRARIES = NO
# Get platform path from OS, these are usually correct:
XCODE_PATH := $(shell xcode-select -print-path)
PLATFORM_DIR = $(XCODE_PATH)/Platforms/$(IOS_PLATFORM).platform

View File

@@ -0,0 +1,14 @@
# CONFIG_SITE.Common.linux-microblaze
#
# Site specific definitions for linux-microblaze target builds.
#-------------------------------------------------------
# The gnu tools for cross compiling for MicroBlaze (little endian)
# on Linux can be downloaded from the Xilinx git server:
# git clone git://git.xilinx.com/xldk/microblaze_v2.0_le.git
#
# The result contains a .tgz file with the tool-chain in it.
# Set GNU_DIR to point to the un-tarred tool-chain:
GNU_DIR = /usr/local/vw/microblaze-2.0/microblazeel-unknown-linux-gnu

View File

@@ -0,0 +1,9 @@
# CONFIG_SITE.Common.linux-xscale_be
#
# Site specific definitions for linux-xscale_be target builds.
#-------------------------------------------------------
# Set GNU_DIR to point to directory containing the tool-chain
GNU_DIR = /usr/local/xscale_be

View File

@@ -6,5 +6,5 @@
# Site override definitions for cygwin-x86 host builds
#-------------------------------------------------------
CROSS_COMPILER_TARGET_ARCHS =
#CROSS_COMPILER_TARGET_ARCHS =

View File

@@ -0,0 +1,20 @@
# CONFIG_SITE.darwinCommon.darwinCommon
#
# $Revision-Id$
# This file is maintained by the build community.
#
# Site specific definitions for darwin builds
#-------------------------------------------------------
# Uncomment the following two definitions to enable the use of DarwinPorts packages.
#
#OP_SYS_INCLUDES += -I/opt/local/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*))))
# Uncomment the following two definitions to enable the use of Fink packages.
#
#OP_SYS_INCLUDES += -I/sw/include
# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist
#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*))))

View File

@@ -0,0 +1,7 @@
# CONFIG_SITE.linux-arm.linux-arm
#
# $Revision-Id$
#
# Site specific definitions for native linux-arm builds
#-------------------------------------------------------

View File

@@ -5,8 +5,10 @@
# Site specific definitions for linux-x86 host - linux-arm target builds
#-------------------------------------------------------
# Diamond:
# Tools install path
#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3
# anj@aps:
#GNU_DIR = /local/anj/cross-arm/gcc-3.4.5-glibc-2.3.6/arm-linux
GNU_DIR = /net/phoebus/vw/zynq-2011.09
# GNU crosscompiler target name
GNU_TARGET = arm-xilinx-linux-gnueabi

View File

@@ -19,7 +19,7 @@ builds with release R3.14. It describes procedures such that:</p>
<li>The application uses the configure rules which are new to R3.14.</li>
<li>The OSI (Operating System Independent) features of R3.14 are available,
i.e. iocCore products can be build for vxWorks as well as other
platforms, e.g. solaris and linux.</li>
platforms, e.g. Solaris and Linux.</li>
</ul>
<h3>Gnumake clean uninstall</h3>
@@ -47,10 +47,14 @@ find *App iocBoot -print | cpio -pvmd <i>/path/to/new/top</i></pre>
<h3>Modify <i>top</i>/configure/RELEASE</h3>
<p>Copy definitions of external modules excluding EPICS_BASE and
TEMPLATES_TOP from old application RELEASE file. <br>
If sequence programs (*.st or *.stt files) exist in your application, add the
SNCSEQ location definition for the R3.14 sncseq external module</p>
<p>Copy definitions of external modules excluding <tt>EPICS_BASE</tt> and
<tt>TEMPLATE_TOP</tt> from your old application config/RELEASE file. In many
cases the modules you actually use under R3.14 will be different to the R3.13
modules, but the old module names here give you a starting-point for what there
replacements will be.</p>
<p>If any sequence programs (*.st or *.stt files) exist in your application, add
the SNCSEQ location definition for the R3.14 sncseq external module.</p>
<blockquote>
<pre>SNCSEQ = <i>/path/to/sncseq</i></pre>
@@ -107,7 +111,7 @@ still to convert):</p>
</blockquote>
<p>This new Makefile has comments explaining how to build the various host
and ioc products. Lets consider some examples</p>
and IOC products. Lets consider some examples</p>
<ul>
<li>Host programs
<p>Makefile.Host contains definitions like:</p>
@@ -149,7 +153,7 @@ DBDNAME = exampleApp.dbd</pre>
<p>NOTES: Change exampleApp.dbd to example.dbd in all st.cmd files. Also
this definition assumes that file exampleInclude.dbd exists.</p>
</li>
<li>Create the ioc application:
<li>Create the IOC application:
<p>Makefile.Vx contains statements like:</p>
<blockquote>
<pre>SRCS.c += ../xxxRecord.c
@@ -198,21 +202,22 @@ baseLIBOBJS, Makefile.Host, and Makefile.Vx</p>
</blockquote>
<p>to your <i>appname</i>Include.dbd file and remove the file
<i>name</i>App/src/base.dbd from your src directory. The base.dbd from base/dbd
will be used instead. If you only want to load a subset of the record
definitions from base you can keep your own copy of base.dbd, but you should
copy the one from your R3.14 base and edit that rather than trying to re-use the
R3.13 version from your old application.</p>
<i>name</i>App/src/base.dbd from your src directory. The base.dbd file from
$(EPICS_BASE)/dbd will be used instead. If you only want to load a subset of the
record definitions from base you can keep a local edited copy of the base.dbd
file but you should copy it from $(EPICS_BASE)/dbd and edit that rather than
trying to re-use the R3.13 version from your old application area.</p>
<h3>Record support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>The structure rset is now a typedef so change</p>
<p>The <tt>struct rset</tt> is now available as a typedef so change</p>
<blockquote>
<pre>struct rset <i>recordname</i>RSET = { ... };</pre>
@@ -224,65 +229,68 @@ R3.13 version from your old application.</p>
<pre>rset <i>recordname</i>RSET = { ... };</pre>
</blockquote>
<p>and add the following line after the <q>rset <i>recordname</i>RSET = { ...
};</q> definition.</p>
<p>and add the following line immediately after that definition:</p>
<blockquote>
<pre>epicsExportAddress(rset,<i>recordname</i>RSET);</pre>
<pre>epicsExportAddress(rset, <i>recordname</i>RSET);</pre>
</blockquote>
<h3>Device support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>and add the following line after the dset definition <q>struct { ... }
dev<i>name</i> = { ... };</q></p>
<p>and add the following line after every dset definition <tt>struct { ... }
dev<i>name</i> = { ... };</tt> in the file.</p>
<blockquote>
<pre>epicsExportAddress(dset,dev<i>name</i>);</pre>
<pre>epicsExportAddress(dset, dev<i>name</i>);</pre>
</blockquote>
<h3>Driver support</h3>
<p>Add the following line after all existing #includes</p>
<p>Add the following header file inclusion after all other <tt>#include</tt>
statements:</p>
<blockquote>
<pre>#include "epicsExport.h"</pre>
</blockquote>
<p>and add the following line after the drvet drv<i>name</i> definition</p>
<p>and add the following line after the <tt>drvet drv<i>name</i></tt>
definition:</p>
<blockquote>
<pre>epicsExportAddress(drvet,drv<i>name</i>);</pre>
<pre>epicsExportAddress(drvet, drv<i>name</i>);</pre>
</blockquote>
<h3>Registration code changed</h3>
<p>Registration code for application specific functions, e.g. subroutine record
init and process functions, must be changed as follows</p>
init and process functions, must be changed as follows</p>
<ol>
<li>Include the following header files after all existing #includes:
<li>Add the following header file inclusions after all other <tt>#include</tt>
statements:
<blockquote>
<pre>#include "registryFunction.h"
#include "epicsExport.h"</pre>
</blockquote></li>
<li>Make the application specific functions static functions, e.g.
<li>Mark the application specific functions as <tt>static</tt>, e.g.
<blockquote>
<pre>static long mySubInit(subRecord *precord)
static long mySubProcess(subRecord *precord)</pre>
</blockquote></li>
<li>Add an epicsExportFunction statement for each of the functions to be
registered, e.g.
<li>Add an <tt>epicsRegisterFunction</tt> statement for each of the functions
to be registered, e.g.
<blockquote>
<pre>epicsExportFunction(mySubInit);
epicsExportFunction(mySubProcess);</pre>
<pre>epicsRegisterFunction(mySubInit);
epicsRegisterFunction(mySubProcess);</pre>
</blockquote></li>
<li>Add a function statement for each of the functions to be registered in a
@@ -293,6 +301,21 @@ function("mySubProcess")</pre>
</blockquote></li>
</ol>
<h3>Additional Headers</h3>
<p>It may be necessary to add one or more of the following header file
inclusions to any C source file if you get warnings or errors from the
compilation process. The most likely file missing is errlog.h.</p>
<ul>
<li><tt>#include &lt;stdarg.h&gt;</tt></li>
<li><tt>#include "errlog.h"</tt></li>
<li><tt>#include "errMdef.h"</tt></li>
<li><tt>#include "ellLib.h"</tt></li>
<li><tt>#include "epicsTypes.h"</tt></li>
</ul>
<h3>Modify the Makefiles in <i>top</i>/iocBoot directory.</h3>
<p>Change <q><tt>include $(TOP)/config/CONFIG_APP</tt></q> to <q><tt>include
@@ -351,14 +374,13 @@ $(TOP)/configure/RULES.ioc</tt></q></p>
ld &lt; iocCore</pre>
</blockquote>
<p>Change <q><tt>ld &lt; <i>name</i>Lib</tt></q> to
<p>The <tt>ld</tt> command in vxWorks 5.5.2 doesn't clean up its standard input
stream properly, so we now recommend passing the filename to it as an argument
instead. Change <q><tt>ld &lt; <i>name</i>Lib</tt></q> to
<blockquote>
<pre>ld 0,0, "<i>name</i>.munch"</pre>
<p>(The <tt>ld</tt> command in vxWorks 5.5.2 doesn't clean up its standard
input properly, so we now recommend passing the filename to it directly
instead.)</p> </blockquote>
</blockquote>
<p>Change <q><tt>cd appbin</tt></q> to <q><tt>cd topbin</tt></q></p>
@@ -381,58 +403,42 @@ to
<p>If any source file makes calls to recGbl routines make sure it includes
<tt>recGbl.h</tt>. If it doesn't the compiler will issue warning messages and
the ioc may issue the message: <q>undefined symbol: _recGblSetSevr</q>.</p>
the IOC may not compile properly, or on vxWorks you could see the load-time
error: <q>undefined symbol: _recGblSetSevr</q>.</p>
<h3>Record support changes</h3>
<p>The steppermotor, scan, and pid records are no longer in base. If these
records are not used in your application, comment out references to them in
base.dbd. If these record types are used at your site, they should be
downloaded and built with base R3.14 by your EPICS administrator. To update
the R3.14 location of these record types in your application you must add
appropriate module definitions to your application's config/RELEASE file and
add <tt>LIBOBJS</tt> definitions to the src Makefile.</p>
<p>The steppermotor, scan, and pid records are no longer in base. If these
record types are used at your site, their unbundled modules should be downloaded
from the EPICS website and built with base R3.14 by your EPICS administrator. To
use these record types in your application you must add them to the application
just like any other external support module. Most modules provide instructions
on how to use them in an IOC application.</p>
<p>For example add</p>
<blockquote>
<pre>PID = <i>/path/to/modules</i>/pid</pre>
</blockquote>
<p>to config/RELEASE and add</p>
<blockquote>
<pre>LIBOBJS += $(PID_BIN)/pidRecord.o</pre>
</blockquote>
<p>to your application src/Makefile.</p>
<p>You should consider changing any existing old steppermotor records to the
new EPICS motor record module supported by Beamline Controls and Data
Acquisition at APS.</p>
<p>Consider changing any existing old steppermotor records to the EPICS motor
record module supported by the Beamline Controls and Data Acquisition group at
APS.</p>
<h3>RecDynLink.o and devPtSoft changes</h3>
<p>recDynLink.o and devPtSoft.o are no longer in EPICS base and now exist as
separate EPICS modules.You must now add the appropriate module full path
definitions to your application config/RELEASE file, and change
<tt>LIBOBJS</tt> location definition <tt>$(EPICS_BASE_BIN)</tt> to the module
definition bin directory in your application src directory files. See
<q>Hardware support changes</q> below for instructions.</p>
separate unbundled EPICS modules. As with the three record types described
above these must now be built separately and added as support modules to any
applications that need them.</p>
<h3>Hardware support changes</h3>
<p>All hardware support (dev, drv and dbd files) except soft support has been
unbundled from base R3.14. This support includes the files symb.dbd,
drvHp1404a.o, drvEpvxiMsg.o, and drvEpvxi.o. If these are not used by your
application, comment out references to them in base.dbd.</p>
application, remove any references to them from your dbd files.</p>
<p>Hardware support now exists as separate EPICS modules. The hardware
support for your site should be downloaded and built with base R3.14 by your
EPICS administrator. You must now add the appropriate module full path
definitions to your application config/RELEASE file, and change
<tt>LIBOBJS</tt> location from <tt>$(EPICS_BASE_BIN) </tt>to the module bin
directory in your application src directory files.</p>
<p>Hardware support now exists as separate EPICS modules. The hardware support
modules used at your site should be downloaded and built with base R3.14 by your
EPICS administrator. To use them, add the appropriate module full path
definitions to your application configure/RELEASE file, and make the documented
changes to your Makefile to link their binaries into the your IOC
executable.</p>
<p>For example, remove</p>
@@ -440,7 +446,7 @@ directory in your application src directory files.</p>
<pre>LIBOBJS += $(EPICS_BASE_BIN)/symb</pre>
</blockquote>
<p>from baseLIBOBJS and add</p>
<p>from <tt>baseLIBOBJS</tt> and add</p>
<blockquote>
<pre>LIBOBJS += $(SYMB_BIN)/symb</pre>
@@ -452,25 +458,25 @@ directory in your application src directory files.</p>
<pre>SYMB = &lt;full path definition for the built module SYMB&gt;</pre>
</blockquote>
<p>into your application config/RELEASE file.</p>
<p>into your application configure/RELEASE file.</p>
<h3>dbLoadtemplate tool changes</h3>
<p>The host tool dbLoadTemplate has been replace by a new EPICS extension,
<p>The host tool dbLoadTemplate has been replace by a new EPICS extension called
msi, which should be downloaded and built with base R3.14 by your EPICS
administrator. dbLoadTemplate is still supported on iocs. If, in your
application, db files are created from template and substitution files you
should add the definition</p>
administrator. dbLoadTemplate is still supported on IOCs. If the msi executable
is not in your default search path and in your application db files are created
from template and substitution files, you should add the definition</p>
<blockquote>
<pre>MSI = &lt;full path name to msi executable&gt;</pre>
</blockquote>
<p>to your application config/RELEASE file.</p>
</body>
<p>to your application's configure/RELEASE file.</p>
<h3>Optional <i>top</i>/configure/CONFIG_SITE changes.</h3>
<h3>Optional <i>top</i>/configure/CONFIG_SITE changes</h3>
<p>Review and optionally modify site build settings.</p>
</body>
</html>

View File

@@ -3,16 +3,127 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>EPICS Base R3.14.12.2 Release Notes</title>
<title>EPICS Base R3.14.12.3-pre1 Release Notes</title>
</head>
<body lang="en">
<h1 align="center">EPICS Base Release 3.14.12.2</h1>
<h1 align="center">EPICS Base Release 3.14.12.3-pre1</h1>
<h2 align="center">Changes between 3.14.12.1 and 3.14.12.2</h2>
<h2 align="center">Changes between 3.14.12.2 and 3.14.12.3</h2>
<!-- Insert new items immediately below here ... -->
<h4>Array Subroutine (aSub) record type fixes</h4>
<ul>
<li>Changing the number of valid elements in a VALx field now triggers
monitors</li>
<li>The NEVx fields now post monitors, following the EFLG setting</li>
<li>The artificial limit of 10,000,000 array elements has been removed</li>
</ul>
<h4>Problem with NAN values in MLST/ALST fields</h4>
<p>The ai, ao, calc, calcout, dfanout, sel and sub record types could stop
posting monitors if they got NAN values in their MLST or ALST fields. A change
has been included so this should no longer be the case.</p>
<h4>MacOS build defaults changed</h4>
<p>The default build settings for darwin-x86 targets have been changed to match
the latest version of XCode; see configure/os/CONFIG_SITE.Common.darwin-x86
if you need to revert back to building with GCC or to include the i386 CPU
architecture.</p>
<h4>Build problem with db dependencies</h4>
<p>The dependency output for .db and .acf files created by makeDbDepends.pl did
not show the directories of the depended files. The makeDbDepends.pl script has
been replaced by mkmf.pl for this purpose after modifying it to accept multiple
-I include directory options and more than one source file on the command line.
The makeDbDepends.pl script has been removed from Base.</p>
<h4>Native linux-arm builds added</h4>
<p>The configuration files needed for a linux-arm system to build Base for
itself have now been added. Both the Shell and Perl versions of the startup
EpicsHostArch scripts now recognize both arm6l and arm7l CPUs and return the
generic linux-arm host architecture name for them.</p>
<h4>New Microblaze Target Architecture</h4>
<p>A new cross-compiled target architecture is included for the Xilinx
Microblaze FPGA soft-core CPU architecture running Linux.</p>
<h4>Win32 Numeric string to enum/menu/device conversions</h4>
<p>Microsoft's C run-time library has a bug in the sscanf() function such that
the "%n" format specifier does not always work. The string to enum, menu and
device conversion functions have been modified to avoid this problem, but a
numeric string will no longer be converted properly on any architecture if it
has trailing whitespace characters.</p>
<h4>Launchpad Bugs Resolved</h4>
<p>The following are links to bugs in the Launchpad bug tracker that have been
fixed in this release:</p>
<ul>
<li>999167
<a href="https://launchpad.net/bugs/999167">
Missing epicsShareFunc for casStatsFetch</a></li>
<li>950555
<a href="https://launchpad.net/bugs/950555">
String substitution removes part of path when linking versioned shared
libraries</a></li>
<li>907761
<a href="https://launchpad.net/bugs/907761">
reading only 1st char of link in "long string" ($) syntax fails in read
error</a></li>
<li>903448
<a href="https://launchpad.net/bugs/903448">
RHEL5 nss ldap update cause stack size related failure</a></li>
</ul>
<h4>Calcout and Seq record timestamps</h4>
<p>Both the calcout and seq record types were not updating the record's
timestamp before calling db_post_events() for some field updates. The calcout
record type will now update the record's timestamp before it posts a channel
access monitor on the DLYA field; this happens twice during record processing if
the ODLY field is larger than 0.</p>
<p>Timestamps from all seq record monitor events have been wrong since 1995 or
earlier, the time being provided was from the last time the record processed.
Now the record timestamp will be updated between reading each DOL1..DOLA link
and posting the monitor on the associated DO1..DOA field. The VAL field is
never given a value by the record processing code, but is used for posting
monitors when the alarm status or severity gets updated at the end of record
processing. Alarm monitors are now timestamped properly at that time.</p>
<h4>Comments in iocsh scripts</h4>
<p>The IOC shell was very particular about comments in previous versions of
Base. If the <tt>#</tt> character was indented using white-space characters it
had to be followed immediately by a white-space, comma or parenthesis character,
and macLib would report errors if the rest of the comment contained any
undefined macros. These restrictions have now been removed. The comment
character can come from expanding a macro without it having to be followed by
white-space, although in this case macLib will still report errors due to
undefined or circular macro definitions.</p>
<h4>MacOS-X: Don't use Ports/Fink unless configured</h4>
<p>Previous releases would automatically use headers and link to libraries found
in the DarwinPorts and Fink installation directories. This is now controlled by
entries in the <tt>CONFIG_SITE.darwinCommon.darwinCommon</tt> file in the
<tt>configure/os</tt> directory, which are commented out by default. Recent
versions of MacOS-X come with an implementation of readline, so those additional
code repositories are no longer required.</p>
<h2 align="center">Changes between 3.14.12.1 and 3.14.12.2</h2>
<h4>Path for Cap5 loadable library changed</h4>
<p>The perl CA module makes use of a loadable library, which used to be loaded

View File

@@ -173,7 +173,7 @@ initialize_local_filesystem(char **argv)
#if __RTEMS_MAJOR__>4 || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
static int
int
nfsMount(char *uidhost, char *path, char *mntpoint)
{
int devl = strlen(uidhost) + strlen(path) + 2;

View File

@@ -1,11 +1,9 @@
/* share/src/as/asDbLib.c */
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* Author: Marty Kraimer Date: 02-11-94*/
@@ -69,18 +67,23 @@ static long asDbAddRecords(void)
int epicsShareAPI asSetFilename(const char *acf)
{
if(pacf) free ((void *)pacf);
if(acf) {
pacf = calloc(1,strlen(acf)+1);
if(!pacf) {
errMessage(0,"asSetFilename calloc failure");
} else {
strcpy(pacf,acf);
}
if (pacf)
free (pacf);
if (acf) {
pacf = calloc(1, strlen(acf)+1);
if (!pacf) {
errMessage(0, "asSetFilename calloc failure");
} else {
strcpy(pacf, acf);
if (*pacf != '/' && !strchr(pacf, ':')) {
printf("asSetFilename: Warning - relative paths won't usually "
"work\n");
}
}
} else {
pacf = NULL;
pacf = NULL;
}
return(0);
return 0;
}
int epicsShareAPI asSetSubstitutions(const char *substitutions)

View File

@@ -397,6 +397,11 @@ void udpRecvThread::run ()
} while ( ! this->iiu.shutdownCmd );
}
/* for sunpro compiler */
udpiiu::M_repeaterTimerNotify::~M_repeaterTimerNotify ()
{
}
/*
* udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
*

View File

@@ -143,6 +143,7 @@ private:
public:
M_repeaterTimerNotify ( udpiiu & iiu ) :
m_udpiiu ( iiu ) {}
~M_repeaterTimerNotify (); /* for sunpro compiler */
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );

View File

@@ -230,6 +230,18 @@ void casStreamIOWakeup::show ( unsigned level ) const
printf ( "}\n" );
}
//
// casStreamOS::armRecv ()
//
inline void casStreamOS::armRecv()
{
if ( ! this->pRdReg ) {
if ( ! this->inBufFull() ) {
this->pRdReg = new casStreamReadReg ( *this );
}
}
}
//
// casStreamIOWakeup::expire()
//
@@ -297,18 +309,6 @@ void casStreamIOWakeup::start ( casStreamOS &os )
this->pOS->printStatus ( "casStreamIOWakeup tmr start" );
}
//
// casStreamOS::armRecv ()
//
inline void casStreamOS::armRecv()
{
if ( ! this->pRdReg ) {
if ( ! this->inBufFull() ) {
this->pRdReg = new casStreamReadReg ( *this );
}
}
}
//
// casStreamOS::disarmRecv ()
//

View File

@@ -25,6 +25,7 @@ catools_LIBS += ca Com
PROD_DEFAULT += caget camonitor cainfo caput
PROD_vxWorks = -nil-
PROD_RTEMS = -nil-
PROD_iOS = -nil-
PROD_LIBS += catools ca Com
catools_DIR = .

View File

@@ -492,12 +492,12 @@ int main (int argc, char *argv[])
if (charArrAsStr) {
count = len;
dbrType = DBR_CHAR;
ebuf = calloc(strlen(cbuf), sizeof(char));
ebuf = calloc(strlen(cbuf)+1, sizeof(char));
if(!ebuf) {
fprintf(stderr, "Memory allocation failed\n");
return 1;
}
epicsStrnRawFromEscaped(ebuf, strlen(cbuf), cbuf, strlen(cbuf));
epicsStrnRawFromEscaped(ebuf, strlen(cbuf)+1, cbuf, strlen(cbuf));
} else {
for (i = 0; i < count; ++i) {
epicsStrnRawFromEscaped(sbuf[i], sizeof(EpicsStr), *(argv+optind+i), sizeof(EpicsStr));

View File

@@ -445,10 +445,15 @@ char *dbr2str (const void *value, unsigned type)
\
if (charArrAsStr && dbr_type_is_CHAR(TYPE_ENUM) && (reqElems || pv->nElems > 1)) { \
dbr_char_t *s = (dbr_char_t*) dbr_value_ptr(pv->value, pv->dbrType); \
int dlen = epicsStrnEscapedFromRawSize((char*)s, strlen((char*)s)); \
char *d = calloc(dlen+1, sizeof(char)); \
size_t len = strlen((char*)s); \
unsigned long elems = reqElems && (reqElems < pv->nElems) ? reqElems : pv->nElems; \
int dlen; \
char *d; \
if (len < elems) elems = len; \
dlen = epicsStrnEscapedFromRawSize((char*)s, elems); \
d = calloc(dlen+1, sizeof(char)); \
if(d) { \
epicsStrnEscapedFromRaw(d, dlen+1, (char*)s, strlen((char*)s));\
epicsStrnEscapedFromRaw(d, dlen+1, (char*)s, elems); \
printf("%c%s", fieldSeparator, d); \
free(d); \
} else { \

View File

@@ -17,6 +17,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cantProceed.h"
#include "dbDefs.h"
@@ -152,12 +153,12 @@ void callbackRequest(CALLBACK *pcallback)
int lockKey;
if (!pcallback) {
epicsPrintf("callbackRequest called with NULL pcallback\n");
epicsInterruptContextMessage("callbackRequest: pcallback was NULL\n");
return;
}
priority = pcallback->priority;
if (priority < 0 || priority >= NUM_CALLBACK_PRIORITIES) {
epicsPrintf("callbackRequest called with invalid priority\n");
epicsInterruptContextMessage("callbackRequest: Bad priority\n");
return;
}
if (ringOverflow[priority]) return;
@@ -167,8 +168,11 @@ void callbackRequest(CALLBACK *pcallback)
epicsInterruptUnlock(lockKey);
if (!pushOK) {
errlogPrintf("callbackRequest: %s ring buffer full\n",
threadName[priority]);
char msg[48] = "callbackRequest: ";
strcat(msg, threadName[priority]);
strcat(msg, " ring buffer full\n");
epicsInterruptContextMessage(msg);
ringOverflow[priority] = TRUE;
}
epicsEventSignal(callbackSem[priority]);

View File

@@ -27,6 +27,7 @@
#include "errlog.h"
#include "cantProceed.h"
#include "cvtFast.h"
#include "epicsMath.h"
#include "epicsTime.h"
#include "alarm.h"
#include "ellLib.h"
@@ -281,48 +282,41 @@ static void get_control(DBADDR *paddr, char **ppbuffer,
}
static void get_alarm(DBADDR *paddr, char **ppbuffer,
struct rset *prset,long *options)
struct rset *prset, long *options)
{
struct dbr_alDouble ald;
int got_data=FALSE;
char *pbuffer = *ppbuffer;
struct dbr_alDouble ald = {epicsNAN, epicsNAN, epicsNAN, epicsNAN};
long no_data = TRUE;
ald.upper_alarm_limit = ald.upper_warning_limit = 0.0;
ald.lower_warning_limit = ald.lower_alarm_limit = 0.0;
if( prset && prset->get_alarm_double ) {
(*prset->get_alarm_double)(paddr,&ald);
got_data=TRUE;
}
if( (*options) & (DBR_AL_LONG) ) {
char *pbuffer=*ppbuffer;
if (prset && prset->get_alarm_double)
no_data = prset->get_alarm_double(paddr, &ald);
if(got_data) {
struct dbr_alLong *pal=(struct dbr_alLong*)pbuffer;
pal->upper_alarm_limit = (epicsInt32)ald.upper_alarm_limit;
pal->upper_warning_limit = (epicsInt32)ald.upper_warning_limit;
pal->lower_warning_limit = (epicsInt32)ald.lower_warning_limit;
pal->lower_alarm_limit = (epicsInt32)ald.lower_alarm_limit;
} else {
memset(pbuffer,'\0',dbr_alLong_size);
*options = (*options) ^ DBR_AL_LONG; /*Turn off option*/
}
*ppbuffer = ((char *)*ppbuffer) + dbr_alLong_size;
}
if( (*options) & (DBR_AL_DOUBLE) ) {
char *pbuffer=*ppbuffer;
if (*options & DBR_AL_LONG) {
struct dbr_alLong *pal = (struct dbr_alLong*) pbuffer;
if(got_data) {
struct dbr_alDouble *pal=(struct dbr_alDouble*)pbuffer;
pal->upper_alarm_limit = ald.upper_alarm_limit;
pal->upper_warning_limit = ald.upper_warning_limit;
pal->lower_warning_limit = ald.lower_warning_limit;
pal->lower_alarm_limit = ald.lower_alarm_limit;
} else {
memset(pbuffer,'\0',dbr_alDouble_size);
*options = (*options) ^ DBR_AL_DOUBLE; /*Turn off option*/
}
*ppbuffer = ((char *)*ppbuffer) + dbr_alDouble_size;
}
return;
pal->upper_alarm_limit = (epicsInt32) ald.upper_alarm_limit;
pal->upper_warning_limit = (epicsInt32) ald.upper_warning_limit;
pal->lower_warning_limit = (epicsInt32) ald.lower_warning_limit;
pal->lower_alarm_limit = (epicsInt32) ald.lower_alarm_limit;
if (no_data)
*options ^= DBR_AL_LONG; /*Turn off option*/
*ppbuffer += dbr_alLong_size;
}
if (*options & DBR_AL_DOUBLE) {
struct dbr_alDouble *pal = (struct dbr_alDouble*) pbuffer;
pal->upper_alarm_limit = ald.upper_alarm_limit;
pal->upper_warning_limit = ald.upper_warning_limit;
pal->lower_warning_limit = ald.lower_warning_limit;
pal->lower_alarm_limit = ald.lower_alarm_limit;
if (no_data)
*options ^= DBR_AL_DOUBLE; /*Turn off option*/
*ppbuffer += dbr_alDouble_size;
}
}
static void getOptions(DBADDR *paddr,char **poriginal,long *options,void *pflin)
@@ -969,7 +963,7 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 1) {
if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -984,8 +978,8 @@ long epicsShareAPI dbGetField(DBADDR *paddr,short dbrType,
if (!status) status = dbFindField(&dbEntry, pfldDes->name);
if (!status) {
rtnString = dbGetString(&dbEntry);
strncpy(pbuf, rtnString, maxlen - 1);
pbuf[maxlen - 1] = 0;
strncpy(pbuf, rtnString, maxlen);
pbuf[maxlen] = 0;
}
dbFinishEntry(&dbEntry);
} else {
@@ -1028,7 +1022,7 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
case DBR_CHAR:
case DBR_UCHAR:
if (nRequest && *nRequest > 1) {
if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -1037,8 +1031,8 @@ long epicsShareAPI dbGet(DBADDR *paddr, short dbrType,
return S_db_badDbrtype;
}
strncpy(pbuf, (char *)paddr->pfield, maxlen - 1);
pbuf[maxlen - 1] = 0;
strncpy(pbuf, (char *)paddr->pfield, maxlen);
pbuf[maxlen] = 0;
return 0;
}
@@ -1442,8 +1436,9 @@ long epicsShareAPI dbPut(DBADDR *paddr, short dbrType,
else
offset = 0;
if (no_elements < nRequest) nRequest = no_elements;
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
if (!status)
status = dbPutConvertRoutine[dbrType][field_type](paddr, pbuffer,
nRequest, no_elements, offset);
/* update array info */
if (!status &&

View File

@@ -59,8 +59,8 @@ static epicsEventId workListEvent; /*wakeup event for dbCaTask*/
static int removesOutstanding = 0;
#define removesOutstandingWarning 10000
static enum {
ctlRun, ctlPause, ctlExit
static volatile enum {
ctlInit, ctlRun, ctlPause, ctlExit
} dbCaCtl;
static epicsEventId startStopEvent;

View File

@@ -416,6 +416,13 @@ static long getCharChar(
char *pbuffer = (char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
/* This is a DBF_STRING field being read as a long string.
* The buffer we return must be zero-terminated.
*/
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -436,6 +443,13 @@ static long getCharUchar(
unsigned char *pbuffer = (unsigned char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
/* This is a DBF_STRING field being read as a long string.
* The buffer we return must be zero-terminated.
*/
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -2586,7 +2600,7 @@ static long putStringEnum(
status = (*prset->get_enum_strs)(paddr,&enumStrs);
if(!status) {
nchoices = enumStrs.no_str;
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nchoices) {
*pfield = ind;
return(0);
@@ -2635,7 +2649,7 @@ static long putStringMenu(
return(0);
}
}
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nChoice) {
*pfield = ind;
return(0);
@@ -2673,7 +2687,7 @@ static long putStringDevice(
return(0);
}
}
nargs = sscanf(pbuffer," %u %n",&ind,&nchars);
nargs = sscanf(pbuffer,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(pbuffer) && ind<nChoice) {
*pfield = ind;
return(0);

View File

@@ -272,7 +272,7 @@ static long cvt_st_e(
status = (*prset->get_enum_strs)(paddr,&enumStrs);
if(!status) {
nchoices = enumStrs.no_str;
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nchoices) {
*pfield = ind;
return(0);
@@ -315,7 +315,7 @@ static long cvt_st_menu(
return(0);
}
}
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nChoice) {
*to = ind;
return(0);
@@ -347,7 +347,7 @@ static long cvt_st_device(
return(0);
}
}
nargs = sscanf(from," %u %n",&ind,&nchars);
nargs = sscanf(from,"%u%n",&ind,&nchars);
if(nargs==1 && nchars==strlen(from) && ind<nChoice) {
*to = ind;
return(0);

View File

@@ -50,12 +50,12 @@
/* Task Control */
enum ctl {ctlRun, ctlPause, ctlExit};
enum ctl {ctlInit, ctlRun, ctlPause, ctlExit};
/* Task Startup/Shutdown Synchronization */
static epicsEventId startStopEvent;
volatile enum ctl scanCtl;
static volatile enum ctl scanCtl;
/* SCAN ONCE */

View File

@@ -317,7 +317,7 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue)
if (nameToAddr(pname, &addr)) return -1;
/* For enumerated types must allow for ENUM rather than string*/
/* If entire field is digits then use DBR_ENUM else DBR_STRING*/
if (addr.dbr_field_type == DBR_ENUM && !*pvalue &&
if (addr.dbr_field_type == DBR_ENUM && *pvalue &&
strspn(pvalue,"0123456789") == strlen(pvalue)) {
unsigned short value;

View File

@@ -21,6 +21,7 @@
#include <limits.h>
#include "dbDefs.h"
#include "epicsMath.h"
#include "epicsTime.h"
#include "epicsPrint.h"
#include "dbBase.h"
@@ -107,64 +108,56 @@ void epicsShareAPI recGblRecSupError(long status, const struct dbAddr *paddr,
return;
}
void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr,long *precision)
void epicsShareAPI recGblGetPrec(const struct dbAddr *paddr, long *precision)
{
dbFldDes *pdbFldDes = paddr->pfldDes;
switch(pdbFldDes->field_type){
case(DBF_SHORT):
*precision = 0;
break;
case(DBF_USHORT):
*precision = 0;
break;
case(DBF_LONG):
*precision = 0;
break;
case(DBF_ULONG):
*precision = 0;
break;
case(DBF_FLOAT):
case(DBF_DOUBLE):
if(*precision<0 || *precision>15) *precision=15;
break;
switch (pdbFldDes->field_type) {
case DBF_CHAR:
case DBF_UCHAR:
case DBF_SHORT:
case DBF_USHORT:
case DBF_LONG:
case DBF_ULONG:
*precision = 0;
break;
case DBF_FLOAT:
case DBF_DOUBLE:
if (*precision < 0 || *precision > 15)
*precision = 15;
break;
default:
break;
}
return;
}
void epicsShareAPI recGblGetGraphicDouble(
const struct dbAddr *paddr,struct dbr_grDouble *pgd)
void epicsShareAPI recGblGetGraphicDouble(const struct dbAddr *paddr,
struct dbr_grDouble *pgd)
{
dbFldDes *pdbFldDes = paddr->pfldDes;
getMaxRangeValues(pdbFldDes->field_type,&pgd->upper_disp_limit,
&pgd->lower_disp_limit);
return;
getMaxRangeValues(pdbFldDes->field_type,
&pgd->upper_disp_limit, &pgd->lower_disp_limit);
}
void epicsShareAPI recGblGetAlarmDouble(
const struct dbAddr *paddr,struct dbr_alDouble *pad)
void epicsShareAPI recGblGetAlarmDouble(const struct dbAddr *paddr,
struct dbr_alDouble *pad)
{
pad->upper_alarm_limit = 0;
pad->upper_warning_limit = 0;
pad->lower_warning_limit = 0;
pad->lower_alarm_limit = 0;
return;
pad->upper_alarm_limit = epicsNAN;
pad->upper_warning_limit = epicsNAN;
pad->lower_warning_limit = epicsNAN;
pad->lower_alarm_limit = epicsNAN;
}
void epicsShareAPI recGblGetControlDouble(
const struct dbAddr *paddr,struct dbr_ctrlDouble *pcd)
void epicsShareAPI recGblGetControlDouble(const struct dbAddr *paddr,
struct dbr_ctrlDouble *pcd)
{
dbFldDes *pdbFldDes=paddr->pfldDes;
dbFldDes *pdbFldDes = paddr->pfldDes;
getMaxRangeValues(pdbFldDes->field_type,&pcd->upper_ctrl_limit,
&pcd->lower_ctrl_limit);
return;
getMaxRangeValues(pdbFldDes->field_type,
&pcd->upper_ctrl_limit, &pcd->lower_ctrl_limit);
}
int epicsShareAPI recGblInitConstantLink(
@@ -319,40 +312,39 @@ static void getMaxRangeValues(short field_type, double *pupper_limit,
double *plower_limit)
{
switch(field_type){
case(DBF_CHAR):
*pupper_limit = -128.0;
*plower_limit = 127.0;
break;
case(DBF_UCHAR):
*pupper_limit = 255.0;
*plower_limit = 0.0;
break;
case(DBF_SHORT):
*pupper_limit = (double)SHRT_MAX;
*plower_limit = (double)SHRT_MIN;
break;
case(DBF_ENUM):
case(DBF_USHORT):
*pupper_limit = (double)USHRT_MAX;
*plower_limit = (double)0;
break;
case(DBF_LONG):
/* long did not work using cast to double */
*pupper_limit = 2147483647.;
*plower_limit = -2147483648.;
break;
case(DBF_ULONG):
*pupper_limit = (double)ULONG_MAX;
*plower_limit = (double)0;
break;
case(DBF_FLOAT):
*pupper_limit = (double)1e+30;
*plower_limit = (double)-1e30;
break;
case(DBF_DOUBLE):
*pupper_limit = (double)1e+30;
*plower_limit = (double)-1e30;
break;
case DBF_CHAR:
*pupper_limit = -128.0;
*plower_limit = 127.0;
break;
case DBF_UCHAR:
*pupper_limit = 255.0;
*plower_limit = 0.0;
break;
case DBF_SHORT:
*pupper_limit = (double) SHRT_MAX;
*plower_limit = (double) SHRT_MIN;
break;
case DBF_ENUM:
case DBF_USHORT:
*pupper_limit = (double) USHRT_MAX;
*plower_limit = 0.0;
break;
case DBF_LONG:
*pupper_limit = 2147483647.0;
*plower_limit = -2147483648.0;
break;
case DBF_ULONG:
*pupper_limit = (double) 0xffffffffU;
*plower_limit = 0.0;
break;
case DBF_FLOAT:
*pupper_limit = 1e30;
*plower_limit = -1e30;
break;
case DBF_DOUBLE:
*pupper_limit = 1e300;
*plower_limit = -1e300;
break;
}
return;
}

View File

@@ -907,43 +907,52 @@ static void dbBreakBody(void)
pgphentry->userPvt = pnewbrkTable;
}
static void dbRecordHead(char *recordType,char *name, int visible)
static void dbRecordHead(char *recordType, char *name, int visible)
{
DBENTRY *pdbentry;
long status;
char *badch;
DBENTRY *pdbentry;
long status;
badch = strpbrk(name, " \"'.$");
if (badch) {
epicsPrintf("Bad character '%c' in record name \"%s\"\n",
*badch, name);
}
pdbentry = dbAllocEntry(pdbbase);
if(ellCount(&tempList))
yyerrorAbort("dbRecordHead: tempList not empty");
if (ellCount(&tempList))
yyerrorAbort("dbRecordHead: tempList not empty");
allocTemp(pdbentry);
status = dbFindRecordType(pdbentry,recordType);
if(status) {
epicsPrintf("Record \"%s\" is of unknown type \"%s\" - ",
status = dbFindRecordType(pdbentry, recordType);
if (status) {
epicsPrintf("Record \"%s\" is of unknown type \"%s\" - ",
name, recordType);
yyerrorAbort(NULL);
return;
yyerrorAbort(NULL);
return;
}
/*Duplicate records ok if the same type */
status = dbCreateRecord(pdbentry,name);
if(status==S_dbLib_recExists) {
if(strcmp(recordType,dbGetRecordTypeName(pdbentry))!=0) {
epicsPrintf("Record %s already defined with different type %s\n",
name, dbGetRecordTypeName(pdbentry));
if (status==S_dbLib_recExists) {
if (strcmp(recordType, dbGetRecordTypeName(pdbentry))!=0) {
epicsPrintf("Record \"%s\" already defined with different type "
"\"%s\"\n", name, dbGetRecordTypeName(pdbentry));
yyerror(NULL);
duplicate = TRUE;
return;
} else if (dbRecordsOnceOnly) {
epicsPrintf("Record \"%s\" already defined (dbRecordsOnceOnly is set)\n",
name);
yyerror(NULL);
duplicate = TRUE;
}
} else if(status) {
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
duplicate = TRUE;
return;
}
else if (dbRecordsOnceOnly) {
epicsPrintf("Record \"%s\" already defined (dbRecordsOnceOnly is "
"set)\n", name);
yyerror(NULL);
duplicate = TRUE;
}
}
if(visible) dbVisibleRecord(pdbentry);
else if (status) {
epicsPrintf("Can't create record \"%s\" of type \"%s\"\n",
name, recordType);
yyerrorAbort(NULL);
}
if (visible)
dbVisibleRecord(pdbentry);
}
static void dbRecordField(char *name,char *value)

View File

@@ -4059,12 +4059,12 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
DBENTRY dbentry;
DBENTRY *pdbentry=&dbentry;
long status;
char busName[40];
char linkValue[40];
char dtypValue[40];
char linkValue[messagesize];
char dtypValue[50];
char cvtValue[40];
int ilink,nlinks;
struct link *plink;
int linkType;
FILE *stream = (report==0) ? stdout : report;
if(!pdbbase) {
@@ -4081,8 +4081,8 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
status = dbGetLinkField(pdbentry,ilink);
if(status || dbGetLinkType(pdbentry)!=DCT_LINK_FORM) continue;
plink = pdbentry->pfield;
strcpy(busName,bus[plink->type]);
if(strlen(busName)==0) continue;
linkType = plink->type;
if(bus[linkType][0]==0) continue;
strcpy(linkValue,dbGetString(pdbentry));
status = dbFindField(pdbentry,"DTYP");
if(status) break;
@@ -4106,7 +4106,7 @@ void epicsShareAPI dbReportDeviceConfig(dbBase *pdbbase,FILE *report)
}
}
fprintf(stream,"%-8s %-20s %-20s %-20s %-s\n",
busName,linkValue,dtypValue,
bus[linkType],linkValue,dtypValue,
dbGetRecordName(pdbentry),cvtValue);
break;
}

View File

@@ -51,11 +51,7 @@ public:
reference ( epicsSingleton & );
reference ( const reference & );
~reference ();
// this somewhat convoluted reference of the return
// type ref through the epicsSingleton template is
// required for the archaic Tornado gnu compiler
typename epicsSingleton < TYPE > :: reference &
operator = ( const reference & );
reference & operator = ( const reference & );
TYPE * operator -> ();
const TYPE * operator -> () const;
TYPE & operator * ();
@@ -106,7 +102,7 @@ inline epicsSingleton < TYPE > :: reference ::
}
template < class TYPE >
typename epicsSingleton < TYPE > :: reference &
class epicsSingleton < TYPE > :: reference &
epicsSingleton < TYPE > :: reference ::
operator = ( const reference & ref )
{
@@ -199,14 +195,14 @@ void epicsSingleton < TYPE > ::
}
template < class TYPE >
inline typename epicsSingleton < TYPE > :: reference
inline class epicsSingleton < TYPE > :: reference
epicsSingleton < TYPE > :: getReference ()
{
return reference ( * this );
}
template < class TYPE >
inline const typename epicsSingleton < TYPE > :: reference
inline const class epicsSingleton < TYPE > :: reference
epicsSingleton < TYPE > :: getReference () const
{
epicsSingleton < TYPE > * pConstCastAway =

View File

@@ -545,10 +545,19 @@ iocshBody (const char *pathname, const char *commandLine)
lineno++;
/*
* Ignore comment lines other than to echo
* them if they came from a script.
* Skip leading white-space
*/
if (*raw == '#') {
icin = 0;
while ((c = raw[icin]) && isspace(c)) {
icin++;
}
/*
* Ignore comment lines other than to echo
* them if they came from a script. This
* avoids macLib errors from comments.
*/
if (c == '#') {
if ((prompt == NULL) && (commandLine == NULL))
puts(raw);
continue;
@@ -562,15 +571,28 @@ iocshBody (const char *pathname, const char *commandLine)
continue;
/*
* Echo commands read from scripts
* Skip leading white-space coming from a macro
*/
while ((c = line[icin]) && isspace(c)) {
icin++;
}
/*
* Echo non-empty lines read from a script
*/
if ((prompt == NULL) && *line && (commandLine == NULL))
puts(line);
/*
* Ignore lines that became a comment or empty after macro expansion
*/
if (!c || c == '#')
continue;
/*
* Break line into words
*/
icout = icin = 0;
icout = 0;
inword = 0;
argc = 0;
quote = EOF;

View File

@@ -94,6 +94,7 @@ epicsShareExtern devLibVME *pdevLibVME;
#ifndef NO_DEVLIB_COMPAT
# define pdevLibVirtualOS pdevLibVME
typedef devLibVME devLibVirtualOS;
#endif

View File

@@ -25,6 +25,7 @@
#include <stdio.h>
#include <assert.h>
#include <syslog.h>
#include <limits.h>
#include <rtems.h>
#include <rtems/error.h>
@@ -364,16 +365,15 @@ epicsThreadSleep (double seconds)
{
rtems_status_code sc;
rtems_interval delay;
extern double rtemsTicksPerTwoSeconds_double;
if (seconds <= 0.0) {
delay = 0;
extern double rtemsTicksPerSecond_double;
if (seconds > 0.0) {
seconds *= rtemsTicksPerSecond_double;
seconds += 0.99999999; /* 8 9s here is optimal */
delay = (seconds >= INT_MAX) ? INT_MAX : (int) seconds;
}
else {
delay = seconds * rtemsTicksPerTwoSeconds_double;
delay = (delay + 1) / 2;
if (delay == 0)
delay++;
else { /* seconds <= 0 or NAN */
delay = 0;
}
sc = rtems_task_wake_after (delay);
if(sc != RTEMS_SUCCESSFUL)

View File

@@ -11,6 +11,11 @@
#include <stdio.h>
#include <stdarg.h>
#ifndef _MSC_VER
/* Older versions of MinGW omitted this prototype from stdio.h */
_CRTIMP int __cdecl __MINGW_NOTHROW _vscprintf (const char*, va_list);
#endif
#define epicsExportSharedSymbols
#include "epicsStdio.h"
@@ -18,26 +23,12 @@ int epicsShareAPI epicsVsnprintf(char *str, size_t len,
const char *fmt, va_list ap)
{
int retval = _vsnprintf(str, len, fmt, ap);
#ifdef _MSC_VER
int needed = _vscprintf(fmt, ap);
if ((int) len < needed + 1) {
str[len - 1] = 0;
return needed;
}
#else
/* Unfortunately MINGW doesn't provide _vscprintf and their
* _vsnprintf follows MS' broken return value semantics.
*/
if (retval == -1) {
if (len)
str[len - 1] = 0;
return len;
} else if (retval == (int) len) {
str[--retval] = 0;
}
#endif
return retval;
}

View File

@@ -446,7 +446,10 @@ epicsShareFunc epicsThreadBooleanStatus epicsShareAPI epicsThreadHighestPriority
epicsShareFunc unsigned int epicsShareAPI
epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
{
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {4000, 6000, 11000};
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
};
if (stackSizeClass<epicsThreadStackSmall) {
fprintf ( stderr,
@@ -776,18 +779,15 @@ epicsShareFunc void epicsShareAPI epicsThreadSleep ( double seconds )
static const unsigned mSecPerSec = 1000;
DWORD milliSecDelay;
if ( seconds <= 0.0 ) {
if ( seconds > 0.0 ) {
seconds *= mSecPerSec;
seconds += 0.99999999; /* 8 9s here is optimal */
milliSecDelay = ( seconds >= INFINITE ) ?
INFINITE - 1 : ( DWORD ) seconds;
}
else { /* seconds <= 0 or NAN */
milliSecDelay = 0u;
}
else if ( seconds >= INFINITE / mSecPerSec ) {
milliSecDelay = INFINITE - 1;
}
else {
milliSecDelay = ( DWORD ) ( ( seconds * mSecPerSec ) + 0.5 );
if ( milliSecDelay == 0 ) {
milliSecDelay = 1;
}
}
Sleep ( milliSecDelay );
}

View File

@@ -189,8 +189,12 @@ epicsReadlineEnd (void *context)
#include <ledLib.h>
#define LEDLIB_LINESIZE 1000
#ifndef _WRS_VXWORKS_MAJOR
typedef int LED_ID;
#endif
struct readlineContext {
int ledId;
LED_ID ledId;
char line[LEDLIB_LINESIZE];
FILE *in;
};
@@ -205,7 +209,7 @@ epicsReadlineBegin(FILE *in)
readlineContext = malloc(sizeof *readlineContext);
if (readlineContext != NULL) {
readlineContext->ledId = ERROR;
readlineContext->ledId = (LED_ID) ERROR;
readlineContext->in = in;
if (in == NULL) {
long i = 50;
@@ -213,7 +217,7 @@ epicsReadlineBegin(FILE *in)
envGetLongConfigParam(&IOCSH_HISTSIZE, &i);
if (i < 1) i = 1;
readlineContext->ledId = ledOpen(fileno(stdin), fileno(stdout), i);
if (readlineContext->ledId == ERROR) {
if (readlineContext->ledId == (LED_ID) ERROR) {
readlineContext->in = stdin;
printf("Warning -- Unabled to allocate space for command-line history.\n");
printf("Warning -- Command-line editting disabled.\n");
@@ -236,7 +240,7 @@ epicsReadline (const char *prompt, void *context)
fputs(prompt, stdout);
fflush(stdout);
}
if (readlineContext->ledId != ERROR) {
if (readlineContext->ledId != (LED_ID) ERROR) {
i = ledRead(readlineContext->ledId, readlineContext->line, LEDLIB_LINESIZE-1);
if (i < 0)
return NULL;
@@ -262,7 +266,7 @@ epicsReadlineEnd (void *context)
struct readlineContext *readlineContext = context;
if (readlineContext) {
if (readlineContext->ledId != ERROR)
if (readlineContext->ledId != (LED_ID) ERROR)
ledClose(readlineContext->ledId);
free(readlineContext);
}

View File

@@ -398,9 +398,6 @@ static void epicsThreadInit(void)
}
#define ARCH_STACK_FACTOR 1024
epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadStackSizeClass stackSizeClass)
{
#if ! defined (_POSIX_THREAD_ATTR_STACKSIZE)
@@ -408,8 +405,10 @@ epicsShareFunc unsigned int epicsShareAPI epicsThreadGetStackSize (epicsThreadSt
#elif defined (OSITHREAD_USE_DEFAULT_STACK)
return 0;
#else
static const unsigned stackSizeTable[epicsThreadStackBig+1] =
{128*ARCH_STACK_FACTOR, 256*ARCH_STACK_FACTOR, 512*ARCH_STACK_FACTOR};
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
static const unsigned stackSizeTable[epicsThreadStackBig+1] = {
STACK_SIZE(1), STACK_SIZE(2), STACK_SIZE(4)
};
if (stackSizeClass<epicsThreadStackSmall) {
errlogPrintf("epicsThreadGetStackSize illegal argument (too small)");
return stackSizeTable[epicsThreadStackBig];
@@ -674,9 +673,15 @@ epicsShareFunc void epicsShareAPI epicsThreadSleep(double seconds)
struct timespec remainingTime;
double nanoseconds;
delayTime.tv_sec = (time_t)seconds;
nanoseconds = (seconds - (double)delayTime.tv_sec) *1e9;
delayTime.tv_nsec = (long)nanoseconds;
if (seconds > 0) {
delayTime.tv_sec = seconds;
nanoseconds = (seconds - delayTime.tv_sec) *1e9;
delayTime.tv_nsec = nanoseconds;
}
else {
delayTime.tv_sec = 0;
delayTime.tv_nsec = 0;
}
while (nanosleep(&delayTime, &remainingTime) == -1 &&
errno == EINTR)
delayTime = remainingTime;

View File

@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <limits.h>
#include <vxWorks.h>
#include <taskLib.h>
@@ -279,11 +280,13 @@ void epicsThreadSleep(double seconds)
STATUS status;
int ticks;
if(seconds<=0.0) {
if (seconds > 0.0) {
seconds *= sysClkRateGet();
seconds += 0.99999999; /* 8 9s here is optimal */
ticks = (seconds >= INT_MAX) ? INT_MAX : (int) seconds;
}
else { /* seconds <= 0 or NAN */
ticks = 0;
} else {
ticks = seconds*sysClkRateGet() + 0.5;
if(ticks<=0) ticks = 1;
}
status = taskDelay(ticks);
if(status) errlogPrintf("epicsThreadSleep\n");

View File

@@ -69,8 +69,8 @@ static epicsMutexId fLock;
static ELLLIST fList = ELLLIST_INIT;
/* Watchdog task control */
static enum {
twdctlRun, twdctlDisable, twdctlExit
static volatile enum {
twdctlInit, twdctlRun, twdctlDisable, twdctlExit
} twdCtl;
static epicsEventId loopEvent;
static epicsEventId exitEvent;

View File

@@ -238,7 +238,7 @@ MAIN(epicsCalcTest)
const double a=1.0, b=2.0, c=3.0, d=4.0, e=5.0, f=6.0,
g=7.0, h=8.0, i=9.0, j=10.0, k=11.0, l=12.0;
testPlan(566);
testPlan(570);
/* LITERAL_OPERAND elements */
testExpr(0);
@@ -325,11 +325,15 @@ MAIN(epicsCalcTest)
testExpr(isinf(NaN));
testExpr(isnan(0));
testExpr(isnan(Inf));
testExpr(isnan(-Inf));
testExpr(isnan(NaN));
testCalc("isnan(0,1,2)", 0);
testCalc("isnan(0,1,NaN)", 1);
testCalc("isnan(0,NaN,2)", 1);
testCalc("isnan(NaN,1,2)", 1);
testCalc("isnan(0,1,Inf)", 0);
testCalc("isnan(0,Inf,2)", 0);
testCalc("isnan(Inf,1,2)", 0);
testCalc("isnan(0,1,-Inf)", 0);
testCalc("isnan(0,-Inf,2)", 0);
testCalc("isnan(-Inf,1,2)", 0);

View File

@@ -85,8 +85,13 @@ void testStdoutRedir (const char *report)
testOk1(stdout == realStdout);
errno = 0;
if (!testOk1(!fclose(stream)))
testDiag("fclose error: %s\n", strerror(errno));
if (!testOk1(!fclose(stream))) {
testDiag("fclose error: %s", strerror(errno));
#ifdef vxWorks
testDiag("The above test fails if you don't cd to a writable directory");
testDiag("before running the test. The next test will also fail...");
#endif
}
if (!testOk1((stream = fopen(report, "r")) != NULL)) {
testDiag("'%s' could not be opened for reading: %s",

View File

@@ -9,6 +9,11 @@
/*
* Authors: Jeff Hill, Marty Kraimer and Andrew Johnson
*/
#ifdef __SUNPRO_CC
using namespace std;
#endif
#include <cstddef>
#include <cstdio>
#include <ctime>
@@ -33,22 +38,17 @@ struct l_fp { /* NTP time stamp */
epicsUInt32 l_uf; /* fractional seconds */
};
epicsTime useSomeCPU;
static const unsigned mSecPerSec = 1000u;
static const unsigned uSecPerSec = 1000u * mSecPerSec;
static const unsigned nSecPerSec = 1000u * uSecPerSec;
static const double precisionEPICS = 1.0 / nSecPerSec;
MAIN(epicsTimeTest)
{
const unsigned wasteTime = 100000u;
const int wasteTime = 100000;
const int nTimes = 10;
const double precisionEPICS = 1.0 / nSecPerSec;
testPlan(15 + nTimes * 18);
const epicsTime begin = epicsTime::getCurrent();
testPlan(16 + nTimes * 18);
{
const epicsTimeStamp epochTS = {0, 0};
@@ -61,16 +61,6 @@ MAIN(epicsTimeTest)
testOk1(epicsEpoch.ansi_tm.tm_year == 90);
}
{
epicsTime tsi = epicsTime::getCurrent ();
l_fp ntp = tsi;
epicsTime tsf = ntp;
const double diff = fabs ( tsf - tsi );
// the difference in the precision of the two time formats
static const double precisionNTP = 1.0 / ( 1.0 + 0xffffffff );
testOk1(diff <= precisionEPICS + precisionNTP);
}
{ // badNanosecTest
static const char * pFormat = "%a %b %d %Y %H:%M:%S.%4f";
try {
@@ -85,7 +75,7 @@ MAIN(epicsTimeTest)
}
}
{
{ // strftime() output
char buf[80];
epicsTime et;
@@ -120,70 +110,87 @@ MAIN(epicsTimeTest)
pFormat = "%%S.%%05f";
et.strftime(buf, sizeof(buf), pFormat);
testOk(strcmp(buf, "%S.%05f") == 0, "'%s' => '%s'", pFormat, buf);
char bigBuf [512];
memset(bigBuf, '\a', sizeof(bigBuf));
bigBuf[ sizeof(bigBuf) - 1] = '\0';
et.strftime(buf, sizeof(buf), bigBuf);
testOk(strcmp(buf, "<invalid format>") == 0, "bad format => '%s'", buf);
}
{ // invalidFormatTest
char bigBuf [512];
char buf [32];
memset(bigBuf, '\a', sizeof(bigBuf ));
bigBuf[ sizeof(bigBuf) - 1] = '\0';
begin.strftime(buf, sizeof(buf), bigBuf);
testOk(strcmp(buf, "<invalid format>") == 0, "bad format => '%s'", buf);
epicsTime now;
try {
now = epicsTime::getCurrent();
testPass("default time provider");
}
catch ( ... ) {
testFail("epicsTime::getCurrent() throws");
testAbort("Can't continue, check your time provider");
}
{
l_fp ntp = now;
epicsTime tsf = ntp;
const double diff = fabs(tsf - now);
// the difference in the precision of the two time formats
static const double precisionNTP = 1.0 / (1.0 + 0xffffffff);
testOk1(diff <= precisionEPICS + precisionNTP);
}
testDiag("Running %d loops", nTimes);
for (int iTimes=0; iTimes < nTimes; ++iTimes) {
for (unsigned i=0; i<wasteTime; i++) {
useSomeCPU = epicsTime::getCurrent();
const epicsTime begin = epicsTime::getCurrent();
for (int loop = 0; loop < nTimes; ++loop) {
for (int i = 0; i < wasteTime; ++i) {
now = epicsTime::getCurrent();
}
const epicsTime end = epicsTime::getCurrent();
const double diff = end - begin;
const double diff = now - begin;
if (iTimes == 0) {
if (loop == 0) {
testDiag ("%d calls to epicsTime::getCurrent() "
"averaged %6.3f usec each", wasteTime,
diff*1e6/wasteTime);
diff * 1e6 / wasteTime);
}
epicsTime copy = end;
testOk1(copy == end);
testOk1(copy <= end);
testOk1(copy >= end);
epicsTime copy = now;
testOk1(copy == now);
testOk1(copy <= now);
testOk1(copy >= now);
testOk1(end > begin);
testOk1(end >= begin);
testOk1(begin != end);
testOk1(begin < end);
testOk1(begin <= end);
testOk1(now > begin);
testOk1(now >= begin);
testOk1(begin != now);
testOk1(begin < now);
testOk1(begin <= now);
testOk1(end - end == 0);
testOk(fabs((end - begin) - diff) < precisionEPICS * 0.01,
"end - begin ~= diff");
testOk1(now - now == 0);
testOk(fabs((now - begin) - diff) < precisionEPICS * 0.01,
"now - begin ~= diff");
testOk1(begin + 0 == begin);
testOk1(begin + diff == end);
testOk1(end - 0 == end);
testOk1(end - diff == begin);
testOk1(begin + diff == now);
testOk1(now - 0 == now);
testOk1(now - diff == begin);
epicsTime end2 = begin;
end2 += diff;
testOk(end2 == end, "(begin += diff) == end");
epicsTime end = begin;
end += diff;
testOk(end == now, "(begin += diff) == now");
end2 = end;
end2 -= diff;
testOk(end2 == begin, "(end -= diff) == begin");
end = now;
end -= diff;
testOk(end == begin, "(now -= diff) == begin");
// test struct tm round-trip conversion
local_tm_nano_sec ansiDate = begin;
epicsTime beginANSI = ansiDate;
testOk1(beginANSI + diff == end);
testOk1(beginANSI + diff == now);
// test struct timespec round-trip conversion
struct timespec ts = begin;
epicsTime beginTS = ts;
testOk1(beginTS + diff == end);
testOk1(beginTS + diff == now);
}
return testDone();

View File

@@ -21,10 +21,10 @@ $app_top = cwd();
$bad_ident_chars = '[^0-9A-Za-z_]';
&GetUser; # Ensure we know who's in charge
&readReleaseFiles("configure/RELEASE", \%release, \@apps);
&expandRelease(\%release);
&get_commandline_opts; # Check command-line options
&GetUser; # Ensure we know who's in charge
#
# Declare two default callback routines for file copy plus two
@@ -164,7 +164,7 @@ exit 0; # END OF SCRIPT
# Get commandline options and check for validity
#
sub get_commandline_opts { #no args
getopts("a:b:dhilp:T:t:") or Cleanup(1);
getopts("a:b:dhilp:T:t:u:") or Cleanup(1);
# Options help
Cleanup(0) if $opt_h;
@@ -395,7 +395,7 @@ EOF
-d Enable debug messages
-i Specifies that ioc boot directories will be generated
-l List valid application types for this installation
If this is specified the other options are not used
If this is specified the other options are not used
-p app Set the application name for use with -i
If not specified, you will be prompted
-T top Set the template top directory (where the application templates are)
@@ -405,6 +405,7 @@ EOF
-t type Set the application type (-l for a list of valid types)
If not specified, type is taken from environment
If not found in environment, \"default\" is used
-u user Set username; overrides OS defaults
Environment:
EPICS_MBA_DEF_APP_TYPE Application type you want to use as default
@@ -419,10 +420,7 @@ EOF
}
sub GetUser {
# add to this list if new possibilities arise,
# currently it's UNIX and WIN32:
$user = $ENV{USER} || $ENV{USERNAME} || Win32::LoginName();
$user =~ s/\s+//g; # Bl**dy Windows stupidity...
$user = $opt_u || $ENV{USER} || $ENV{USERNAME} || Win32::LoginName();
unless ($user) {
print "Strange, I cannot figure out your user name!\n";
@@ -430,5 +428,6 @@ sub GetUser {
$user = <STDIN>;
chomp $user;
}
$user =~ tr/-a-zA-Z0-9_:;[]<>//cd; # Sanitize; these are the legal chars
die "No user name" unless $user;
}

View File

@@ -1,7 +1,9 @@
/*caMonitor.c*/
/* This example accepts a file containing a list of pvs to monitor
* It prints a message for all ca evemts: connection, access rights, data
/* This example accepts the name of a file containing a list of pvs to monitor.
* It prints a message for all ca events: connection, access rights and monitor.
*/
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
@@ -110,18 +112,18 @@ int main(int argc,char **argv)
SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create");
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
"ca_add_exception_event");
for(i=0; i<npv; i++) {
for (i=0; i<npv; i++) {
SEVCHK(ca_create_channel(pname[i],connectionCallback,
pmynode[i],20,&pmynode[i]->mychid),
"ca_create_channel");
SEVCHK(ca_replace_access_rights_event(pmynode[i]->mychid,
accessRightsCallback),
"ca_replace_access_rights_event");
SEVCHK(ca_add_event(DBR_STRING,pmynode[i]->mychid,eventCallback,
pmynode[i],&pmynode[i]->myevid),
"ca_add_event");
SEVCHK(ca_create_subscription(DBR_STRING,1,pmynode[i]->mychid,
DBE_VALUE,eventCallback,pmynode[i],&pmynode[i]->myevid),
"ca_create_subscription");
}
/*Should never return from following call*/
SEVCHK(ca_pend_event(0.0),"ca_pend_event");
return(0);
return 0;
}

View File

@@ -28,9 +28,9 @@ PYTHON_INCLUDE=/System/Library/Frameworks/Python.framework/Versions/2.3/include/
# XDarwin
#
X11_LIB=/usr/X11R6/lib
X11_INC=/usr/X11R6/include/X11
X11_INC=/usr/X11R6/include
XPM_LIB=/usr/X11R6/lib
XPM_INC=/usr/X11R6/include/X11
XPM_INC=/usr/X11R6/include
#
# Fink OpenMotif

View File

@@ -85,13 +85,12 @@ rset aSubRSET = {
epicsExportAddress(rset, aSubRSET);
static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne,
const char **fldnames, void **pval, void **povl);
epicsUInt32 *pon, const char **fldnames, void **pval, void **povl);
static long fetch_values(aSubRecord *prec);
static void monitor(aSubRecord *);
static long do_sub(aSubRecord *);
#define NUM_ARGS 21
#define MAX_ARRAY_SIZE 10000000
/* These are the names of the Input fields */
static const char *Ifldnames[] = {
@@ -117,10 +116,10 @@ static long init_record(aSubRecord *prec, int pass)
status = 0;
if (pass == 0) {
/* Allocate memory for arrays */
initFields(&prec->fta, &prec->noa, &prec->nea, Ifldnames,
&prec->a, NULL);
initFields(&prec->ftva, &prec->nova, &prec->neva, Ofldnames,
&prec->vala, &prec->ovla);
initFields(&prec->fta, &prec->noa, &prec->nea, NULL,
Ifldnames, &prec->a, NULL);
initFields(&prec->ftva, &prec->nova, &prec->neva, &prec->onva,
Ofldnames, &prec->vala, &prec->ovla);
return 0;
}
@@ -146,12 +145,8 @@ static long init_record(aSubRecord *prec, int pass)
struct link *plink = &(&prec->inpa)[i];
switch (plink->type) {
case CONSTANT:
if ((&prec->noa)[i] < 2) {
if (recGblInitConstantLink(plink, (&prec->fta)[i], (&prec->a)[i])) {
prec->udf = FALSE;
} else
prec->udf = TRUE;
}
if ((&prec->noa)[i] < 2)
recGblInitConstantLink(plink, (&prec->fta)[i], (&prec->a)[i]);
break;
case PV_LINK:
@@ -218,7 +213,7 @@ static long init_record(aSubRecord *prec, int pass)
static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne,
const char **fldnames, void **pval, void **povl)
epicsUInt32 *pon, const char **fldnames, void **pval, void **povl)
{
int i;
long status = 0;
@@ -235,22 +230,16 @@ static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne,
flen = dbValueSize(*pft);
num = *pno * flen;
if (num > MAX_ARRAY_SIZE) {
epicsPrintf("Link %s - Array too large! %d Bytes\n", fldnames[i], num);
*pno = num = 0;
status = S_db_errArg;
} else
*pval = (char *)callocMustSucceed(*pno, flen,
"aSubRecord::init_record");
*pval = callocMustSucceed(*pno, flen, "aSubRecord::init_record");
*pne = *pno;
if (povl) {
if (num)
*povl = (char *)callocMustSucceed(*pno, flen,
*povl = callocMustSucceed(*pno, flen,
"aSubRecord::init_record");
povl++;
*pon++ = *pne;
}
}
return status;
@@ -281,6 +270,7 @@ static long process(aSubRecord *prec)
/* Push the output link values */
if (!status) {
int i;
for (i = 0; i < NUM_ARGS; i++)
dbPutLink(&(&prec->outa)[i], (&prec->ftva)[i], (&prec->vala)[i],
(&prec->neva)[i]);
@@ -359,18 +349,29 @@ static void monitor(aSubRecord *prec)
break;
case aSubEFLG_ON_CHANGE:
for (i = 0; i < NUM_ARGS; i++) {
epicsUInt32 alen = dbValueSize((&prec->ftva)[i]) * (&prec->neva)[i];
void *povl = (&prec->ovla)[i];
void *pval = (&prec->vala)[i];
if (memcmp(povl, pval, alen)) {
epicsUInt32 *ponv = &(&prec->onva)[i];
epicsUInt32 *pnev = &(&prec->neva)[i];
epicsUInt32 onv = *ponv; /* Num Elements in OVLx */
epicsUInt32 nev = *pnev; /* Num Elements in VALx */
epicsUInt32 alen = dbValueSize((&prec->ftva)[i]) * nev;
if (nev != onv || memcmp(povl, pval, alen)) {
memcpy(povl, pval, alen);
db_post_events(prec, pval, monitor_mask);
if (nev != onv) {
*ponv = nev;
db_post_events(prec, pnev, monitor_mask);
}
}
}
break;
case aSubEFLG_ALWAYS:
for (i = 0; i < NUM_ARGS; i++)
for (i = 0; i < NUM_ARGS; i++) {
db_post_events(prec, (&prec->vala)[i], monitor_mask);
db_post_events(prec, &(&prec->neva)[i], monitor_mask);
}
break;
}
return;

View File

@@ -1049,127 +1049,148 @@ recordtype(aSub) {
prompt("Old Output A")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovla")
interest(4)
extra("void *ovla")
}
field(OVLB,DBF_NOACCESS) {
prompt("Old Output B")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlb")
interest(4)
extra("void *ovlb")
}
field(OVLC,DBF_NOACCESS) {
prompt("Old Output C")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlc")
interest(4)
extra("void *ovlc")
}
field(OVLD,DBF_NOACCESS) {
prompt("Old Output D")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovld")
interest(4)
extra("void *ovld")
}
field(OVLE,DBF_NOACCESS) {
prompt("Old Output E")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovle")
interest(4)
extra("void *ovle")
}
field(OVLF,DBF_NOACCESS) {
prompt("Old Output F")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlf")
interest(4)
extra("void *ovlf")
}
field(OVLG,DBF_NOACCESS) {
prompt("Old Output G")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlg")
interest(4)
extra("void *ovlg")
}
field(OVLH,DBF_NOACCESS) {
prompt("Old Output H")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlh")
interest(4)
extra("void *ovlh")
}
field(OVLI,DBF_NOACCESS) {
prompt("Old Output I")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovli")
interest(4)
extra("void *ovli")
}
field(OVLJ,DBF_NOACCESS) {
prompt("Old Output J")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlj")
interest(4)
extra("void *ovlj")
}
field(OVLK,DBF_NOACCESS) {
prompt("Old Output K")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlk")
interest(4)
extra("void *ovlk")
}
field(OVLL,DBF_NOACCESS) {
prompt("Old Output L")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovll")
interest(4)
extra("void *ovll")
}
field(OVLM,DBF_NOACCESS) {
prompt("Old Output M")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlm")
interest(4)
extra("void *ovlm")
}
field(OVLN,DBF_NOACCESS) {
prompt("Old Output N")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovln")
interest(4)
extra("void *ovln")
}
field(OVLO,DBF_NOACCESS) {
prompt("Old Output O")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlo")
interest(4)
extra("void *ovlo")
}
field(OVLP,DBF_NOACCESS) {
prompt("Old Output P")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlp")
interest(4)
extra("void *ovlp")
}
field(OVLQ,DBF_NOACCESS) {
prompt("Old Output Q")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlq")
interest(4)
extra("void *ovlq")
}
field(OVLR,DBF_NOACCESS) {
prompt("Old Output R")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlr")
interest(4)
extra("void *ovlr")
}
field(OVLS,DBF_NOACCESS) {
prompt("Old Output S")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovls")
interest(4)
extra("void *ovls")
}
field(OVLT,DBF_NOACCESS) {
prompt("Old Output T")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlt")
interest(4)
extra("void *ovlt")
}
field(OVLU,DBF_NOACCESS) {
prompt("Old Output U")
asl(ASL0)
special(SPC_NOMOD)
interest(4) extra("void *ovlu")
interest(4)
extra("void *ovlu")
}
field(FTVA,DBF_MENU) {
prompt("Type of VALA")
@@ -1488,149 +1509,254 @@ recordtype(aSub) {
}
field(NEVA,DBF_ULONG) {
prompt("Num. elements in VALA")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVB,DBF_ULONG) {
prompt("Num. elements in VALB")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVC,DBF_ULONG) {
prompt("Num. elements in VALC")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVD,DBF_ULONG) {
prompt("Num. elements in VALD")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVE,DBF_ULONG) {
prompt("Num. elements in VALE")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVF,DBF_ULONG) {
prompt("Num. elements in VALF")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVG,DBF_ULONG) {
prompt("Num. elements in VALG")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVH,DBF_ULONG) {
prompt("Num. elements in VAlH")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVI,DBF_ULONG) {
prompt("Num. elements in VALI")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVJ,DBF_ULONG) {
prompt("Num. elements in VALJ")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVK,DBF_ULONG) {
prompt("Num. elements in VALK")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVL,DBF_ULONG) {
prompt("Num. elements in VALL")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVM,DBF_ULONG) {
prompt("Num. elements in VALM")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVN,DBF_ULONG) {
prompt("Num. elements in VALN")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVO,DBF_ULONG) {
prompt("Num. elements in VALO")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVP,DBF_ULONG) {
prompt("Num. elements in VALP")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVQ,DBF_ULONG) {
prompt("Num. elements in VALQ")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVR,DBF_ULONG) {
prompt("Num. elements in VALR")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVS,DBF_ULONG) {
prompt("Num. elements in VALS")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVT,DBF_ULONG) {
prompt("Num. elements in VALT")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(NEVU,DBF_ULONG) {
prompt("Num. elements in VALU")
promptgroup(GUI_WAVE)
special(SPC_NOMOD)
interest(3)
initial("1")
}
field(ONVA,DBF_ULONG) {
prompt("Num. elements in OVLA")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVB,DBF_ULONG) {
prompt("Num. elements in OVLB")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVC,DBF_ULONG) {
prompt("Num. elements in OVLC")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVD,DBF_ULONG) {
prompt("Num. elements in OVLD")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVE,DBF_ULONG) {
prompt("Num. elements in OVLE")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVF,DBF_ULONG) {
prompt("Num. elements in OVLF")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVG,DBF_ULONG) {
prompt("Num. elements in OVLG")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVH,DBF_ULONG) {
prompt("Num. elements in VAlH")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVI,DBF_ULONG) {
prompt("Num. elements in OVLI")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVJ,DBF_ULONG) {
prompt("Num. elements in OVLJ")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVK,DBF_ULONG) {
prompt("Num. elements in OVLK")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVL,DBF_ULONG) {
prompt("Num. elements in OVLL")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVM,DBF_ULONG) {
prompt("Num. elements in OVLM")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVN,DBF_ULONG) {
prompt("Num. elements in OVLN")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVO,DBF_ULONG) {
prompt("Num. elements in OVLO")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVP,DBF_ULONG) {
prompt("Num. elements in OVLP")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVQ,DBF_ULONG) {
prompt("Num. elements in OVLQ")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVR,DBF_ULONG) {
prompt("Num. elements in OVLR")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVS,DBF_ULONG) {
prompt("Num. elements in OVLS")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVT,DBF_ULONG) {
prompt("Num. elements in OVLT")
special(SPC_NOMOD)
interest(4)
initial("1")
}
field(ONVU,DBF_ULONG) {
prompt("Num. elements in OVLU")
special(SPC_NOMOD)
interest(4)
initial("1")
}
}

View File

@@ -385,7 +385,7 @@ static void monitor(aiRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -395,7 +395,7 @@ static void monitor(aiRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -484,7 +484,7 @@ static void monitor(aoRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -493,7 +493,7 @@ static void monitor(aoRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -310,7 +310,7 @@ static void monitor(calcRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if (delta < 0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -319,7 +319,7 @@ static void monitor(calcRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if (delta < 0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -209,7 +209,7 @@ static long init_record(calcoutRecord *prec, int pass)
static long process(calcoutRecord *prec)
{
rpvtStruct *prpvt = prec->rpvt;
int doOutput = 0;
int doOutput;
if (!prec->pact) {
prec->pact = TRUE;
@@ -231,27 +231,29 @@ static long process(calcoutRecord *prec)
doOutput = 1;
break;
case calcoutOOPT_On_Change:
if (fabs(prec->pval - prec->val) > prec->mdel) doOutput = 1;
doOutput = ! (fabs(prec->pval - prec->val) <= prec->mdel);
break;
case calcoutOOPT_Transition_To_Zero:
if ((prec->pval != 0.0) && (prec->val == 0.0)) doOutput = 1;
doOutput = ((prec->pval != 0.0) && (prec->val == 0.0));
break;
case calcoutOOPT_Transition_To_Non_zero:
if ((prec->pval == 0.0) && (prec->val != 0.0)) doOutput = 1;
doOutput = ((prec->pval == 0.0) && (prec->val != 0.0));
break;
case calcoutOOPT_When_Zero:
if (prec->val == 0.0) doOutput = 1;
doOutput = (prec->val == 0.0);
break;
case calcoutOOPT_When_Non_zero:
if (prec->val != 0.0) doOutput = 1;
doOutput = (prec->val != 0.0);
break;
default:
doOutput = 0;
break;
}
prec->pval = prec->val;
if (doOutput) {
if (prec->odly > 0.0) {
prec->dlya = 1;
recGblGetTimeStamp(prec);
db_post_events(prec, &prec->dlya, DBE_VALUE);
callbackRequestProcessCallbackDelayed(&prpvt->doOutCb,
prec->prio, prec, (double)prec->odly);
@@ -263,9 +265,11 @@ static long process(calcoutRecord *prec)
prec->pact = TRUE;
}
}
recGblGetTimeStamp(prec);
} else { /* pact == TRUE */
if (prec->dlya) {
prec->dlya = 0;
recGblGetTimeStamp(prec);
db_post_events(prec, &prec->dlya, DBE_VALUE);
/* Make pact FALSE for asynchronous device support*/
prec->pact = FALSE;
@@ -274,9 +278,9 @@ static long process(calcoutRecord *prec)
prec->pact = TRUE;
} else {/*Device Support is asynchronous*/
writeValue(prec);
recGblGetTimeStamp(prec);
}
}
recGblGetTimeStamp(prec);
monitor(prec);
recGblFwdLink(prec);
prec->pact = FALSE;
@@ -581,7 +585,7 @@ static void monitor(calcoutRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if (delta<0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -590,7 +594,7 @@ static void monitor(calcoutRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if (delta<0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -267,7 +267,7 @@ static void monitor(dfanoutRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if(delta<0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -276,7 +276,7 @@ static void monitor(dfanoutRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if(delta<0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -300,7 +300,7 @@ static void monitor(selRecord *prec)
/* check for value change */
delta = prec->mlst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -309,7 +309,7 @@ static void monitor(selRecord *prec)
/* check for archive change */
delta = prec->alst - prec->val;
if(delta<0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -90,8 +90,6 @@ typedef struct callbackSeq {
int index;
}callbackSeq;
int processNextLink();
/*****************************************************************************
*
@@ -327,7 +325,9 @@ static long asyncFinish(seqRecord *prec)
if (seqRecDebug > 5)
printf("asyncFinish(%s) completing processing\n", prec->name);
prec->udf = FALSE;
recGblGetTimeStamp(prec);
MonitorMask = recGblResetAlarms(prec);
if (MonitorMask)
@@ -336,8 +336,6 @@ static long asyncFinish(seqRecord *prec)
/* process the forward scan link record */
recGblFwdLink(prec);
recGblGetTimeStamp(prec);
/* tsLocalTime(&prec->time); */
prec->pact = FALSE;
return(0);
@@ -377,6 +375,8 @@ static void processCallback(CALLBACK *arg)
dbGetLink(&(pcb->plinks[pcb->index]->dol), DBR_DOUBLE,
&(pcb->plinks[pcb->index]->dov),0,0);
recGblGetTimeStamp(prec);
/* Dump the value to the destination field */
dbPutLink(&(pcb->plinks[pcb->index]->lnk), DBR_DOUBLE,
&(pcb->plinks[pcb->index]->dov),1);

View File

@@ -156,20 +156,20 @@ static long process(stringinRecord *prec)
static void monitor(stringinRecord *prec)
{
unsigned short monitor_mask;
int monitor_mask = recGblResetAlarms(prec);
monitor_mask = recGblResetAlarms(prec);
if(strcmp(prec->oval,prec->val)) {
monitor_mask |= DBE_VALUE|DBE_LOG;
strcpy(prec->oval,prec->val);
if (strncmp(prec->oval, prec->val, sizeof(prec->val))) {
monitor_mask |= DBE_VALUE | DBE_LOG;
strncpy(prec->oval, prec->val, sizeof(prec->val));
}
if (prec->mpst == stringinPOST_Always)
monitor_mask |= DBE_VALUE;
monitor_mask |= DBE_VALUE;
if (prec->apst == stringinPOST_Always)
monitor_mask |= DBE_LOG;
if(monitor_mask)
db_post_events(prec,&(prec->val[0]),monitor_mask);
return;
monitor_mask |= DBE_LOG;
if (monitor_mask)
db_post_events(prec, prec->val, monitor_mask);
}
static long readValue(stringinRecord *prec)

View File

@@ -184,20 +184,20 @@ static long process(stringoutRecord *prec)
static void monitor(stringoutRecord *prec)
{
unsigned short monitor_mask;
int monitor_mask = recGblResetAlarms(prec);
monitor_mask = recGblResetAlarms(prec);
if(strcmp(prec->oval,prec->val)) {
monitor_mask |= DBE_VALUE|DBE_LOG;
strcpy(prec->oval,prec->val);
if (strncmp(prec->oval, prec->val, sizeof(prec->val))) {
monitor_mask |= DBE_VALUE | DBE_LOG;
strncpy(prec->oval, prec->val, sizeof(prec->val));
}
if (prec->mpst == stringoutPOST_Always)
monitor_mask |= DBE_VALUE;
monitor_mask |= DBE_VALUE;
if (prec->apst == stringoutPOST_Always)
monitor_mask |= DBE_LOG;
if(monitor_mask)
db_post_events(prec,&(prec->val[0]),monitor_mask);
return;
monitor_mask |= DBE_LOG;
if (monitor_mask)
db_post_events(prec, prec->val, monitor_mask);
}
static long writeValue(stringoutRecord *prec)

View File

@@ -353,7 +353,7 @@ static void monitor(subRecord *prec)
/* check for value change */
delta = prec->val - prec->mlst;
if (delta < 0.0) delta = -delta;
if (delta > prec->mdel) {
if (!(delta <= prec->mdel)) { /* Handles MDEL == NAN */
/* post events for value change */
monitor_mask |= DBE_VALUE;
/* update last value monitored */
@@ -362,7 +362,7 @@ static void monitor(subRecord *prec)
/* check for archive change */
delta = prec->val - prec->alst;
if (delta < 0.0) delta = -delta;
if (delta > prec->adel) {
if (!(delta <= prec->adel)) { /* Handles ADEL == NAN */
/* post events on value field for archive change */
monitor_mask |= DBE_LOG;
/* update last archive value monitored */

View File

@@ -13,8 +13,6 @@
* Date: 2004-03-19
*/
#include "dbBase.h"
#include "shareLib.h"
#include "errlog.h"
#define epicsExportSharedSymbols
@@ -24,16 +22,16 @@
void epicsShareAPI registerRecordTypes(DBBASE *pbase, int nRecordTypes,
const char* const* recordTypeNames, const recordTypeLocation *rtl)
const char * const *recordTypeNames, const recordTypeLocation *rtl)
{
int i;
for(i=0; i< nRecordTypes; i++) {
for (i = 0; i < nRecordTypes; i++) {
recordTypeLocation *precordTypeLocation;
computeSizeOffset sizeOffset;
DBENTRY dbEntry;
if(registryRecordTypeFind(recordTypeNames[i])) continue;
if(!registryRecordTypeAdd(recordTypeNames[i],&rtl[i])) {
if (registryRecordTypeFind(recordTypeNames[i])) continue;
if (!registryRecordTypeAdd(recordTypeNames[i], &rtl[i])) {
errlogPrintf("registryRecordTypeAdd failed %s\n",
recordTypeNames[i]);
continue;
@@ -41,7 +39,7 @@ void epicsShareAPI registerRecordTypes(DBBASE *pbase, int nRecordTypes,
dbInitEntry(pbase,&dbEntry);
precordTypeLocation = registryRecordTypeFind(recordTypeNames[i]);
sizeOffset = precordTypeLocation->sizeOffset;
if(dbFindRecordType(&dbEntry,recordTypeNames[i])) {
if (dbFindRecordType(&dbEntry, recordTypeNames[i])) {
errlogPrintf("registerRecordDeviceDriver failed %s\n",
recordTypeNames[i]);
} else {
@@ -51,12 +49,12 @@ void epicsShareAPI registerRecordTypes(DBBASE *pbase, int nRecordTypes,
}
void epicsShareAPI registerDevices(DBBASE *pbase, int nDevices,
const char* const* deviceSupportNames, const dset* const* devsl)
const char * const *deviceSupportNames, const dset * const *devsl)
{
int i;
for(i=0; i< nDevices; i++) {
if(registryDeviceSupportFind(deviceSupportNames[i])) continue;
if(!registryDeviceSupportAdd(deviceSupportNames[i],devsl[i])) {
for (i = 0; i < nDevices; i++) {
if (registryDeviceSupportFind(deviceSupportNames[i])) continue;
if (!registryDeviceSupportAdd(deviceSupportNames[i], devsl[i])) {
errlogPrintf("registryDeviceSupportAdd failed %s\n",
deviceSupportNames[i]);
continue;
@@ -65,12 +63,12 @@ void epicsShareAPI registerDevices(DBBASE *pbase, int nDevices,
}
void epicsShareAPI registerDrivers(DBBASE *pbase, int nDrivers,
const char* const* driverSupportNames, struct drvet* const* drvsl)
const char * const * driverSupportNames, struct drvet * const *drvsl)
{
int i;
for(i=0; i< nDrivers; i++) {
if(registryDriverSupportFind(driverSupportNames[i])) continue;
if(!registryDriverSupportAdd(driverSupportNames[i], drvsl[i])) {
for (i = 0; i < nDrivers; i++) {
if (registryDriverSupportFind(driverSupportNames[i])) continue;
if (!registryDriverSupportAdd(driverSupportNames[i], drvsl[i])) {
errlogPrintf("registryDriverSupportAdd failed %s\n",
driverSupportNames[i]);
continue;

View File

@@ -7,7 +7,8 @@
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* registryCommon.h */
#ifndef INC_registryCommon_H
#define INC_registryCommon_H
#include "dbStaticLib.h"
#include "registryRecordType.h"
@@ -19,14 +20,16 @@ extern "C" {
epicsShareFunc void epicsShareAPI registerRecordTypes(
DBBASE *pbase, int nRecordTypes,
const char* const* recordTypeNames, const recordTypeLocation *rtl);
const char * const *recordTypeNames, const recordTypeLocation *rtl);
epicsShareFunc void epicsShareAPI registerDevices(
DBBASE *pbase, int nDevices,
const char* const* deviceSupportNames, const dset* const* devsl);
const char * const *deviceSupportNames, const dset * const *devsl);
epicsShareFunc void epicsShareAPI registerDrivers(
DBBASE *pbase, int nDrivers,
const char* const* driverSupportNames, struct drvet* const* drvsl);
const char * const *driverSupportNames, struct drvet * const *drvsl);
#ifdef __cplusplus
}
#endif
#endif /* INC_registryCommon_H */

View File

@@ -1,38 +1,30 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* registryDeviceSupport.c */
/* Author: Marty Kraimer Date: 08JUN99 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include "dbBase.h"
#include "devSup.h"
#define epicsExportSharedSymbols
#include "registry.h"
#include "registryDeviceSupport.h"
const char *deviceSupport = "device support";
static void *registryID = (void *)&deviceSupport;
static void *registryID = "device support";
epicsShareFunc int epicsShareAPI registryDeviceSupportAdd(
const char *name,const struct dset *pdset)
const char *name, const struct dset *pdset)
{
return(registryAdd(registryID,name,(void *)pdset));
return registryAdd(registryID, name, (void *)pdset);
}
epicsShareFunc struct dset * epicsShareAPI registryDeviceSupportFind(
const char *name)
{
return((struct dset *)registryFind(registryID,name));
return registryFind(registryID, name);
}

View File

@@ -7,18 +7,18 @@
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef INCregistryDeviceSupporth
#define INCregistryDeviceSupporth
#ifndef INC_registryDeviceSupport_H
#define INC_registryDeviceSupport_H
#include "shareLib.h"
#include "devSup.h"
#include "shareLib.h"
#ifdef __cplusplus
extern "C" {
#endif
epicsShareFunc int epicsShareAPI registryDeviceSupportAdd(
const char *name,const struct dset *pdset);
const char *name, const struct dset *pdset);
epicsShareFunc struct dset * epicsShareAPI registryDeviceSupportFind(
const char *name);
@@ -27,4 +27,4 @@ epicsShareFunc struct dset * epicsShareAPI registryDeviceSupportFind(
#endif
#endif /* INCregistryDeviceSupporth */
#endif /* INC_registryDeviceSupport_H */

View File

@@ -1,38 +1,30 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* registryDriverSupport.c */
/* Author: Marty Kraimer Date: 08JUN99 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include "dbBase.h"
#include "drvSup.h"
#define epicsExportSharedSymbols
#include "registry.h"
#include "registryDriverSupport.h"
const char *driverSupport = "driver support";
static void *registryID = (void *)&driverSupport;
static void *registryID = "driver support";
epicsShareFunc int epicsShareAPI registryDriverSupportAdd(
const char *name,struct drvet *pdrvet)
const char *name, struct drvet *pdrvet)
{
return(registryAdd(registryID,name,(void *)pdrvet));
return registryAdd(registryID, name, pdrvet);
}
epicsShareFunc struct drvet * epicsShareAPI registryDriverSupportFind(
const char *name)
{
return((struct drvet *)registryFind(registryID,name));
return registryFind(registryID, name);
}

View File

@@ -7,19 +7,18 @@
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef INCregistryDriverSupporth
#define INCregistryDriverSupporth
#ifndef INC_registryDriverSupport_H
#define INC_registryDriverSupport_H
#include "shareLib.h"
#include "drvSup.h"
#include "shareLib.h"
#ifdef __cplusplus
extern "C" {
#endif
/* c interface definitions */
epicsShareFunc int epicsShareAPI registryDriverSupportAdd(
const char *name,struct drvet *pdrvet);
const char *name, struct drvet *pdrvet);
epicsShareFunc struct drvet * epicsShareAPI registryDriverSupportFind(
const char *name);
@@ -28,4 +27,4 @@ epicsShareFunc struct drvet * epicsShareAPI registryDriverSupportFind(
#endif
#endif /* INCregistryDriverSupporth */
#endif /* INC_registryDriverSupport_H */

View File

@@ -1,58 +1,53 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* registryFunction.c */
/* Author: Marty Kraimer Date: 01MAY2000 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#define epicsExportSharedSymbols
#include "registry.h"
#include "registryFunction.h"
const char *function = "function";
static void *registryID = (void *)&function;
static void * const registryID = "function";
epicsShareFunc int epicsShareAPI registryFunctionAdd(
const char *name,REGISTRYFUNCTION func)
const char *name, REGISTRYFUNCTION func)
{
return(registryAdd(registryID,name,(void *)func));
return registryAdd(registryID, name, func);
}
epicsShareFunc REGISTRYFUNCTION epicsShareAPI registryFunctionFind(
const char *name)
{
REGISTRYFUNCTION func;
func = (REGISTRYFUNCTION)registryFind(registryID,name);
if(!func) {
func = (REGISTRYFUNCTION)registryFind(0,name);
if(func)registryFunctionAdd(name,func);
REGISTRYFUNCTION func = registryFind(registryID, name);
if (!func) {
func = registryFind(0, name);
if (func) registryFunctionAdd(name, func);
}
return(func);
return func;
}
epicsShareFunc int epicsShareAPI registryFunctionRefAdd(
registryFunctionRef ref[],int nfunctions)
registryFunctionRef ref[], int nfunctions)
{
int ind;
int i;
for(ind=0; ind<nfunctions; ind++) {
if(!registryFunctionAdd(ref[ind].name,ref[ind].addr)) {
for (i = 0; i < nfunctions; i++) {
if (!registryFunctionAdd(ref[i].name, ref[i].addr)) {
printf("registryFunctionRefAdd: could not register %s\n",
ref[ind].name);
return(0);
ref[i].name);
return 0;
}
}
return(1);
return 1;
}

View File

@@ -1,14 +1,14 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef INCregistryFunctionh
#define INCregistryFunctionh
#ifndef INC_registryFunction_H
#define INC_registryFunction_H
#include "shareLib.h"
@@ -19,21 +19,21 @@ extern "C" {
typedef void (*REGISTRYFUNCTION)(void);
typedef struct registryFunctionRef {
const char *name;
const char * name;
REGISTRYFUNCTION addr;
}registryFunctionRef;
} registryFunctionRef;
/* c interface definitions */
epicsShareFunc int epicsShareAPI registryFunctionAdd(
const char *name,REGISTRYFUNCTION func);
const char *name, REGISTRYFUNCTION func);
epicsShareFunc REGISTRYFUNCTION epicsShareAPI registryFunctionFind(
const char *name);
epicsShareFunc int epicsShareAPI registryFunctionRefAdd(
registryFunctionRef ref[],int nfunctions);
registryFunctionRef ref[], int nfunctions);
#ifdef __cplusplus
}
#endif
#endif /* INCregistryFunctionh */
#endif /* INC_registryFunction_H */

View File

@@ -1,37 +1,30 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* registryRecordType.c */
/* Author: Marty Kraimer Date: 08JUN99 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include "dbBase.h"
#define epicsExportSharedSymbols
#include "registry.h"
#include "registryRecordType.h"
const char *recordType = "record type";
static void *registryID = (void *)&recordType;
static void * const registryID = "record type";
epicsShareFunc int epicsShareAPI registryRecordTypeAdd(
const char *name,const recordTypeLocation *prtl)
const char *name, const recordTypeLocation *prtl)
{
return(registryAdd(registryID,name,(void *)prtl));
return registryAdd(registryID, name, (void *)prtl);
}
epicsShareFunc recordTypeLocation * epicsShareAPI registryRecordTypeFind(
const char *name)
{
return((recordTypeLocation *)registryFind(registryID,name));
return registryFind(registryID, name);
}

View File

@@ -1,14 +1,14 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifndef INCregistryRecordTypeh
#define INCregistryRecordTypeh
#ifndef INC_registryRecordType_H
#define INC_registryRecordType_H
#include "recSup.h"
#include "shareLib.h"
@@ -27,10 +27,9 @@ typedef struct recordTypeLocation {
struct rset *prset;
computeSizeOffset sizeOffset;
}recordTypeLocation;
epicsShareFunc int epicsShareAPI registryRecordTypeAdd(
const char *name,const recordTypeLocation *prtl);
const char *name, const recordTypeLocation *prtl);
epicsShareFunc recordTypeLocation * epicsShareAPI registryRecordTypeFind(
const char *name);
@@ -41,4 +40,4 @@ int registerRecordDeviceDriver(struct dbBase *pdbbase);
#endif
#endif /* INCregistryRecordTypeh */
#endif /* INC_registryRecordType_H */

View File

@@ -3,8 +3,7 @@
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
@@ -31,7 +30,8 @@ epicsShareFunc void epicsShareAPI casHostNameInitiatingCurrentThread (
char * pBuf, unsigned bufSize );
epicsShareFunc void epicsShareAPI casUserNameInitiatingCurrentThread (
char * pBuf, unsigned bufSize );
void casStatsFetch ( unsigned *pChanCount, unsigned *pConnCount );
epicsShareFunc void casStatsFetch (
unsigned *pChanCount, unsigned *pConnCount );
#define RSRV_OK 0
#define RSRV_ERROR (-1)

View File

@@ -138,7 +138,7 @@ struct event_ext {
};
enum ctl {ctlRun, ctlPause, ctlExit};
enum ctl {ctlInit, ctlRun, ctlPause, ctlExit};
/* NOTE: external used so they remember the state across loads */
#ifdef GLBLSOURCE

View File

@@ -9,7 +9,8 @@ TOP=../..
include $(TOP)/configure/CONFIG
PROD_IOC = softIoc
PROD_IOC_DEFAULT = softIoc
PROD_IOC_iOS = -nil-
DBD += softIoc.dbd
softIoc_DBD += base.dbd

View File

@@ -123,6 +123,7 @@ sub AbsPath {
# Now calculate the absolute path
my $abs = File::Spec->rel2abs($path, abs_path($cwd));
$abs = abs_path($abs) if -e $abs;
return LocalPath($abs);
}

View File

@@ -23,7 +23,6 @@ PERL_SCRIPTS += expandVars.pl
PERL_SCRIPTS += filterWarnings.pl
PERL_SCRIPTS += fullPathName.pl
PERL_SCRIPTS += installEpics.pl
PERL_SCRIPTS += makeDbDepends.pl
PERL_SCRIPTS += makeIncludeDbd.pl
PERL_SCRIPTS += makeMakefile.pl
PERL_SCRIPTS += makeTestfile.pl

View File

@@ -1,24 +0,0 @@
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
if $running_under_some_shell; # makeDbDepends.pl
# Called from within RULES.Db in the Db directories.
# Searches .substitutions and .template files (from the command line) for
# file ["']xxx["'] {
# and
# include "xxx"
# entries to include in the DEPENDS file
use strict;
my $target = shift @ARGV;
my %depends;
while (my $line = <>) {
$depends{$2}++ if $line =~ m/^\s*file\s*(["']?)(.*)\1/;
$depends{$1}++ if $line =~ m/^\s*include\s+"(.*)"/;
}
if (%depends) {
my @depends = keys %depends;
print "$target: @depends\n";
}

View File

@@ -25,39 +25,39 @@
#
#-----------------------------------------------------------------------
use Getopt::Std;
use strict;
use FindBin;
use lib "$FindBin::Bin/../../lib/perl";
use EPICS::Getopts;
my $version = 'mkmf.pl,v 1.5 2002/03/25 21:33:24 jba Exp $ ';
my $endline = $/;
my %output;
my @includes;
use vars qw( $opt_d $opt_m );
getopts( 'dm:' ) || die "\aSyntax: $0 [-d] [-m dependsFile] includeDirs objFile srcFile\n";
our ( $opt_d, $opt_m, @opt_I);
getopts( 'dm:I@' ) || die "\aSyntax: $0 [-d] [-m dependsFile] [-I incdir [-I incdir]...] objFile srcFile [srcfile]... \n";
my $debug = $opt_d;
my $depFile = $opt_m;
print "$0 $version\n" if $debug;
# directory list
my @dirs;
my $i;
foreach $i (0 .. $#ARGV-2) {
push @dirs, $ARGV[$i];
}
my $objFile = $ARGV[$#ARGV-1];
my $srcFile = $ARGV[$#ARGV];
my @incdirs = @opt_I;
my $objFile = shift or die "No target file argument";
my @srcFiles=@ARGV;
if( $debug ) {
print "DEBUG: dirs= @dirs\n";
print "DEBUG: source= $srcFile\n";
print "DEBUG: object= $objFile\n";
print "$0 $version\n";
print "DEBUG: incdirs= @incdirs\n";
print "DEBUG: objFile= $objFile\n";
print "DEBUG: srcFiles= @srcFiles\n";
}
print "Generating dependencies for $objFile\n" if $debug;
scanFile($srcFile);
scanIncludesList();
foreach my $srcFile (@srcFiles) {
scanFile($srcFile);
scanIncludesList();
}
$depFile = 'depends' unless $depFile;
@@ -118,7 +118,7 @@ sub scanIncludesList {
}
#-----------------------------------------
# find filename on #include line
# find filename on #include and file lines
sub findNextIncName {
my $line = shift;
my $is_subst = shift;
@@ -130,6 +130,7 @@ sub findNextIncName {
if ($is_subst) {
return 0 if not $line =~ /^\s*file\s*([^\s{]*)/;
$incname = $1;
$incname = substr $incname, 1, length($incname)-2 if $incname =~ /^".+?"$/;
} else {
return 0 if not $line =~ /^#?\s*include\s*('.*?'|<.*?>|".*?")/;
$incname = substr $1, 1, length($1)-2;
@@ -139,7 +140,7 @@ sub findNextIncName {
return $incname if -f $incname;
return 0 if ( $incname =~ /^\// || $incname =~ /^\\/ );
foreach $dir ( @dirs ) {
foreach $dir ( @incdirs ) {
chomp($dir);
$incfile = "$dir/$incname";
print "DEBUG: checking for $incname in $dir\n" if $debug;

View File

@@ -289,7 +289,7 @@ static int seekLatestLine (struct ioc_log_server *pserver)
}
}
else {
char c = fgetc (pserver->poutfile);
int c = fgetc (pserver->poutfile);
/*
* bypass the line if it does not match the expected format

View File

@@ -24,21 +24,24 @@ case $sysname in
Linux )
os=linux
cpu=`uname -m`
case $cpu in i386 | i486 | i586 | i686 )
cpu=x86
;;
case $cpu in
i386 | i486 | i586 | i686 )
cpu=x86 ;;
x86_64 )
;; # $cpu is correct
armv6l | armv7l )
cpu=arm ;;
esac
if [ ${cpu} = "x86_64" ]; then
cpu=x86_64
fi
echo ${os}-${cpu}${suffix}
;;
Darwin )
os=darwin
cpu=`uname -m`
case $cpu in
"Power Macintosh") cpu=ppc ;;
i386 | x86_64 ) cpu=x86 ;;
"Power Macintosh")
cpu=ppc ;;
i386 | x86_64 )
cpu=x86 ;;
esac
echo ${os}-${cpu}${suffix}
;;

View File

@@ -24,11 +24,13 @@ print "$EpicsHostArch$suffix";
sub GetEpicsHostArch { # no args
$arch=$Config{'archname'};
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
} elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
} elsif ($arch =~ m/i[3-6]86-linux/) { return "linux-x86";
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
} elsif ($arch =~ m/i[3-6]86-linux/){ return "linux-x86";
} elsif ($arch =~ m/x86_64-linux/) { return "linux-x86_64";
} elsif ($arch =~ m/arm-linux/) { return "linux-arm";
} elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
} elsif ($arch =~ m/MSWin32-x64/) { return "windows-x64";
} elsif ($arch =~ m/cygwin/) { return "cygwin-x86";
} elsif ($arch =~ m/darwin/) {
my($kernel, $hostname, $release, $version, $cpu) = POSIX::uname();