Compare commits

...

18 Commits

Author SHA1 Message Date
zimoch
edcb2cb21a bugfix in patch 2012-03-20 10:32:37 +00:00
zimoch
1cd879797a rules-db.patch applied 2012-03-20 10:31:43 +00:00
zimoch
159c738e9e str-to-enum.patch applied 2012-03-20 10:29:50 +00:00
zimoch
c4b3eb98c2 replaced by fix-907761.patch 2012-03-20 10:27:20 +00:00
zimoch
176e5c2d80 install headers needed by the ca gateway 2012-01-12 16:52:45 +00:00
zimoch
4def6ebbdf bugfix: missing return 2012-01-12 16:51:34 +00:00
zimoch
cb814383d9 bugfix: missing return 2012-01-12 08:10:33 +00:00
zimoch
d8cd08d0ed char arrays are now always 0 terminated when fetching strings with $ suffix 2012-01-12 08:07:54 +00:00
zimoch
4cfb2708e8 binary compatibility to old base versions where ca_detach_context was accidentally not extern C 2012-01-12 08:06:34 +00:00
zimoch
d8edba5dfc was accidantally mixed with named-soft-events patch 2011-12-23 12:37:22 +00:00
zimoch
0212ec4075 bugfix: char array access (using $ syntax) to links and attributes returned to few bytes and faild when 1 byte was requested. 2011-12-23 10:50:59 +00:00
zimoch
fa1abe85e8 re-import our changes to new 3.14.12.2 2011-12-14 13:44:18 +00:00
zimoch
b7129e7c3b process records when selection index is written, selection mechanism changes, or value is written to choice values 2011-12-14 13:43:10 +00:00
zimoch
d40f2ef877 perlconfig works only on host arch 2011-12-14 12:31:03 +00:00
zimoch
5074f1c364 patch for sun compiler 2011-12-14 10:40:26 +00:00
zimoch
e79756f5bf now included in 3.14.12.2 2011-12-14 10:38:04 +00:00
zimoch
47c494fa28 compat 3.13 mode, INSTALL_LOCATION, and cross archs 2011-12-14 10:35:28 +00:00
zimoch
d9e3634ebd our changes for INSTALL_LOCATION, cross archs and compat mode 2011-12-14 10:32:00 +00:00
41 changed files with 799 additions and 171 deletions

View File

@@ -27,3 +27,10 @@ config_DEPEND_DIRS = src
include $(TOP)/configure/RULES_TOP
UNINSTALL_DIRS += $(INSTALL_LOCATION)/src
copysrc:
tar cf - --exclude=CVS --exclude=O.* src | tar xf - -C $(INSTALL_LOCATION)
tar: install copysrc
tar cfjP epics_base-3.14.12.tar.bz2 $(INSTALL_LOCATION) --exclude=*.o

View File

@@ -0,0 +1,22 @@
Index: src/ca/access.cpp
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/ca/access.cpp,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 access.cpp
*** src/ca/access.cpp 29 Nov 2010 10:38:06 -0000 1.1.1.1
--- src/ca/access.cpp 12 Jan 2012 08:05:42 -0000
***************
*** 756,761 ****
--- 756,767 ----
}
}
+ // backward compatibility with 3.14.8
+ extern "C" void _Z17ca_detach_contextv ()
+ {
+ ca_detach_context();
+ }
+
int epicsShareAPI ca_preemtive_callback_is_enabled ()
{
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );

86
config_site.patch Normal file
View File

@@ -0,0 +1,86 @@
Index: configure/CONFIG_SITE
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/configure/CONFIG_SITE,v
retrieving revision 1.5
retrieving revision 1.6
diff -c -r1.5 -r1.6
*** configure/CONFIG_SITE 14 Dec 2011 09:58:10 -0000 1.5
--- configure/CONFIG_SITE 14 Dec 2011 10:32:00 -0000 1.6
***************
*** 165,176 ****
# NOTE: Set to YES only if you have existing R3.13 ioc applications
# and extensions to be built with this base
#
! COMPAT_313=NO
# Installation directory
# If you don't want to install into $(TOP) dir then
# define INSTALL_LOCATION here
#INSTALL_LOCATION=<fullpathname>
# Use POSIX thread priority scheduling (YES or NO)
USE_POSIX_THREAD_PRIORITY_SCHEDULING = NO
--- 165,177 ----
# NOTE: Set to YES only if you have existing R3.13 ioc applications
# and extensions to be built with this base
#
! COMPAT_313=YES
# Installation directory
# If you don't want to install into $(TOP) dir then
# define INSTALL_LOCATION here
#INSTALL_LOCATION=<fullpathname>
+ INSTALL_LOCATION=/usr/local/epics/base-3.14.12
# Use POSIX thread priority scheduling (YES or NO)
USE_POSIX_THREAD_PRIORITY_SCHEDULING = NO
Index: configure/os/CONFIG_SITE.linux-x86.Common
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/configure/os/CONFIG_SITE.linux-x86.Common,v
retrieving revision 1.4
retrieving revision 1.5
diff -c -r1.4 -r1.5
*** configure/os/CONFIG_SITE.linux-x86.Common 14 Dec 2011 10:02:01 -0000 1.4
--- configure/os/CONFIG_SITE.linux-x86.Common 14 Dec 2011 10:32:00 -0000 1.5
***************
*** 6,12 ****
# Site override definitions for linux-x86 host builds
#-------------------------------------------------------
! # JBA test override values
! #CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
! #CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
! #CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
--- 6,14 ----
# Site override definitions for linux-x86 host builds
#-------------------------------------------------------
! CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
! CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
! CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
! CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-xscale_be
! CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-ppc405
! CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-p2020
Index: configure/os/CONFIG_SITE.solaris-sparc.Common
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/configure/os/CONFIG_SITE.solaris-sparc.Common,v
retrieving revision 1.3
retrieving revision 1.4
diff -c -r1.3 -r1.4
*** configure/os/CONFIG_SITE.solaris-sparc.Common 14 Dec 2011 10:02:01 -0000 1.3
--- configure/os/CONFIG_SITE.solaris-sparc.Common 14 Dec 2011 10:32:00 -0000 1.4
***************
*** 5,10 ****
# Site specific override definitions for solaris-sparc host builds
# Only the local epics system manager should modify this file
! #INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew
#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040
--- 5,10 ----
# Site specific override definitions for solaris-sparc host builds
# Only the local epics system manager should modify this file
! INSTALL_LOCATION = /afs/psi.ch/group/8431/dirk/solaris/base-3.14.12
#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040

View File

@@ -165,12 +165,13 @@ CROSS_WARN=YES
# NOTE: Set to YES only if you have existing R3.13 ioc applications
# and extensions to be built with this base
#
COMPAT_313=NO
COMPAT_313=YES
# Installation directory
# If you don't want to install into $(TOP) dir then
# define INSTALL_LOCATION here
#INSTALL_LOCATION=<fullpathname>
INSTALL_LOCATION=/usr/local/epics/base-3.14.12
# Use POSIX thread priority scheduling (YES or NO)
USE_POSIX_THREAD_PRIORITY_SCHEDULING = NO

View File

@@ -24,8 +24,8 @@ vpath %.acs $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
# 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)
DBDFLAGS = $(USR_DBDFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
#####################################################
# To allow os specific dbd files AND have the -j option work properly,

View File

@@ -6,7 +6,9 @@
# Site override definitions for linux-x86 host builds
#-------------------------------------------------------
# JBA test override values
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100 RTEMS-pc386 # RTEMS-mvme5500 RTEMS-mvme167
CROSS_COMPILER_TARGET_ARCHS += T2-ppc604
CROSS_COMPILER_TARGET_ARCHS += V67-ppc604
CROSS_COMPILER_TARGET_ARCHS += V63-ppc603
CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-xscale_be
CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-ppc405
CROSS_COMPILER_TARGET_ARCHS += embeddedlinux-p2020

View File

@@ -5,6 +5,6 @@
# Site specific override definitions for solaris-sparc host builds
# Only the local epics system manager should modify this file
#INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew
INSTALL_LOCATION = /afs/psi.ch/group/8431/dirk/solaris/base-3.14.12
#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040

View File

@@ -13,6 +13,10 @@
<!-- Insert new items immediately below here ... -->
<h4>Named Soft Events</h4>
<p>Soft events can now be meaningful strings instead of numbers 1-255.
<h4>Path for Cap5 loadable library changed</h4>
<p>The perl CA module makes use of a loadable library, which used to be loaded

70
fix-907761.patch Normal file
View File

@@ -0,0 +1,70 @@
=== modified file 'src/db/dbAccess.c'
--- src/db/dbAccess.c 2010-10-05 19:27:37 +0000
+++ src/db/dbAccess.c 2012-01-06 00:11:42 +0000
@@ -969,7 +969,7 @@
case DBR_CHAR:
case DBR_UCHAR:
- if (nRequest && *nRequest > 1) {
+ if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -984,8 +984,8 @@
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 +1028,7 @@
case DBR_CHAR:
case DBR_UCHAR:
- if (nRequest && *nRequest > 1) {
+ if (nRequest && *nRequest > 0) {
maxlen = *nRequest - 1;
break;
}
@@ -1037,8 +1037,8 @@
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;
}
=== modified file 'src/db/dbConvert.c'
--- src/db/dbConvert.c 2009-04-23 18:49:40 +0000
+++ src/db/dbConvert.c 2012-01-06 00:13:33 +0000
@@ -416,6 +416,10 @@
char *pbuffer = (char *)pto;
char *psrc=(char *)(paddr->pfield);
+ if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
+ pbuffer[--nRequest] = 0;
+ if (nRequest == 0) return(0);
+ }
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -436,6 +440,10 @@
unsigned char *pbuffer = (unsigned char *)pto;
char *psrc=(char *)(paddr->pfield);
+ if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
+ pbuffer[--nRequest] = 0;
+ if (nRequest == 0) return(0);
+ }
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);

View File

@@ -1,16 +0,0 @@
Index: src/libCom/misc/compilerDependencies.h
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/libCom/misc/compilerDependencies.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 compilerDependencies.h
--- src/libCom/misc/compilerDependencies.h 29 Nov 2010 10:38:07 -0000 1.1.1.1
+++ src/libCom/misc/compilerDependencies.h 21 Jun 2011 07:37:38 -0000
@@ -95,7 +95,7 @@
/*
* Deprecation marker
*/
-#ifdef __GNUC__
+#if defined (__GNUC__) && (__GNUC__ >= 3)
# define EPICS_DEPRECATED __attribute__((deprecated))
#else
# define EPICS_DEPRECATED

View File

@@ -0,0 +1,8 @@
Index: src/cas/build/Makefile
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/cas/build/Makefile,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 Makefile
28a29,30
> INC += casCtx.h
> INC += caHdrLargeArray.h

View File

@@ -502,7 +502,7 @@
recGblGetTimeStamp(prec);
@@ -137,10 +140,21 @@
@@ -137,10 +140,22 @@
return(status);
}
@@ -515,6 +515,7 @@
+ if (dbGetFieldIndex(paddr) == eventRecordVAL) {
+ prec->epvt = eventNameToHandle(prec->val);
+ }
+ return 0;
+}
+
@@ -525,7 +526,7 @@
pvdes->no_elements=1;
pvdes->pvalue = (void *)(&prec->val);
return(0);
@@ -177,10 +191,13 @@
@@ -177,10 +192,13 @@
return(status);
}
if (prec->simm == menuYesNoYES){

View File

@@ -0,0 +1,144 @@
Index: src/rec/selRecord.dbd
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/selRecord.dbd,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 selRecord.dbd
*** src/rec/selRecord.dbd 29 Nov 2010 10:38:07 -0000 1.1.1.1
--- src/rec/selRecord.dbd 14 Dec 2011 13:40:29 -0000
***************
*** 24,32 ****
--- 24,34 ----
prompt("Select Mechanism")
promptgroup(GUI_INPUTS)
menu(selSELM)
+ pp(TRUE)
}
field(SELN,DBF_USHORT) {
prompt("Index value")
+ pp(TRUE)
}
field(PREC,DBF_SHORT) {
prompt("Display Precision")
Index: src/rec/seqRecord.dbd
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.12/src/rec/seqRecord.dbd,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 seqRecord.dbd
*** src/rec/seqRecord.dbd 29 Nov 2010 10:38:07 -0000 1.1.1.1
--- src/rec/seqRecord.dbd 14 Dec 2011 13:40:29 -0000
***************
*** 24,34 ****
--- 24,36 ----
promptgroup(GUI_INPUTS)
interest(1)
menu(seqSELM)
+ pp(TRUE)
}
field(SELN,DBF_USHORT) {
prompt("Link Selection")
interest(1)
initial("1")
+ pp(TRUE)
}
field(SELL,DBF_INLINK) {
prompt("Link Selection Loc")
***************
*** 53,58 ****
--- 55,61 ----
field(DO1,DBF_DOUBLE) {
prompt("Constant input 1")
interest(1)
+ pp(TRUE)
}
field(LNK1,DBF_OUTLINK) {
prompt("Output Link 1")
***************
*** 72,77 ****
--- 75,81 ----
field(DO2,DBF_DOUBLE) {
prompt("Constant input 2")
interest(1)
+ pp(TRUE)
}
field(LNK2,DBF_OUTLINK) {
prompt("Output Link 2")
***************
*** 91,96 ****
--- 95,101 ----
field(DO3,DBF_DOUBLE) {
prompt("Constant input 3")
interest(1)
+ pp(TRUE)
}
field(LNK3,DBF_OUTLINK) {
prompt("Output Link 3")
***************
*** 110,115 ****
--- 115,121 ----
field(DO4,DBF_DOUBLE) {
prompt("Constant input 4")
interest(1)
+ pp(TRUE)
}
field(LNK4,DBF_OUTLINK) {
prompt("Output Link 4")
***************
*** 129,134 ****
--- 135,141 ----
field(DO5,DBF_DOUBLE) {
prompt("Constant input 5")
interest(1)
+ pp(TRUE)
}
field(LNK5,DBF_OUTLINK) {
prompt("Output Link 5")
***************
*** 148,153 ****
--- 155,161 ----
field(DO6,DBF_DOUBLE) {
prompt("Constant input 6")
interest(1)
+ pp(TRUE)
}
field(LNK6,DBF_OUTLINK) {
prompt("Output Link 6")
***************
*** 167,172 ****
--- 175,181 ----
field(DO7,DBF_DOUBLE) {
prompt("Constant input 7")
interest(1)
+ pp(TRUE)
}
field(LNK7,DBF_OUTLINK) {
prompt("Output Link 7")
***************
*** 186,191 ****
--- 195,201 ----
field(DO8,DBF_DOUBLE) {
prompt("Constant input 8")
interest(1)
+ pp(TRUE)
}
field(LNK8,DBF_OUTLINK) {
prompt("Output Link 8")
***************
*** 205,210 ****
--- 215,221 ----
field(DO9,DBF_DOUBLE) {
prompt("Constant input 9")
interest(1)
+ pp(TRUE)
}
field(LNK9,DBF_OUTLINK) {
prompt("Output Link 9")
***************
*** 224,229 ****
--- 235,241 ----
field(DOA,DBF_DOUBLE) {
prompt("Constant input 10")
interest(1)
+ pp(TRUE)
}
field(LNKA,DBF_OUTLINK) {
prompt("Output Link 10")

15
rules-db.patch Normal file
View File

@@ -0,0 +1,15 @@
=== modified file 'configure/RULES.Db'
--- configure/RULES.Db 2011-11-08 19:23:25 +0000
+++ configure/RULES.Db 2011-12-22 17:49:29 +0000
@@ -24,8 +24,8 @@
# 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)
+DBDFLAGS = $(USR_DBDFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
+DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. -I.. -I$(COMMON_DIR) $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
#####################################################
# To allow os specific dbd files AND have the -j option work properly,

View File

@@ -756,6 +756,12 @@ void epicsShareAPI ca_detach_context ()
}
}
// backward compatibility with 3.14.8
extern "C" void _Z17ca_detach_contextv ()
{
ca_detach_context();
}
int epicsShareAPI ca_preemtive_callback_is_enabled ()
{
ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId );

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

@@ -26,7 +26,7 @@ PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version)
PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname)
PERL_ARCHPATH = $(PERL_VERSION)/$(PERL_ARCHNAME)
ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
ifeq ($(T_A),$(EPICS_HOST_ARCH))
ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),)
# Doesn't build on WIN32
LOADABLE_LIBRARY_HOST = Cap5

View File

@@ -26,6 +26,8 @@ SRC_DIRS += $(CA)
INC += casdef.h
INC += casEventMask.h
INC += caNetAddr.h
INC += casCtx.h
INC += caHdrLargeArray.h
LIBSRCS += caServer.cc
LIBSRCS += caServerI.cc

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

@@ -969,7 +969,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 +984,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 +1028,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 +1037,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;
}

View File

@@ -43,10 +43,11 @@
special(SPC_SCAN)
interest(1)
}
field(EVNT,DBF_SHORT) {
prompt("Event Number")
field(EVNT,DBF_STRING) {
prompt("Event Name")
promptgroup(GUI_SCAN)
special(SPC_SCAN)
size(40)
interest(1)
}
field(TSE,DBF_SHORT) {

View File

@@ -416,6 +416,10 @@ static long getCharChar(
char *pbuffer = (char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -436,6 +440,10 @@ static long getCharUchar(
unsigned char *pbuffer = (unsigned char *)pto;
char *psrc=(char *)(paddr->pfield);
if (paddr->pfldDes && paddr->pfldDes->field_type == DBF_STRING) {
pbuffer[--nRequest] = 0;
if (nRequest == 0) return(0);
}
if(nRequest==1 && offset==0) {
*pbuffer = *psrc;
return(0);
@@ -2586,7 +2594,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 +2643,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 +2681,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

@@ -266,11 +266,11 @@ static void scanpplCallFunc(const iocshArgBuf *args)
{ scanppl(args[0].dval);}
/* scanpel */
static const iocshArg scanpelArg0 = { "event number",iocshArgInt};
static const iocshArg scanpelArg0 = { "event name",iocshArgString};
static const iocshArg * const scanpelArgs[1] = {&scanpelArg0};
static const iocshFuncDef scanpelFuncDef = {"scanpel",1,scanpelArgs};
static void scanpelCallFunc(const iocshArgBuf *args)
{ scanpel(args[0].ival);}
{ scanpel(args[0].sval);}
/* scanpiol */
static const iocshFuncDef scanpiolFuncDef = {"scanpiol",0};

View File

@@ -101,12 +101,13 @@ static char *priorityName[NUM_CALLBACK_PRIORITIES] = {
/* EVENT */
#define MAX_EVENTS 256
typedef struct event_scan_list {
CALLBACK callback;
scan_list scan_list;
} event_scan_list;
static event_scan_list *pevent_list[NUM_CALLBACK_PRIORITIES][MAX_EVENTS];
typedef struct event_list {
CALLBACK callback[NUM_CALLBACK_PRIORITIES];
scan_list scan_list[NUM_CALLBACK_PRIORITIES];
struct event_list *next;
char event_name[MAX_STRING_SIZE];
} event_list;
static event_list * volatile pevent_list[256];
/* IO_EVENT*/
@@ -204,35 +205,24 @@ void scanAdd(struct dbCommon *precord)
recGblRecordError(-1, (void *)precord,
"scanAdd detected illegal SCAN value");
} else if (scan == menuScanEvent) {
int evnt;
char* eventname;
int prio;
event_scan_list *pesl;
event_list *pel;
evnt = precord->evnt;
if (evnt < 0 || evnt >= MAX_EVENTS) {
eventname = precord->evnt;
if (strlen(eventname) >= MAX_STRING_SIZE) {
recGblRecordError(S_db_badField, (void *)precord,
"scanAdd detected illegal EVNT value");
precord->scan = menuScanPassive;
"scanAdd: too long EVNT value");
return;
}
prio = precord->prio;
if (prio < 0 || prio >= NUM_CALLBACK_PRIORITIES) {
recGblRecordError(-1, (void *)precord,
"scanAdd: illegal prio field");
precord->scan = menuScanPassive;
return;
}
pesl = pevent_list[prio][evnt];
if (pesl == NULL) {
pesl = dbCalloc(1, sizeof(event_scan_list));
pevent_list[prio][evnt] = pesl;
pesl->scan_list.lock = epicsMutexMustCreate();
callbackSetCallback(eventCallback, &pesl->callback);
callbackSetPriority(prio, &pesl->callback);
callbackSetUser(pesl, &pesl->callback);
ellInit(&pesl->scan_list.list);
}
addToList(precord, &pesl->scan_list);
pel = eventNameToHandle(eventname);
if (pel) addToList(precord, &pel->scan_list[prio]);
} else if (scan == menuScanI_O_Intr) {
io_scan_list *piosl = NULL;
int prio;
@@ -287,31 +277,25 @@ void scanDelete(struct dbCommon *precord)
recGblRecordError(-1, (void *)precord,
"scanDelete detected illegal SCAN value");
} else if (scan == menuScanEvent) {
int evnt;
char* eventname;
int prio;
event_scan_list *pesl;
event_list *pel;
scan_list *psl = 0;
evnt = precord->evnt;
if (evnt < 0 || evnt >= MAX_EVENTS) {
recGblRecordError(S_db_badField, (void *)precord,
"scanAdd detected illegal EVNT value");
precord->scan = menuScanPassive;
return;
}
eventname = precord->evnt;
prio = precord->prio;
if (prio < 0 || prio >= NUM_CALLBACK_PRIORITIES) {
recGblRecordError(-1, (void *)precord,
"scanAdd: illegal prio field");
precord->scan = menuScanPassive;
"scanDelete detected illegal PRIO field");
return;
}
pesl = pevent_list[prio][evnt];
if (pesl) psl = &pesl->scan_list;
if (!pesl || !psl)
recGblRecordError(-1, (void *)precord,
"scanDelete for bad evnt");
else
do /* multithreading: make sure pel is consistent */
pel = pevent_list[0];
while (pel != pevent_list[0]);
for (; pel; pel=pel->next) {
if (strcmp(pel->event_name, eventname) == 0) break;
}
if (pel && (psl = &pel->scan_list[prio]))
deleteFromList(precord, psl);
} else if (scan == menuScanI_O_Intr) {
io_scan_list *piosl=NULL;
@@ -372,21 +356,22 @@ int scanppl(double period) /* print periodic list */
return 0;
}
int scanpel(int event_number) /* print event list */
int scanpel(char* eventname) /* print event list */
{
char message[80];
int prio, evnt;
event_scan_list *pesl;
for (evnt = 0; evnt < MAX_EVENTS; evnt++) {
if (event_number && evnt<event_number) continue;
if (event_number && evnt>event_number) break;
for (prio = 0; prio < NUM_CALLBACK_PRIORITIES; prio++) {
pesl = pevent_list[prio][evnt];
if (!pesl) continue;
if (ellCount(&pesl->scan_list.list) == 0) continue;
sprintf(message, "Event %d Priority %s", evnt, priorityName[prio]);
printList(&pesl->scan_list, message);
int prio;
event_list *pel;
do /* multithreading: make sure pel is consistent */
pel = pevent_list[0];
while (pel != pevent_list[0]);
for (; pel; pel = pel->next) {
if (!eventname || strcmp(pel->event_name, eventname) == 0) {
for (prio = 0; prio < NUM_CALLBACK_PRIORITIES; prio++) {
if (ellCount(&pel->scan_list[prio].list) == 0) continue;
sprintf(message, "Event \"%s\" Priority %s", pel->event_name, priorityName[prio]);
printList(&pel->scan_list[prio], message);
}
}
}
return 0;
@@ -412,39 +397,73 @@ int scanpiol(void) /* print io_event list */
static void eventCallback(CALLBACK *pcallback)
{
event_scan_list *pesl;
scan_list *psl;
callbackGetUser(pesl, pcallback);
scanList(&pesl->scan_list);
callbackGetUser(psl, pcallback);
scanList(psl);
}
static void initEvent(void)
{
int evnt, prio;
}
for (prio = 0; prio < NUM_CALLBACK_PRIORITIES; prio++) {
for (evnt = 0; evnt < MAX_EVENTS; evnt++) {
pevent_list[prio][evnt] = NULL;
event_list *eventNameToHandle(char *eventname)
{
int prio;
event_list *pel;
static epicsMutexId lock = NULL;
if (!lock) lock = epicsMutexMustCreate();
if (!eventname || eventname[0] == 0) return NULL;
epicsMutexMustLock(lock);
for (pel = pevent_list[0]; pel; pel=pel->next) {
if (strcmp(pel->event_name, eventname) == 0) break;
}
if (pel == NULL) {
pel = dbCalloc(1, sizeof(event_list));
strcpy(pel->event_name, eventname);
for (prio = 0; prio < NUM_CALLBACK_PRIORITIES; prio++) {
callbackSetUser(&pel->scan_list[prio], &pel->callback[prio]);
callbackSetPriority(prio, &pel->callback[prio]);
callbackSetCallback(eventCallback, &pel->callback[prio]);
pel->scan_list[prio].lock = epicsMutexMustCreate();
ellInit(&pel->scan_list[prio].list);
}
pel->next=pevent_list[0];
pevent_list[0]=pel;
{ /* backward compatibility */
char* p;
long e = strtol(eventname, &p, 0);
if (*p == 0 && e > 0 && e <= 255)
pevent_list[e]=pel;
}
}
epicsMutexUnlock(lock);
return pel;
}
void postEvent(event_list *pel)
{
int prio;
if (scanCtl != ctlRun) return;
if (!pel) return;
for (prio = 0; prio < NUM_CALLBACK_PRIORITIES; prio++) {
if (ellCount(&pel->scan_list[prio].list) >0)
callbackRequest(&pel->callback[prio]);
}
}
/* backward compatibility */
void post_event(int event)
{
int prio;
event_scan_list *pesl;
if (scanCtl != ctlRun) return;
if (event < 0 || event >= MAX_EVENTS) {
errMessage(-1, "illegal event passed to post_event");
return;
}
for (prio=0; prio<NUM_CALLBACK_PRIORITIES; prio++) {
pesl = pevent_list[prio][event];
if (!pesl) continue;
if (ellCount(&pesl->scan_list.list) >0)
callbackRequest((void *)pesl);
}
event_list* pel;
if (event <= 0 || event > 255) return;
do { /* multithreading: make sure pel is consistent */
pel = pevent_list[event];
} while (pel != pevent_list[event]);
postEvent(pel);
}
void scanIoInit(IOSCANPVT *ppioscanpvt)

View File

@@ -19,6 +19,7 @@
#include "menuScan.h"
#include "shareLib.h"
#include "compilerDependencies.h"
#ifdef __cplusplus
extern "C" {
@@ -32,10 +33,13 @@ extern "C" {
#define MAX_PHASE SHRT_MAX
#define MIN_PHASE SHRT_MIN
#define HAVE_NAMED_SOFT_EVENTS
/*definitions for I/O Interrupt Scanning */
struct io_scan_list;
typedef struct io_scan_list *IOSCANPVT;
typedef struct event_list *EVENTPVT;
struct dbCommon;
@@ -43,7 +47,9 @@ epicsShareFunc long scanInit(void);
epicsShareFunc void scanRun(void);
epicsShareFunc void scanPause(void);
epicsShareFunc void post_event(int event);
epicsShareFunc EVENTPVT eventNameToHandle(char* event);
epicsShareFunc void postEvent(EVENTPVT epvt);
epicsShareFunc void post_event(int event) EPICS_DEPRECATED;
epicsShareFunc void scanAdd(struct dbCommon *);
epicsShareFunc void scanDelete(struct dbCommon *);
epicsShareFunc double scanPeriod(int scan);
@@ -54,7 +60,7 @@ epicsShareFunc int scanOnceSetQueueSize(int size);
epicsShareFunc int scanppl(double rate);
/*print event lists*/
epicsShareFunc int scanpel(int event_number);
epicsShareFunc int scanpel(char *event_name);
/*print io_event list*/
epicsShareFunc int scanpiol(void);

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

@@ -51,7 +51,7 @@ static long init_record(eventRecord *prec)
/* INP must be CONSTANT, PV_LINK, DB_LINK or CA_LINK*/
switch (prec->inp.type) {
case CONSTANT:
if (recGblInitConstantLink(&prec->inp, DBF_USHORT, &prec->val))
if (recGblInitConstantLink(&prec->inp, DBF_STRING, &prec->val))
prec->udf = FALSE;
break;
case PV_LINK:
@@ -69,13 +69,20 @@ static long init_record(eventRecord *prec)
static long read_event(eventRecord *prec)
{
long status;
char newEvent[MAX_STRING_SIZE];
status = dbGetLink(&prec->inp, DBR_USHORT, &prec->val, 0, 0);
if (!status) {
prec->udf = FALSE;
if (prec->tsel.type == CONSTANT &&
prec->tse == epicsTimeEventDeviceTime)
dbGetTimeStamp(&prec->inp, &prec->time);
if (prec->inp.type != CONSTANT)
{
status = dbGetLinkValue(&prec->inp, DBR_STRING, newEvent, 0, 0);
if (status) return status;
if (strcmp(newEvent, prec->val) != 0) {
strcpy(prec->val, newEvent);
prec->epvt = eventNameToHandle(prec->val);
}
}
return status;
prec->udf = FALSE;
if (prec->tsel.type == CONSTANT &&
prec->tse == epicsTimeEventDeviceTime)
dbGetTimeStamp(&prec->inp, &prec->time);
return 0;
}

View File

@@ -405,10 +405,12 @@ epicsShareFunc long
pstacktop--;
}
if (cond_count != 0) {
*perror = CALC_ERR_CONDITIONAL;
goto bad;
}
/*
* if (cond_count != 0) {
* *perror = CALC_ERR_CONDITIONAL;
* goto bad;
* }
*/
if (runtime_depth > 1) {
*perror = CALC_ERR_TOOMANY;
goto bad;
@@ -452,10 +454,12 @@ epicsShareFunc long
}
*pout = END_EXPRESSION;
if (cond_count != 0) {
*perror = CALC_ERR_CONDITIONAL;
goto bad;
}
/*
* if (cond_count != 0) {
* *perror = CALC_ERR_CONDITIONAL;
* goto bad;
* }
*/
if (operand_needed || runtime_depth != 1) {
*perror = CALC_ERR_INCOMPLETE;
goto bad;

View File

@@ -282,6 +282,13 @@ void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc)
pList->count = 0;
}
/* for backward compatibility provide a function ellFree() in addition to macro */
#undef ellFree
void ellFree (ELLLIST *pList)
{
ellFree2 (pList, free);
}
/****************************************************************************
*
* This function verifies that the list is consistent.

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>

View File

@@ -197,6 +197,8 @@ static long init_record(calcoutRecord *prec, int pass)
callbackSetUser(prec, &prpvt->checkLinkCb);
prpvt->cbScheduled = 0;
prec->epvt = eventNameToHandle(prec->oevt);
if (pcalcoutDSET->init_record) pcalcoutDSET->init_record(prec);
prec->pval = prec->val;
prec->mlst = prec->val;
@@ -357,6 +359,9 @@ static long special(DBADDR *paddr, int after)
}
db_post_events(prec, plinkValid, DBE_VALUE);
return 0;
case(calcoutRecordOEVT):
prec->epvt = eventNameToHandle(prec->oevt);
return 0;
default:
recGblDbaddrError(S_db_badChoice, paddr, "calc: special");
return(S_db_badChoice);
@@ -540,27 +545,21 @@ static void execOutput(calcoutRecord *prec)
if (prec->nsev < INVALID_ALARM ) {
/* Output the value */
status = writeValue(prec);
/* post event if output event != 0 */
if (prec->oevt > 0) {
post_event((int)prec->oevt);
}
/* post output event if set */
if (prec->epvt) postEvent(prec->epvt);
} else switch (prec->ivoa) {
case menuIvoaContinue_normally:
status = writeValue(prec);
/* post event if output event != 0 */
if (prec->oevt > 0) {
post_event((int)prec->oevt);
}
/* post output event if set */
if (prec->epvt) postEvent(prec->epvt);
break;
case menuIvoaDon_t_drive_outputs:
break;
case menuIvoaSet_output_to_IVOV:
prec->oval = prec->ivov;
status = writeValue(prec);
/* post event if output event != 0 */
if (prec->oevt > 0) {
post_event((int)prec->oevt);
}
/* post output event if set */
if (prec->epvt) postEvent(prec->epvt);
break;
default:
status = -1;

View File

@@ -255,10 +255,19 @@ recordtype(calcout) {
prompt("OCAL Valid")
interest(1)
}
field(OEVT,DBF_USHORT) {
field(OEVT,DBF_STRING) {
prompt("Event To Issue")
promptgroup(GUI_CLOCK)
special(SPC_MOD)
asl(ASL0)
size(40)
}
%#include "dbScan.h"
field(EPVT, DBF_NOACCESS) {
prompt("Event private")
special(SPC_NOMOD)
interest(4)
extra("EVENTPVT epvt")
}
field(IVOA,DBF_MENU) {
prompt("INVALID output action")

View File

@@ -32,6 +32,7 @@
#include "errMdef.h"
#include "recSup.h"
#include "recGbl.h"
#include "special.h"
#include "menuYesNo.h"
#define GEN_SIZE_OFFSET
#include "eventRecord.h"
@@ -43,7 +44,7 @@
#define initialize NULL
static long init_record(eventRecord *, int);
static long process(eventRecord *);
#define special NULL
static long special(DBADDR *, int);
static long get_value(eventRecord *, struct valueDes *);
#define cvt_dbaddr NULL
#define get_array_info NULL
@@ -103,9 +104,11 @@ static long init_record(eventRecord *prec, int pass)
}
if (prec->siol.type == CONSTANT) {
recGblInitConstantLink(&prec->siol,DBF_USHORT,&prec->sval);
recGblInitConstantLink(&prec->siol,DBF_STRING,&prec->sval);
}
prec->epvt = eventNameToHandle(prec->val);
if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
status=(*pdset->init_record)(prec);
return(status);
@@ -123,7 +126,7 @@ static long process(eventRecord *prec)
if ( !pact && prec->pact ) return(0);
prec->pact = TRUE;
if(prec->val>0) post_event((int)prec->val);
postEvent(prec->epvt);
recGblGetTimeStamp(prec);
@@ -137,10 +140,22 @@ static long process(eventRecord *prec)
return(status);
}
static long special(DBADDR *paddr, int after)
{
eventRecord *prec = (eventRecord *)paddr->precord;
if (!after) return 0;
if (dbGetFieldIndex(paddr) == eventRecordVAL) {
prec->epvt = eventNameToHandle(prec->val);
}
return 0;
}
static long get_value(eventRecord *prec, struct valueDes *pvdes)
{
pvdes->field_type = DBF_USHORT;
pvdes->field_type = DBF_STRING;
pvdes->no_elements=1;
pvdes->pvalue = (void *)(&prec->val);
return(0);
@@ -177,10 +192,13 @@ static long readValue(eventRecord *prec)
return(status);
}
if (prec->simm == menuYesNoYES){
status=dbGetLink(&(prec->siol),DBR_USHORT,
status=dbGetLink(&(prec->siol),DBR_STRING,
&(prec->sval),0,0);
if (status==0) {
prec->val=prec->sval;
if (strcmp(prec->sval, prec->val) != 0) {
strcpy(prec->val, prec->sval);
prec->epvt = eventNameToHandle(prec->val);
}
prec->udf=FALSE;
}
} else {

View File

@@ -9,10 +9,19 @@
#*************************************************************************
recordtype(event) {
include "dbCommon.dbd"
field(VAL,DBF_USHORT) {
prompt("Event Number To Post")
field(VAL,DBF_STRING) {
prompt("Event Name To Post")
promptgroup(GUI_INPUTS)
special(SPC_MOD)
asl(ASL0)
size(40)
}
%#include "dbScan.h"
field(EPVT, DBF_NOACCESS) {
prompt("Event private")
special(SPC_NOMOD)
interest(4)
extra("EVENTPVT epvt")
}
field(INP,DBF_INLINK) {
prompt("Input Specification")
@@ -24,8 +33,9 @@ recordtype(event) {
promptgroup(GUI_INPUTS)
interest(1)
}
field(SVAL,DBF_USHORT) {
field(SVAL,DBF_STRING) {
prompt("Simulation Value")
size(40)
}
field(SIML,DBF_INLINK) {
prompt("Sim Mode Location")

View File

@@ -24,9 +24,11 @@ recordtype(sel) {
prompt("Select Mechanism")
promptgroup(GUI_INPUTS)
menu(selSELM)
pp(TRUE)
}
field(SELN,DBF_USHORT) {
prompt("Index value")
pp(TRUE)
}
field(PREC,DBF_SHORT) {
prompt("Display Precision")

View File

@@ -24,11 +24,13 @@ recordtype(seq) {
promptgroup(GUI_INPUTS)
interest(1)
menu(seqSELM)
pp(TRUE)
}
field(SELN,DBF_USHORT) {
prompt("Link Selection")
interest(1)
initial("1")
pp(TRUE)
}
field(SELL,DBF_INLINK) {
prompt("Link Selection Loc")
@@ -53,6 +55,7 @@ recordtype(seq) {
field(DO1,DBF_DOUBLE) {
prompt("Constant input 1")
interest(1)
pp(TRUE)
}
field(LNK1,DBF_OUTLINK) {
prompt("Output Link 1")
@@ -72,6 +75,7 @@ recordtype(seq) {
field(DO2,DBF_DOUBLE) {
prompt("Constant input 2")
interest(1)
pp(TRUE)
}
field(LNK2,DBF_OUTLINK) {
prompt("Output Link 2")
@@ -91,6 +95,7 @@ recordtype(seq) {
field(DO3,DBF_DOUBLE) {
prompt("Constant input 3")
interest(1)
pp(TRUE)
}
field(LNK3,DBF_OUTLINK) {
prompt("Output Link 3")
@@ -110,6 +115,7 @@ recordtype(seq) {
field(DO4,DBF_DOUBLE) {
prompt("Constant input 4")
interest(1)
pp(TRUE)
}
field(LNK4,DBF_OUTLINK) {
prompt("Output Link 4")
@@ -129,6 +135,7 @@ recordtype(seq) {
field(DO5,DBF_DOUBLE) {
prompt("Constant input 5")
interest(1)
pp(TRUE)
}
field(LNK5,DBF_OUTLINK) {
prompt("Output Link 5")
@@ -148,6 +155,7 @@ recordtype(seq) {
field(DO6,DBF_DOUBLE) {
prompt("Constant input 6")
interest(1)
pp(TRUE)
}
field(LNK6,DBF_OUTLINK) {
prompt("Output Link 6")
@@ -167,6 +175,7 @@ recordtype(seq) {
field(DO7,DBF_DOUBLE) {
prompt("Constant input 7")
interest(1)
pp(TRUE)
}
field(LNK7,DBF_OUTLINK) {
prompt("Output Link 7")
@@ -186,6 +195,7 @@ recordtype(seq) {
field(DO8,DBF_DOUBLE) {
prompt("Constant input 8")
interest(1)
pp(TRUE)
}
field(LNK8,DBF_OUTLINK) {
prompt("Output Link 8")
@@ -205,6 +215,7 @@ recordtype(seq) {
field(DO9,DBF_DOUBLE) {
prompt("Constant input 9")
interest(1)
pp(TRUE)
}
field(LNK9,DBF_OUTLINK) {
prompt("Output Link 9")
@@ -224,6 +235,7 @@ recordtype(seq) {
field(DOA,DBF_DOUBLE) {
prompt("Constant input 10")
interest(1)
pp(TRUE)
}
field(LNKA,DBF_OUTLINK) {
prompt("Output Link 10")

View File

@@ -14,6 +14,8 @@ USR_INCLUDES = -I../../ca
INC += rsrv.h
INC += rsrvIocRegister.h
# The following is used by iocmon
INC += server.h
LIB_SRCS += caserverio.c
LIB_SRCS += caservertask.c

75
str-to-enum.patch Normal file
View File

@@ -0,0 +1,75 @@
=== modified file 'src/db/dbConvert.c'
--- src/db/dbConvert.c 2012-01-11 22:47:37 +0000
+++ src/db/dbConvert.c 2012-01-26 23:05:05 +0000
@@ -2600,7 +2600,7 @@
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);
@@ -2649,7 +2649,7 @@
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);
@@ -2687,7 +2687,7 @@
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);
=== modified file 'src/db/dbFastLinkConv.c'
--- src/db/dbFastLinkConv.c 2010-10-05 19:27:37 +0000
+++ src/db/dbFastLinkConv.c 2012-01-26 23:05:11 +0000
@@ -272,7 +272,7 @@
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 @@
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 @@
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);
=== modified file 'src/db/dbTest.c'
--- src/db/dbTest.c 2010-10-05 19:27:37 +0000
+++ src/db/dbTest.c 2012-01-26 21:34:42 +0000
@@ -317,7 +317,7 @@
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;

86
sunpro.patch Normal file
View File

@@ -0,0 +1,86 @@
=== modified file 'src/ca/udpiiu.cpp'
--- src/ca/udpiiu.cpp 2011-07-26 22:23:34 +0000
+++ src/ca/udpiiu.cpp 2011-12-13 01:50:13 +0000
@@ -397,6 +397,11 @@
} while ( ! this->iiu.shutdownCmd );
}
+/* for sunpro compiler */
+udpiiu::M_repeaterTimerNotify::~M_repeaterTimerNotify ()
+{
+}
+
/*
* udpiiu::M_repeaterTimerNotify::repeaterRegistrationMessage ()
*
=== modified file 'src/ca/udpiiu.h'
--- src/ca/udpiiu.h 2011-09-08 23:57:14 +0000
+++ src/ca/udpiiu.h 2011-12-13 01:50:13 +0000
@@ -143,6 +143,7 @@
public:
M_repeaterTimerNotify ( udpiiu & iiu ) :
m_udpiiu ( iiu ) {}
+ ~M_repeaterTimerNotify (); /* for sunpro compiler */
// repeaterTimerNotify
void repeaterRegistrationMessage (
unsigned attemptNumber );
=== modified file 'src/cas/generic/st/casStreamOS.cc'
--- src/cas/generic/st/casStreamOS.cc 2011-04-05 21:08:49 +0000
+++ src/cas/generic/st/casStreamOS.cc 2011-12-13 01:50:13 +0000
@@ -231,6 +231,18 @@
}
//
+// casStreamOS::armRecv ()
+//
+inline void casStreamOS::armRecv()
+{
+ if ( ! this->pRdReg ) {
+ if ( ! this->inBufFull() ) {
+ this->pRdReg = new casStreamReadReg ( *this );
+ }
+ }
+}
+
+//
// casStreamIOWakeup::expire()
//
// This is called whenever asynchronous IO completes
@@ -298,18 +310,6 @@
}
//
-// casStreamOS::armRecv ()
-//
-inline void casStreamOS::armRecv()
-{
- if ( ! this->pRdReg ) {
- if ( ! this->inBufFull() ) {
- this->pRdReg = new casStreamReadReg ( *this );
- }
- }
-}
-
-//
// casStreamOS::disarmRecv ()
//
inline void casStreamOS::disarmRecv ()
=== modified file 'src/libCom/test/epicsTimeTest.cpp'
--- src/libCom/test/epicsTimeTest.cpp 2007-05-07 20:50:38 +0000
+++ src/libCom/test/epicsTimeTest.cpp 2011-12-13 01:50:13 +0000
@@ -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>