Compare commits
398 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aee5c90f6 | ||
|
|
403624903e | ||
|
|
6d17162c11 | ||
|
|
64c0807817 | ||
|
|
d0b06e271b | ||
|
|
b7c68df55e | ||
|
|
dff7d483ff | ||
|
|
0197dbeb24 | ||
|
|
c6ee0cf8d3 | ||
|
|
3f3c33e159 | ||
|
|
8363b8267d | ||
|
|
67b972448f | ||
|
|
287fd7efa8 | ||
|
|
c80d0e5c8e | ||
|
|
417ef02d33 | ||
|
|
6a7445abdf | ||
|
|
365f1dc84e | ||
|
|
2151e6b6ad | ||
|
|
fb931434bd | ||
|
|
26c756d4cf | ||
|
|
fa12125bdf | ||
|
|
7d7f4df700 | ||
|
|
146eb58120 | ||
|
|
e658f3c108 | ||
|
|
5e94b2146f | ||
|
|
87cef6172d | ||
|
|
f677d2f6c5 | ||
|
|
53360f3dea | ||
|
|
8c75201ad8 | ||
|
|
0569fc753d | ||
|
|
8fa418519e | ||
|
|
98641bcfd2 | ||
|
|
3449a7157a | ||
|
|
bc2b80584c | ||
|
|
75a2d6229f | ||
|
|
14a47a31e9 | ||
|
|
139472e2db | ||
|
|
5731e72cf1 | ||
|
|
b4e2c4c432 | ||
|
|
4f03bba90d | ||
|
|
cb119338b2 | ||
|
|
d2c672d238 | ||
|
|
dc2fb8bb5c | ||
|
|
8739e1c298 | ||
|
|
c7e7f8e221 | ||
|
|
25c30be105 | ||
|
|
dc930863f2 | ||
|
|
c508e485ba | ||
|
|
e700d00db0 | ||
|
|
5c0f09c5d2 | ||
|
|
bd4b66de07 | ||
|
|
36aa145d04 | ||
|
|
b75254ec92 | ||
|
|
8a1987ea9e | ||
|
|
55bdb9cd2a | ||
|
|
b6e3f6d481 | ||
|
|
ba1139f3c9 | ||
|
|
f4876149bb | ||
|
|
1c95d2eca8 | ||
|
|
39b89bd349 | ||
|
|
0c99fe1bc8 | ||
|
|
13ec7a675c | ||
|
|
f42c2954df | ||
|
|
1a09047c87 | ||
|
|
4c2d266910 | ||
|
|
de9767dc34 | ||
|
|
58cf1e72ab | ||
|
|
8473be4f20 | ||
|
|
4d4063d7ce | ||
|
|
daeafe774f | ||
|
|
69fc21474b | ||
|
|
a4790a1dc2 | ||
|
|
c5414a268c | ||
|
|
da3cd3bc19 | ||
|
|
5f78b88f07 | ||
|
|
bfe0eb9e09 | ||
|
|
daacfdc550 | ||
|
|
8bc593a64e | ||
|
|
a15e9beff6 | ||
|
|
2b7305097b | ||
|
|
509f4de9a0 | ||
|
|
0d85c7d8a8 | ||
|
|
d69a0f70e5 | ||
|
|
7a5bdb93c4 | ||
|
|
3e05c90653 | ||
|
|
dfa35d0596 | ||
|
|
89814eb9e2 | ||
|
|
86e71a90b0 | ||
|
|
bdc723f500 | ||
|
|
502620ee4e | ||
|
|
c3f277dbc6 | ||
|
|
004db1aea7 | ||
|
|
085b228c83 | ||
|
|
2d47ba27b1 | ||
|
|
60c0a98c08 | ||
|
|
9223d7476e | ||
|
|
89d7953c90 | ||
|
|
10a9edf186 | ||
|
|
ce912df8a4 | ||
|
|
532e17fd0f | ||
|
|
13aaf8ef1b | ||
|
|
9df773e88f | ||
|
|
1069541aa6 | ||
|
|
9b82574901 | ||
|
|
cb9934b0c7 | ||
|
|
d5e01c38b1 | ||
|
|
d4c8dd67d3 | ||
|
|
d99c0b613a | ||
|
|
91097d7d32 | ||
|
|
010ebea821 | ||
|
|
2f829e5992 | ||
|
|
4c302621e2 | ||
|
|
22ef6a9653 | ||
|
|
a4aa9234ed | ||
|
|
92a9d4cebf | ||
|
|
7eba880fc6 | ||
|
|
4b89949310 | ||
|
|
2a809e2102 | ||
|
|
9a94ca9d88 | ||
|
|
ce20721cf9 | ||
|
|
d2ff90286c | ||
|
|
15e78067ca | ||
|
|
399017339e | ||
|
|
5a91260f49 | ||
|
|
40c0281ea1 | ||
|
|
29d605faaf | ||
|
|
2bbcec03c0 | ||
|
|
89aa261055 | ||
|
|
e1f3c9fd40 | ||
|
|
e2ecac9e96 | ||
|
|
892e71f55b | ||
|
|
0d12ed33ca | ||
|
|
5161a3b939 | ||
|
|
48ea77dc6f | ||
|
|
02c67eda2c | ||
|
|
0dc034962c | ||
|
|
25c797b212 | ||
|
|
527dbf796d | ||
|
|
b3bb33f448 | ||
|
|
231a037c0b | ||
|
|
81ef601637 | ||
|
|
86152e91b9 | ||
|
|
331979dfb9 | ||
|
|
4f731caf14 | ||
|
|
e7f16cb078 | ||
|
|
370e46227a | ||
|
|
e76362d84b | ||
|
|
62df64a03c | ||
|
|
2d733190ce | ||
|
|
54a5a71377 | ||
|
|
108a7a6e0f | ||
|
|
0d6323803f | ||
|
|
0e1aa1c4bb | ||
|
|
400d474bed | ||
|
|
00c2aff710 | ||
|
|
f5803beb8a | ||
|
|
1bb5a5d86b | ||
|
|
07f8759a0a | ||
|
|
7ecc2d0535 | ||
|
|
1a31fbcdda | ||
|
|
fab9e49710 | ||
|
|
cce9a2b3b4 | ||
|
|
d91a3917ce | ||
|
|
f9f5381a30 | ||
|
|
7571947ceb | ||
|
|
dac63b0826 | ||
|
|
06c3533158 | ||
|
|
0d6784c31b | ||
|
|
667ab7eab8 | ||
|
|
372a3dc989 | ||
|
|
1a326265ff | ||
|
|
e8b642bd5f | ||
|
|
906f74cfe1 | ||
|
|
5c99cf24f1 | ||
|
|
bbc999f033 | ||
|
|
b0a654b4c1 | ||
|
|
36733cd907 | ||
|
|
75e43a6b6c | ||
|
|
639d54fd91 | ||
|
|
0975f7457b | ||
|
|
302cde41b0 | ||
|
|
4b8e2bcf2c | ||
|
|
84559b5fd3 | ||
|
|
753ecff270 | ||
|
|
46cfe589d5 | ||
|
|
31c9c89350 | ||
|
|
42953c05f7 | ||
|
|
361d617ede | ||
|
|
207e1ed8f7 | ||
|
|
c106bc9740 | ||
|
|
23be13bd5b | ||
|
|
2e66cfb8fb | ||
|
|
1dda0263f0 | ||
|
|
4db45ea43d | ||
|
|
ecc0d9976d | ||
|
|
9f8e75b945 | ||
|
|
fddaeb1dc8 | ||
|
|
319b886ab4 | ||
|
|
ef292bffe6 | ||
|
|
81bc2a0d7a | ||
|
|
3419fee587 | ||
|
|
a470a5b850 | ||
|
|
5a832e7ccd | ||
|
|
46068e813d | ||
|
|
cd551b4860 | ||
|
|
46255e607a | ||
|
|
5e49aafb5c | ||
|
|
44b0995b0d | ||
|
|
c15d2d589c | ||
|
|
7617d78f36 | ||
|
|
61c0cff87d | ||
|
|
f384eee9b6 | ||
|
|
a868270c68 | ||
|
|
7deabc8923 | ||
|
|
35bbb5d897 | ||
|
|
b04811e146 | ||
|
|
620f8b74b7 | ||
|
|
4154b61d46 | ||
|
|
1388169f1e | ||
|
|
7b7a07c667 | ||
|
|
107f1fa37f | ||
|
|
6c12088e2a | ||
|
|
889d8bc6c2 | ||
|
|
1584471439 | ||
|
|
c020be9e04 | ||
|
|
ff419d8922 | ||
|
|
6e01a1e22c | ||
|
|
6d70a66826 | ||
|
|
a33d6585f9 | ||
|
|
6615cb7fbd | ||
|
|
694d0401f0 | ||
|
|
a29a954a19 | ||
|
|
63a4b83b16 | ||
|
|
f41a7910c4 | ||
|
|
88702dd180 | ||
|
|
c31910760f | ||
|
|
0d07d00108 | ||
|
|
3d377eed1d | ||
|
|
63aba004d1 | ||
|
|
f8647ac5c6 | ||
|
|
045619d68a | ||
|
|
cd84c95920 | ||
|
|
7a1249cd99 | ||
|
|
262901c567 | ||
|
|
c7e31a2a41 | ||
|
|
99690a12e2 | ||
|
|
ca9146dfb5 | ||
|
|
5d2cc64d62 | ||
|
|
15c156d41f | ||
|
|
ab176a13cd | ||
|
|
cb1c8e14af | ||
|
|
4a95bacb24 | ||
|
|
66c0ecd2f9 | ||
|
|
3973a3fdb2 | ||
|
|
a7b44180bd | ||
|
|
096172f252 | ||
|
|
e8a2cdeee1 | ||
|
|
e6173f93eb | ||
|
|
f81097d891 | ||
|
|
269acc7478 | ||
|
|
2f33de21fe | ||
|
|
e553e1b21e | ||
|
|
0d2e8aa434 | ||
|
|
dd3d974bc7 | ||
|
|
f02e58528c | ||
|
|
1f791db248 | ||
|
|
d7cf7531b2 | ||
|
|
bd93889676 | ||
|
|
a2cd656268 | ||
|
|
bcbcf05110 | ||
|
|
f408398166 | ||
|
|
34a59c7eb9 | ||
|
|
447e03c994 | ||
|
|
bedba55eb5 | ||
|
|
0f2ce403bb | ||
|
|
4d636df146 | ||
|
|
4c827f8104 | ||
|
|
5d036dc54b | ||
|
|
5a41338d08 | ||
|
|
b4f40d0011 | ||
|
|
63f139adc5 | ||
|
|
47223261a0 | ||
|
|
a15c5377f2 | ||
|
|
162ffc9873 | ||
|
|
34a4b00f91 | ||
|
|
5505bfc3ab | ||
|
|
72021a6501 | ||
|
|
2e07db4a3e | ||
|
|
2c7e345a00 | ||
|
|
916038e13a | ||
|
|
6f030c8030 | ||
|
|
4e92e2f36c | ||
|
|
0120c0e2a1 | ||
|
|
3d42f8df29 | ||
|
|
bf9cd7241a | ||
|
|
39bae7925b | ||
|
|
6acf7c6294 | ||
|
|
9f216b07df | ||
|
|
c23cb75b21 | ||
|
|
45f71fcde9 | ||
|
|
ab627a9166 | ||
|
|
87023ea4b2 | ||
|
|
d41312bac5 | ||
|
|
012f44ff48 | ||
|
|
e3e3737a71 | ||
|
|
2999b11a51 | ||
|
|
2a02939267 | ||
|
|
48b47b519d | ||
|
|
73dd387f05 | ||
|
|
2d613ba5d0 | ||
|
|
7ef6eaee28 | ||
|
|
9b3cf1dc84 | ||
|
|
8ebd5d4e0a | ||
|
|
83adcfbaea | ||
|
|
ac8dc4facd | ||
|
|
75ddcbaf06 | ||
|
|
cd1d544401 | ||
|
|
1cfd4c9100 | ||
|
|
4d84f66918 | ||
|
|
84dd4cdd2b | ||
|
|
8148784a20 | ||
|
|
12b20f2398 | ||
|
|
4324145435 | ||
|
|
e227241d4b | ||
|
|
f07f9d8b2b | ||
|
|
c43b60c6ef | ||
|
|
f4251bcf79 | ||
|
|
1b20ea0e6a | ||
|
|
6c205869f6 | ||
|
|
3e5f48cd05 | ||
|
|
dfebaae2cf | ||
|
|
6c46c794f6 | ||
|
|
6355bd4c80 | ||
|
|
629b14d3d4 | ||
|
|
f54d1ca30a | ||
|
|
4d5213f609 | ||
|
|
3d1dfa5dc6 | ||
|
|
b4715368d7 | ||
|
|
6cb83962d0 | ||
|
|
99778934c1 | ||
|
|
f6e1d32b25 | ||
|
|
975a1af43b | ||
|
|
f2fc8f8838 | ||
|
|
e9f54b70d9 | ||
|
|
b97efc9f7d | ||
|
|
23d4d7f790 | ||
|
|
94e70da4ef | ||
|
|
744e836ad8 | ||
|
|
ad878fc71d | ||
|
|
51a8b2ec98 | ||
|
|
6669549c68 | ||
|
|
55b22facee | ||
|
|
77a8aa677a | ||
|
|
2f7abfdd7a | ||
|
|
8006613981 | ||
|
|
4a7152c1a2 | ||
|
|
77b28ee777 | ||
|
|
cb430154d0 | ||
|
|
cb34e16385 | ||
|
|
f212fae267 | ||
|
|
ce1be263d5 | ||
|
|
0ca4281952 | ||
|
|
05dad621be | ||
|
|
8507d48527 | ||
|
|
44c358d6bd | ||
|
|
0f7189d62b | ||
|
|
d254a52c4d | ||
|
|
400c482bb2 | ||
|
|
3b602063fa | ||
|
|
c097ce9b82 | ||
|
|
288e8abe90 | ||
|
|
e5ba349551 | ||
|
|
7f3db9f676 | ||
|
|
d0ca66c2e3 | ||
|
|
33ee0cba83 | ||
|
|
61a4d8a0d3 | ||
|
|
88b13e36f0 | ||
|
|
2b21145d19 | ||
|
|
6a1ea9df6a | ||
|
|
ec29674d06 | ||
|
|
6fe68a0cb3 | ||
|
|
b9fa2e7515 | ||
|
|
aa2273c7d3 | ||
|
|
58a741d845 | ||
|
|
f291862044 | ||
|
|
0999b6d923 | ||
|
|
c75ab8eea6 | ||
|
|
da5bc3b820 | ||
|
|
1a6c1caa54 | ||
|
|
0e0aa7bac5 | ||
|
|
ef04b81c74 | ||
|
|
7035e0f475 | ||
|
|
367374b51c | ||
|
|
55ac37cfac | ||
|
|
7c5e384d08 | ||
|
|
751e52a314 | ||
|
|
becd80c4d8 | ||
|
|
6614ff45a9 |
@@ -18,7 +18,7 @@
|
||||
|
||||
EPICS_VERSION=3
|
||||
EPICS_REVISION=14
|
||||
EPICS_MODIFICATION=6
|
||||
EPICS_MODIFICATION=7
|
||||
EPICS_UPDATE_NAME=
|
||||
EPICS_UPDATE_LEVEL=0
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#Syntax:
|
||||
# ARCH_<host_arch> = <epics_host_arch>
|
||||
ARCH_solarisGnu = solaris-sparc-gnu
|
||||
ARCH_solarisNonshared = solaris-sparc-nonshared
|
||||
#ARCH_solaris = solaris-sparc-static
|
||||
#ARCH_solaris = solaris-sparc-debug
|
||||
ARCH_solaris = solaris-sparc
|
||||
@@ -46,4 +47,3 @@ HOST_ARCH := $(EPICS_HOST_ARCH)
|
||||
# and change ARCH_solaris=solaris-<arch> to ARCH_solaris=solaris-<arch>-gnu
|
||||
# in base/config/CONFIG_COMPAT.
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ EPICS_BASE_HOST_BIN = $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH)
|
||||
EPICS_BASE_HOST_LIB = $(EPICS_BASE)/lib/$(EPICS_HOST_ARCH)
|
||||
ifdef T_A
|
||||
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
|
||||
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -31,7 +32,7 @@ EPICS_BASE_IOC_LIBS += dbIoc registryIoc dbStaticIoc ca Com
|
||||
#---------------------------------------------------------------
|
||||
# Epics base Host libraries
|
||||
|
||||
EPICS_BASE_HOST_LIBS += cas gdd iocsh asHost dbStaticHost
|
||||
EPICS_BASE_HOST_LIBS += cas gdd iocsh asHost dbStaticHost registryIoc
|
||||
EPICS_BASE_HOST_LIBS += ca Com
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -48,23 +49,30 @@ endif # EPICS_BASE
|
||||
BASE_CPPFLAGS =
|
||||
|
||||
# osithread default stack
|
||||
OSITHREAD_USE_DEFAULT_STACK = YES
|
||||
OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK
|
||||
OSITHREAD_DEFAULT_STACK_FLAGS_NO =
|
||||
BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Where to find the installed build tools
|
||||
|
||||
EPICS_BASE_TOOLS_BIN_HOST = $(EPICS_BASE_BIN)
|
||||
EPICS_BASE_TOOLS_BIN_CROSS = $(EPICS_BASE_HOST_BIN)
|
||||
EPICS_BASE_TOOLS_BIN = $(EPICS_BASE_TOOLS_BIN_$(BUILD_CLASS))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Epics base build tools and tool flags
|
||||
|
||||
MAKEBPT = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/makeBpt$(HOSTEXE))
|
||||
DBEXPAND = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/dbExpand$(HOSTEXE))
|
||||
DBTORECORDTYPEH = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/dbToRecordtypeH$(HOSTEXE))
|
||||
DBTOMENUH = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/dbToMenuH$(HOSTEXE))
|
||||
REGISTERRECORDDEVICEDRIVER = $(PERL) $(EPICS_BASE_HOST_BIN)/registerRecordDeviceDriver.pl
|
||||
MAKEBPT = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/makeBpt$(HOSTEXE))
|
||||
DBEXPAND = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/dbExpand$(HOSTEXE))
|
||||
DBTORECORDTYPEH = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/dbToRecordtypeH$(HOSTEXE))
|
||||
DBTOMENUH = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/dbToMenuH$(HOSTEXE))
|
||||
REGISTERRECORDDEVICEDRIVER = $(PERL) $(EPICS_BASE_TOOLS_BIN)/registerRecordDeviceDriver.pl
|
||||
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/antelope$(HOSTEXE))
|
||||
ELEX = $(call PATH_FILTER, $(EPICS_BASE_HOST_BIN)/e_flex$(HOSTEXE)) -S$(EPICS_BASE)/include/flex.skel.static
|
||||
EYACC = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/antelope$(HOSTEXE))
|
||||
ELEX = $(call PATH_FILTER, $(EPICS_BASE_TOOLS_BIN)/e_flex$(HOSTEXE)) -S$(EPICS_BASE)/include/flex.skel.static
|
||||
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
EPICS_VERSION=3
|
||||
EPICS_REVISION=14
|
||||
EPICS_MODIFICATION=6
|
||||
EPICS_MODIFICATION=7
|
||||
EPICS_UPDATE_NAME=
|
||||
EPICS_UPDATE_LEVEL=0
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ INSTALL_SHRLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
|
||||
|
||||
#Directories for libraries
|
||||
SHRLIB_SEARCH_DIRS = $(INSTALL_LIB)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Ext, app, and module configure dir targets
|
||||
CONFIG_TARGETS += CONFIG_APP_INCLUDE RULES_INCLUDE
|
||||
@@ -281,8 +284,8 @@ ARFLAGS =
|
||||
ARCMD = $(AR) $(ARFLAGS) $(USR_ARFLAGS) $@ $(LIBRARY_LD_OBJS)
|
||||
|
||||
#--------------------------------------------------
|
||||
# ld default
|
||||
LDCMD = $(LD) -o $@ $^
|
||||
# 'Munch' link-edit
|
||||
MUNCH_CMD = $(LD) -o $@ $^
|
||||
|
||||
#--------------------------------------------------
|
||||
# Build compile line here
|
||||
|
||||
@@ -36,6 +36,7 @@ EPICS_CA_REPEATER_PORT=5065
|
||||
EPICS_CA_SERVER_PORT=5064
|
||||
EPICS_CA_MAX_ARRAY_BYTES=16384
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CA_MAX_SEARCH_PERIOD=300.0
|
||||
EPICS_CAS_BEACON_PERIOD=
|
||||
EPICS_CAS_BEACON_PORT=
|
||||
EPICS_CAS_AUTO_BEACON_ADDR_LIST=""
|
||||
|
||||
@@ -23,20 +23,20 @@
|
||||
# <operating system>-<architecture>[-<alternate compiler>]
|
||||
#
|
||||
# Currently Supporting:
|
||||
# aix-ppc (HP compiler used for host builds)
|
||||
# aix-ppc-gnu (GNU compiler used for host builds)
|
||||
# cygwin-x86 (cygwin compiler used for host builds)
|
||||
# darwin-ppc
|
||||
# hpux-parisc (HP compiler used for host builds)
|
||||
# hpux-parisc-gnu (GNU compiler used for host builds)
|
||||
# osf-alpha
|
||||
# linux-x86 (GNU compiler used for host builds)
|
||||
# linux-x86-borland (Borland C++ compiler used for host builds)
|
||||
# solaris-sparc (sun compiler used for host builds)
|
||||
# solaris-sparc-gnu (GNU compiler used for host builds)
|
||||
# solaris-x86 (sun compiler used for host builds)
|
||||
# solaris-x86-gnu (GNU compiler used for host builds)
|
||||
# sun4-x86 (sun compiler used for host builds)
|
||||
# linux-x86 (GNU compiler used for host builds)
|
||||
# win32-x86 (MS Visual C++ compiler used for host builds)
|
||||
# win32-x86-borland (Borland C++ compiler used for host builds)
|
||||
# lynxos-x86
|
||||
# darwin-ppc
|
||||
# linux-mpc82xx
|
||||
|
||||
# Debugging builds
|
||||
# linux-x86-debug (GNU compiler with -g option for host builds)
|
||||
@@ -52,6 +52,11 @@
|
||||
# The cross-compiler architectures to build EPICS for
|
||||
#
|
||||
# Currently Supporting:
|
||||
# linux-386 (linux-x86 host)
|
||||
# linux-486 (linux-x86 host)
|
||||
# linux-586 (linux-x86 host)
|
||||
# linux-686 (linux-x86 host)
|
||||
# linux-athlon (linux-x86 host)
|
||||
# vxWorks-486
|
||||
# vxWorks-68040
|
||||
# vxWorks-68040lc
|
||||
@@ -67,6 +72,9 @@
|
||||
# RTEMS-mcp750
|
||||
# RTEMS-psim
|
||||
#
|
||||
# Debugging builds
|
||||
# vxWorks-68040-debug
|
||||
|
||||
# Definitions of CROSS_COMPILER_TARGET_ARCHS in
|
||||
# configure/os/CONFIG_SITE.<host>.Common files will
|
||||
# override
|
||||
|
||||
@@ -60,7 +60,7 @@ TEMPLATE2=$(patsubst %0,%,$(patsubst %1,%,$(patsubst %2,%,$(patsubst %3,%,$(pats
|
||||
$(patsubst %5,%,$(patsubst %6,%,$(patsubst %7,%,$(patsubst %8,%,$(patsubst %9,%, \
|
||||
$(TEMPLATE1)))))))))))
|
||||
TEMPLATE3=$(addsuffix .template,$(addprefix ../,$(TEMPLATE2)))
|
||||
TEMPLATE_FILENAME=$(firstword $(wildcard $(addprefix ../,$($*_TEMPLATE)) ../$*.template $(TEMPLATE3)) $(TEMPLATE3))
|
||||
TEMPLATE_FILENAME=$(firstword $(wildcard $(addprefix ../,$($*_TEMPLATE)) ../$*.template $(TEMPLATE3) $(TEMPLATE3) ../template))
|
||||
|
||||
# dbst based database optimization
|
||||
ifeq '$(DB_OPT)' 'YES'
|
||||
@@ -113,11 +113,11 @@ $(DBDDEPENDS_FILES):
|
||||
|
||||
##################################################### build dependancies, clean rule
|
||||
|
||||
ifdef DBD_INSTALLS
|
||||
ifneq (,$(strip $(DBD_INSTALLS)))
|
||||
buildInstall : dbdInstalls
|
||||
endif
|
||||
|
||||
ifdef DB_INSTALLS
|
||||
ifneq (,$(strip $(DB_INSTALLS)))
|
||||
buildInstall : dbInstalls
|
||||
endif
|
||||
|
||||
|
||||
@@ -13,8 +13,17 @@ include $(CONFIG)/RULES_DIRS
|
||||
build: buildInstall
|
||||
install: buildInstall
|
||||
|
||||
ifneq ($(findstring $(ARCH),$(BUILD_ARCHS)),)
|
||||
buildInstall: $(TARGETS)
|
||||
|
||||
clean:
|
||||
$(RM) cdCommands envPaths
|
||||
|
||||
else
|
||||
buildInstall:
|
||||
clean:
|
||||
endif
|
||||
|
||||
envPaths cdCommands: $(wildcard $(TOP)/configure/RELEASE*) \
|
||||
$(TOP)/configure/CONFIG $(INSTALL_BIN)
|
||||
@$(RM) $@
|
||||
@@ -24,6 +33,6 @@ else
|
||||
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) -t $(IOCS_APPL_TOP) $@
|
||||
endif
|
||||
|
||||
realclean clean:
|
||||
realclean:
|
||||
$(RM) cdCommands envPaths
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) \
|
||||
|
||||
#---------------------------------------------------------------
|
||||
ifneq ($(CONFIG),$(TOP)/configure)
|
||||
RULES_TOP:=$(INSTALL_LOCATION)
|
||||
-include $(TOP)/configure/RULES_BUILD
|
||||
endif
|
||||
-include $(TOP)/configure/O.$(T_A)/RULES_INCLUDE
|
||||
@@ -286,13 +287,13 @@ $(LOADABLE_SHRLIBNAME):$(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX): $(LI
|
||||
@$(RM) $@
|
||||
$(PERL) $(TOOLS)/munch.pl < $< > $@
|
||||
|
||||
$(MUNCHNAME):%.munch : %_ctdt$(OBJ) %$(EXE)
|
||||
$(MUNCHNAME):%$(MUNCH_SUFFIX) : $(MUNCH_DEPENDS) %$(EXE)
|
||||
@$(RM) $@
|
||||
$(LDCMD)
|
||||
$(MUNCH_CMD)
|
||||
|
||||
$(OBJLIB_MUNCHNAME):%.munch : %_ctdt$(OBJ) %$(OBJ)
|
||||
@$(RM) $@
|
||||
$(LDCMD)
|
||||
$(MUNCH_CMD)
|
||||
|
||||
# Ext, app and module rules
|
||||
RULES_INCLUDE CONFIG_APP_INCLUDE: $(wildcard $(TOP)/configure/RELEASE*)
|
||||
@@ -329,7 +330,7 @@ $(INSTALL_LIB)/%.lib: %.lib
|
||||
$(INSTALL_SHRLIB)/lib%: lib%
|
||||
@echo "Installing shared library $@"
|
||||
@$(INSTALL_LIBRARY) -d -m 555 $< $(INSTALL_SHRLIB)
|
||||
ifdef SHRLIB_VERSION
|
||||
ifneq (,$(strip $(SHRLIB_VERSION)))
|
||||
@$(RM) $(subst .$(SHRLIB_VERSION),,$@)
|
||||
ln -s $< $(subst .$(SHRLIB_VERSION),,$@)
|
||||
endif # SHRLIB_VERSION
|
||||
@@ -347,6 +348,10 @@ endif
|
||||
$(INSTALL_LOADABLE_SHRLIBS): $(INSTALL_SHRLIB)/%: %
|
||||
@echo "Installing loadable shared library $@"
|
||||
@$(INSTALL_LIBRARY) -d -m 555 $< $(INSTALL_SHRLIB)
|
||||
ifneq (,$(strip $(LOADABLE_SHRLIB_VERSION)))
|
||||
@$(RM) $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
|
||||
ln -s $< $(subst .$(LOADABLE_SHRLIB_VERSION),,$@)
|
||||
endif # LOADABLE_SHRLIB_VERSION
|
||||
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
@echo "Installing config file $@"
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#
|
||||
|
||||
|
||||
ifeq ($(BUILD_CLASS),HOST)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# java jdk1.1.5 definitions
|
||||
|
||||
@@ -20,13 +22,16 @@ JAVA_INCLUDES += -I$(JAVA_INC) -I$(JAVA_INC)/$(word 1, $(subst -, ,$(T_A))) -I$(
|
||||
|
||||
JAVACCMD = $(subst \,/,$(JAVA_BIN)/javac$(EXE) $(CLASSPATH) $(SOURCEPATH) $(JAVACFLAGS))
|
||||
JAVAHCMD = $(subst \,/,$(JAVA_BIN)/javah$(EXE) -d $(COMMON_DIR) -force $(CLASSPATH) $(JAVAHFLAGS))
|
||||
JARCMD = $(subst \,/,$(JAVA_BIN)/jar$(EXE) $(JAR_OPTIONS) $(COMMON_JAR) $(JARINPUT) $(JARPACKAGES))
|
||||
JARCMD = $(subst \,/,$(JAVA_BIN)/jar$(EXE) $(JAR_OPTIONS) $@ $(JARINPUT) $(JARPACKAGES))
|
||||
|
||||
#-------------------------------------------------------
|
||||
vpath %.java ..
|
||||
vpath %.jar .. $(COMMON_DIR)
|
||||
|
||||
CLASSPATH=-classpath $(INSTALL_JAVA)$(addprefix :,$(USR_CLASSPATH))
|
||||
SOURCEPATH=-sourcepath .:..:../..
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
CLASSPATH = -classpath $(subst $(space),:,$(strip $(USR_PRECLASSPATH) $(INSTALL_JAVA) $(USR_CLASSPATH)))
|
||||
SOURCEPATH = -sourcepath .:..:../..
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Java directory
|
||||
@@ -58,12 +63,12 @@ DEPTESTJAVA += $(subst .class,.java,$(TESTCLASSES))
|
||||
#-------------------------------------------------------
|
||||
# Java jar file
|
||||
|
||||
COMMON_JAR += $(addprefix $(COMMON_DIR)/,$(JAR))
|
||||
INSTALL_JAR =$(addprefix $(INSTALL_JAVA)/,$(JAR))
|
||||
INSTALL_JAR =$(addprefix $(INSTALL_JAVA)/,$(JAR) $(JAR_INPUT))
|
||||
JARMANIFEST += $(firstword $(MANIFEST) $(JAR_MANIFEST))
|
||||
JARINPUT += $(subst .java,.class,$(JAR_INPUT))
|
||||
JARDEPFILES += $(addprefix $(INSTALL_JAVA)/,$(subst .java,.class,$(JAVA))) $(JARINPUT)
|
||||
JARDEPFILES += $(addprefix $(INSTALL_JAVA)/,$(subst .java,.class,$(JAVA)) $(JAR_INPUT))
|
||||
JARINPUT += $(foreach inp,$(JAR_INPUT),-C $(INSTALL_JAVA) $(subst .java,.class,$(inp)))
|
||||
JARPACKAGES += $(foreach pkg,$(JAR_PACKAGES),-C $(INSTALL_JAVA) $(subst .,/,$(pkg)))
|
||||
PACKAGEDIRS += $(foreach pkg,$(JAR_PACKAGES),$(addprefix $(INSTALL_JAVA)/,$(subst .,/,$(pkg))))
|
||||
|
||||
ifneq ($(JARMANIFEST),)
|
||||
JAR_OPTIONS = cvmf $(JARMANIFEST)
|
||||
@@ -94,15 +99,15 @@ inc: $(JAVA_DIRECTORY_TARGETS) $(INSTALL_CLASSES) $(COMMON_JAVAINC)
|
||||
|
||||
build: inc
|
||||
|
||||
build: $(COMMON_TESTCLASSES) $(COMMON_JAR)
|
||||
build: $(COMMON_TESTCLASSES)
|
||||
|
||||
buildInstall : $(INSTALL_JAR) $(INSTALL_JAVADOC)
|
||||
|
||||
#This clean works only from O.* dirs.
|
||||
clean::
|
||||
@$(RMDIR) $(INSTALL_CLASSES)
|
||||
@$(RMDIR) $(INSTALL_CLASSES) $(PACKAGEDIRS)
|
||||
@$(RM) $(INSTALL_JAR) $(INSTALL_JAVADOC)
|
||||
@$(RM) $(COMMON_TESTCLASSES) $(COMMON_JAR) $(COMMON_JAVAINC)
|
||||
@$(RM) $(COMMON_TESTCLASSES) $(COMMON_JAVAINC)
|
||||
|
||||
ifdef JAVA_DIRECTORY_TARGETS
|
||||
$(JAVA_DIRECTORY_TARGETS):
|
||||
@@ -138,7 +143,16 @@ $(INSTALL_JAVA)/%.jar: $(COMMON_DIR)/%.jar
|
||||
@echo "Installing java jar file $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_JAVA)/%.jar: %.jar
|
||||
@echo "Installing java jar file $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
$(addprefix $(INSTALL_JAVA)/, $(JARINPUT)): $(INSTALL_JAVA)/%: ../%
|
||||
@echo "Installing jar input file $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
.PHONY: all install buildInstall rebuild clean build inc
|
||||
|
||||
.PRECIOUS: $(COMMON_JAVAINC)
|
||||
|
||||
endif
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Where to find RTEMS
|
||||
RTEMS_BASE=/opt/rtems
|
||||
RTEMS_BASE=/opt/rtems-4.7
|
||||
RTEMS_VERSION=4.7
|
||||
|
||||
#-------------------------------------------------------
|
||||
# RTEMS tools are similar to UNIX tools
|
||||
@@ -23,7 +24,7 @@ RTEMS_BASE=/opt/rtems
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Pick up the RTEMS tool/path definitions from the RTEMS BSP directory.
|
||||
include $(RTEMS_BASE)/$(RTEMS_TARGET_CPU)-rtems/$(subst RTEMS-,,$(T_A))/Makefile.inc
|
||||
include $(RTEMS_BASE)/$(RTEMS_TARGET_CPU)-rtems$(RTEMS_VERSION)/$(subst RTEMS-,,$(T_A))/Makefile.inc
|
||||
include $(RTEMS_CUSTOM)
|
||||
include $(CONFIG.CC)
|
||||
|
||||
@@ -46,7 +47,7 @@ VALID_BUILDS = Ioc
|
||||
# through the following contortions to get the EPICS flags back.
|
||||
CFLAGS = $(CONFORM_CFLAGS) $(CROSS_CFLAGS) $(OPT_CFLAGS) $(DEBUG_CFLAGS)\
|
||||
$(WARN_CFLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS)\
|
||||
$(CODE_CFLAGS) $(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS)
|
||||
$(CODE_CFLAGS) $(STATIC_CFLAGS) $(OP_SYS_CFLAGS) $(LIBRARY_SRC_CFLAGS)
|
||||
|
||||
CXXFLAGS = $(CONFORM_CXXFLAGS) $(CROSS_CXXFLAGS) $(OPT_CXXFLAGS)\
|
||||
$(DEBUG_CXXFLAGS) $(WARN_CXXFLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS)\
|
||||
@@ -69,6 +70,10 @@ $(BASE_CPPFLAGS) $(TARGET_CPPFLAGS) $(USR_CPPFLAGS) $(ARCH_DEP_CPPFLAGS)\
|
||||
CROSS_CPPFLAGS =
|
||||
CROSS_LDFLAGS =
|
||||
SHRLIB_CFLAGS =
|
||||
OPT_CFLAGS_YES = $(CFLAGS_OPTIMIZE_V)
|
||||
OPT_CXXFLAGS_YES = $(CFLAGS_OPTIMIZE_V)
|
||||
OPT_CFLAGS_NO = $(CFLAGS_DEBUG_V)
|
||||
OPT_CXXFLAGS_NO = $(CFLAGS_DEBUG_V)
|
||||
|
||||
#--------------------------------------------------
|
||||
# operating system class (include/os/<os_class>)
|
||||
@@ -76,7 +81,7 @@ OS_CLASS = RTEMS
|
||||
|
||||
#--------------------------------------------------
|
||||
# Operating system flags
|
||||
OP_SYS_LDLIBS += -lrtemsCom -lrtemscpu -lCom -lm
|
||||
OP_SYS_LDLIBS += -lrtemsCom -lrtemscpu -lCom -lrtemsNfs -lm
|
||||
OP_SYS_LDFLAGS += $(CPU_CFLAGS) -u Init \
|
||||
$(PROJECT_RELEASE)/lib/no-dpmem.rel \
|
||||
$(PROJECT_RELEASE)/lib/no-mp.rel \
|
||||
|
||||
27
configure/os/CONFIG.Common.RTEMS-mvme2100
Normal file
27
configure/os/CONFIG.Common.RTEMS-mvme2100
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# $Id$
|
||||
# Author: W. Eric Norum
|
||||
# Canadian Light Source
|
||||
# eric@cls.usask.ca
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
ARCH_DEP_CFLAGS += -DHAVE_PPCBUG
|
||||
|
||||
MUNCH_SUFFIX = .boot
|
||||
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
|
||||
define MUNCH_CMD
|
||||
$(RTEMS_BASE)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< rtems
|
||||
gzip -f9 rtems
|
||||
$(RTEMS_BASE)/bin/$(LD_FOR_TARGET) -o $@ \
|
||||
$(PROJECT_RELEASE)/lib/bootloader.o \
|
||||
--just-symbols=$< \
|
||||
-b binary rtems.gz \
|
||||
-T $(PROJECT_RELEASE)/lib/ppcboot.lds \
|
||||
-Map $<.map
|
||||
rm -f rtems.gz
|
||||
endef
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
19
configure/os/CONFIG.Common.RTEMS-mvme5500
Normal file
19
configure/os/CONFIG.Common.RTEMS-mvme5500
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# $Id$
|
||||
# Author: W. Eric Norum
|
||||
# Advanced Photon Source
|
||||
# norume@aps.anl.gov
|
||||
#
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_TARGET_CPU = powerpc
|
||||
ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
|
||||
ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
|
||||
|
||||
MUNCH_SUFFIX = .boot
|
||||
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
|
||||
define MUNCH_CMD
|
||||
$(RTEMS_BASE)/bin/$(OBJCOPY_FOR_TARGET) -O binary $< $@
|
||||
endef
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
@@ -7,6 +7,16 @@
|
||||
# All RTEMS targets use the same Makefile fragment
|
||||
#
|
||||
RTEMS_TARGET_CPU=i386
|
||||
|
||||
MUNCH_SUFFIX = .boot
|
||||
MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
|
||||
define MUNCH_CMD
|
||||
$(RTEMS_BASE)/bin/$(OBJCOPY_FOR_TARGET) -O binary -R .comment -S $< temp.bin
|
||||
$(PROJECT_RELEASE)/build-tools/bin2boot $@ 0x00097E00 \
|
||||
$(PROJECT_RELEASE)/lib/start16.bin 0x00097C00 0 temp.bin 0x00100000 0
|
||||
rm -f temp.bin
|
||||
endef
|
||||
|
||||
include $(CONFIG)/os/CONFIG.Common.RTEMS
|
||||
|
||||
#
|
||||
|
||||
@@ -17,12 +17,9 @@ VALID_BUILDS = Host Ioc
|
||||
GNU_DIR = /usr/local
|
||||
|
||||
#-------------------------------------------------------
|
||||
FULLPATHTOP= $(shell perl $(TOOLS)/fullPathName.pl $(TOP))
|
||||
# Get fullpathname of modules relative to TOP
|
||||
SHRLIB_SEARCH_FULLPATHTOP = $(SHRLIB_SEARCH_DIRS:$(TOP)/%=$(FULLPATHTOP)/%)
|
||||
# Get fullpathname of other relative dirs
|
||||
SHRLIB_SEARCH_FULLPATHDIRS = $(SHRLIB_SEARCH_FULLPATHTOP:.%= \
|
||||
$(shell perl $(TOOLS)/fullPathName.pl .%)
|
||||
# Get fullpathname of relative dirs
|
||||
SHRLIB_SEARCH_FULLPATHDIRS = $(foreach dir,$(SHRLIB_SEARCH_DIRS), \
|
||||
$(shell perl $(TOOLS)/fullPathName.pl $(dir)))
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Unix prefix and suffix definitions
|
||||
@@ -32,7 +29,7 @@ OBJ = .o
|
||||
LIB_PREFIX = lib
|
||||
LIB_SUFFIX = .a
|
||||
SHRLIB_SUFFIX = .so$(addprefix .,$(SHRLIB_VERSION))
|
||||
LOADABLE_SHRLIB_SUFFIX = .so
|
||||
LOADABLE_SHRLIB_SUFFIX = .so$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
|
||||
LOADABLE_SHRLIB_PREFIX = lib
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
@@ -28,7 +28,7 @@ ARCH_DEP_CPPFLAGS += -D_X86_
|
||||
OP_SYS_CPPFLAGS += -DCYGWIN32 -U_WIN32
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_DIRS:%=-Wl,-rpath,%)
|
||||
RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-Wl,-rpath,%)
|
||||
|
||||
LDLIBS_READLINE = -lcygreadline5 -lcygcurses7
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ OP_SYS_CFLAGS = -D_HPUX_SOURCE
|
||||
OP_SYS_CXXFLAGS =
|
||||
|
||||
SHRLIB_SUFFIX = .sl$(addprefix .,$(SHRLIB_VERSION))
|
||||
LOADABLE_SHRLIB_SUFFIX = .sl
|
||||
LOADABLE_SHRLIB_SUFFIX = .sl$(addprefix .,$(LOADABLE_SHRLIB_VERSION))
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
empty:= # trick from the make docs...
|
||||
|
||||
@@ -29,6 +29,8 @@ OP_SYS_LDFLAGS += $(COMPILER_LDFLAGS)
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-R%)
|
||||
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
|
||||
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
GNU_TARGET=sparc-sun-solaris2
|
||||
@@ -44,7 +46,7 @@ OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION))
|
||||
# Definitions used when COMMANDLINE_LIBRARY is READLINE
|
||||
GNU_DIR = /opt/gnu
|
||||
INCLUDES_READLINE = -I$(GNU_DIR)/include
|
||||
LDFLAGS_READLINE += -R$(GNU_DIR)/lib
|
||||
RUNTIME_LDFLAGS_READLINE += -R$(GNU_DIR)/lib
|
||||
LDFLAGS_READLINE += -L$(GNU_DIR)/lib
|
||||
LDLIBS_READLINE = -lreadline -lcurses
|
||||
# Use archive if there is a problem with the readline shared library
|
||||
|
||||
@@ -16,5 +16,6 @@ COMPILER_CPPFLAGS = -D_REENTRANT
|
||||
OP_SYS_LDLIBS_8 = -lc
|
||||
OP_SYS_LDLIBS_9 = -lc
|
||||
|
||||
OP_SYS_LDFLAGS += -R$(GNU_LIB) -L$(GNU_LIB)
|
||||
RUNTIME_LDFLAGS += -R$(GNU_LIB)
|
||||
OP_SYS_LDFLAGS += -L$(GNU_LIB)
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ ARCH_DEP_CPPFLAGS = -D_X86_
|
||||
|
||||
# Set runtime path for shared libraries
|
||||
RUNTIME_LDFLAGS = $(SHRLIB_SEARCH_FULLPATHDIRS:%=-R%)
|
||||
RUNTIME_LDFLAGS += $(RUNTIME_LDFLAGS_$(COMMANDLINE_LIBRARY))
|
||||
|
||||
ifeq ($(BUILD_CLASS),CROSS)
|
||||
GNU_TARGET=x86-sun-solaris2
|
||||
@@ -45,7 +46,7 @@ OP_SYS_LDLIBS += $(OP_SYS_LDLIBS_$(SOLARIS_VERSION))
|
||||
# Definitions used when COMMANDLINE_LIBRARY is READLINE
|
||||
GNU_DIR = /opt/gnu
|
||||
INCLUDES_READLINE = -I$(GNU_DIR)/include
|
||||
LDFLAGS_READLINE += -R$(GNU_DIR)/lib
|
||||
RUNTIME_LDFLAGS_READLINE += -R$(GNU_DIR)/lib
|
||||
LDFLAGS_READLINE += -L$(GNU_DIR)/lib
|
||||
LDLIBS_READLINE = -lreadline -lcurses
|
||||
# Use archive if there is a problem with the readline shared library
|
||||
|
||||
@@ -15,5 +15,6 @@ COMPILER_CPPFLAGS = -D_REENTRANT
|
||||
OP_SYS_LDLIBS_8 = -lc
|
||||
OP_SYS_LDLIBS_9 = -lc
|
||||
|
||||
OP_SYS_LDFLAGS += -R$(GNU_LIB) -L$(GNU_LIB)
|
||||
RUNTIME_LDFLAGS += -R$(GNU_LIB)
|
||||
OP_SYS_LDFLAGS += -L$(GNU_LIB)
|
||||
|
||||
|
||||
@@ -19,4 +19,6 @@ ARCH_CLASS = 68k
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=MC68040
|
||||
ARCH_DEP_CFLAGS = -m68040
|
||||
|
||||
OPT_CFLAGS_YES = -O0
|
||||
|
||||
GNU_TARGET = m68k-wrs-vxworks
|
||||
|
||||
@@ -19,4 +19,6 @@ ARCH_CLASS = 68k
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=MC68LC040
|
||||
ARCH_DEP_CFLAGS = -m68040 -msoft-float
|
||||
|
||||
OPT_CFLAGS_YES = -O0
|
||||
|
||||
GNU_TARGET = m68k-wrs-vxworks
|
||||
|
||||
@@ -19,4 +19,6 @@ ARCH_CLASS = 68k
|
||||
ARCH_DEP_CPPFLAGS = -DCPU=MC68060
|
||||
ARCH_DEP_CFLAGS = -m68040
|
||||
|
||||
OPT_CFLAGS_YES = -O0
|
||||
|
||||
GNU_TARGET = m68k-wrs-vxworks
|
||||
|
||||
@@ -49,6 +49,7 @@ MUNCHNAME = $(PRODNAME:%$(EXE)=%$(MUNCH_SUFFIX))
|
||||
CTDT_SRCS = $(PRODNAME:%$(EXE)=%_ctdt.c)
|
||||
CTDT_OBJS = $(PRODNAME:%$(EXE)=%_ctdt$(OBJ))
|
||||
NMS = $(PRODNAME:%$(EXE)=%.nm)
|
||||
MUNCH_DEPENDS = %_ctdt$(OBJ)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# R3.13 compatability object library definitions
|
||||
@@ -136,7 +137,7 @@ COMPILE.ctdt = $(CC) -c $(CPPFLAGS) $(CFLAGS_ctdt) $(call PATH_FILTER,$(INCLUDES
|
||||
|
||||
#--------------------------------------------------
|
||||
# C preprocessor command
|
||||
VXCPPFLAGS = $(filterout $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS))
|
||||
VXCPPFLAGS = $(filter-out $(OP_SYS_INCLUDE_CPPFLAGS),$(CPPFLAGS))
|
||||
PREPROCESS.cpp = $(CPP) $(VXCPPFLAGS) $(INCLUDES) $< > $@
|
||||
|
||||
#--------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,6 @@ AR = ar
|
||||
ARFLAGS = rcv
|
||||
RANLIB = ranlib -t
|
||||
|
||||
SHRLIB_LDFLAGS = -shared
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared
|
||||
SHRLIB_LDFLAGS = -shared -fPIC
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared -fPIC
|
||||
|
||||
|
||||
@@ -15,3 +15,7 @@ OSITHREAD_USE_DEFAULT_STACK = NO
|
||||
|
||||
HOSTEXE=.exe
|
||||
|
||||
# Needed to find dlls for base installed build tools (antelope,eflex,...)
|
||||
PATH := $(EPICS_BASE_TOOLS_BIN):$(PATH)
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ CCC = $(GNU_BIN)/c++
|
||||
# Darwin shared libraries
|
||||
#
|
||||
SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \
|
||||
-install_name $(firstword $(SHRLIB_SEARCH_DIRS))/$@ \
|
||||
-install_name $(firstword $(SHRLIB_SEARCH_FULLPATHDIRS))/$@ \
|
||||
-compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \
|
||||
-current_version $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)
|
||||
SHRLIB_SUFFIX = .$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION).dylib
|
||||
|
||||
@@ -19,6 +19,6 @@ STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
STATIC_LDLIBS_NO=
|
||||
|
||||
SHRLIB_LDFLAGS += -shared -z defs
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared
|
||||
SHRLIB_LDFLAGS += -shared -fPIC
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared -fPIC
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
||||
STATIC_LDLIBS_NO=
|
||||
|
||||
SHRLIB_LDFLAGS += -G -h $@ -z ignore -z defs
|
||||
LOADABLE_SHRLIB_LDFLAGS += -G -h $@
|
||||
SHRLIB_LDFLAGS += -shared -fPIC -h $@
|
||||
LOADABLE_SHRLIB_LDFLAGS += -shared -fPIC -h $@
|
||||
|
||||
OP_SYS_LDFLAGS += -z ignore -z combreloc -z lazyload
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ SPARCWORKS = /opt/SUNWspro
|
||||
|
||||
CC = $(SPARCWORKS)/bin/cc
|
||||
CCC = $(SPARCWORKS)/bin/CC
|
||||
CPP = $(CC) -E -Qn
|
||||
RANLIB =
|
||||
# required by sun's C++ compiler
|
||||
AR = $(CCC) -xar -o
|
||||
LD = ld -r
|
||||
CPP = gcc -x c -E
|
||||
RANLIB =
|
||||
|
||||
#Prepare the object code for profiling with prof. (YES or NO)
|
||||
PROFILE=NO
|
||||
|
||||
@@ -18,8 +18,8 @@ AR = ar -rc
|
||||
RANLIB=
|
||||
LD = ld -r
|
||||
|
||||
SHRLIB_LDFLAGS = -z defs -G -h $@
|
||||
LOADABLE_SHRLIB_LDFLAGS += -G -h $@
|
||||
SHRLIB_LDFLAGS += -shared -fPIC -h $@ -z defs
|
||||
LOADABLE_SHRLIB_LDFLAGS += -shared -fPIC -h $@
|
||||
|
||||
OP_SYS_LDFLAGS += -z ignore -z combreloc -z lazyload
|
||||
|
||||
|
||||
@@ -7,14 +7,11 @@
|
||||
# Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include definitions common to all Unix target archs
|
||||
include $(CONFIG)/os/CONFIG.Common.UnixCommon
|
||||
|
||||
SPARCWORKS = /opt/SUNWspro
|
||||
|
||||
CC = $(SPARCWORKS)/bin/cc
|
||||
CCC = $(SPARCWORKS)/bin/CC
|
||||
CPP = $(CC) -E
|
||||
CPP = $(CC) -E -Qn
|
||||
RANLIB =
|
||||
# required by sun's C++ compiler
|
||||
AR = $(CCC) -xar -o
|
||||
@@ -22,6 +19,8 @@ LD = ld -r
|
||||
|
||||
#Prepare the object code for profiling with prof. (YES or NO)
|
||||
PROFILE=NO
|
||||
#Prepare the object code for profiling with gprof. (YES or NO)
|
||||
GPROF=NO
|
||||
|
||||
# Configure OS vendor C compiler
|
||||
CONFORM_CFLAGS_ANSI = -Xa -v
|
||||
@@ -36,8 +35,8 @@ OPT_CFLAGS_YES = -xO4
|
||||
OPT_CFLAGS_NO = -g
|
||||
|
||||
# Configure OS vendor C++ compiler
|
||||
CONFORM_CXXFLAGS_NORMAL =
|
||||
CONFORM_CXXFLAGS_STRICT =
|
||||
CONFORM_CXXFLAGS_NORMAL =
|
||||
CONFORM_CXXFLAGS_STRICT =
|
||||
PROF_CXXFLAGS_YES = -p
|
||||
GPROF_CXXFLAGS_YES = -xpg
|
||||
CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
@@ -46,13 +45,16 @@ WARN_CXXFLAGS_NO =
|
||||
OPT_CXXFLAGS_YES = -O
|
||||
OPT_CXXFLAGS_NO = -g
|
||||
|
||||
CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF))
|
||||
|
||||
STATIC_LDFLAGS_YES= -Bstatic
|
||||
STATIC_LDFLAGS_NO=
|
||||
STATIC_LDLIBS_YES= -Bdynamic
|
||||
STATIC_LDLIBS_NO=
|
||||
|
||||
SHRLIB_LDFLAGS = -z defs -KPIC -G -h $@
|
||||
LOADABLE_SHRLIB_LDFLAGS = -KPIC -G -h $@
|
||||
SHRLIB_CFLAGS = -KPIC
|
||||
SHRLIB_LDFLAGS += -z defs -G -h $@ -z text
|
||||
LOADABLE_SHRLIB_LDFLAGS += -G -h $@ -z text
|
||||
|
||||
OP_SYS_LDFLAGS += -z ignore -z combreloc -z lazyload
|
||||
|
||||
|
||||
@@ -25,3 +25,6 @@ ifndef HOME
|
||||
HOME = $(HOMEDRIVE)$(HOMEPATH)
|
||||
endif
|
||||
|
||||
# Needed to find dlls for base installed build tools (antelope,eflex,...)
|
||||
PATH := $(EPICS_BASE_TOOLS_BIN):$(PATH)
|
||||
|
||||
|
||||
@@ -25,3 +25,6 @@ ifndef HOME
|
||||
HOME = $(HOMEDRIVE)$(HOMEPATH)
|
||||
endif
|
||||
|
||||
# Needed to find dlls for base installed build tools (antelope,eflex,...)
|
||||
PATH := $(EPICS_BASE_TOOLS_BIN):$(PATH)
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ DLL_DEF_FLAG = $(addprefix /def:,$(wildcard ../$(addsuffix .def,$*)))
|
||||
#
|
||||
LINK.shrlib = $(WINLINK) /nologo $(WIN32_DLLFLAGS) /implib:$*.lib /out:$*.dll $(DLL_DEF_FLAG)
|
||||
LINK.shrlib += $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
|
||||
LDCMD = $(CCC) /Fo $@ $^
|
||||
MUNCH_CMD = $(CCC) /Fo $@ $^
|
||||
|
||||
|
||||
# adjust names of libraries to build
|
||||
|
||||
14
configure/os/CONFIG_SITE.Common.RTEMS
Normal file
14
configure/os/CONFIG_SITE.Common.RTEMS
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Site-specific information for all RTEMS targets
|
||||
#
|
||||
|
||||
#
|
||||
# If you're not using BOOTP/DHCP to pick up your IOC network configuration
|
||||
# you may need to specify your Internet Domain Name here
|
||||
#
|
||||
OP_SYS_CFLAGS += -DRTEMS_NETWORK_CONFIG_DNS_DOMAINNAME=aps.anl.gov
|
||||
|
||||
#
|
||||
# Specify your desired command-line-input library
|
||||
#
|
||||
EPICSCOMMANDLINE_LIBRARY = READLINE
|
||||
@@ -9,5 +9,5 @@
|
||||
#
|
||||
# Other local options
|
||||
#
|
||||
#OP_SYS_CFLAGS += -g
|
||||
OP_SYS_CFLAGS += -g
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
@@ -20,3 +20,4 @@
|
||||
# If readline is not installed comment the following line
|
||||
# to omit command-line editing and history support
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
OP_SYS_CFLAGS += -g
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
# If readline is installed uncomment the following macro definition
|
||||
# to include command-line editing and history support
|
||||
#
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
@@ -9,3 +9,5 @@
|
||||
# JBA test override values
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 solaris-sparc
|
||||
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040
|
||||
#CROSS_COMPILER_TARGET_ARCHS = RTEMS-mvme2100
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@
|
||||
|
||||
#INSTALL_LOCATION = /home/phoebus/JBA/testBaseNew
|
||||
|
||||
#CROSS_COMPILER_TARGET_ARCHS += vxWorks-ppc604 vxWorks-ppc603 vxWorks-68040
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
#Prepares the object code to collect data for profiling with prof.
|
||||
#PROFILE=YES
|
||||
|
||||
#Compiles for profiling with the gprof profiler.
|
||||
#GPROF=YES
|
||||
|
||||
# Removes -O optimization and adds -g compile option
|
||||
HOST_OPT=NO
|
||||
@@ -200,8 +200,6 @@ sub configAppInclude {
|
||||
# We can't just include TOP in the foreach list:
|
||||
# 1. The lib directory probably doesn't exist yet, and
|
||||
# 2. We need an abolute path but $(TOP_LIB) is relative
|
||||
$path = $macros{"TOP"};
|
||||
print OUT "SHRLIB_SEARCH_DIRS = $path/lib/$arch\n";
|
||||
foreach $app (@includes) {
|
||||
$path = $macros{$app};
|
||||
next unless (-d "$path/lib/$arch");
|
||||
@@ -233,7 +231,8 @@ sub rulesInclude {
|
||||
foreach $app (@includes) {
|
||||
$path = $macros{$app};
|
||||
next unless (-r "$path/configure/RULES_BUILD");
|
||||
print OUT "-include \$(strip \$($app))/configure/RULES_BUILD\n";
|
||||
print OUT "RULES_TOP:=\$($app)\n";
|
||||
print OUT "-include \$(strip \$(RULES_TOP))/configure/RULES_BUILD\n";
|
||||
}
|
||||
close OUT;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ eval 'exec perl -S -w $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
|
||||
use Cwd 'abs_path';
|
||||
my $dir;
|
||||
$dir = abs_path("$ARGV[0]");
|
||||
print "$dir\n";
|
||||
|
||||
if( $ARGV[0] )
|
||||
{
|
||||
$dir = abs_path("$ARGV[0]");
|
||||
print "$dir\n";
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
<body>
|
||||
|
||||
<center>
|
||||
<h2>Converting an EPICS R3.13 application to R3.14.4</h2>
|
||||
<h2>Converting an EPICS R3.13 application to R3.14</h2>
|
||||
</center>
|
||||
|
||||
<p><br>
|
||||
This document describes how to convert a R3.13 vxWorks application so that it
|
||||
builds with release R3.14.4. It describes procedures such that:</p>
|
||||
builds with release R3.14. It describes procedures such that:</p>
|
||||
<ul>
|
||||
<li>The application uses the configure rules which are new to R3.14.</li>
|
||||
</ul>
|
||||
@@ -50,7 +50,7 @@ If sequence programs (*.st or *.stt files) exist in your application, add the
|
||||
SNCSEQ location definition for the R3.14 seq external module</p>
|
||||
|
||||
<p><tt>SNCSEQ =<full path to seq module top></tt></p>
|
||||
The R3.14 seq module must exist and be built with EPICS base R3.14.4
|
||||
The R3.14 seq module must exist and be built with the same EPICS base R3.14 release.
|
||||
|
||||
<h3>Modify the Makefiles in <top>/*App directories.</h3>
|
||||
|
||||
@@ -300,10 +300,14 @@ function("mySubProcess")</pre>
|
||||
<p>Change " i<tt>nclude $(TOP)/config/CONFIG_APP" </tt>to "<tt>include
|
||||
$(TOP)/configure/CONFIG"</tt></p>
|
||||
|
||||
<p>Remove the line "<tt>DIRS += $(wildcard *ioc*"</tt></p>
|
||||
<p>If they do not already exist, add the lines
|
||||
<blockquote>
|
||||
<p><tt>DIRS += $(wildcard *ioc*)</tt></p>
|
||||
<p><tt>DIRS += $(wildcard as*)</tt></p>
|
||||
</blockquote>
|
||||
|
||||
<p>Change <tt>"include $(TOP)/config/RULES.iocBoot" </tt>to "i<tt>nclude
|
||||
$(TOP)/configure/RULES.iocBoot"</tt></p>
|
||||
$(TOP)/configure/RULES_DIRS"</tt></p>
|
||||
|
||||
<h3>Modify the Makefiles in <top>/iocBoot/ioc* directories.</h3>
|
||||
|
||||
|
||||
45
documentation/ConvertingR3.14.6AppsToR3.14.7.html
Normal file
45
documentation/ConvertingR3.14.6AppsToR3.14.7.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="Author" content="jba">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<center>
|
||||
<h2>Converting an EPICS R3.14.6 application to R3.14.7</h2>
|
||||
</center>
|
||||
|
||||
<p>This document describes how to convert a R3.14.6 application so that it
|
||||
builds with release R3.14.7.</p>
|
||||
|
||||
|
||||
<h3>State Notation Compiler flags</h3>
|
||||
|
||||
<blockquote>
|
||||
To make the run-time code reentrant, thus allowing more than one
|
||||
instance of the state program to run on an IOC add the line
|
||||
<pre><name>_SNCFLAGS += +r"</pre> to the Makefile, replacing <name> with the
|
||||
state notation language code file name.
|
||||
</blockquote>
|
||||
|
||||
<h3>epicsExit</h3>
|
||||
<blockquote>
|
||||
Code that calls exit or atexit should change these calls to epicsExit
|
||||
and epicsAtExit. epicsAtExit was created because of problems on
|
||||
vxWorks and windows with the implementation of atexit,
|
||||
i.e. neither of these systems implements exit and atexit according to the POSIX standard.
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
Add the following lines
|
||||
<blockquote>
|
||||
<pre>
|
||||
#include "epicsExit.h"
|
||||
epicsExit(0);
|
||||
</pre>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.6: Known Problems</h1>
|
||||
<h1 style="text-align: center">EPICS Base R3.14.7: Known Problems</h1>
|
||||
|
||||
<p>None yet.</p>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ README.1st
|
||||
|
||||
EPICS base
|
||||
|
||||
Release 3.14.4
|
||||
Release 3.14.*
|
||||
|
||||
What is EPICS base?
|
||||
|
||||
@@ -20,10 +20,8 @@ What is EPICS base?
|
||||
|
||||
What is new in this release?
|
||||
|
||||
This version of EPICS base contains significant changes and offers
|
||||
major improvements in functionality over previous versions. Please
|
||||
check the RELEASE_NOTES file in the distribution for description of
|
||||
changes and release migration details.
|
||||
Please check the RELEASE_NOTES file in the distribution for description
|
||||
of changes and release migration details.
|
||||
|
||||
Copyright
|
||||
|
||||
@@ -35,7 +33,7 @@ Supported platforms
|
||||
Currently this version of EPICS base has been built on the following
|
||||
hosts for the following targets. If you are trying to build EPICS base on a
|
||||
different host or for a different target machine you must get the proper
|
||||
host/target cross compiler and header files and you will have to create
|
||||
host/target cross compiler and header files, and you will have to create
|
||||
and add the appropriate new configure files to the
|
||||
base/configure/os/directory. You can start by copying existing
|
||||
configuration files in the configure/os directory and then make changes
|
||||
@@ -44,26 +42,36 @@ Supported platforms
|
||||
Host platforms (operating system - architecture - <alternate c++
|
||||
compiler>)
|
||||
|
||||
aix-ppc
|
||||
aix-ppc-gnu
|
||||
cygwin-x86
|
||||
darwin-ppc (Mac OS X)
|
||||
hpux-parisc
|
||||
hpux-parisc-gnu
|
||||
linux-mpc82xx
|
||||
linux-x86
|
||||
lynxos-x86
|
||||
osf-alpha
|
||||
linux-x86-borland
|
||||
solaris-sparc
|
||||
solaris-sparc-gnu
|
||||
solaris-x86
|
||||
solaris-x86-gnu
|
||||
sun4-x86
|
||||
win32-x86
|
||||
win32-x86-borland
|
||||
|
||||
Debugging builds
|
||||
linux-x86-debug (GNU compiler with -g option for host builds)
|
||||
solaris-sparc-debug (sun compiler with -g option for host builds)
|
||||
win32-x86-debug (MS Visual C++ with debug option for host builds)
|
||||
|
||||
Cross compile target platforms (operating system - architecture)
|
||||
|
||||
linux-386 (linux-x86 host)
|
||||
linux-486 (linux-x86 host)
|
||||
linux-586 (linux-x86 host)
|
||||
linux-686 (linux-x86 host)
|
||||
linux-athlon (linux-x86 host)
|
||||
vxWorks-486
|
||||
vxWorks-68040
|
||||
vxWorks-68040-debug
|
||||
vxWorks-68040lc
|
||||
vxWorks-68060
|
||||
vxWorks-pentium
|
||||
@@ -71,7 +79,6 @@ Supported platforms
|
||||
vxWorks-ppc603_long
|
||||
vxWorks-ppc604
|
||||
vxWorks-ppc604_long
|
||||
vxWorks-pentium
|
||||
RTEMS-gen68360
|
||||
RTEMS-mcp750
|
||||
RTEMS-mvme167
|
||||
@@ -85,10 +92,8 @@ Supported compilers
|
||||
vendor's C and C++ compilers as well as the GNU gcc and g++
|
||||
compilers. The GNU cross-compilers have been used for all
|
||||
cross-compiled targets. You may need the host vendor's C++ compiler
|
||||
in your search path to do EPICS builds. Check definitions of ACC and
|
||||
CCC in base/configure/os/CONFIG.<host>.<host> or the definitions
|
||||
for GCC and G++ if ANSI=GCC and CPLUSPLUS=GCC are specified
|
||||
in CONFIG_SITE.
|
||||
in your search path to do EPICS builds. Check definitions of CC and
|
||||
CCC in base/configure/os/CONFIG.<host>.<host>.
|
||||
|
||||
Software requirements
|
||||
|
||||
@@ -114,14 +119,22 @@ Software requirements
|
||||
more board support packages. Consult the vxWorks documentation for
|
||||
details.
|
||||
|
||||
Optional GNU compiler requirement for solaris-sparc and win32-x86 hosts
|
||||
If you have state notation language source files (*.st files) which require
|
||||
c preprocessing before conversion to c source, gcc must be in your path.
|
||||
GNU readline or Tecla library
|
||||
GNU readline and Tecla librararies can be used by the IOC shell to
|
||||
provide command line editing and command line history recall and edit.
|
||||
GNU readline (or Tecla library) must be installed on your target system
|
||||
when COMMANDLINE_LIBRARY is set to READLINE (or TECLA) for that target.
|
||||
EPICS (EPICS shell) is the default specified in CONFIG_COMMON. A READLINE
|
||||
override is defined for linux-x86 in the EPICS distribution. Comment out
|
||||
COMMANDLINE_LIBRARY=READLINE in configure/os/CONFIG_SITE.Common.linux-x86
|
||||
if readline is not installed on linux-x86. Command-line editing and
|
||||
history will then be those supplied by the os. On vxWorks the ledLib
|
||||
command-line input libraries are used.
|
||||
|
||||
Host system storage requirements
|
||||
|
||||
The GNU zipped tar file is approximately 1.4 MB in size. The unzipped
|
||||
untarred distribution source tree is approximately 6 MB. The build
|
||||
untarred distribution source tree is approximately 7.3 MB. The build
|
||||
created files for each host take approximately 40 MB and the build
|
||||
created files for each target take approximately 10 MB.
|
||||
|
||||
@@ -145,17 +158,17 @@ WWW pages
|
||||
Additional information on EPICS can be found at the
|
||||
various other WWW links on the EPICS home page at APS.
|
||||
|
||||
Mailing Lists
|
||||
Mailing List
|
||||
|
||||
There is an EPICS mailing list called tech-talk which is hosted at
|
||||
APS, with a list repeater at BESSY. See The EPICS home page for
|
||||
APS, with a list repeater at BESSY. See the EPICS home page for
|
||||
subscription instructions.
|
||||
|
||||
Directory Structure
|
||||
|
||||
Distribution directory structure:
|
||||
|
||||
base Root directory of the base istribution
|
||||
base Root directory of the base distribution
|
||||
base/config R3.13 compatibility build configuration files
|
||||
base/config/tools Perl and shell scripts used in the R3.13 build
|
||||
base/configure Operating system independent build config files
|
||||
@@ -168,11 +181,13 @@ Directory Structure
|
||||
base/src/bpt Break point table
|
||||
base/src/ca Channel access
|
||||
base/src/cas Channel access server library and examples
|
||||
base/src/catools Channel access tools caget,cainfo,camonitor,caput
|
||||
base/src/db Database access
|
||||
base/src/db/test Database access tests
|
||||
base/src/dbStatic Static database access
|
||||
base/src/dbtools Database dbLoadTemplate tools
|
||||
base/src/dev Device support (softDev and testDev)
|
||||
base/src/excas Example channel access server
|
||||
base/src/gdd General data descriptor
|
||||
base/src/iocsh Ioc shell command interpreter
|
||||
base/src/libCom General purpose library code in subdirectories
|
||||
@@ -195,17 +210,16 @@ Directory Structure
|
||||
base/src/libCom/osi/os Operating system dependant code in subdirectories
|
||||
base/src/libCom/ring Methods for creating and using ring buffers
|
||||
base/src/libCom/taskwd Task watchdog
|
||||
base/src/libCom/test Test tools (timer, semBinary, semMutex,fdmgr, ?)
|
||||
base/src/libCom/test Test tools (timer, semBinary, semMutex,fdmgr,...)
|
||||
base/src/libCom/timer Timer
|
||||
base/src/libCom/tsDefs R3.13 time stamp definitions and routines
|
||||
base/src/libCom/ring ringPointer: First in first out circular buffers
|
||||
base/src/libCom/cppStd epicsList: Lists of pointers to objects
|
||||
base/src/makeBaseApp Perl tool+templates to create ioc app dvl tree
|
||||
base/src/makeBaseExt Perl tool+templates to create extension dvl tree
|
||||
base/src/misc Miscellaneous (coreRelease, iocInit, asSub*)
|
||||
base/src/rec Record support
|
||||
base/src/registry EPICS support function registry
|
||||
base/src/rsrv Channel access ioc resource server library
|
||||
base/src/softIoc Example softIoc
|
||||
base/src/toolsComm Code for the build tools antelope and e_flex
|
||||
base/src/util Utilities (ca_test, iocLogServer, startCArepeater)
|
||||
base/src/vxWorks R3.13 compatibility code specific to vxWorks
|
||||
@@ -226,26 +240,31 @@ Directory Structure
|
||||
Build related components
|
||||
|
||||
base/documentation/README* files
|
||||
|
||||
README.1st Instructions for setup and building epics base
|
||||
README.html (html version of README.1st)
|
||||
README.html html version of README.1st
|
||||
README.WIN32 Microsoft WIN32 specific instructions
|
||||
README.cxxTemplates Information about C++ templates in EPICS base
|
||||
README.niCpu030 NI cpu030 specific instructions
|
||||
README.darwin Installation notes for Mac OS X (Darwin)
|
||||
RELEASE_NOTES.html Notes on release changes.
|
||||
KnownProblems.html List of know problems and workarounds.
|
||||
Converting*To*.html Release specific conversion instructions.
|
||||
Building*With*.html Release specific build instructions.
|
||||
RELEASE_NOTES.html Notes on release changes
|
||||
KnownProblems.html List of known problems and workarounds
|
||||
Converting*To*.html Release specific conversion instructions
|
||||
Building*With*.html Release specific build instructions
|
||||
|
||||
base/startup directory - contains scripts to set environment and path
|
||||
|
||||
EpicsHostArch c shell script to set EPICS_HOST_ARCH env variable
|
||||
EpicsHostArch.pl perl script to set EPICS_HOST_ARCH env variable
|
||||
Site.profile bourne shell script to set path and env variables
|
||||
Site.cshrc c shell script to set path and env variables
|
||||
borland.bat WIN32 bat file to set path and env variables
|
||||
borland.bat WIN32 bat file to set borland path and env variables
|
||||
cygwin.bat WIN32 bat file to set cygwin path and env variables
|
||||
win32.bat WIN32 bat file to set path and env variables
|
||||
win32-debug.bat WIN32 bat file to set debug path and env variables
|
||||
|
||||
base/configure directory - contains build definitions and rules
|
||||
|
||||
CONFIG Includes configure files and allows variable overrides
|
||||
CONFIG.CrossCommon Cross build definitions
|
||||
CONFIG.gnuCommon Gnu compiler build definitions for all archs
|
||||
@@ -269,6 +288,7 @@ Build related components
|
||||
Sample.Makefile Sample makefile with comments
|
||||
|
||||
base/configure/os directory - contains os-arch specific definitions
|
||||
|
||||
CONFIG.<host>.<target> Specific host-target build definitions
|
||||
CONFIG.Common.<target> Specific target definitions for all hosts
|
||||
CONFIG.<host>.Common Specific host definitions for all targets
|
||||
@@ -281,18 +301,23 @@ Build related components
|
||||
CONFIG_SITE.<host>.Common Site specific host defs for all targets
|
||||
|
||||
base/configure/tools directory - contains Perl scripts used for the build
|
||||
|
||||
convertRelease.pl Performs consistancy checks on RELEASE files
|
||||
cp.pl This Perl script copies an existing file
|
||||
filterWarnings.pl Filters warning messages during HP builds.
|
||||
installEpics.pl Installs built files into install directories.
|
||||
cvsclean.pl Remove all .#* files in directory tree
|
||||
dos2unix.pl Converts text file from DOS CR/LF to unix ISO
|
||||
filterWarnings.pl Filters warning messages during HP builds
|
||||
fullpathName.pl Returns fullpath name of directory arg
|
||||
installEpics.pl Installs built files into install directories
|
||||
makeIncludeDbd.pl Creates *Include.dbd file from filename args
|
||||
makeMakefile.pl Creates a Makefile in O.<arch> dirs
|
||||
makeMakefileInclude.pl Creates file to be included by Makefile
|
||||
mkdir.pl Creates a directory (like Unix mkdir)
|
||||
mkmf.pl Generates dependencies from include stmnts
|
||||
munch.pl Creates a ctdt.c file for vxWorks targets
|
||||
mv.pl Renames an existing file.
|
||||
mv.pl Renames an existing file
|
||||
replaceVAR.pl Changes CapFast VAR(xxx) to $(xxx) notation
|
||||
rm.pl Quietly removes an existing file.
|
||||
rm.pl Quietly removes an existing file
|
||||
|
||||
Building EPICS base (Unix and Win32)
|
||||
|
||||
@@ -337,7 +362,7 @@ Building EPICS base (Unix and Win32)
|
||||
|
||||
Unix LD_LIBRARY_PATH
|
||||
It is no longer necessary to have LD_LIBRARY_PATH include
|
||||
EPICS directories on Unix type system. R3.14 shared libraries
|
||||
EPICS directories on a Unix type system. R3.14 shared libraries
|
||||
and executables will contain the full path name to libraries
|
||||
they require. However, if you move the EPICS directories
|
||||
from their build-time location then in order for libraries
|
||||
@@ -349,11 +374,11 @@ Building EPICS base (Unix and Win32)
|
||||
even if the R3.13 extensions are built with R3.14 base.
|
||||
|
||||
Win32 PATH
|
||||
On WIN32 systems, building shared libraries is the default
|
||||
setting and you will need to add fullpathname to
|
||||
$(INSTALL_LOCATION)/bin/$(EPICS_HOST_ARCH) to your path.
|
||||
Building shared libraries is determined by the value of the
|
||||
macro SHARED_LIBRARIES in CONFIG_SITE (either YES or NO).
|
||||
On WIN32 systems, for R3.14.7 and later, it is no longer necessary
|
||||
to add fullpathname to $(INSTALL_LOCATION)/bin/$(EPICS_HOST_ARCH)
|
||||
to your path for finding dlls during EPICS builds. The win32
|
||||
configure files in base now add this directory to the path
|
||||
definition.
|
||||
|
||||
|
||||
Do site-specific build configuration
|
||||
@@ -368,24 +393,24 @@ Building EPICS base (Unix and Win32)
|
||||
|
||||
Host configuration
|
||||
To configure each host system, you may override the default
|
||||
definitions by adding a new file with override definitions into
|
||||
the configure/os directory. The new file should have the
|
||||
definitions by adding a new file in the configure/os directory
|
||||
with override definitions. The new file should have the
|
||||
same name as the distribution file to be overridden except
|
||||
with CONFIG in the name changed to CONFIG_SITE.
|
||||
|
||||
configure/os/CONFIG.<host>.<host> - Host build settings
|
||||
configure/os/CONFIG.<host>.Common - Host cross build settings
|
||||
configure/os/CONFIG.<host>.<host> Host build settings
|
||||
configure/os/CONFIG.<host>.Common Host cross build settings
|
||||
|
||||
Target configuration
|
||||
To configure each target system, you may override the
|
||||
default definitions by adding a new file with override
|
||||
definitions into the configure/os directory. The new file
|
||||
default definitions by adding a new file into the configure/os
|
||||
directory with override definitions. The new file
|
||||
should have the same name as the distribution file to be
|
||||
overridden except with CONFIG in the name replaced by
|
||||
CONFIG_SITE.
|
||||
|
||||
configure/os/CONFIG.Common.<target> - Target cross settings
|
||||
configure/os/CONFIG.<host>.<target> - Host-target settings
|
||||
configure/os/CONFIG.Common.<target> Target cross settings
|
||||
configure/os/CONFIG.<host>.<target> Host-target settings
|
||||
|
||||
R3.13 compatibility configuration
|
||||
To configure EPICS base for building with R3.13 extensions
|
||||
|
||||
@@ -35,16 +35,18 @@ To build only for win32-x86 and not cross compile for IOC development type
|
||||
To compile EPICS on win32-x86, we need
|
||||
|
||||
WindRiver System's Tornado (used: 1.0) (not required if host only build)
|
||||
Microsoft's Visual C/C++ (used: 6.0) (borland C++ rumored to work also)
|
||||
Microsoft's Visual C/C++ (used: 6.0)
|
||||
or borland C++
|
||||
or Visual C++ toolkit 2003 with MS platform SDK
|
||||
|
||||
and some tools:
|
||||
|
||||
gnu make - www.gnu.org (we used 3.76)
|
||||
perl - www.perl.org (we used 5.003)
|
||||
|
||||
The perl interpreter and gnu make are available 'on the net'
|
||||
The gnu make and perl executables are downloadable from www.cygwin.com
|
||||
The perl interpreter and gnu make are also available 'on the net'
|
||||
as sources which compile with MS Visual C++.
|
||||
If you cannot/don't want to find them, contact me, please!
|
||||
|
||||
2) set environment variables
|
||||
|
||||
@@ -61,7 +63,7 @@ and the MS linker will accept "/" and this will result in less trouble.
|
||||
must be replaced with a "\\" (this is because GNU make treats
|
||||
all "\" characters as line continuation)
|
||||
|
||||
** Note that that each space in any file name or
|
||||
*and* Note that that each space in any file name or
|
||||
path name variable you set must be replaced with
|
||||
a "\ " (this is because GNU make treats all " " separated
|
||||
input as independent tokens in the input stream.
|
||||
@@ -107,8 +109,11 @@ MSDevDir=C:\MSDEV
|
||||
include=c:\msdev\include;c:\msdev\mfc\include
|
||||
lib=c:\msdev\lib;c:\msdev\mfc\lib
|
||||
|
||||
The EPICS build system requires EPICS_HOST_ARCH environment variable
|
||||
Select host arch to build:
|
||||
EPICS_HOST_ARCH=win32-x86 (used by the make system)
|
||||
EPICS_HOST_ARCH=win32-x86
|
||||
or
|
||||
EPICS_HOST_ARCH=win32-x86-borland (if using borland C++)
|
||||
|
||||
Set the "TMP" environment variable if you need to specify where
|
||||
temporary files are created.
|
||||
|
||||
@@ -130,7 +130,33 @@ Known Possible Problems
|
||||
application successfully, contact me.
|
||||
|
||||
|
||||
Please feel free to contact me if you encounter serious problems.
|
||||
Kernel Configuration
|
||||
--------------------
|
||||
|
||||
HP-UX 11 has a kernel configuration parameter that limits the number of
|
||||
threads that can be created within the context of a single process. This
|
||||
parameter has a default of 64.
|
||||
Channel Access creates two threads for each TCP connection it uses,
|
||||
where one TCP connection usually corresponds to one client-server
|
||||
pair. So a CA client program that connects to 30 different IOCs will use
|
||||
60 threads for the CA communication.
|
||||
|
||||
Obviously it is advisable to increase that value from 64 to something
|
||||
larger - any number higher than twice the maximum number of IOCs in your
|
||||
system should be enough for regular concole systems. At some point you
|
||||
will hit the limited number of kernel threads, which has to be larger
|
||||
than the number uf user threads.
|
||||
|
||||
You will find the parameter in SAM's Kernel Configuration / Configurable
|
||||
Parameters section, under the name max_thread_proc ("Max No. of Threads
|
||||
allowed in each process").
|
||||
|
||||
Note that this kernel configuration change requires a reboot of the
|
||||
machine.
|
||||
|
||||
|
||||
So much for this README - please feel free to contact me if you
|
||||
encounter serious problems.
|
||||
|
||||
Enjoy!
|
||||
Ralph
|
||||
|
||||
@@ -17,10 +17,7 @@ EPICS base</h2></center>
|
||||
|
||||
<center>
|
||||
<h2>
|
||||
Release 3.14.6</h2></center>
|
||||
|
||||
<p>
|
||||
<em>NOTE:</em> Parts of this document are likely to be out of date.</p>
|
||||
Release 3.14.*</h2></center>
|
||||
|
||||
<h3>
|
||||
What is EPICS base?</h3>
|
||||
@@ -37,8 +34,7 @@ OPIs (operator interfaces) of various types.</blockquote>
|
||||
<h3>
|
||||
What is new in this release?</h3>
|
||||
|
||||
<blockquote>This version of EPICS base contains significant changes and
|
||||
offers major improvements in functionality over previous versions. Please
|
||||
<blockquote> Please
|
||||
check the RELEASE_NOTES file in the distribution for description of changes
|
||||
and release migration details.</blockquote>
|
||||
|
||||
@@ -54,16 +50,17 @@ Supported platforms</h3>
|
||||
<blockquote>Currently this version of EPICS base has been built on the
|
||||
following hosts for the following targets. If you are trying to build EPICS
|
||||
base on a different host or for a different target machine you must get
|
||||
the proper host/target cross compiler and header files and you will have
|
||||
the proper host/target cross compiler and header files, and you will have
|
||||
to create and add the appropriate new configure files to the base/configure/os/directory.
|
||||
You can start by copying existing configuration files in the configure/os
|
||||
directory and then make changes for your new platforms.</blockquote>
|
||||
|
||||
<blockquote><b>Host platforms (operating system - architecture - <alternate
|
||||
c++ compiler>)</b>
|
||||
<blockquote>
|
||||
|
||||
<blockquote>
|
||||
<br><tt>aix-ppc</tt>
|
||||
<br><tt>aix-ppc-gnu</tt>
|
||||
<br><tt>cygwin-x86</tt>
|
||||
<br><tt>darwin-ppc (Mac OS X)</tt>
|
||||
<br><tt>hpux-parisc</tt>
|
||||
@@ -76,6 +73,17 @@ c++ compiler>)</b>
|
||||
<br><tt>solaris-x86-gnu</tt>
|
||||
<br><tt>win32-x86</tt>
|
||||
<br><tt>win32-x86-borland</tt>
|
||||
</blockquote>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<blockquote><b>Debugging builds</b>
|
||||
|
||||
<blockquote>
|
||||
<br><tt>linux-x86-debug (GNU compiler with -g option for host builds)</tt>
|
||||
<br><tt>solaris-sparc-debug (sun compiler with -g option for host builds)</tt>
|
||||
<br><tt>win32-x86-debug (MS Visual C++ with debug option for host builds)</tt>
|
||||
</blockquote>
|
||||
|
||||
|
||||
</blockquote>
|
||||
@@ -87,8 +95,15 @@ Cross compile target platforms (operating system - architecture)</h4>
|
||||
</blockquote>
|
||||
|
||||
<blockquote>
|
||||
<blockquote><tt>vxWorks-486</tt>
|
||||
<blockquote>
|
||||
<br><tt>linux-386 (linux-x86 host)</tt>
|
||||
<br><tt>linux-486 (linux-x86 host)</tt>
|
||||
<br><tt>linux-586 (linux-x86 host)</tt>
|
||||
<br><tt>linux-686 (linux-x86 host)</tt>
|
||||
<br><tt>linux-althon (linux-x86 host)</tt>
|
||||
<br><tt>vxWorks-486</tt>
|
||||
<br><tt>vxWorks-68040</tt>
|
||||
<br><tt>vxWorks-68040-debug</tt>
|
||||
<br><tt>vxWorks-68040lc</tt>
|
||||
<br><tt>vxWorks-68060</tt>
|
||||
<br><tt>vxWorks-pentium</tt>
|
||||
@@ -96,12 +111,12 @@ Cross compile target platforms (operating system - architecture)</h4>
|
||||
<br><tt>vxWorks-ppc603_long</tt>
|
||||
<br><tt>vxWorks-ppc604</tt>
|
||||
<br><tt>vxWorks-ppc604_long</tt>
|
||||
<br><tt>vxWorks-pentium</tt>
|
||||
<br><tt>RTEMS-gen68360</tt>
|
||||
<br><tt>RTEMS-mcp750</tt>
|
||||
<br><tt>RTEMS-mvme167</tt>
|
||||
<br><tt>RTEMS-pc386</tt>
|
||||
<br><tt>RTEMS-psim</tt></blockquote>
|
||||
<br><tt>RTEMS-psim</tt>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
<h3>
|
||||
@@ -111,9 +126,8 @@ Supported compilers</h3>
|
||||
the host vendor's C and C++ compilers as well as the GNU gcc and g++ compilers.
|
||||
The GNU cross-compilers have been used for all cross-compiled targets.
|
||||
You may need the host vendor's C++ compiler in your search path to do EPICS
|
||||
builds. Check definitions of ACC and CCC in base/configure/os/CONFIG.<host>.<host>
|
||||
or the definitions for GCC and G++ if ANSI=GCC and CPLUSPLUS=GCC are specified
|
||||
in CONFIG_SITE.</blockquote>
|
||||
builds. Check definitions of CC and CCC in base/configure/os/CONFIG.<host>.<host>.
|
||||
</blockquote>
|
||||
|
||||
<h3>
|
||||
Software requirements</h3>
|
||||
@@ -137,17 +151,26 @@ to Tornado 2 should be specified in the base/configure/RELEASE or
|
||||
base/configure/RELEASE.<hostarch>
|
||||
file. You will also need one or more board support packages. Consult the
|
||||
vxWorks documentation for details.
|
||||
<p><b>Optional GNU compiler requirement for solaris-sparc and win32-x86
|
||||
hosts</b>
|
||||
<br>If you have state notation language source files (*.st files) which
|
||||
require c preprocessing before conversion to c source, gcc must be
|
||||
in your path.</blockquote>
|
||||
<p><b>GNU readline or Tecla library</b>
|
||||
<br>
|
||||
GNU readline and Tecla librararies can be used by the IOC shell to
|
||||
provide command line editing and command line history recall and edit.
|
||||
GNU readline (or Tecla library) must be installed on your target system
|
||||
when COMMANDLINE_LIBRARY is set to READLINE (or TECLA) for that target.
|
||||
EPICS (EPICS shell) is the default specified in CONFIG_COMMON. A READLINE
|
||||
override is defined for linux-x86 in the EPICS distribution. Comment out
|
||||
COMMANDLINE_LIBRARY=READLINE in configure/os/CONFIG_SITE.Common.linux-x86
|
||||
if readline is not installed on linux-x86. Command-line editing and
|
||||
history will then be those supplied by the os. On vxWorks the ledLib
|
||||
command-line input libraries are used.
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h3>
|
||||
Host system storage requirements</h3>
|
||||
|
||||
<blockquote>The GNU zipped tar file is approximately 1.4 MB in size. The
|
||||
unzipped untarred distribution source tree is approximately 6 MB. The build
|
||||
unzipped untarred distribution source tree is approximately 7.3 MB. The build
|
||||
created files for each host take approximately 40 MB and the build created
|
||||
files for each target take approximately 10 MB.</blockquote>
|
||||
|
||||
@@ -155,9 +178,8 @@ files for each target take approximately 10 MB.</blockquote>
|
||||
Documentation</h3>
|
||||
|
||||
<blockquote>EPICS documentation is available on the WWW via the EPICS home
|
||||
page at APS: URL <a href="http://www.aps.anl.gov/epics">http://www.aps.anl.gov/epics</a></blockquote>
|
||||
page at APS: URL <a href="http://www.aps.anl.gov/epics">http://www.aps.anl.gov/epics</a>
|
||||
|
||||
<blockquote>This README.html file is in the base distribution and
|
||||
available on the IOC software, Base R3.14, release number, web page
|
||||
which can be accessed from the APS EPICS home page.</blockquote>
|
||||
|
||||
@@ -180,7 +202,7 @@ other WWW links on the EPICS home page at APS.</blockquote>
|
||||
Mailing List</h4>
|
||||
|
||||
<blockquote>There is an EPICS mailing list called tech-talk which is hosted at
|
||||
APS with a list repeater at BESSY. See The EPICS home page for subscription
|
||||
APS with a list repeater at BESSY. See the EPICS home page for subscription
|
||||
instructions.</blockquote> </blockquote>
|
||||
|
||||
<h3>
|
||||
@@ -188,7 +210,7 @@ Directory Structure</h3>
|
||||
|
||||
<blockquote>Distribution directory structure:</blockquote>
|
||||
<tt> base
|
||||
Root directory of the base istribution</tt>
|
||||
Root directory of the base distribution</tt>
|
||||
<br><tt> base/config
|
||||
R3.13 compatibility build configuration files</tt>
|
||||
<br><tt> base/config/tools
|
||||
@@ -199,6 +221,8 @@ Operating system independent build config files</tt>
|
||||
Operating system dependent build config files</tt>
|
||||
<br><tt> base/configure/tools
|
||||
Perl and shell scripts used in the build</tt>
|
||||
<br><tt> base/documentation
|
||||
Distributation documentation</tt>
|
||||
<br><tt> base/src
|
||||
All epics base source code in subdirectories</tt>
|
||||
<br><tt> base/src/RTEMS
|
||||
@@ -211,6 +235,8 @@ Break point table</tt>
|
||||
Channel access</tt>
|
||||
<br><tt> base/src/cas
|
||||
Channel access server library and examples</tt>
|
||||
<br><tt> base/src/catools
|
||||
Channel access tools caget, cainfo, camonitor, caput</tt>
|
||||
<br><tt> base/src/db
|
||||
Database access</tt>
|
||||
<br><tt> base/src/db/test
|
||||
@@ -221,14 +247,14 @@ Static database access</tt>
|
||||
Database dbLoadTemplate tools</tt>
|
||||
<br><tt> base/src/dev
|
||||
Device support (softDev and testDev)</tt>
|
||||
<br><tt> base/src/excas
|
||||
Example channel access server</tt>
|
||||
<br><tt> base/src/gdd
|
||||
General data descriptor</tt>
|
||||
<br><tt> base/src/iocsh
|
||||
Ioc shell command interpreter</tt>
|
||||
<br><tt> base/src/libCom
|
||||
General purpose library code in subdirectories</tt>
|
||||
<br><tt> base/src/libCom/RTEMS
|
||||
Code to configure RTEMS for EPICS</tt>
|
||||
<br><tt> base/src/libCom/bucketLib
|
||||
Hash bucket</tt>
|
||||
<br><tt> base/src/libCom/calc
|
||||
@@ -268,15 +294,11 @@ Methods for creating and using ring buffers</tt>
|
||||
<br><tt> base/src/libCom/taskwd
|
||||
Task watchdog</tt>
|
||||
<br><tt> base/src/libCom/test
|
||||
Test tools (timer, semBinary, semMutex,fdmgr, ?)</tt>
|
||||
Test tools (timer, semBinary, semMutex,fdmgr, ...)</tt>
|
||||
<br><tt> base/src/libCom/timer
|
||||
Timer</tt>
|
||||
<br><tt> base/src/libCom/tsDefs
|
||||
R3.13 time stamp definitions and routines</tt>
|
||||
<br><tt> base/src/libCom/ring
|
||||
ringPointer: First in first out circular buffers</tt>
|
||||
<br><tt> base/src/libCom/cppStd
|
||||
epicsList: Lists of pointers to objects</tt>
|
||||
<br><tt> base/src/makeBaseApp
|
||||
Perl tool+templates to create ioc app dvl tree</tt>
|
||||
<br><tt> base/src/makeBaseExt
|
||||
@@ -289,6 +311,8 @@ Record support</tt>
|
||||
EPICS support function registry</tt>
|
||||
<br><tt> base/src/rsrv
|
||||
Channel access ioc resource server library</tt>
|
||||
<br><tt> base/src/softIoc
|
||||
Example softIoc</tt>
|
||||
<br><tt> base/src/toolsComm
|
||||
Code for the build tools antelope and e_flex</tt>
|
||||
<br><tt> base/src/util
|
||||
@@ -303,14 +327,16 @@ build:
|
||||
Installed scripts and executables in subdirs</tt>
|
||||
<br><tt> base/db
|
||||
Installed data bases</tt>
|
||||
<br><tt> base/html
|
||||
Installed html documentation</tt>
|
||||
<br><tt> base/dbd
|
||||
Installed data base definitions</tt>
|
||||
<br><tt> base/html
|
||||
Installed html documentation</tt>
|
||||
<br><tt> base/include
|
||||
Installed header files</tt>
|
||||
<br><tt> base/include/os
|
||||
Installed os specific header files</tt>
|
||||
<br><tt> base/javalib
|
||||
Installed java class and jar files</tt>
|
||||
<br><tt> base/lib
|
||||
Installed libraries in arch subdirectories</tt>
|
||||
<br><tt> base/templates
|
||||
@@ -325,15 +351,20 @@ base/documentation/README* files</li>
|
||||
<br><tt>README.1st
|
||||
Instructions for setup and building epics base</tt>
|
||||
<br><tt>README.html
|
||||
(html version of README.1st</tt>
|
||||
html version of README.1st</tt>
|
||||
<br><tt>README.WIN32 Microsoft
|
||||
WIN32 specific instructions</tt>
|
||||
<br><tt>README.cxxTemplates Information about C++ templates in EPICS
|
||||
base</tt>
|
||||
<br><tt>README.niCpu030 NI cpu030 specific
|
||||
instructions</tt>
|
||||
<br><tt>README.darwin Installation notes
|
||||
<br><tt>README.darwin Installation notes
|
||||
for Mac OS X (Darwin)</tt>
|
||||
<br><tt>RELEASE_NOTES.html Notes on release changes</tt>
|
||||
<br><tt>KnownProblems.html List of known problems and workarounds</tt>
|
||||
<br><tt>Converting*To*.html Release specific conversion instructions</tt>
|
||||
<br><tt>Building*With*.html Release specific build instructions</tt>
|
||||
|
||||
<br>
|
||||
<li>
|
||||
base/startup directory - contains scripts to set environment and path</li>
|
||||
@@ -347,9 +378,13 @@ script to set path and env variables</tt>
|
||||
<br><tt>Site.cshrc
|
||||
c shell script to set path and env variables</tt>
|
||||
<br><tt>borland.bat WIN32
|
||||
bat file to set path and env variables</tt>
|
||||
bat file to set borland path and env variables</tt>
|
||||
<br><tt>cygwin.bat
|
||||
WIN32 bat file to set cygwin path and env variables</tt>
|
||||
<br><tt>win32.bat
|
||||
WIN32 bat file to set path and env variables</tt>
|
||||
<br><tt>win32-debug.bat
|
||||
WIN32 debug bat file to set debug path and env variables</tt>
|
||||
<br>
|
||||
<li>
|
||||
base/configure directory - contains build definitions and rules</li>
|
||||
@@ -381,6 +416,8 @@ Location of external products such as Tornado II</tt>
|
||||
Includes appropriate rules file</tt>
|
||||
<br><tt>RULES.Db
|
||||
Rules for database and database definition files</tt>
|
||||
<br><tt>RULES.ioc
|
||||
Rules for application iocBoot/ioc* directory</tt>
|
||||
<br><tt>RULES_ARCHS
|
||||
Definitions and rules for building architectures</tt>
|
||||
<br><tt>RULES_BUILD
|
||||
@@ -420,15 +457,23 @@ for all targets</tt>
|
||||
<li>
|
||||
base/configure/tools directory - contains Perl scripts used for the build</li>
|
||||
|
||||
<br><tt>MakeReleae
|
||||
Unix shell script to create a release tar file</tt>
|
||||
<br><tt>convertRelease.pl Performs
|
||||
consistancy checks on RELEASE files</tt>
|
||||
<br><tt>cp.pl
|
||||
This Perl script copies an existing file</tt>
|
||||
<br><tt>cvsclean.pl
|
||||
Remove all .#* files in directory tree</tt>
|
||||
<br><tt>dos2unix.pl
|
||||
|
||||
Converts text file from DOS CR/LF to unix ISO</tt>
|
||||
<br><tt>filterWarnings.pl
|
||||
Filters warning messages during HP builds</tt>
|
||||
<br><tt>fullpathName.pl
|
||||
Returns fullpath name of directory arg</tt>
|
||||
<br><tt>installEpics.pl
|
||||
Installs built files into install directories.</tt>
|
||||
<br><tt>makeDependsTargets.pl Creates targets of include dependency
|
||||
Installs built files into install directories</tt>
|
||||
<br><tt>makeIncludeDbd.pl
|
||||
Creates *Include.dbd file from filename args</tt>
|
||||
files</tt>
|
||||
<br><tt>makeMakefile.pl
|
||||
Creates a Makefile in O.<arch> dirs</tt>
|
||||
@@ -444,7 +489,7 @@ Renames an existing file.</tt>
|
||||
<br><tt>replaceVAR.pl
|
||||
Changes CapFast VAR(xxx) to $(xxx) notation</tt>
|
||||
<br><tt>rm.pl
|
||||
Quietly removes an existing file.</tt></blockquote>
|
||||
Quietly removes an existing file</tt></blockquote>
|
||||
|
||||
<h3>
|
||||
Building EPICS base (Unix and Win32)</h3>
|
||||
@@ -484,15 +529,15 @@ variable PERLLIB be set to <perl directory location>.
|
||||
As already mentioned, you must have the perl executable and you may
|
||||
need C and C++ compilers in your search path. For building base you also
|
||||
must have echo in your search path. For Unix host builds you also need
|
||||
touch, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod must
|
||||
ln, cpp, cp, rm, mv, and mkdir in your search path and /bin/chmod must
|
||||
exist. On some Unix systems you may also need ar and ranlib in your path,
|
||||
and the c compiler may require ld in your path. On solaris systems you
|
||||
and the c compiler may require as and ld in your path. On solaris systems you
|
||||
need uname in your path.
|
||||
|
||||
<p><b>LD_LIBRARY_PATH</b>
|
||||
<br>
|
||||
It is no longer necessary to have LD_LIBRARY_PATH include
|
||||
EPICS directories on Unix type system. R3.14 shared libraries
|
||||
EPICS directories on a Unix type system. R3.14 shared libraries
|
||||
and executables will contain the full path name to libraries
|
||||
they require. However, if you move the EPICS directories
|
||||
from their build-time location then in order for libraries
|
||||
@@ -505,10 +550,11 @@ even if the R3.13 extensions are built with R3.14 base.
|
||||
|
||||
<p><b>Win32 PATH</b>
|
||||
<br>
|
||||
On WIN32 systems, building shared libraries is the default setting
|
||||
and you will need to add fullpathname to $(INSTALL_LOCATION)/lib/$(EPICS_HOST_ARCH)
|
||||
to your path. Building shared libraries is determined by the value of the
|
||||
macro SHARED_LIBRARIES in CONFIG_SITE (either YES or NO).
|
||||
On WIN32 systems, for R3.14.7 and later, it is no longer necessary
|
||||
to add fullpathname to $(INSTALL_LOCATION)/bin/$(EPICS_HOST_ARCH)
|
||||
to your path for finding dlls during EPICS builds. The win32
|
||||
configure files in base now add this directory to the path
|
||||
definition.
|
||||
|
||||
|
||||
</blockquote>
|
||||
@@ -517,29 +563,33 @@ macro SHARED_LIBRARIES in CONFIG_SITE (either YES or NO).
|
||||
<blockquote><b>Site configuration</b>
|
||||
<br>To configure EPICS, you may want to modify the default definitions
|
||||
in the following files:
|
||||
<blockquote><tt>configure/CONFIG_SITE </tt>Build
|
||||
choices. Specify target archs.
|
||||
<br><tt>configure/CONFIG_SITE_ENV </tt>Environment variable defaults
|
||||
<br><tt>configure/RELEASE </tt>TORNADO
|
||||
2 full path location</blockquote>
|
||||
<blockquote>
|
||||
<tt>configure/CONFIG_SITE </tt>
|
||||
Build choices. Specify target archs.
|
||||
<tt>configure/CONFIG_SITE_ENV </tt>
|
||||
Environment variable defaults
|
||||
<tt>configure/RELEASE </tt>
|
||||
TORNADO 2 full path location
|
||||
</blockquote>
|
||||
<b>Host configuration</b>
|
||||
<br>To configure each host system, you may override the default definitions
|
||||
by adding a new file with override definitions into the configure/os directory.
|
||||
by adding a new file in the configure/os directory with override definitions.
|
||||
The new file should have the same name as the distribution file to be overridden
|
||||
except with CONFIG in the name changed to CONFIG_SITE.
|
||||
<blockquote><tt>configure/os/CONFIG.<host>.<host></tt>
|
||||
- Host build settings
|
||||
Host build settings
|
||||
<br><tt>configure/os/CONFIG.<host>.Common</tt>
|
||||
- Host cross build settings</blockquote>
|
||||
Host cross build settings</blockquote>
|
||||
<b>Target configuration</b>
|
||||
<br>To configure each target system, you may override the default definitions
|
||||
by adding a new file with override definitions into the configure/os directory.
|
||||
by adding a new file in the configure/os directory with override definitions.
|
||||
The new file should have the same name as the distribution file to be overridden
|
||||
except with CONFIG in the name replaced by CONFIG_SITE.
|
||||
<blockquote><tt>configure/os/CONFIG.Common.<target></tt>
|
||||
- Target cross settings
|
||||
<br><tt>configure/os/CONFIG.<host>.<target> </tt> - Host-target
|
||||
settings</blockquote>
|
||||
Target cross settings
|
||||
<br><tt>configure/os/CONFIG.<host>.<target> </tt>
|
||||
Host-target settings
|
||||
</blockquote>
|
||||
<b>R3.13 compatibility configuration</b>
|
||||
<br>To configure EPICS base for building with R3.13 extensions and ioc
|
||||
applications , you must modify the default definitions in the base/config/CONFIG_SITE*
|
||||
@@ -570,7 +620,7 @@ host systems and for multiple cross target systems. The intermediate and
|
||||
binary files generated by the build will be created in separate subdirectories
|
||||
and installed into the appropriate separate host/target install directories.
|
||||
EPICS executables and perl scripts are installed into the <tt>$(INSTALL_LOCATION)/bin/<arch></tt>
|
||||
directories. Libraries are installed into $<tt><font size=+1>(INSTALL_LOCATION)/lib/<arch></font></tt>.
|
||||
directories. Libraries are installed into $<tt>(INSTALL_LOCATION)/lib/<arch></tt>.
|
||||
The default definition for <tt>$(INSTALL_LOCATION)</tt> is <tt>$(TOP)</tt>
|
||||
which is the root directory in the distribution directory structure, base.
|
||||
Created object files are stored in O.<arch> source subdirectories, This
|
||||
|
||||
@@ -7,17 +7,152 @@
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<h1 align="center">EPICS Base Release 3.14.6<br>
|
||||
28 May 2004</h1>
|
||||
<h1 align="center">EPICS Base Release 3.14.7<br>
|
||||
7 December 2004</h1>
|
||||
|
||||
<h2 align="center">Changes since 3.14.6</h2>
|
||||
|
||||
|
||||
<h4>selRecord</h4>
|
||||
<p>The select record type has for a long time made use of a coule of magic
|
||||
numbers (1e+30 and -1e+30) to mean "not a real value", which prevents the record
|
||||
from working properly if one or other of these appears as an actual data value.
|
||||
These have been changed to use +Inf and -Inf or NaN instead, so +/-1e+30 may be
|
||||
used as a data value.</p>
|
||||
|
||||
<h4>ai, ao, dfanout and subroutine Records</h4>
|
||||
<p>These record types have been modified to respond better to NaN values as
|
||||
follows: if the VAL field contains a NaN value, the UDF field will be set and an
|
||||
undefined value alarm will be triggered.</p>
|
||||
|
||||
<h4>epicsStdlib.h/epicsStrtod()</h4>
|
||||
<p>epicsStdlib.h declares epicsStrtod() which provides a version of
|
||||
strtod which handles NAN/INF on all architectures. All uses of strtod() in
|
||||
base have been converted to use epicsStrtod().</p>
|
||||
<p>epicsStdlib.h also declares epicsScanFloat() and epicsScanDouble() which
|
||||
replace calls to sscanf with routines which handle NAN/INF on all architectures.</p>
|
||||
|
||||
<h4>epicsThreadCreate Stacksize Posix</h4>
|
||||
<p>The posix implementation of epicsThreadCreate now makes pthread
|
||||
calls to set the stack size. The sizes for (small,medium,large) stack
|
||||
sizes are (128K,256K,512K). This is used for at least the following:
|
||||
linux, solaris, HPUX, Darwin). Doing this allows creation of many more
|
||||
threads os most systems.</p>
|
||||
|
||||
<h4>dbNotify</h4>
|
||||
<p>dbNotifyCancel now waits if the userCallback is active when dbNotifyCancel
|
||||
is called. Previously it just returned. NOTE CAREFULLY. This means
|
||||
that the userCallback must not free the putNotify structure.</p>
|
||||
|
||||
<h4>CA commandline tools</h4>
|
||||
<p>caget and camonitor now have an additional "-s" option to explicitly
|
||||
request server-side string conversion, which - in case of the regular CA
|
||||
server - leads to "precision" info (e.g. the PREC field of an EPICS
|
||||
record) being honoured.</p>
|
||||
|
||||
<h4>POSIX signals</h4>
|
||||
<p>Signals are blocked in all but the main thread. Applications/drivers
|
||||
which require signal delivery to a subthread will need to be modified.</p>
|
||||
|
||||
<h4>epicsExit</h4>
|
||||
Three new functions are implemented: <span
|
||||
style="font-family: courier">epicsExit</span>, <span
|
||||
style="font-family: courier">epicsExitCallAtExits</span>, and <span
|
||||
style="font-family: courier">epicsAtExit</span>. These are similar to <span
|
||||
style="font-family: courier">exit</span> and <span
|
||||
style="font-family: courier">atexit</span>, i.e. they provide the ability to
|
||||
register a function to be called when the process exits. They are provided
|
||||
becase neither vxWorks or win32 properly implement <span
|
||||
style="font-family: courier">exit</span> and <span
|
||||
style="font-family: courier">atexit</span>. Note that they apply to an IOC
|
||||
stopping NOT to a thread exiting.
|
||||
|
||||
<h4>epicsStdio and epicsStdioRedirect</h4>
|
||||
|
||||
<p>In order to support iocsh redirection of <span
|
||||
style="font-family: courier">stdin</span>, <span
|
||||
style="font-family: courier">stdout</span>, and <span
|
||||
style="font-family: courier">stderr</span>, <span
|
||||
style="font-family: courier">epicsStdio.h</span> defines the following new
|
||||
functions: <span style="font-family: courier">epicsGetStdin</span>, <span
|
||||
style="font-family: courier">epicsGetStdout</span>, <span
|
||||
style="font-family: courier">epicsGetStderr</span>, <span
|
||||
style="font-family: courier">epicsSetStdin</span>, <span
|
||||
style="font-family: courier">epicsSetStdout</span>, <span
|
||||
style="font-family: courier">epicsSetStderr</span>, and <span
|
||||
style="font-family: courier">epicsStdoutPrintf</span>. <span
|
||||
style="font-family: courier">epicsStdioRedirect.h</span> defines macros that
|
||||
redefine <span style="font-family: courier">stdin</span>, <span
|
||||
style="font-family: courier">stdout</span>, <span
|
||||
style="font-family: courier">stderr</span>, and <span
|
||||
style="font-family: courier">printf</span>.</p>
|
||||
|
||||
<p>Any code that includes <span
|
||||
style="font-family: courier">epicsStdioRedirect.h</span> will automatically
|
||||
have it's stdio redirected. It has been added to many files in base. If code
|
||||
called by dbior wants it's output redirected, it must also include this
|
||||
file.</p>
|
||||
|
||||
<h4>IOC Test Facilities</h4>
|
||||
|
||||
<p>Any command that previously had an argument for a report file name no
|
||||
longer has the argument. The new iocsh redirection capability is now used.
|
||||
For example the former command:</p>
|
||||
<pre> dbl "0" reportName</pre>
|
||||
<pre>Is now:</pre>
|
||||
<pre> dbl > reportName</pre>
|
||||
Note that this does NOT work on the vxWorks shell only on iocsh. On the
|
||||
vxWorks shell the following command can be given:
|
||||
<pre> iocshCmd("dbl > reportName")</pre>
|
||||
|
||||
<h4>errlog</h4>
|
||||
|
||||
<p>errlog now calls <span style="font-family: courier">epicsAtExit</span> and
|
||||
releases all resources when <span
|
||||
style="font-family: courier">epicsExitCallAtExits</span> is callled..</p>
|
||||
|
||||
<h4>libCom</h4>
|
||||
<p>epicsStrGlobMatch() routine added.</p>
|
||||
|
||||
<h4>iocsh</h4>
|
||||
|
||||
<p>Input/output redirection added.</p>
|
||||
<p>iocshCmd routine added (callable from vxWorks shell).</p>
|
||||
<p>help command uses globbing.</p>
|
||||
|
||||
<h4>calcoutRecord</h4>
|
||||
|
||||
<p>The ODLY (Output Delay) was not handled properly. This is fixed.</p>
|
||||
|
||||
<h4>compressRecord</h4>
|
||||
|
||||
<p>make sure reset gets called when size of INP array changes.</p>
|
||||
|
||||
<h4>dbAccess DBR_ENUM_STRS for field DTYP</h4>
|
||||
|
||||
<p>Data Base Request Option DBR_ENUM_STRS for the DTYP field of soft records
|
||||
can cause an IOC to crash.</p?<h2align="center"></p>
|
||||
|
||||
<h4>RTEMS</h4>
|
||||
<p>RTEMS implementation of epicsMessageQueuePending() now works.</p>
|
||||
<p>Added support for MVME2100 BSP.</p>
|
||||
<p>Added support for building RTEMS bootable images.</p>
|
||||
|
||||
<h4>iocBoot/ioc* build change</h4>
|
||||
|
||||
<p>The cdCommands and envPaths files are now created in ioc* directory only
|
||||
when the ARCH defined in the ioc*/Makefile is present in BUILD_ARCHS for the
|
||||
build.</p>
|
||||
|
||||
|
||||
<h2 align="center">Changes since 3.14.5</h2>
|
||||
|
||||
<h4>CA command line tools complete</h4>
|
||||
|
||||
<p>The complete set of Channel Access command line tools (caget, caput,
|
||||
camonitor, cainfo) is available as announced during the May 2004
|
||||
Collab. meeting. Documentation is part of the CA Reference Manual. Be
|
||||
aware of possible name conflicts with existing local tools.</p>
|
||||
camonitor, cainfo) is available as announced during the May 2004 Collab.
|
||||
meeting. Documentation is part of the CA Reference Manual. Be aware of
|
||||
possible name conflicts with existing local tools.</p>
|
||||
|
||||
<h4>IOC template file configure/RULES.iocBoot removed</h4>
|
||||
|
||||
@@ -708,7 +843,7 @@ bad news is that it does mean changes for existing 3.14.1 applications.
|
||||
Please see:</p>
|
||||
|
||||
<p><a
|
||||
href="ConvertingR3.14.1AppsToR3.14.2.html">ConvertingR3.14.1AppsToR3.14.2</a></p>
|
||||
href="../2-docs/ConvertingR3.14.1AppsToR3.14.2.html">ConvertingR3.14.1AppsToR3.14.2</a></p>
|
||||
|
||||
<p>for details. If you are using the <strong>function</strong> DBD keyword it
|
||||
no longer exists. Please read this conversion document for details.</p>
|
||||
|
||||
@@ -16,6 +16,10 @@ SRCS += rtems_netconfig.c
|
||||
SRCS += rtems_util.c
|
||||
SRCS += rtems_dummyreg.c
|
||||
|
||||
SRCS_RTEMS-mvme2100 += setBootConfigFromPPCBUGNVRAM.c
|
||||
SRCS_RTEMS-mvme5500 += setBootConfigFromMOTLOADNVRAM.c
|
||||
SRCS += $(SRCS_$(T_A))
|
||||
|
||||
LIBRARY_RTEMS = rtemsCom
|
||||
LIBRARY_SRCS = $(SRCS) $(BUILD_ARCHS)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
* RTEMS configuration for EPICS
|
||||
* $Id$
|
||||
* Author: W. Eric Norum
|
||||
* eric@cls.usask.ca
|
||||
* (306) 966-6055
|
||||
* norume@aps.anl.gov
|
||||
* (630) 252-4793
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
@@ -29,8 +29,9 @@
|
||||
#define CONFIGURE_MAXIMUM_TIMERS rtems_resource_unlimited(20)
|
||||
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES rtems_resource_unlimited(5)
|
||||
|
||||
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 50
|
||||
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 100
|
||||
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
|
||||
#define CONFIGURE_MAXIMUM_DRIVERS 8
|
||||
|
||||
#define CONFIGURE_MICROSECONDS_PER_TICK 20000
|
||||
|
||||
@@ -47,5 +48,8 @@ rtems_task Init (rtems_task_argument argument);
|
||||
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
|
||||
#ifndef __mc68040__ /* MVME167 doesn't have RTC code 'yet' */
|
||||
#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
|
||||
#endif
|
||||
|
||||
#include <confdefs.h>
|
||||
#include <rtems/confdefs.h>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <rtems/error.h>
|
||||
#include <rtems/stackchk.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
#include <rtems/tftp.h>
|
||||
|
||||
#include <epicsThread.h>
|
||||
#include <errlog.h>
|
||||
@@ -151,30 +150,114 @@ LogNetFatal (const char *msg, int err)
|
||||
delayedPanic (msg);
|
||||
}
|
||||
|
||||
void *
|
||||
mustMalloc(int size, const char *msg)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if ((p = malloc (size)) == NULL)
|
||||
LogFatal ("Can't allocate space for %s.\n");
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
***********************************************************************
|
||||
* REMOTE FILE ACCESS *
|
||||
***********************************************************************
|
||||
*/
|
||||
/*
|
||||
* Add TFTP server and target prefix to pathnames
|
||||
*/
|
||||
#ifdef OMIT_NFS_SUPPORT
|
||||
# include <rtems/tftp.h>
|
||||
#endif
|
||||
|
||||
static void
|
||||
rtems_set_directory (void)
|
||||
initialize_remote_filesystem(const char **argv)
|
||||
{
|
||||
#ifdef OMIT_NFS_SUPPORT
|
||||
char *path;
|
||||
int pathsize = 200;
|
||||
int l;
|
||||
|
||||
if ((path = malloc (pathsize)) == NULL)
|
||||
LogFatal ("Can't create TFTP path name -- no memory.\n");
|
||||
printf ("***** Initializing TFTP *****\n");
|
||||
rtems_bsdnet_initialize_tftp_filesystem ();
|
||||
|
||||
path = mustMalloc(pathsize, "Command path name ");
|
||||
strcpy (path, "/TFTP/BOOTP_HOST/epics/");
|
||||
l = strlen (path);
|
||||
if (gethostname (&path[l], pathsize - l - 2) || (path[l] == '\0'))
|
||||
if (gethostname (&path[l], pathsize - l - 10) || (path[l] == '\0'))
|
||||
LogFatal ("Can't get host name");
|
||||
strcat (path, "/");
|
||||
if (chdir (path) < 0)
|
||||
LogFatal ("Can't set initial TFTP directory");
|
||||
strcat (path, "/st.cmd");
|
||||
argv[1] = path;
|
||||
#else
|
||||
char *server_path;
|
||||
char *mount_point;
|
||||
char *cp;
|
||||
int l = 0;
|
||||
|
||||
printf ("***** Initializing NFS *****\n");
|
||||
rpcUdpInit();
|
||||
nfsInit(0,0);
|
||||
/*
|
||||
* Use first component of nvram/bootp command line pathname
|
||||
* to set up initial NFS mount. A "/tftpboot/" is prepended
|
||||
* if the pathname does not begin with a '/'. This allows
|
||||
* NFS and TFTP to have a similar view of the remote system.
|
||||
*/
|
||||
if (rtems_bsdnet_bootp_cmdline[0] == '/')
|
||||
cp = rtems_bsdnet_bootp_cmdline + 1;
|
||||
else
|
||||
cp = rtems_bsdnet_bootp_cmdline;
|
||||
cp = strchr(cp, '/');
|
||||
if ((cp == NULL)
|
||||
|| ((l = cp - rtems_bsdnet_bootp_cmdline) == 0))
|
||||
LogFatal("\"%s\" is not a valid command pathname.\n", rtems_bsdnet_bootp_cmdline);
|
||||
cp = mustMalloc(l + 20, "NFS mount paths");
|
||||
server_path = cp;
|
||||
if (rtems_bsdnet_bootp_cmdline[0] == '/') {
|
||||
mount_point = server_path;
|
||||
strncpy(mount_point, rtems_bsdnet_bootp_cmdline, l);
|
||||
mount_point[l] = '\0';
|
||||
argv[1] = rtems_bsdnet_bootp_cmdline;
|
||||
}
|
||||
else {
|
||||
char *abspath = mustMalloc(strlen(rtems_bsdnet_bootp_cmdline)+2,"Absolute command path");
|
||||
strcpy(server_path, "/tftpboot/");
|
||||
mount_point = server_path + strlen(server_path);
|
||||
strncpy(mount_point, rtems_bsdnet_bootp_cmdline, l);
|
||||
mount_point[l] = '\0';
|
||||
mount_point--;
|
||||
strcpy(abspath, "/");
|
||||
strcat(abspath, rtems_bsdnet_bootp_cmdline);
|
||||
argv[1] = abspath;
|
||||
}
|
||||
nfsMount(rtems_bsdnet_bootp_server_name, server_path, mount_point);
|
||||
free(cp);
|
||||
#endif
|
||||
argv[0] = rtems_bsdnet_bootp_boot_file_name;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get to the startup script directory
|
||||
* The TFTP filesystem requires a trailing '/' on chdir arguments.
|
||||
*/
|
||||
static void
|
||||
set_directory (const char *commandline)
|
||||
{
|
||||
const char *cp;
|
||||
char *directoryPath;
|
||||
int l;
|
||||
|
||||
cp = strrchr(commandline, '/');
|
||||
if (cp == NULL)
|
||||
l = strlen(commandline);
|
||||
else
|
||||
l = cp - commandline;
|
||||
directoryPath = mustMalloc(l + 2, "Command path directory ");
|
||||
strncpy(directoryPath, commandline, l);
|
||||
directoryPath[l] = '/';
|
||||
directoryPath[l+1] = '\0';
|
||||
if (chdir (directoryPath) < 0)
|
||||
LogFatal ("Can't set initial directory(%s): %s\n", directoryPath, strerror(errno));
|
||||
free(directoryPath);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -208,12 +291,26 @@ static void netStatCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
rtems_netstat(args[0].ival);
|
||||
}
|
||||
|
||||
static const iocshFuncDef stackCheckFuncDef = {"stackCheck",0,NULL};
|
||||
static void stackCheckCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
Stack_check_Dump_usage ();
|
||||
}
|
||||
|
||||
#ifndef OMIT_NFS_SUPPORT
|
||||
static const iocshArg nfsMountArg0 = { "[uid.gid@]host",iocshArgString};
|
||||
static const iocshArg nfsMountArg1 = { "server path",iocshArgString};
|
||||
static const iocshArg nfsMountArg2 = { "mount point",iocshArgString};
|
||||
static const iocshArg * const nfsMountArgs[3] = {&nfsMountArg0,&nfsMountArg1,
|
||||
&nfsMountArg2};
|
||||
static const iocshFuncDef nfsMountFuncDef = {"nfsMount",3,nfsMountArgs};
|
||||
static void nfsMountCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
nfsMount(args[0].sval, args[1].sval, args[2].sval);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Register RTEMS-specific commands
|
||||
*/
|
||||
@@ -221,6 +318,9 @@ static void iocshRegisterRTEMS (void)
|
||||
{
|
||||
iocshRegister(&netStatFuncDef, netStatCallFunc);
|
||||
iocshRegister(&stackCheckFuncDef, stackCheckCallFunc);
|
||||
#ifndef OMIT_NFS_SUPPORT
|
||||
iocshRegister(&nfsMountFuncDef, nfsMountCallFunc);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -260,11 +360,11 @@ rtems_task
|
||||
Init (rtems_task_argument ignored)
|
||||
{
|
||||
int i;
|
||||
char arg0[] = "RTEMS_IOC";
|
||||
char arg1[] = "st.cmd";
|
||||
char *argv[3] = { arg0, arg1, NULL };
|
||||
const char *argv[3] = { NULL, NULL, NULL };
|
||||
rtems_interval ticksPerSecond;
|
||||
rtems_task_priority newpri;
|
||||
rtems_status_code sc;
|
||||
rtems_time_of_day now;
|
||||
|
||||
/*
|
||||
* Get configuration
|
||||
@@ -277,6 +377,18 @@ Init (rtems_task_argument ignored)
|
||||
#if defined(__i386__)
|
||||
initRemoteGdb(ticksPerSecond);
|
||||
#endif
|
||||
#if defined(HAVE_PPCBUG)
|
||||
{
|
||||
extern void setBootConfigFromPPCBUGNVRAM(void);
|
||||
setBootConfigFromPPCBUGNVRAM();
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_MOTLOAD)
|
||||
{
|
||||
extern void setBootConfigFromMOTLOADNVRAM(void);
|
||||
setBootConfigFromMOTLOADNVRAM();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Override RTEMS configuration
|
||||
@@ -303,32 +415,35 @@ Init (rtems_task_argument ignored)
|
||||
== epicsThreadBooleanStatusSuccess)
|
||||
rtems_bsdnet_config.network_task_priority = epicsThreadGetOssPriorityValue(p);
|
||||
}
|
||||
printf ("***** Initializing network *****\n");
|
||||
printf ("\n***** Initializing network *****\n");
|
||||
rtems_bsdnet_initialize_network ();
|
||||
printf ("***** Initializing TFTP *****\n");
|
||||
rtems_bsdnet_initialize_tftp_filesystem ();
|
||||
for (i = 0 ; ; i++) {
|
||||
printf ("***** Initializing NTP *****\n");
|
||||
if (rtems_bsdnet_synchronize_ntp (0, 0) >= 0)
|
||||
break;
|
||||
rtems_task_wake_after (5*ticksPerSecond);
|
||||
if (i >= 12) {
|
||||
rtems_status_code sc;
|
||||
rtems_time_of_day now;
|
||||
printf (" *************** WARNING ***************\n");
|
||||
printf (" ***** NO RESPONSE FROM NTP SERVER *****\n");
|
||||
printf (" ***** TIME SET TO DEFAULT VALUE *****\n");
|
||||
printf (" ***************************************\n");
|
||||
now.year = 2001;
|
||||
now.month = 1;
|
||||
now.day = 1;
|
||||
now.hour = 0;
|
||||
now.minute = 0;
|
||||
now.second = 0;
|
||||
now.ticks = 0;
|
||||
if ((sc = rtems_clock_set (&now)) != RTEMS_SUCCESSFUL)
|
||||
printf ("***** Can't set time: %s\n", rtems_status_text (sc));
|
||||
break;
|
||||
initialize_remote_filesystem (argv);
|
||||
|
||||
/*
|
||||
* Use BSP-supplied time of day if available
|
||||
*/
|
||||
if (rtems_clock_get(RTEMS_CLOCK_GET_TOD,&now) != RTEMS_SUCCESSFUL) {
|
||||
for (i = 0 ; ; i++) {
|
||||
printf ("***** Initializing NTP *****\n");
|
||||
if (rtems_bsdnet_synchronize_ntp (0, 0) >= 0)
|
||||
break;
|
||||
rtems_task_wake_after (5*ticksPerSecond);
|
||||
if (i >= 12) {
|
||||
printf (" *************** WARNING ***************\n");
|
||||
printf (" ***** NO RESPONSE FROM NTP SERVER *****\n");
|
||||
printf (" ***** TIME SET TO DEFAULT VALUE *****\n");
|
||||
printf (" ***************************************\n");
|
||||
now.year = 2001;
|
||||
now.month = 1;
|
||||
now.day = 1;
|
||||
now.hour = 0;
|
||||
now.minute = 0;
|
||||
now.second = 0;
|
||||
now.ticks = 0;
|
||||
if ((sc = rtems_clock_set (&now)) != RTEMS_SUCCESSFUL)
|
||||
printf ("***** Can't set time: %s\n", rtems_status_text (sc));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +452,7 @@ Init (rtems_task_argument ignored)
|
||||
*/
|
||||
printf ("***** Starting EPICS application *****\n");
|
||||
iocshRegisterRTEMS ();
|
||||
rtems_set_directory ();
|
||||
set_directory (argv[1]);
|
||||
i = main ((sizeof argv / sizeof argv[0]) - 1, argv);
|
||||
printf ("***** IOC application terminating *****\n");
|
||||
exit (i);
|
||||
|
||||
@@ -38,7 +38,6 @@ static struct rtems_bsdnet_ifconfig loopback_config = {
|
||||
* application directory and make the appropriate changes.
|
||||
*/
|
||||
#if defined(__i386__)
|
||||
|
||||
extern int rtems_fxp_attach (struct rtems_bsdnet_ifconfig *, int);
|
||||
static struct rtems_bsdnet_ifconfig fxp_driver_config = {
|
||||
"fxp1", /* name */
|
||||
@@ -52,17 +51,20 @@ static struct rtems_bsdnet_ifconfig e3c509_driver_config = {
|
||||
&fxp_driver_config, /* link to next interface */
|
||||
};
|
||||
#define FIRST_DRIVER_CONFIG &e3c509_driver_config
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* FIXME: This really belongs in the mcp750 BSP
|
||||
*/
|
||||
#if defined(__PPC) && defined(mpc750) && !defined(RTEMS_BSP_NETWORK_DRIVER_NAME) && !defined(RTEMS_BSP_NETWORK_DRIVER_ATTACH)
|
||||
# define RTEMS_BSP_NETWORK_DRIVER_NAME "dc1"
|
||||
# define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_dec21140_driver_attach
|
||||
extern int rtems_dec21140_driver_attach();
|
||||
#endif
|
||||
# if defined(__PPC)
|
||||
/*
|
||||
* FIXME: This really belongs in the BSP
|
||||
*/
|
||||
# ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
|
||||
# define RTEMS_BSP_NETWORK_DRIVER_NAME "dc1"
|
||||
# endif
|
||||
# ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
|
||||
# define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_dec21140_driver_attach
|
||||
extern int rtems_dec21140_driver_attach();
|
||||
# endif
|
||||
# endif
|
||||
|
||||
static struct rtems_bsdnet_ifconfig bsp_driver_config = {
|
||||
RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
|
||||
@@ -73,14 +75,37 @@ static struct rtems_bsdnet_ifconfig bsp_driver_config = {
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allow configure/os/CONFIG_SITE.Common.RTEMS to provide domain name
|
||||
*/
|
||||
#ifdef RTEMS_NETWORK_CONFIG_DNS_DOMAINNAME
|
||||
# define XSTR(x) STR(x)
|
||||
# define STR(x) #x
|
||||
# define MY_DOMAINNAME XSTR(RTEMS_NETWORK_CONFIG_DNS_DOMAINNAME)
|
||||
#else
|
||||
# define MY_DOMAINNAME NULL
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allow non-BOOTP network configuration
|
||||
*/
|
||||
#ifndef MY_DO_BOOTP
|
||||
# define MY_DO_BOOTP rtems_bsdnet_do_bootp
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Network configuration
|
||||
*/
|
||||
struct rtems_bsdnet_config rtems_bsdnet_config = {
|
||||
FIRST_DRIVER_CONFIG, /* Link to next interface */
|
||||
rtems_bsdnet_do_bootp, /* Use BOOTP to get network configuration */
|
||||
0, /* If 0 then the network daemons will run at a */
|
||||
MY_DO_BOOTP, /* How to find network config */
|
||||
10, /* If 0 then the network daemons will run at a */
|
||||
/* priority just less than the lowest-priority */
|
||||
/* EPICS scan thread. */
|
||||
/* If non-zero then the network daemons will run */
|
||||
/* at this *RTEMS* priority */
|
||||
180*1024, /* MBUF space */
|
||||
350*1024, /* MBUF cluster space */
|
||||
NULL, /* Host name */
|
||||
MY_DOMAINNAME, /* Domain name */
|
||||
};
|
||||
|
||||
105
src/RTEMS/base/setBootConfigFromMOTLOADNVRAM.c
Normal file
105
src/RTEMS/base/setBootConfigFromMOTLOADNVRAM.c
Normal file
@@ -0,0 +1,105 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
#include <bsp.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
static char *
|
||||
gev(const char *parm)
|
||||
{
|
||||
volatile char *nvp = (volatile unsigned char *)(GT64260_DEV1_BASE + 0x10000 + 0x70F8);
|
||||
const char *val;
|
||||
const char *name;
|
||||
char *ret;
|
||||
char c;
|
||||
|
||||
for (;;) {
|
||||
if (*nvp == '\0')
|
||||
return NULL;
|
||||
name = parm;
|
||||
while ((c = *nvp++) != '\0') {
|
||||
if ((c == '=') && (*name == '\0')) {
|
||||
val = (char *)nvp;
|
||||
while (*nvp++ != '\0')
|
||||
continue;
|
||||
ret = malloc(nvp - val);
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
strcpy(ret, val);
|
||||
return ret;
|
||||
}
|
||||
if (c != *name++) {
|
||||
while (*nvp++ != '\0')
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
motScriptParm(const char *mot_script_boot, char parm)
|
||||
{
|
||||
const char *cp;
|
||||
char *ret;
|
||||
int l;
|
||||
|
||||
while (*mot_script_boot != '\0') {
|
||||
if (isspace(*mot_script_boot)
|
||||
&& (*(mot_script_boot+1) == '-')
|
||||
&& (*(mot_script_boot+2) == parm)) {
|
||||
mot_script_boot += 3;
|
||||
cp = mot_script_boot;
|
||||
while ((*mot_script_boot != '\0') && !isspace(*mot_script_boot))
|
||||
mot_script_boot++;
|
||||
l = mot_script_boot - cp;
|
||||
ret = malloc(l+1);
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
strncpy(ret, cp, l);
|
||||
*(ret+l) = '\0';
|
||||
return ret;
|
||||
}
|
||||
mot_script_boot++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
setBootConfigFromMOTLOADNVRAM(void)
|
||||
{
|
||||
char *cp;
|
||||
const char *mot_script_boot;
|
||||
|
||||
if (rtems_bsdnet_config.bootp != NULL)
|
||||
return;
|
||||
mot_script_boot = gev("mot-script-boot");
|
||||
if ((rtems_bsdnet_bootp_server_name = gev("mot-/dev/enet0-sipa")) == NULL)
|
||||
rtems_bsdnet_bootp_server_name = motScriptParm(mot_script_boot, 's');
|
||||
if ((rtems_bsdnet_config.gateway = gev("mot-/dev/enet0-gipa")) == NULL)
|
||||
rtems_bsdnet_config.gateway = motScriptParm(mot_script_boot, 'g');
|
||||
if ((rtems_bsdnet_config.ifconfig->ip_netmask = gev("mot-/dev/enet0-snma")) == NULL)
|
||||
rtems_bsdnet_config.ifconfig->ip_netmask = motScriptParm(mot_script_boot, 'm');
|
||||
|
||||
rtems_bsdnet_config.name_server[0] = gev("rtems-dns-server");
|
||||
if (rtems_bsdnet_config.name_server[0] == NULL)
|
||||
rtems_bsdnet_config.name_server[0] = rtems_bsdnet_bootp_server_name;
|
||||
rtems_bsdnet_config.log_host = rtems_bsdnet_bootp_server_name;
|
||||
cp = gev("rtems-dns-domainname");
|
||||
if (cp)
|
||||
rtems_bsdnet_config.domainname = cp;
|
||||
|
||||
if ((rtems_bsdnet_config.ifconfig->ip_address = gev("mot-/dev/enet0-cipa")) == NULL)
|
||||
rtems_bsdnet_config.ifconfig->ip_address = motScriptParm(mot_script_boot, 'c');
|
||||
rtems_bsdnet_config.hostname = gev("rtems-client-name");
|
||||
if (rtems_bsdnet_config.hostname == NULL)
|
||||
rtems_bsdnet_config.hostname = rtems_bsdnet_config.ifconfig->ip_address;
|
||||
|
||||
if ((rtems_bsdnet_bootp_boot_file_name = gev("mot-/dev/enet0-file")) == NULL)
|
||||
rtems_bsdnet_bootp_boot_file_name = motScriptParm(mot_script_boot, 'f');
|
||||
rtems_bsdnet_bootp_cmdline = gev("epics-script");
|
||||
}
|
||||
83
src/RTEMS/base/setBootConfigFromPPCBUGNVRAM.c
Normal file
83
src/RTEMS/base/setBootConfigFromPPCBUGNVRAM.c
Normal file
@@ -0,0 +1,83 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
struct ppcbug_nvram {
|
||||
rtems_unsigned32 PacketVersionIdentifier;
|
||||
rtems_unsigned32 NodeControlMemoryAddress;
|
||||
rtems_unsigned32 BootFileLoadAddress;
|
||||
rtems_unsigned32 BootFileExecutionAddress;
|
||||
rtems_unsigned32 BootFileExecutionDelay;
|
||||
rtems_unsigned32 BootFileLength;
|
||||
rtems_unsigned32 BootFileByteOffset;
|
||||
rtems_unsigned32 TraceBufferAddress;
|
||||
rtems_unsigned32 ClientIPAddress;
|
||||
rtems_unsigned32 ServerIPAddress;
|
||||
rtems_unsigned32 SubnetIPAddressMask;
|
||||
rtems_unsigned32 BroadcastIPAddressMask;
|
||||
rtems_unsigned32 GatewayIPAddress;
|
||||
rtems_unsigned8 BootpRarpRetry;
|
||||
rtems_unsigned8 TftpRarpRetry;
|
||||
rtems_unsigned8 BootpRarpControl;
|
||||
rtems_unsigned8 UpdateControl;
|
||||
char BootFilenameString[64];
|
||||
char ArgumentFilenameString[64];
|
||||
};
|
||||
|
||||
static char *addr(char *cbuf, rtems_unsigned32 addr)
|
||||
{
|
||||
struct in_addr a;
|
||||
if ((a.s_addr = addr) == 0)
|
||||
return NULL;
|
||||
return (char *)inet_ntop(AF_INET, &a, cbuf, INET_ADDRSTRLEN);
|
||||
}
|
||||
|
||||
void
|
||||
setBootConfigFromPPCBUGNVRAM(void)
|
||||
{
|
||||
static struct ppcbug_nvram nvram;
|
||||
static char ip_address[INET_ADDRSTRLEN];
|
||||
static char ip_netmask[INET_ADDRSTRLEN];
|
||||
static char server[INET_ADDRSTRLEN];
|
||||
static char gateway[INET_ADDRSTRLEN];
|
||||
|
||||
if (rtems_bsdnet_config.bootp != NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Get network configuation from PPCBUG.
|
||||
* The 'correct' way to do this would be to issue a .NETCFIG PPCBUG
|
||||
* system call. Unfortunately it is very difficult to issue such a
|
||||
* call once RTEMS is up and running so we just copy from the 'known'
|
||||
* location of the network configuration parameters.
|
||||
* Care must be taken to access the NVRAM a byte at a time.
|
||||
*/
|
||||
{
|
||||
volatile char *s = (volatile char *)0xFFE81000;
|
||||
char *d = (char *)&nvram;
|
||||
|
||||
while (d < ((char *)&nvram + sizeof nvram))
|
||||
*d++ = *s++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Assume that the boot server is also the name server and log server!
|
||||
*/
|
||||
rtems_bsdnet_config.name_server[0] =
|
||||
rtems_bsdnet_bootp_server_name =
|
||||
rtems_bsdnet_config.log_host = addr(server, nvram.ServerIPAddress);
|
||||
rtems_bsdnet_bootp_server_address.s_addr = nvram.ServerIPAddress;
|
||||
|
||||
/*
|
||||
* Nothing better to use as host name!
|
||||
*/
|
||||
rtems_bsdnet_config.ifconfig->ip_address =
|
||||
rtems_bsdnet_config.hostname = addr(ip_address, nvram.ClientIPAddress);
|
||||
|
||||
rtems_bsdnet_config.gateway = addr(gateway, nvram.GatewayIPAddress);
|
||||
rtems_bsdnet_config.ifconfig->ip_netmask = addr(ip_netmask, nvram.SubnetIPAddressMask);
|
||||
rtems_bsdnet_bootp_boot_file_name = nvram.BootFilenameString;
|
||||
rtems_bsdnet_bootp_cmdline = nvram.ArgumentFilenameString;
|
||||
}
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "caerr.h"
|
||||
#include "caeventmask.h"
|
||||
#include "alarm.h"
|
||||
#include "epicsStdioRedirect.h"
|
||||
|
||||
#include "epicsExport.h"
|
||||
#include "asLib.h"
|
||||
@@ -260,7 +261,7 @@ void epicsShareAPI asCaStop(void)
|
||||
epicsMutexUnlock(asCaTaskLock);
|
||||
}
|
||||
|
||||
int epicsShareAPI ascar(int level) {return ascarFP(stdout,level);}
|
||||
int epicsShareAPI ascar(int level) { return ascarFP(stdout,level);}
|
||||
|
||||
int epicsShareAPI ascarFP(FILE *fp,int level)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "epicsStdioRedirect.h"
|
||||
#include "dbDefs.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsThread.h"
|
||||
@@ -66,7 +67,7 @@ static long asDbAddRecords(void)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asSetFilename(char *acf)
|
||||
int epicsShareAPI asSetFilename(const char *acf)
|
||||
{
|
||||
if(pacf) free ((void *)pacf);
|
||||
if(acf) {
|
||||
@@ -82,7 +83,7 @@ int epicsShareAPI asSetFilename(char *acf)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asSetSubstitutions(char *substitutions)
|
||||
int epicsShareAPI asSetSubstitutions(const char *substitutions)
|
||||
{
|
||||
if(psubstitutions) free ((void *)psubstitutions);
|
||||
if(substitutions) {
|
||||
@@ -222,7 +223,7 @@ static void astacCallback(ASCLIENTPVT clientPvt,asClientStatus status)
|
||||
(asCheckPut(clientPvt) ? "Yes" : "No"));
|
||||
}
|
||||
|
||||
int epicsShareAPI astac(char *pname,char *user,char *location)
|
||||
int epicsShareAPI astac(const char *pname,const char *user,const char *location)
|
||||
{
|
||||
DBADDR *paddr;
|
||||
long status;
|
||||
@@ -278,51 +279,50 @@ int epicsShareAPI asdbdumpFP(FILE *fp)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI aspuag(char *uagname)
|
||||
int epicsShareAPI aspuag(const char *uagname)
|
||||
{
|
||||
|
||||
asDumpUagFP(stdout,uagname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI aspuagFP(FILE *fp,char *uagname)
|
||||
int epicsShareAPI aspuagFP(FILE *fp,const char *uagname)
|
||||
{
|
||||
|
||||
asDumpUagFP(fp,uagname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asphag(char *hagname)
|
||||
int epicsShareAPI asphag(const char *hagname)
|
||||
{
|
||||
asDumpHagFP(stdout,hagname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asphagFP(FILE *fp,char *hagname)
|
||||
int epicsShareAPI asphagFP(FILE *fp,const char *hagname)
|
||||
{
|
||||
asDumpHagFP(fp,hagname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asprules(char *asgname)
|
||||
int epicsShareAPI asprules(const char *asgname)
|
||||
{
|
||||
asDumpRulesFP(stdout,asgname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asprulesFP(FILE *fp,char *asgname)
|
||||
int epicsShareAPI asprulesFP(FILE *fp,const char *asgname)
|
||||
{
|
||||
asDumpRulesFP(fp,asgname);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI aspmem(char *asgname,int clients)
|
||||
int epicsShareAPI aspmem(const char *asgname,int clients)
|
||||
{
|
||||
asDumpMemFP(stdout,asgname,myMemberCallback,clients);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI aspmemFP(FILE *fp,char *asgname,int clients)
|
||||
int epicsShareAPI aspmemFP(FILE *fp,const char *asgname,int clients)
|
||||
{
|
||||
asDumpMemFP(fp,asgname,myMemberCallback,clients);
|
||||
return(0);
|
||||
|
||||
@@ -26,24 +26,25 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc int epicsShareAPI asSetFilename(char *acf);
|
||||
epicsShareFunc int epicsShareAPI asSetSubstitutions(char *substitutions);
|
||||
epicsShareFunc int epicsShareAPI asSetFilename(const char *acf);
|
||||
epicsShareFunc int epicsShareAPI asSetSubstitutions(const char *substitutions);
|
||||
epicsShareFunc int epicsShareAPI asInit(void);
|
||||
epicsShareFunc int epicsShareAPI asInitAsyn(ASDBCALLBACK *pcallback);
|
||||
epicsShareFunc int epicsShareAPI asDbGetAsl( void *paddr);
|
||||
epicsShareFunc void * epicsShareAPI asDbGetMemberPvt( void *paddr);
|
||||
epicsShareFunc int epicsShareAPI asdbdump(void);
|
||||
epicsShareFunc int epicsShareAPI asdbdumpFP(FILE *fp);
|
||||
epicsShareFunc int epicsShareAPI aspuag(char *uagname);
|
||||
epicsShareFunc int epicsShareAPI aspuagFP(FILE *fp,char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asphag(char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asphagFP(FILE *fp,char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asprules(char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asprulesFP(FILE *fp,char *asgname);
|
||||
epicsShareFunc int epicsShareAPI aspmem(char *asgname,int clients);
|
||||
epicsShareFunc int epicsShareAPI aspmemFP(FILE *fp,char *asgname,int clients);
|
||||
epicsShareFunc int epicsShareAPI aspuag(const char *uagname);
|
||||
epicsShareFunc int epicsShareAPI aspuagFP(FILE *fp,const char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asphag(const char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asphagFP(FILE *fp,const char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asprules(const char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asprulesFP(FILE *fp,const char *asgname);
|
||||
epicsShareFunc int epicsShareAPI aspmem(const char *asgname,int clients);
|
||||
epicsShareFunc int epicsShareAPI aspmemFP(
|
||||
FILE *fp,const char *asgname,int clients);
|
||||
epicsShareFunc int epicsShareAPI astac(
|
||||
char *recordname,char *user,char *location);
|
||||
const char *recordname,const char *user,const char *location);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -48,25 +48,32 @@ long asCheckPut(ASCLIENTPVT asClientPvt);
|
||||
#define asTrapWriteAfter(pvt) if((pvt)) asTrapWriteAfterWrite((pvt))
|
||||
|
||||
epicsShareFunc long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction);
|
||||
epicsShareFunc long epicsShareAPI asInitFile(const char *filename,const char *substitutions);
|
||||
epicsShareFunc long epicsShareAPI asInitFile(
|
||||
const char *filename,const char *substitutions);
|
||||
epicsShareFunc long epicsShareAPI asInitFP(FILE *fp,const char *substitutions);
|
||||
/*caller must provide permanent storage for asgName*/
|
||||
epicsShareFunc long epicsShareAPI asAddMember(ASMEMBERPVT *asMemberPvt,char *asgName);
|
||||
epicsShareFunc long epicsShareAPI asAddMember(
|
||||
ASMEMBERPVT *asMemberPvt,const char *asgName);
|
||||
epicsShareFunc long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt);
|
||||
/*caller must provide permanent storage for newAsgName*/
|
||||
epicsShareFunc long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,char *newAsgName);
|
||||
epicsShareFunc long epicsShareAPI asChangeGroup(
|
||||
ASMEMBERPVT *asMemberPvt,const char *newAsgName);
|
||||
epicsShareFunc void * epicsShareAPI asGetMemberPvt(ASMEMBERPVT asMemberPvt);
|
||||
epicsShareFunc void epicsShareAPI asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt);
|
||||
epicsShareFunc void epicsShareAPI asPutMemberPvt(
|
||||
ASMEMBERPVT asMemberPvt,void *userPvt);
|
||||
/*client must provide permanent storage for user and host*/
|
||||
epicsShareFunc long epicsShareAPI asAddClient(ASCLIENTPVT *asClientPvt,ASMEMBERPVT asMemberPvt,
|
||||
int asl,char *user,char *host);
|
||||
epicsShareFunc long epicsShareAPI asAddClient(
|
||||
ASCLIENTPVT *asClientPvt,ASMEMBERPVT asMemberPvt,
|
||||
int asl,const char *user,char *host);
|
||||
/*client must provide permanent storage for user and host*/
|
||||
epicsShareFunc long epicsShareAPI asChangeClient(ASCLIENTPVT asClientPvt,int asl,char *user,char *host);
|
||||
epicsShareFunc long epicsShareAPI asChangeClient(
|
||||
ASCLIENTPVT asClientPvt,int asl,const char *user,char *host);
|
||||
epicsShareFunc long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt);
|
||||
epicsShareFunc void * epicsShareAPI asGetClientPvt(ASCLIENTPVT asClientPvt);
|
||||
epicsShareFunc void epicsShareAPI asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt);
|
||||
epicsShareFunc long epicsShareAPI asRegisterClientCallback(ASCLIENTPVT asClientPvt,
|
||||
ASCLIENTCALLBACK pcallback);
|
||||
epicsShareFunc void epicsShareAPI asPutClientPvt(
|
||||
ASCLIENTPVT asClientPvt,void *userPvt);
|
||||
epicsShareFunc long epicsShareAPI asRegisterClientCallback(
|
||||
ASCLIENTPVT asClientPvt, ASCLIENTCALLBACK pcallback);
|
||||
epicsShareFunc long epicsShareAPI asComputeAllAsg(void);
|
||||
/* following declared below after ASG is declared
|
||||
epicsShareFunc long epicsShareAPI asComputeAsg(ASG *pasg);
|
||||
@@ -78,15 +85,15 @@ epicsShareFunc int epicsShareAPI asDump(
|
||||
epicsShareFunc int epicsShareAPI asDumpFP(FILE *fp,
|
||||
void (*memcallback)(ASMEMBERPVT,FILE *),
|
||||
void (*clientcallback)(ASCLIENTPVT,FILE *),int verbose);
|
||||
epicsShareFunc int epicsShareAPI asDumpUag(char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpUagFP(FILE *fp,char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpHag(char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpHagFP(FILE *fp,char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpRules(char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asDumpRulesFP(FILE *fp,char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asDumpMem(char *asgname,
|
||||
epicsShareFunc int epicsShareAPI asDumpUag(const char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpHag(const char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname);
|
||||
epicsShareFunc int epicsShareAPI asDumpRules(const char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname);
|
||||
epicsShareFunc int epicsShareAPI asDumpMem(const char *asgname,
|
||||
void (*memcallback)(ASMEMBERPVT,FILE *),int clients);
|
||||
epicsShareFunc int epicsShareAPI asDumpMemFP(FILE *fp,char *asgname,
|
||||
epicsShareFunc int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
|
||||
void (*memcallback)(ASMEMBERPVT,FILE *),int clients);
|
||||
epicsShareFunc int epicsShareAPI asDumpHash(void);
|
||||
epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp);
|
||||
@@ -192,15 +199,15 @@ typedef struct asgMember {
|
||||
ELLNODE node;
|
||||
ASG *pasg;
|
||||
ELLLIST clientList;
|
||||
char *asgName;
|
||||
const char *asgName;
|
||||
void *userPvt;
|
||||
} ASGMEMBER;
|
||||
|
||||
typedef struct asgClient {
|
||||
ELLNODE node;
|
||||
ASGMEMBER *pasgMember;
|
||||
char *user;
|
||||
char *host;
|
||||
const char *user;
|
||||
char *host;
|
||||
void *userPvt;
|
||||
ASCLIENTCALLBACK pcallback;
|
||||
int level;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "epicsStdioRedirect.h"
|
||||
#include "dbDefs.h"
|
||||
#include "epicsThread.h"
|
||||
#include "ellLib.h"
|
||||
@@ -49,22 +50,22 @@ static void *freeListPvt = NULL;
|
||||
|
||||
|
||||
/*private routines */
|
||||
static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,char *asgName);
|
||||
static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,const char *asgName);
|
||||
static long asComputeAllAsgPvt(void);
|
||||
static long asComputeAsgPvt(ASG *pasg);
|
||||
static long asComputePvt(ASCLIENTPVT asClientPvt);
|
||||
static void asFreeAll(ASBASE *pasbase);
|
||||
static UAG *asUagAdd(char *uagName);
|
||||
static long asUagAddUser(UAG *puag,char *user);
|
||||
static HAG *asHagAdd(char *hagName);
|
||||
static long asHagAddHost(HAG *phag,char *host);
|
||||
static ASG *asAsgAdd(char *asgName);
|
||||
static long asAsgAddInp(ASG *pasg,char *inp,int inpIndex);
|
||||
static UAG *asUagAdd(const char *uagName);
|
||||
static long asUagAddUser(UAG *puag,const char *user);
|
||||
static HAG *asHagAdd(const char *hagName);
|
||||
static long asHagAddHost(HAG *phag,const char *host);
|
||||
static ASG *asAsgAdd(const char *asgName);
|
||||
static long asAsgAddInp(ASG *pasg,const char *inp,int inpIndex);
|
||||
static ASGRULE *asAsgAddRule(ASG *pasg,asAccessRights access,int level);
|
||||
static long asAsgAddRuleOptions(ASGRULE *pasgrule,int trapMask);
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule,char *name);
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule,char *name);
|
||||
static long asAsgRuleCalc(ASGRULE *pasgrule,char *calc);
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name);
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name);
|
||||
static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc);
|
||||
|
||||
/*
|
||||
asInitialize can be called while access security is already active.
|
||||
@@ -256,7 +257,7 @@ long epicsShareAPI asInitFP(FILE *fp,const char *substitutions)
|
||||
return(status);
|
||||
}
|
||||
|
||||
long epicsShareAPI asAddMember(ASMEMBERPVT *pasMemberPvt,char *asgName)
|
||||
long epicsShareAPI asAddMember(ASMEMBERPVT *pasMemberPvt,const char *asgName)
|
||||
{
|
||||
long status;
|
||||
|
||||
@@ -281,7 +282,7 @@ long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt)
|
||||
} else {
|
||||
errMessage(-1,"Logic error in asRemoveMember");
|
||||
UNLOCK;
|
||||
exit(-1);
|
||||
return(-1);
|
||||
}
|
||||
free((void *)pasgmember);
|
||||
*asMemberPvt = NULL;
|
||||
@@ -289,7 +290,7 @@ long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt)
|
||||
return(0);
|
||||
}
|
||||
|
||||
long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,char *newAsgName)
|
||||
long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName)
|
||||
{
|
||||
ASGMEMBER *pasgmember;
|
||||
long status;
|
||||
@@ -303,7 +304,7 @@ long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,char *newAsgName)
|
||||
} else {
|
||||
errMessage(-1,"Logic error in asChangeGroup");
|
||||
UNLOCK;
|
||||
exit(-1);
|
||||
return(-1);
|
||||
}
|
||||
status = asAddMemberPvt(asMemberPvt,newAsgName);
|
||||
UNLOCK;
|
||||
@@ -330,7 +331,7 @@ void epicsShareAPI asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
|
||||
}
|
||||
|
||||
long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt,
|
||||
int asl,char *user,char *host)
|
||||
int asl,const char *user,char *host)
|
||||
{
|
||||
ASGMEMBER *pasgmember = asMemberPvt;
|
||||
ASGCLIENT *pasgclient;
|
||||
@@ -356,7 +357,8 @@ long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt
|
||||
return(status);
|
||||
}
|
||||
|
||||
long epicsShareAPI asChangeClient(ASCLIENTPVT asClientPvt,int asl,char *user,char *host)
|
||||
long epicsShareAPI asChangeClient(
|
||||
ASCLIENTPVT asClientPvt,int asl,const char *user,char *host)
|
||||
{
|
||||
ASGCLIENT *pasgclient = asClientPvt;
|
||||
long status;
|
||||
@@ -461,9 +463,9 @@ long epicsShareAPI asCompute(ASCLIENTPVT asClientPvt)
|
||||
|
||||
/*The dump routines do not lock. Thus they may get inconsistant data.*/
|
||||
/*HOWEVER if they did lock and a user interrupts one of then then BAD BAD*/
|
||||
static char *asAccessName[] = {"NONE","READ","WRITE"};
|
||||
static char *asTrapOption[] = {"NOTRAPWRITE","TRAPWRITE"};
|
||||
static char *asLevelName[] = {"ASL0","ASL1"};
|
||||
static const char *asAccessName[] = {"NONE","READ","WRITE"};
|
||||
static const char *asTrapOption[] = {"NOTRAPWRITE","TRAPWRITE"};
|
||||
static const char *asLevelName[] = {"ASL0","ASL1"};
|
||||
int epicsShareAPI asDump(
|
||||
void (*memcallback)(struct asgMember *,FILE *),
|
||||
void (*clientcallback)(struct asgClient *,FILE *),
|
||||
@@ -617,12 +619,12 @@ int epicsShareAPI asDumpFP(
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpUag(char *uagname)
|
||||
int epicsShareAPI asDumpUag(const char *uagname)
|
||||
{
|
||||
return asDumpUagFP(stdout,uagname);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpUagFP(FILE *fp,char *uagname)
|
||||
int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname)
|
||||
{
|
||||
UAG *puag;
|
||||
UAGNAME *puagname;
|
||||
@@ -648,12 +650,12 @@ int epicsShareAPI asDumpUagFP(FILE *fp,char *uagname)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpHag(char *hagname)
|
||||
int epicsShareAPI asDumpHag(const char *hagname)
|
||||
{
|
||||
return asDumpHagFP(stdout,hagname);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpHagFP(FILE *fp,char *hagname)
|
||||
int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname)
|
||||
{
|
||||
HAG *phag;
|
||||
HAGNAME *phagname;
|
||||
@@ -679,12 +681,12 @@ int epicsShareAPI asDumpHagFP(FILE *fp,char *hagname)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpRules(char *asgname)
|
||||
int epicsShareAPI asDumpRules(const char *asgname)
|
||||
{
|
||||
return asDumpRulesFP(stdout,asgname);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpRulesFP(FILE *fp,char *asgname)
|
||||
int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
|
||||
{
|
||||
ASG *pasg;
|
||||
ASGINP *pasginp;
|
||||
@@ -762,13 +764,13 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,char *asgname)
|
||||
return(0);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpMem(char *asgname,void (*memcallback)(ASMEMBERPVT,FILE *),
|
||||
int epicsShareAPI asDumpMem(const char *asgname,void (*memcallback)(ASMEMBERPVT,FILE *),
|
||||
int clients)
|
||||
{
|
||||
return asDumpMemFP(stdout,asgname,memcallback,clients);
|
||||
}
|
||||
|
||||
int epicsShareAPI asDumpMemFP(FILE *fp,char *asgname,
|
||||
int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
|
||||
void (*memcallback)(ASMEMBERPVT,FILE *),int clients)
|
||||
{
|
||||
ASG *pasg;
|
||||
@@ -827,7 +829,7 @@ epicsShareFunc int epicsShareAPI asDumpHash(void)
|
||||
epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp)
|
||||
{
|
||||
if(!asActive) return(0);
|
||||
gphDumpFP(pasbase->phash,fp);
|
||||
gphDumpFP(fp,pasbase->phash);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -841,7 +843,7 @@ epicsShareFunc void * epicsShareAPI asCalloc(size_t nobj,size_t size)
|
||||
return(p);
|
||||
}
|
||||
|
||||
static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,char *asgName)
|
||||
static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,const char *asgName)
|
||||
{
|
||||
ASGMEMBER *pasgmember;
|
||||
ASG *pgroup;
|
||||
@@ -867,7 +869,7 @@ static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,char *asgName)
|
||||
pgroup = (ASG *)ellNext((ELLNODE *)pgroup);
|
||||
}
|
||||
errMessage(-1,"Logic Error in asAddMember");
|
||||
exit(1);
|
||||
return(-1);
|
||||
got_it:
|
||||
pasgmember->pasg = pgroup;
|
||||
ellAdd(&pgroup->memberList,(ELLNODE *)pasgmember);
|
||||
@@ -1083,7 +1085,7 @@ static void asFreeAll(ASBASE *pasbase)
|
||||
}
|
||||
|
||||
/*Beginning of routines called by lex code*/
|
||||
static UAG *asUagAdd(char *uagName)
|
||||
static UAG *asUagAdd(const char *uagName)
|
||||
{
|
||||
UAG *pprev;
|
||||
UAG *pnext;
|
||||
@@ -1115,7 +1117,7 @@ static UAG *asUagAdd(char *uagName)
|
||||
return(puag);
|
||||
}
|
||||
|
||||
static long asUagAddUser(UAG *puag,char *user)
|
||||
static long asUagAddUser(UAG *puag,const char *user)
|
||||
{
|
||||
UAGNAME *puagname;
|
||||
|
||||
@@ -1127,7 +1129,7 @@ static long asUagAddUser(UAG *puag,char *user)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static HAG *asHagAdd(char *hagName)
|
||||
static HAG *asHagAdd(const char *hagName)
|
||||
{
|
||||
HAG *pprev;
|
||||
HAG *pnext;
|
||||
@@ -1159,7 +1161,7 @@ static HAG *asHagAdd(char *hagName)
|
||||
return(phag);
|
||||
}
|
||||
|
||||
static long asHagAddHost(HAG *phag,char *host)
|
||||
static long asHagAddHost(HAG *phag,const char *host)
|
||||
{
|
||||
HAGNAME *phagname;
|
||||
int ind;
|
||||
@@ -1175,7 +1177,7 @@ static long asHagAddHost(HAG *phag,char *host)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static ASG *asAsgAdd(char *asgName)
|
||||
static ASG *asAsgAdd(const char *asgName)
|
||||
{
|
||||
ASG *pprev;
|
||||
ASG *pnext;
|
||||
@@ -1214,7 +1216,7 @@ static ASG *asAsgAdd(char *asgName)
|
||||
return(pasg);
|
||||
}
|
||||
|
||||
static long asAsgAddInp(ASG *pasg,char *inp,int inpIndex)
|
||||
static long asAsgAddInp(ASG *pasg,const char *inp,int inpIndex)
|
||||
{
|
||||
ASGINP *pasginp;
|
||||
|
||||
@@ -1253,7 +1255,7 @@ static long asAsgAddRuleOptions(ASGRULE *pasgrule,int trapMask)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule,char *name)
|
||||
static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name)
|
||||
{
|
||||
ASGUAG *pasguag;
|
||||
UAG *puag;
|
||||
@@ -1277,7 +1279,7 @@ static long asAsgRuleUagAdd(ASGRULE *pasgrule,char *name)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule,char *name)
|
||||
static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name)
|
||||
{
|
||||
ASGHAG *pasghag;
|
||||
HAG *phag;
|
||||
@@ -1301,7 +1303,7 @@ static long asAsgRuleHagAdd(ASGRULE *pasgrule,char *name)
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long asAsgRuleCalc(ASGRULE *pasgrule,char *calc)
|
||||
static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc)
|
||||
{
|
||||
short error_number;
|
||||
long status;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "ellLib.h"
|
||||
#include "freeList.h"
|
||||
#include "epicsStdioRedirect.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "ellLib.h"
|
||||
|
||||
@@ -29,7 +29,7 @@ int main(int argc,char **argv)
|
||||
char **pstr;
|
||||
char *psep;
|
||||
int *len;
|
||||
long status;
|
||||
long status = 0;
|
||||
static char *subSep = ",";
|
||||
|
||||
/*Look for options*/
|
||||
@@ -49,9 +49,10 @@ int main(int argc,char **argv)
|
||||
}
|
||||
if(argc!=1) {
|
||||
printf("usage: ascheck -Smacsub < file\n");
|
||||
exit(0);
|
||||
status = -1;
|
||||
} else {
|
||||
status = asInitFP(stdin,sub);
|
||||
if(status) errMessage(status,"from asInitFP");
|
||||
}
|
||||
status = asInitFP(stdin,sub);
|
||||
if(status) errMessage(status,"from asInitFP");
|
||||
return(0);
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
* Author: Jeffrey O. Hill
|
||||
* hill@luke.lanl.gov
|
||||
* (505) 665 1831
|
||||
@@ -19,6 +18,8 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "syncGroup.h"
|
||||
|
||||
@@ -56,12 +56,20 @@ height="31" width="88"></a></p>
|
||||
Period</a></li>
|
||||
<li><a href="#Dynamic">Dynamic Changes in the CA Client Library Search
|
||||
Interval</a></li>
|
||||
<li><a href="#Configurin3">Configuring the Maximum Search Period</a></li>
|
||||
<li><a href="#Repeater">The CA Repeater</a></li>
|
||||
<li><a href="#Configurin">Configuring the Time Zone</a></li>
|
||||
<li><a href="#Configurin1">Configuring the maximum array size</a></li>
|
||||
<li><a href="#Configurin1">Configuring the Maximum Array Size</a></li>
|
||||
<li><a href="#Configurin2">Configuring a CA server</a></li>
|
||||
</ul>
|
||||
|
||||
<h3><a href="#Building">Building an Application</a></h3>
|
||||
<ul>
|
||||
<li><a href="#Required1">Required Header (.h) Files</a></li>
|
||||
<li><a href="#Required">Required Libraries</a></li>
|
||||
<li><a href="#Compiler">Compiler and System Specific Build Options</a></li>
|
||||
</ul>
|
||||
|
||||
<h3><a href="#CommandUtils">Command Line Utilities</a></h3>
|
||||
<ul>
|
||||
<li><a href="#acctst">acctst - CA client library regression test</a></li>
|
||||
@@ -123,6 +131,8 @@ height="31" width="88"></a></p>
|
||||
Common</a></li>
|
||||
<li><a href="#Calling">Calling CA Functions from the vxWorks Shell
|
||||
Thread</a></li>
|
||||
<li><a href="#Calling1">Calling CA Functions from POSIX signal
|
||||
handlers</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>Functionality Index </h3>
|
||||
@@ -276,6 +286,11 @@ files is used.</p>
|
||||
<td>i >= 16384</td>
|
||||
<td>16384</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_CA_MAX_SEARCH_PERIOD</td>
|
||||
<td>r > 60 seconds</td>
|
||||
<td>300</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EPICS_TS_MIN_WEST</td>
|
||||
<td>-720 < i <720 minutes</td>
|
||||
@@ -407,7 +422,7 @@ Channel Access port numbers have been registered with IANA.</p>
|
||||
|
||||
<p>If a client needs to communicate with two servers that are residing at
|
||||
different port numbers then an extended syntax may be used with the
|
||||
EPICS_CA_ADDRESS_LIST environment variable. See <a href="#Environmen">WAN
|
||||
EPICS_CA_ADDR_LIST environment variable. See <a href="#Environmen">WAN
|
||||
Environment</a> below.</p>
|
||||
|
||||
<h3><a name="Environmen">WAN Environment</a></h3>
|
||||
@@ -466,8 +481,8 @@ broadcast addresses, but this will often be the most convenient choice.</p>
|
||||
|
||||
<p>If a client needs to communicate with two servers that are residing at
|
||||
different port numbers then an extended syntax may be used with the
|
||||
EPICS_CA_ADDRESS_LIST environment variable. Each host name or IP address in
|
||||
the EPICS_CA_ADDR_LIST may be immediately followed by a colon and an IP port
|
||||
EPICS_CA_ADDR_LIST environment variable. Each host name or IP address in the
|
||||
EPICS_CA_ADDR_LIST may be immediately followed by a colon and an IP port
|
||||
number without intervening whitespace. Entries that do not specify a port
|
||||
number will default to EPICS_CA_SERVER_PORT.</p>
|
||||
|
||||
@@ -538,36 +553,48 @@ name resolution requests are responded to, then it sends name resolution
|
||||
requests at an interval that is twice the estimated round trip interval for
|
||||
the set of servers responding, or at the minimum delay quantum for the
|
||||
operating system - whichever is greater. The number of UDP frames per
|
||||
interval is also dynamically adjusted based on the past success rate.</p>
|
||||
interval is also dynamically adjusted based on the past success rates.</p>
|
||||
|
||||
<p>If name resolution requests are not responded to, then the client library
|
||||
<p>If a name resolution request is not responded to, then the client library
|
||||
doubles the delay between name resolution attempts and reduces the number of
|
||||
requests per interval. The delay between attempts is initially limited by a
|
||||
maximum however, after some long interval, if the client library does not
|
||||
receive any responses it stops sending name resolution attempts altogether
|
||||
until it sees a beacon anomaly.</p>
|
||||
requests per interval. The maximum delay between attempts is limited by
|
||||
EPICS_CA_MAX_SEARCH_PERIOD (see <a href="#Configurin3">Configuring the
|
||||
Maximum Search Period</a>). Note however that prior to R3.14.7, if the client
|
||||
library did not receive any responses over a long interval it stoped sending
|
||||
name resolution attempts altogether until a beacon anomaly was detected (see
|
||||
below).</p>
|
||||
|
||||
<p>The CA client library continually estimates the beacon period of all
|
||||
server beacons received. If a particular server's beacon period becomes
|
||||
significantly shorter or longer then the client is said to detect a beacon
|
||||
anomaly. When a client sees a beacon anomaly then it resumes search requests
|
||||
but with a longer initial interval between requests than is used when the
|
||||
application creates a channel. An initial delay based on the client's
|
||||
ephemeral port number is also imposed before the first name resolution
|
||||
request to avoid all clients responding to a beacon anomaly at the same
|
||||
instant. The program "casw" prints a message on standard out each time that a
|
||||
CA client will detect a beacon anomaly.</p>
|
||||
anomaly. The library boosts the search interval for unresolved channels when
|
||||
a beacon anomaly is seen or when <em>any</em> successful search response is
|
||||
received, but with a longer initial interval between requests than is used
|
||||
when the application creates a channel. Creation of a new channel does
|
||||
<em>not</em> (starting with EPICS R3.14.7) change the interval used when
|
||||
searching for preexisting unresolved channels. The program "casw" prints a
|
||||
message on standard out for each CA client beacon anomaly detect event.</p>
|
||||
|
||||
<p>Two conclusions deserve special emphasis.<em> First, if a client does not
|
||||
see the server's beacons, then it will use additional network and server
|
||||
resources sending periodic state-of-health messages. Second, if a client does
|
||||
not see the server's beacons, then it may not connect to a newly introduced
|
||||
server that was initially inaccessible if the client timed out attempting to
|
||||
find it.</em> The typical situation where a client would not see the server's
|
||||
beacon might be when the client isnt on the same IP subnet as the server, and
|
||||
the EPICS_CA_ADDR_LIST was modified to include a destination address for the
|
||||
server, but the server's beacon address list was not modified so that it's
|
||||
beacons are received by the client.</p>
|
||||
<p>See also <a href="#Client1">When a Client Does not See the Server's
|
||||
Beacon</a>.</p>
|
||||
|
||||
<h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search
|
||||
Period</a></h3>
|
||||
|
||||
<p>The rate at which name resolution (search) requests are sent exponentially
|
||||
backs off to a plateau rate. The value of this plateau has an impact on
|
||||
network traffic because it determines the rate that clients search for
|
||||
channel names that are miss-spelled or otherwise don't exist in a server.
|
||||
Furthermore, for clients that are unable to see the beacon from a new server,
|
||||
the plateau rate may also determine the maximum interval that the client will
|
||||
wait until discovering a new server.</p>
|
||||
|
||||
<p>Starting with EPICS R3.14.7 this maximum search rate interval plateau in
|
||||
seconds is determined by the EPICS_CA_MAX_SEARCH_PERIOD environment
|
||||
variable.</p>
|
||||
|
||||
<p>See also <a href="#Client1">When a Client Does not See the Server's
|
||||
Beacon</a>.</p>
|
||||
|
||||
<h3><a name="Repeater">The CA Repeater</a></h3>
|
||||
|
||||
@@ -608,7 +635,7 @@ the correct time zone. Nevertheless, several programs commonly used with
|
||||
EPICS still use the original "tssubr" library and therefore they still rely
|
||||
on proper configuration of EPICS_TS_MIN_WEST.</em></p>
|
||||
|
||||
<p>While the CA client library does not translate in between the local time
|
||||
<p>While the CA client library does not translate inbetween the local time
|
||||
and the time zone independent internal storage of EPICS time stamps, many
|
||||
EPICS client side applications call core EPICS libraries which provide these
|
||||
services. To set the correct time zone users must compute the number of
|
||||
@@ -650,6 +677,10 @@ placed in the variable EPICS_TS_MIN_WEST.</p>
|
||||
<td>Japan</td>
|
||||
<td>-540</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>China</td>
|
||||
<td>-420</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Germany</td>
|
||||
<td>-120</td>
|
||||
@@ -663,13 +694,25 @@ placed in the variable EPICS_TS_MIN_WEST.</p>
|
||||
|
||||
<h3><a name="Configurin1">Configuring the Maximum Array Size</a></h3>
|
||||
|
||||
<p>The environment variable EPICS_CA_MAX_ARRAY_BYTES determines the size of
|
||||
the largest array that may pass through CA. This parameter must be set
|
||||
appropriately for both the CA client and the CA server. In EPICS R3.14 CA
|
||||
maintains a free list of 16384 byte network buffers that are used for
|
||||
ordinary communication. If EPICS_CA_MAX_ARRAY_BYTES is larger than
|
||||
16384 then a second free list of larger data buffers is established when
|
||||
clients request transportation of large arrays.</p>
|
||||
<p>Starting with version R3.14 the environment variable
|
||||
EPICS_CA_MAX_ARRAY_BYTES determines the size of the largest array that may
|
||||
pass through CA. Prior to this version only arrays smaller than 16k bytes
|
||||
could be transfered. The CA libraries maintains a free list of 16384 byte
|
||||
network buffers that are used for ordinary communication. If
|
||||
EPICS_CA_MAX_ARRAY_BYTES is larger than 16384 then a second free list
|
||||
of larger data buffers is established and used only after a client send its
|
||||
first large array request.</p>
|
||||
|
||||
<p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the
|
||||
maximum array that it will send or receive. Likewise, the CA server uses
|
||||
EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or
|
||||
receive. The client does not influence the server's message size quotas and
|
||||
visa versa. In fact the value of EPICS_CA_MAX_ARRAY_BYTES need not be the
|
||||
same in the client and the server. If the server receives a request which is
|
||||
too large to read or respond to in entirety then it sends an exception
|
||||
message to the client. Likewise, if the CA client library receives a request
|
||||
to send an array larger than EPICS_CA_MAX_ARRAY_BYTES it will return
|
||||
ECA_TOLARGE.</p>
|
||||
|
||||
<h3><a name="Configurin2">Configuring a CA Server</a></h3>
|
||||
|
||||
@@ -763,14 +806,15 @@ specified in EPICS_CA_REPEATER_PORT.</p>
|
||||
<h4>Binding a Server to a Limited Set of Network Interfaces</h4>
|
||||
|
||||
<p>The parameter EPICS_CAS_INTF_ADDR_LIST allows a ca server to bind itself
|
||||
to, and therefore accept messages only from, a limited set of network
|
||||
interfaces (each specified by it's IP address). Specifically, UDP search
|
||||
messages addressed to both the IP addresses in EPICS_CAS_INTF_ADDR_LIST and
|
||||
also to the broadcast addresses of the corresponding LAN interfaces will be
|
||||
accepted by the server. By default, the CA server is accessible from all
|
||||
network interfaces configured into its host. <em>In R3.14 and previous
|
||||
releases the CA server employed by iocCore does not implemet this
|
||||
feature</em>.</p>
|
||||
to, and therefore accept messages only over, a limited set of the local
|
||||
host's network interfaces (each specified by it's IP address). On UNIX
|
||||
systems type "netstat -i" (type "ipconfig" on windows) to see a list of the
|
||||
local host's network interfaces. Specifically, UDP search messages addressed
|
||||
to both the IP addresses in EPICS_CAS_INTF_ADDR_LIST and also to the
|
||||
broadcast addresses of the corresponding LAN interfaces will be accepted by
|
||||
the server. By default, the CA server is accessible from all network
|
||||
interfaces configured into its host. <em>In R3.14 and previous releases the
|
||||
CA server employed by iocCore does not implemet this feature</em>.</p>
|
||||
|
||||
<h4>Ignoring Process Variable Name Resolution Requests From Certain Hosts</h4>
|
||||
|
||||
@@ -786,6 +830,121 @@ implemet this feature.</em></p>
|
||||
<p>See also <a href="#Routing">Routing Restrictions on vxWorks
|
||||
Systems</a>.</p>
|
||||
|
||||
<h2><a name="Building" id="Building">Building an Application</a></h2>
|
||||
|
||||
<h3><a name="Required1" id="Required1">Required Header (.h) Files</a></h3>
|
||||
|
||||
<p>An application that uses the CA client library functions described in this
|
||||
document will need to include the cadef.h header files as follows.</p>
|
||||
|
||||
<p><code>#include "cadef.h"</code></p>
|
||||
|
||||
<p>This header file is located at "<EPICS base>/include/". It includes
|
||||
many other header files (operating system specific and otherwise), and
|
||||
therefore the application must also specify "<EPICS
|
||||
base>/include/os/<arch>" in its header file search path.</p>
|
||||
|
||||
<h3><a name="Required" id="Required">Required Libraries</a></h3>
|
||||
|
||||
<p>An application that uses the Channel Access Client Library functions
|
||||
described in this document will need to link with the EPICS CA Client Library
|
||||
and also the EPICS Common Library. The EPICS CA Client Library calls the
|
||||
EPICS Common Library. The following table shows the names of these libraries
|
||||
on UNIX and Windows systems.</p>
|
||||
|
||||
<table border="1">
|
||||
<caption></caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<div style="text-align: left">
|
||||
</div>
|
||||
</th>
|
||||
<th>UNIX Object</th>
|
||||
<th>UNIX Shareable</th>
|
||||
<th>Windows Object</th>
|
||||
<th>Windows Shareable</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align: left">EPICS CA Client Library</th>
|
||||
<td>libca.a</td>
|
||||
<td>libca.so</td>
|
||||
<td>ca.lib</td>
|
||||
<td>ca.dll</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div style="text-align: left">
|
||||
EPICS Common Library</div>
|
||||
</th>
|
||||
<td>libCom.a</td>
|
||||
<td>libCom.so</td>
|
||||
<td>Com.lib</td>
|
||||
<td>Com.dll</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
|
||||
<p>The above libraries are located in "<EPICS
|
||||
base>/lib/<architechture>".</p>
|
||||
|
||||
<h3><a name="Compiler" id="Compiler">Compiler and System Specific Build
|
||||
Options</a></h3>
|
||||
|
||||
<p>If you do not use the EPICS build environemnt (layered make files) then it
|
||||
may be helpful to run one of the EPICS make files and watch the compile/link
|
||||
lines. This may be the simplest way to capture the latest system and compiler
|
||||
specific options required by your build environment. I have included some
|
||||
snapshots of typical build lines below, but expect some risk of this
|
||||
information becoming dated.</p>
|
||||
|
||||
<h4>Typical Linux Build Options</h4>
|
||||
|
||||
<p><code>/usr/bin/gcc -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS
|
||||
-D_XOPEN_SOURCE=500 -DOSITHREAD_USE_DEFAULT_STACK -D_X86_ -DUNIX
|
||||
-D_BSD_SOURCE -Dlinux -D_REENTRANT -ansi -O3 -Wall -I. -I..
|
||||
-I../../../include/os/Linux -I../../../include ../acctst.c</code></p>
|
||||
|
||||
<p><code>/usr/bin/g++ -o acctst
|
||||
-L/home/user/epicsR3.14/epics/base/lib/linux-x86/
|
||||
-Wl,-rpath,/mnt/bogart_home/hill/epicsR3.14/epics/base/lib/linux-x86
|
||||
acctstMain.o acctst.o -lca -lCom</code></p>
|
||||
|
||||
<h4>Typical Solaris Build Options</h4>
|
||||
|
||||
<p><code>/opt/SUNWspro/bin/cc -c -D_POSIX_C_SOURCE=199506L
|
||||
-D_XOPEN_SOURCE=500 -DOSITHREAD_USE_DEFAULT_STACK -DUNIX -DSOLARIS=9 -mt
|
||||
-D__EXTENSIONS__ -Xc -v -xO4 -I. -I.. -I./../../../include/os/solaris
|
||||
-I./../../../include ../acctst.c</code></p>
|
||||
|
||||
<p><code>/opt/SUNWspro/bin/CC -o acctst
|
||||
-L/home/phoebus1/JHILL/epics/base/lib/solaris-sparc/ -mt -z ignore -z
|
||||
combreloc -z lazyload -R/home/disk1/user/epics/base/lib/solaris-sparc
|
||||
acctstMain.o acctst.o -lca -lCom</code></p>
|
||||
|
||||
<h4>Typical Windows Build Options</h4>
|
||||
|
||||
<p><code>cl -c /nologo /D__STDC__=0 /Ox /GL /W3 /w44355 /MD -I. -I..
|
||||
-I..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\include ..\\acctst.c</code></p>
|
||||
|
||||
<p><code>link -nologo /LTCG /incremental:no /opt:ref /release /version:3.14
|
||||
-out:acctst.exe acctstMain.obj acctst.obj
|
||||
d:/user/R3.14.clean/epics/base/lib/WIN32-x86/ca.lib
|
||||
d:/user/R3.14.clean/epics/base/lib/WIN32-x86/</code></p>
|
||||
|
||||
<h4>Typical vxWorks Build Options</h4>
|
||||
|
||||
<p><code>/usr/local/xcomp/ppc/bin/ccppc -c -D_POSIX_SOURCE -DCPU=PPC603
|
||||
-DvxWorks -include /home/vx/tornado20/target/h/vxWorks.h -ansi -O3 -Wall
|
||||
-mcpu=603 -mstrict-align -fno-builtin -I. -I.. -I../../../include/os/vxWorks
|
||||
-I../../../include -I/home/vx/tornado20/target/h ../acctst.c</code></p>
|
||||
|
||||
<h4>Other Systems and Compilers</h4>
|
||||
|
||||
<p>Contributions gratefully accepted.</p>
|
||||
|
||||
<h2><a name="CommandUtils">Command Line Utilities</a></h2>
|
||||
|
||||
<h3><a name="acctst">acctst</a></h3>
|
||||
@@ -1085,6 +1244,10 @@ the output.</p>
|
||||
<td>-g <nr></td>
|
||||
<td>Use %g format, with <nr> digits after the decimal point</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-s</td>
|
||||
<td>Get value as string (may honour server-side precision)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Integer number format:</strong></td>
|
||||
@@ -1205,8 +1368,11 @@ the output.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-g <nr></td>
|
||||
<td>Use %g format, with <nr> digits after the decimal
|
||||
pointDefault:</td>
|
||||
<td>Use %g format, with <nr> digits after the decimal point</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-s</td>
|
||||
<td>Get value as string (may honour server-side precision)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -1400,8 +1566,22 @@ single specific host's ip address).</p>
|
||||
|
||||
<h4><a name="Client1">Client Does not See Server's Beacons</a></h4>
|
||||
|
||||
<p>See <a href="#Dynamic">Dynamic Changes in the CA Client Library Search
|
||||
Interval.</a></p>
|
||||
<p>Two conclusions deserve special emphasis. <em>First, if a client does not
|
||||
see the server's beacons, then it will use additional network and server
|
||||
resources sending periodic state-of-health messages.</em> <em>Second, if a
|
||||
client does not see a newly introduced server's beacon, then it will take up
|
||||
to EPICS_CA_MAX_SEARCH_PERIOD to find that newly introduced server.</em>
|
||||
Also, starting with EPICS R3.14.7 the client library does <em>not</em>
|
||||
suspend searching for a channel after 100 unsuccessful attempts until a
|
||||
beacon anomaly is seen. Therefore, if the client library is from before
|
||||
version R3.14.7 of EPICS and it timed out attempting to find a server whoose
|
||||
beacon cant be seen by the client library then the client application might
|
||||
need to be restarted in order to connect to this new beacon-out-of-range
|
||||
server. The typical situation where a client would not see the server's
|
||||
beacon might be when the client isnt on the same IP subnet as the server, and
|
||||
the client's EPICS_CA_ADDR_LIST was modified to include a destination address
|
||||
for the server, but the server's beacon address list was not modified so that
|
||||
it's beacons are received by the client.</p>
|
||||
|
||||
<h4><a name="Server1">A Server's IP Address Was Changed</a></h4>
|
||||
|
||||
@@ -1449,6 +1629,15 @@ undesirable resource consumption resulting from periodic circuit setup and
|
||||
teardown overhead (thrashing) during periods of CPU / network / IP kernel
|
||||
buffer congestion.</p>
|
||||
|
||||
<h3><a name="Requests" id="Requests">Put Requests Just Prior to Process
|
||||
Termination Appear to be Ignored</a></h3>
|
||||
|
||||
<p>Short lived CA client applications that issue a CA put request and then
|
||||
immediately exit the process (return from <code>main</code> or call
|
||||
<code>exit</code>) may find that there request isn't executed. To guarantee
|
||||
that the request is sent call <code>ca_flush</code> followed by
|
||||
<code>ca_context_destroy</code> prior to terminating the process.</p>
|
||||
|
||||
<h3><a name="Problems">ENOBUFS Messages</a></h3>
|
||||
|
||||
<p>Many Berkley UNIX derived Internet Protocol (IP) kernels use a memory
|
||||
@@ -1498,6 +1687,13 @@ which vary between OS and even between different versions of the same OS.</p>
|
||||
monitor subscriptions associated with stale connections which will
|
||||
rapidly increase the number of dedicated mbufs to the quota available for
|
||||
each circuit.</li>
|
||||
<li>When sites switch to the vxWorks 5.4 IP kernel they frequently run into
|
||||
network pool exhaustion problems. This may be because the original
|
||||
vxWorks IP kernel expanded the network pool as needed at runtime while
|
||||
the new kernel's pool is statically configured at compile time, and does
|
||||
<em>not</em> expand as needed at runtime. Also, at certain sites problems
|
||||
related to vxWorks network driver pool exhaustion have also been reported
|
||||
(this can also result in ENOBUF diagnostic messages).</li>
|
||||
</ul>
|
||||
|
||||
<h4>Related Diagnostics</h4>
|
||||
@@ -1509,7 +1705,7 @@ which vary between OS and even between different versions of the same OS.</p>
|
||||
mbuf based protocol control blocks have been consumed. The vxWorks
|
||||
commands (availability depending on vxWorks version) mbufShow,
|
||||
netStackSysPoolShow, and netStackDataPoolShow indicate how much space
|
||||
remains in the mbuf pool.</li>
|
||||
remains in the network stack pool.</li>
|
||||
<li>The RTEMS command "netstat [interest level]" displays network
|
||||
information including mbuf consumption statistics.</li>
|
||||
</ul>
|
||||
@@ -1576,13 +1772,63 @@ properties such as units, limits, time stamp, or alarm status. The primitive
|
||||
C types follow a naming convention where the C typedef dbr_xxxx_t corresponds
|
||||
to the DBR_XXXX data type code. The compound (C structure) types follow a
|
||||
naming convention where the C structure tag dbr_xxxx corresponds to the
|
||||
DBR_XXXX data type code. The following table provides more details on the
|
||||
DBR_XXXX data type code. The following tables provides more details on the
|
||||
structure of the CA data type space. Since data addresses are passed to the
|
||||
CA client library as typeless "void *" pointers then care should be taken to
|
||||
ensure that you have passed the correct C data type corresponding to the
|
||||
DBR_XXXX type that you have specified. Architecture independent types are
|
||||
provided in db_access.h to assist programmers in writing portable code. For
|
||||
example "dbr_short_t" should be used to send or receive type DBR_SHORT.</p>
|
||||
example "dbr_short_t" should be used to send or receive type DBR_SHORT. Be
|
||||
aware that type name DBR_INT has been deprecated in favor of the less
|
||||
confusing type name DBR_SHORT. In practice, both the DBR_INT type code and
|
||||
the DBR_SHORT type code refer to a 16 bit integer type, and are functionally
|
||||
equivalent.</p>
|
||||
|
||||
<table border="1">
|
||||
<caption>Channel Access Primitive Data Types</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>CA Type Code</th>
|
||||
<th>Primitive C Data Type</th>
|
||||
<th>Data Size</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_CHAR</td>
|
||||
<td>dbr_char_t</td>
|
||||
<td>8 bit character</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_SHORT</td>
|
||||
<td>dbr_short_t</td>
|
||||
<td>16 bit integer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_ENUM</td>
|
||||
<td>dbr_enum_t</td>
|
||||
<td>16 bit unsigned integer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_LONG</td>
|
||||
<td>dbr_long_t</td>
|
||||
<td>32 bit signed integer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_FLOAT</td>
|
||||
<td>dbr_float_t</td>
|
||||
<td>32 bit IEEE floating point</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_DOUBLE</td>
|
||||
<td>dbr_double_t</td>
|
||||
<td>64 bit IEEE floating point</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DBR_STRING</td>
|
||||
<td>dbr_string_t</td>
|
||||
<td>40 character string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table border="1">
|
||||
<caption>Structure of the Channel Access Data Type Space</caption>
|
||||
@@ -1978,6 +2224,13 @@ questionable practice for the following reasons.</p>
|
||||
clean up on vxWorks. This is the same behavior as on all other OS.</li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="Calling1" id="Calling1">Calling CA Functions from POSIX signal
|
||||
handlers</a></h3>
|
||||
|
||||
<p>As you might expect, it isnt safe to call the CA client library from a
|
||||
POSIX signal handler. Likewise, it isnt safe to call the CA client library
|
||||
from interrupt context.</p>
|
||||
|
||||
<h2><a name="Function Call Reference"></a>Function Call Reference</h2>
|
||||
|
||||
<h3><code><a name="ca_context_create">ca_context_create()</a></code></h3>
|
||||
@@ -1988,8 +2241,11 @@ int ca_context_create ( enum ca_preemptive_callback_select SELECT );</code></pre
|
||||
|
||||
<h4>Description</h4>
|
||||
|
||||
<p>This function should be called once prior to making any of the other
|
||||
channel access calls.</p>
|
||||
<p>This function, or <a href="#ca_attach_context">ca_attach_context()</a>,
|
||||
should be called once for each thread prior to making any of the other
|
||||
Channel Access calls. If one of the above is not called before making other
|
||||
CA calls then a non-preemptive context is created by default, and future
|
||||
attempts to create a preemptive context for the current threads will fail.</p>
|
||||
|
||||
<p>If <code>ca_disable_preemptive_callback</code> is specified then
|
||||
additional threads are <em>not </em>allowed to join the CA context using
|
||||
@@ -2016,6 +2272,9 @@ callbacks will be called preemptively from more than one thread.</p>
|
||||
|
||||
<p>ECA_ALLOCMEM - Failed, unable to allocate space in pool</p>
|
||||
|
||||
<p>ECA_NOTTHREADED - Current thread is already a member of a non-preemptive
|
||||
callback CA context (possibly created implicitly)</p>
|
||||
|
||||
<h4>See Also</h4>
|
||||
|
||||
<p>ca_context_destroy()</p>
|
||||
@@ -2173,7 +2432,7 @@ any time.</p>
|
||||
|
||||
<h3><a name="ca_clear_channel"></a><code>ca_clear_channel()</code></h3>
|
||||
<pre><code>#include <cadef.h>
|
||||
int ca_clear_channel (evid CHID);</code></pre>
|
||||
int ca_clear_channel (chid CHID);</code></pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
|
||||
@@ -3603,6 +3862,9 @@ preemptively from more than one thread.</p>
|
||||
|
||||
<p>ECA_ISATTACHED - already attached to a CA context</p>
|
||||
|
||||
<p>ECA_NOTTHREADED - the specified context is non-preemptive and therefore
|
||||
does not allow other threads to join</p>
|
||||
|
||||
<h4>See Also</h4>
|
||||
|
||||
<p>ca_current_context()</p>
|
||||
@@ -3703,7 +3965,7 @@ void * PDBR );</code></p>
|
||||
bytes</dd>
|
||||
</dl>
|
||||
|
||||
<p><small>$Id$
|
||||
<p><small>$Id CAref.html,v 1.58.2.21 2004/06/08 15:58:10 jhill Exp $
|
||||
.</small></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -46,6 +46,7 @@ LIBSRCS += nciu.cpp
|
||||
LIBSRCS += netiiu.cpp
|
||||
LIBSRCS += udpiiu.cpp
|
||||
LIBSRCS += tcpiiu.cpp
|
||||
LIBSRCS += noopiiu.cpp
|
||||
LIBSRCS += netReadNotifyIO.cpp
|
||||
LIBSRCS += netWriteNotifyIO.cpp
|
||||
LIBSRCS += netSubscription.cpp
|
||||
@@ -69,7 +70,7 @@ LIBSRCS += comQueSend.cpp
|
||||
LIBSRCS += comBuf.cpp
|
||||
LIBSRCS += hostNameCache.cpp
|
||||
LIBSRCS += msgForMultiplyDefinedPV.cpp
|
||||
LIBSRCS += templateInstances.cpp
|
||||
LIBSRCS_vxWorks += templateInstances.cpp
|
||||
|
||||
LIBRARY=ca
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -24,6 +23,8 @@
|
||||
#include <new>
|
||||
#include <float.h>
|
||||
|
||||
#include "epicsExit.h"
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
|
||||
@@ -78,7 +79,7 @@ const char * ca_message_text []
|
||||
"Invalid string",
|
||||
"Virtual circuit disconnect",
|
||||
|
||||
"Identical process variable name on multiple servers",
|
||||
"Identical process variable names on multiple servers",
|
||||
"Request inappropriate within subscription (monitor) update callback",
|
||||
"Database value get for that channel failed during channel search",
|
||||
"Unable to initialize without the vxWorks VX_FP_TASK task option set",
|
||||
@@ -125,7 +126,7 @@ const char * ca_message_text []
|
||||
|
||||
static epicsThreadOnceId caClientContextIdOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" void ca_client_exit_handler ()
|
||||
extern "C" void ca_client_exit_handler (void *)
|
||||
{
|
||||
if ( caClientContextId ) {
|
||||
epicsThreadPrivateDelete ( caClientContextId );
|
||||
@@ -138,7 +139,7 @@ extern "C" void ca_init_client_context ( void * )
|
||||
{
|
||||
caClientContextId = epicsThreadPrivateCreate ();
|
||||
if ( caClientContextId ) {
|
||||
atexit ( ca_client_exit_handler );
|
||||
epicsAtExit ( ca_client_exit_handler,0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,287 +364,18 @@ int epicsShareAPI ca_create_channel (
|
||||
int epicsShareAPI ca_clear_channel ( chid pChan )
|
||||
{
|
||||
ca_client_context & cac = pChan->getClientCtx ();
|
||||
cac.destroyChannel ( *pChan );
|
||||
epicsGuard < epicsMutex > * pCBGuard = cac.pCallbackGuard.get();
|
||||
if ( pCBGuard ) {
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
cac.destroyChannel ( *pCBGuard, guard, *pChan );
|
||||
}
|
||||
else {
|
||||
epicsGuard < epicsMutex > cbGuard ( cac.cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
cac.destroyChannel ( cbGuard, guard, *pChan );
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
#include "autoPtrFreeList.h"
|
||||
|
||||
/*
|
||||
* ca_array_get ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_array_get ( chtype type,
|
||||
arrayElementCount count, chid pChan, void *pValue )
|
||||
{
|
||||
int caStatus;
|
||||
try {
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->eliminateExcessiveSendBacklog (
|
||||
pChan->getClientCtx().pCallbackGuard.get(), guard );
|
||||
autoPtrFreeList < getCopy, 0x400, epicsMutexNOOP > pNotify
|
||||
( pChan->getClientCtx().getCopyFreeList,
|
||||
new ( pChan->getClientCtx().getCopyFreeList )
|
||||
getCopy ( guard, pChan->getClientCtx(), *pChan,
|
||||
tmpType, count, pValue ) );
|
||||
pChan->read ( guard, type, count, *pNotify );
|
||||
pNotify.release ();
|
||||
caStatus = ECA_NORMAL;
|
||||
}
|
||||
catch ( cacChannel::badString & )
|
||||
{
|
||||
caStatus = ECA_BADSTR;
|
||||
}
|
||||
catch ( cacChannel::badType & )
|
||||
{
|
||||
caStatus = ECA_BADTYPE;
|
||||
}
|
||||
catch ( cacChannel::outOfBounds & )
|
||||
{
|
||||
caStatus = ECA_BADCOUNT;
|
||||
}
|
||||
catch ( cacChannel::noReadAccess & )
|
||||
{
|
||||
caStatus = ECA_NORDACCESS;
|
||||
}
|
||||
catch ( cacChannel::notConnected & )
|
||||
{
|
||||
caStatus = ECA_DISCONN;
|
||||
}
|
||||
catch ( cacChannel::unsupportedByService & )
|
||||
{
|
||||
caStatus = ECA_UNAVAILINSERV;
|
||||
}
|
||||
catch ( cacChannel::requestTimedOut & )
|
||||
{
|
||||
caStatus = ECA_TIMEOUT;
|
||||
}
|
||||
catch ( std::bad_alloc & )
|
||||
{
|
||||
caStatus = ECA_ALLOCMEM;
|
||||
}
|
||||
catch ( cacChannel::msgBodyCacheTooSmall & ) {
|
||||
caStatus = ECA_TOLARGE;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
caStatus = ECA_GETFAIL;
|
||||
}
|
||||
return caStatus;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_array_get_callback ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_array_get_callback ( chtype type,
|
||||
arrayElementCount count, chid pChan,
|
||||
caEventCallBackFunc *pfunc, void *arg )
|
||||
{
|
||||
int caStatus;
|
||||
try {
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->eliminateExcessiveSendBacklog (
|
||||
pChan->getClientCtx().pCallbackGuard.get(), guard );
|
||||
autoPtrFreeList < getCallback, 0x400, epicsMutexNOOP > pNotify
|
||||
( pChan->getClientCtx().getCallbackFreeList,
|
||||
new ( pChan->getClientCtx().getCallbackFreeList )
|
||||
getCallback ( *pChan, pfunc, arg ) );
|
||||
pChan->read ( guard, tmpType, count, *pNotify );
|
||||
pNotify.release ();
|
||||
caStatus = ECA_NORMAL;
|
||||
}
|
||||
catch ( cacChannel::badString & )
|
||||
{
|
||||
caStatus = ECA_BADSTR;
|
||||
}
|
||||
catch ( cacChannel::badType & )
|
||||
{
|
||||
caStatus = ECA_BADTYPE;
|
||||
}
|
||||
catch ( cacChannel::outOfBounds & )
|
||||
{
|
||||
caStatus = ECA_BADCOUNT;
|
||||
}
|
||||
catch ( cacChannel::noReadAccess & )
|
||||
{
|
||||
caStatus = ECA_NORDACCESS;
|
||||
}
|
||||
catch ( cacChannel::notConnected & )
|
||||
{
|
||||
caStatus = ECA_DISCONN;
|
||||
}
|
||||
catch ( cacChannel::unsupportedByService & )
|
||||
{
|
||||
caStatus = ECA_UNAVAILINSERV;
|
||||
}
|
||||
catch ( cacChannel::requestTimedOut & )
|
||||
{
|
||||
caStatus = ECA_TIMEOUT;
|
||||
}
|
||||
catch ( std::bad_alloc & )
|
||||
{
|
||||
caStatus = ECA_ALLOCMEM;
|
||||
}
|
||||
catch ( cacChannel::msgBodyCacheTooSmall ) {
|
||||
caStatus = ECA_TOLARGE;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
caStatus = ECA_GETFAIL;
|
||||
}
|
||||
return caStatus;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_array_put_callback ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count,
|
||||
chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg )
|
||||
{
|
||||
int caStatus;
|
||||
try {
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->eliminateExcessiveSendBacklog (
|
||||
pChan->getClientCtx().pCallbackGuard.get(), guard );
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
autoPtrFreeList < putCallback, 0x400, epicsMutexNOOP > pNotify
|
||||
( pChan->getClientCtx().putCallbackFreeList,
|
||||
new ( pChan->getClientCtx().putCallbackFreeList )
|
||||
putCallback ( *pChan, pfunc, usrarg ) );
|
||||
pChan->write ( guard, tmpType, count, pValue, *pNotify );
|
||||
pNotify.release ();
|
||||
caStatus = ECA_NORMAL;
|
||||
}
|
||||
catch ( cacChannel::badString & )
|
||||
{
|
||||
caStatus = ECA_BADSTR;
|
||||
}
|
||||
catch ( cacChannel::badType & )
|
||||
{
|
||||
caStatus = ECA_BADTYPE;
|
||||
}
|
||||
catch ( cacChannel::outOfBounds & )
|
||||
{
|
||||
caStatus = ECA_BADCOUNT;
|
||||
}
|
||||
catch ( cacChannel::noWriteAccess & )
|
||||
{
|
||||
caStatus = ECA_NOWTACCESS;
|
||||
}
|
||||
catch ( cacChannel::notConnected & )
|
||||
{
|
||||
caStatus = ECA_DISCONN;
|
||||
}
|
||||
catch ( cacChannel::unsupportedByService & )
|
||||
{
|
||||
caStatus = ECA_UNAVAILINSERV;
|
||||
}
|
||||
catch ( cacChannel::requestTimedOut & )
|
||||
{
|
||||
caStatus = ECA_TIMEOUT;
|
||||
}
|
||||
catch ( std::bad_alloc & )
|
||||
{
|
||||
caStatus = ECA_ALLOCMEM;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
caStatus = ECA_PUTFAIL;
|
||||
}
|
||||
return caStatus;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_array_put ()
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_array_put ( chtype type, arrayElementCount count,
|
||||
chid pChan, const void * pValue )
|
||||
{
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
|
||||
int caStatus;
|
||||
try {
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->eliminateExcessiveSendBacklog (
|
||||
pChan->getClientCtx().pCallbackGuard.get(), guard );
|
||||
pChan->write ( guard, tmpType, count, pValue );
|
||||
caStatus = ECA_NORMAL;
|
||||
}
|
||||
catch ( cacChannel::badString & )
|
||||
{
|
||||
caStatus = ECA_BADSTR;
|
||||
}
|
||||
catch ( cacChannel::badType & )
|
||||
{
|
||||
caStatus = ECA_BADTYPE;
|
||||
}
|
||||
catch ( cacChannel::outOfBounds & )
|
||||
{
|
||||
caStatus = ECA_BADCOUNT;
|
||||
}
|
||||
catch ( cacChannel::noWriteAccess & )
|
||||
{
|
||||
caStatus = ECA_NOWTACCESS;
|
||||
}
|
||||
catch ( cacChannel::notConnected & )
|
||||
{
|
||||
caStatus = ECA_DISCONN;
|
||||
}
|
||||
catch ( cacChannel::unsupportedByService & )
|
||||
{
|
||||
caStatus = ECA_UNAVAILINSERV;
|
||||
}
|
||||
catch ( cacChannel::requestTimedOut & )
|
||||
{
|
||||
caStatus = ECA_TIMEOUT;
|
||||
}
|
||||
catch ( std::bad_alloc & )
|
||||
{
|
||||
caStatus = ECA_ALLOCMEM;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
caStatus = ECA_PUTFAIL;
|
||||
}
|
||||
return caStatus;
|
||||
}
|
||||
|
||||
/*
|
||||
* Specify an event subroutine to be run for connection events
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_change_connection_event ( chid pChan, caCh *pfunc )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->changeConnCallBack ( guard, pfunc );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_replace_access_rights_event
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_replace_access_rights_event ( chid pChan, caArh *pfunc )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->replaceAccessRightsEvent ( guard, pfunc );
|
||||
}
|
||||
|
||||
/*
|
||||
* Specify an event subroutine to be run for asynch exceptions
|
||||
@@ -662,84 +394,6 @@ int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
int epicsShareAPI ca_create_subscription (
|
||||
chtype type, arrayElementCount count, chid pChan,
|
||||
long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg,
|
||||
evid * monixptr )
|
||||
{
|
||||
if ( type < 0 ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
unsigned tmpType = static_cast < unsigned > ( type );
|
||||
|
||||
if ( INVALID_DB_REQ (type) ) {
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
|
||||
if ( pCallBack == NULL ) {
|
||||
return ECA_BADFUNCPTR;
|
||||
}
|
||||
|
||||
static const long maskMask = 0xffff;
|
||||
if ( ( mask & maskMask ) == 0) {
|
||||
return ECA_BADMASK;
|
||||
}
|
||||
|
||||
if ( mask & ~maskMask ) {
|
||||
return ECA_BADMASK;
|
||||
}
|
||||
|
||||
try {
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->eliminateExcessiveSendBacklog (
|
||||
pChan->getClientCtx().pCallbackGuard.get(), guard );
|
||||
autoPtrFreeList < oldSubscription, 0x400, epicsMutexNOOP > pSubsr
|
||||
( pChan->getClientCtx().subscriptionFreeList,
|
||||
new ( pChan->getClientCtx().subscriptionFreeList )
|
||||
oldSubscription ( *pChan,
|
||||
pCallBack, pCallBackArg ) );
|
||||
if ( monixptr ) {
|
||||
*monixptr = pSubsr.get ();
|
||||
}
|
||||
pSubsr->begin ( guard, tmpType, count, mask );
|
||||
pSubsr.release ();
|
||||
// dont touch pTmp after this because
|
||||
// the first callback might have canceled it
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
catch ( cacChannel::badType & )
|
||||
{
|
||||
return ECA_BADTYPE;
|
||||
}
|
||||
catch ( cacChannel::outOfBounds & )
|
||||
{
|
||||
return ECA_BADCOUNT;
|
||||
}
|
||||
catch ( cacChannel::badEventSelection & )
|
||||
{
|
||||
return ECA_BADMASK;
|
||||
}
|
||||
catch ( cacChannel::noReadAccess & )
|
||||
{
|
||||
return ECA_NORDACCESS;
|
||||
}
|
||||
catch ( cacChannel::unsupportedByService & )
|
||||
{
|
||||
return ECA_UNAVAILINSERV;
|
||||
}
|
||||
catch ( std::bad_alloc & )
|
||||
{
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
catch ( cacChannel::msgBodyCacheTooSmall & ) {
|
||||
return ECA_TOLARGE;
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
return ECA_INTERNAL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_add_masked_array_event
|
||||
*/
|
||||
@@ -753,26 +407,6 @@ int epicsShareAPI ca_add_masked_array_event (
|
||||
pCallBack, pCallBackArg, monixptr );
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
|
||||
{
|
||||
oldChannelNotify & chan = pMon->channel ();
|
||||
ca_client_context & cac = chan.getClientCtx ();
|
||||
if ( cac.pCallbackGuard.get() ) {
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
chan.eliminateExcessiveSendBacklog (
|
||||
cac.pCallbackGuard.get(), guard );
|
||||
pMon->ioCancel ( *cac.pCallbackGuard, guard );
|
||||
}
|
||||
else {
|
||||
epicsGuard < epicsMutex > cbGuard ( cac.cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||
chan.eliminateExcessiveSendBacklog (
|
||||
&cbGuard, guard );
|
||||
pMon->ioCancel ( cbGuard, guard );
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_clear_event ()
|
||||
*/
|
||||
@@ -981,39 +615,6 @@ int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg )
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_get_host_name ()
|
||||
*/
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->hostName ( guard, pBuf, bufLength );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_host_name ()
|
||||
*
|
||||
* !!!! not thread safe !!!!
|
||||
*
|
||||
*/
|
||||
// extern "C"
|
||||
const char * epicsShareAPI ca_host_name ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->pHostName ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_v42_ok(chid chan)
|
||||
*/
|
||||
// extern "C"
|
||||
int epicsShareAPI ca_v42_ok ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->ca_v42_ok ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_version()
|
||||
* function that returns the CA version string
|
||||
@@ -1041,114 +642,6 @@ int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func )
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_field_type()
|
||||
*/
|
||||
// extern "C"
|
||||
short epicsShareAPI ca_field_type ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->nativeType ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_element_count ()
|
||||
*/
|
||||
// extern "C"
|
||||
arrayElementCount epicsShareAPI ca_element_count ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->nativeElementCount ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_state ()
|
||||
*/
|
||||
// extern "C"
|
||||
enum channel_state epicsShareAPI ca_state ( chid pChan ) // X aCC 361
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
if ( pChan->connected ( guard ) ) {
|
||||
return cs_conn;
|
||||
}
|
||||
else if ( pChan->previouslyConnected ( guard ) ){
|
||||
return cs_prev_conn;
|
||||
}
|
||||
else {
|
||||
return cs_never_conn;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_set_puser ()
|
||||
*/
|
||||
// extern "C"
|
||||
void epicsShareAPI ca_set_puser ( chid pChan, void *puser )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
pChan->setPrivatePointer ( guard, puser );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_get_puser ()
|
||||
*/
|
||||
// extern "C"
|
||||
void * epicsShareAPI ca_puser ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->privatePointer ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_read_access ()
|
||||
*/
|
||||
// extern "C"
|
||||
unsigned epicsShareAPI ca_read_access ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->accessRights(guard).readPermit();
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_write_access ()
|
||||
*/
|
||||
// extern "C"
|
||||
unsigned epicsShareAPI ca_write_access ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->accessRights(guard).writePermit();
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_name ()
|
||||
*/
|
||||
// extern "C"
|
||||
const char * epicsShareAPI ca_name ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->pName ( guard );
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
unsigned epicsShareAPI ca_search_attempts ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->searchAttempts ( guard );
|
||||
}
|
||||
|
||||
// extern "C"
|
||||
double epicsShareAPI ca_beacon_period ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->beaconPeriod ( guard );
|
||||
}
|
||||
|
||||
double epicsShareAPI ca_receive_watchdog_delay ( chid pChan )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( pChan->getClientCtx().mutex );
|
||||
return pChan->receiveWatchdogDelay ( guard );
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_get_ioc_connection_count()
|
||||
*
|
||||
|
||||
149
src/ca/acctst.c
149
src/ca/acctst.c
@@ -31,6 +31,7 @@
|
||||
#include "caDiagnostics.h"
|
||||
#include "cadef.h"
|
||||
#include "fdmgr.h"
|
||||
#include "epicsExit.h"
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
@@ -76,7 +77,6 @@ void showProgressBegin ( const char *pTestName, unsigned interestLevel )
|
||||
|
||||
void showProgressEnd ( unsigned interestLevel )
|
||||
{
|
||||
|
||||
if ( interestLevel > 0 ) {
|
||||
printf ( "}" );
|
||||
if ( interestLevel > 1 ) {
|
||||
@@ -2006,11 +2006,11 @@ void pend_event_delay_test ( dbr_double_t request )
|
||||
assert ( fabs(accuracy) < 10.0 );
|
||||
}
|
||||
|
||||
void caTaskExistTest ( unsigned interestLevel )
|
||||
void caTaskExitTest ( unsigned interestLevel )
|
||||
{
|
||||
int status;
|
||||
|
||||
showProgressBegin ( "caTaskExistTest", interestLevel );
|
||||
showProgressBegin ( "caTaskExitTest", interestLevel );
|
||||
|
||||
status = ca_task_exit ();
|
||||
SEVCHK ( status, NULL );
|
||||
@@ -2494,6 +2494,32 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel )
|
||||
showProgressEnd ( interestLevel );
|
||||
}
|
||||
|
||||
void verifyTearDownWhenChannelConnected ( const char * pName,
|
||||
enum ca_preemptive_callback_select select,
|
||||
unsigned interestLevel )
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
showProgressBegin ( "verifyTearDownWhenChannelConnected", interestLevel );
|
||||
|
||||
for ( i = 0u; i < 10; i++ ) {
|
||||
chid chan;
|
||||
int status;
|
||||
ca_context_create ( select );
|
||||
status = ca_create_channel ( pName, 0, 0, 0, & chan );
|
||||
SEVCHK ( status, "immediate tear down channel create failed" );
|
||||
status = ca_pend_io ( timeoutToPendIO );
|
||||
SEVCHK ( status, "immediate tear down channel connect failed" );
|
||||
assert ( status == ECA_NORMAL );
|
||||
ca_context_destroy ();
|
||||
}
|
||||
|
||||
ca_context_create ( select );
|
||||
|
||||
showProgressEnd ( interestLevel );
|
||||
}
|
||||
|
||||
|
||||
void verifyImmediateTearDown ( const char * pName,
|
||||
enum ca_preemptive_callback_select select,
|
||||
unsigned interestLevel )
|
||||
@@ -2529,13 +2555,15 @@ void verifyImmediateTearDown ( const char * pName,
|
||||
SEVCHK ( status, "immediate tear down channel put failed" );
|
||||
status = ca_clear_channel ( chan );
|
||||
SEVCHK ( status, "immediate tear down channel clear failed" );
|
||||
ca_task_exit ();
|
||||
epicsThreadSleep ( 1e-15 );
|
||||
ca_context_destroy ();
|
||||
/* epicsThreadSleep ( 1e-15 ); */
|
||||
if ( i % 100 == 0 ) {
|
||||
showProgress ( interestLevel );
|
||||
}
|
||||
}
|
||||
|
||||
ca_context_create ( select );
|
||||
|
||||
showProgressEnd ( interestLevel );
|
||||
}
|
||||
|
||||
@@ -2696,7 +2724,104 @@ void verifyConnectWithDisconnectedChannels (
|
||||
showProgressEnd ( interestLevel );
|
||||
}
|
||||
|
||||
int acctst ( char *pName, unsigned interestLevel, unsigned channelCount,
|
||||
void verifyClearChannelOnDisconnectCallback (
|
||||
struct connection_handler_args args )
|
||||
{
|
||||
int * pDisconnectFlag = ca_puser ( args.chid );
|
||||
if ( args.op == CA_OP_CONN_DOWN ) {
|
||||
ca_clear_channel ( args.chid );
|
||||
*pDisconnectFlag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void noopExceptionCallback ( struct exception_handler_args args )
|
||||
{
|
||||
}
|
||||
|
||||
void verifyDisconnect (
|
||||
const char * pName, unsigned interestLevel )
|
||||
{
|
||||
int disconnectFlag = 0;
|
||||
unsigned count = 0;
|
||||
chid chan;
|
||||
int status;
|
||||
|
||||
status = ca_create_channel (
|
||||
pName, verifyClearChannelOnDisconnectCallback,
|
||||
& disconnectFlag, 0, & chan );
|
||||
SEVCHK ( status, NULL );
|
||||
|
||||
fprintf ( stdout, "Waiting for test channel to connect." );
|
||||
fflush ( stdout );
|
||||
do {
|
||||
ca_pend_event ( 0.1 );
|
||||
if ( count++%50 == 0 ) {
|
||||
fprintf ( stdout, "." );
|
||||
fflush ( stdout );
|
||||
}
|
||||
} while ( ca_state ( chan ) != cs_conn );
|
||||
fprintf ( stdout, "confirmed.\n" );
|
||||
|
||||
/*
|
||||
* if its a local channel and will never disconnect
|
||||
* then skip the portions of this test that cant be
|
||||
* completed.
|
||||
*/
|
||||
if ( ca_get_ioc_connection_count () == 0 ) {
|
||||
status = ca_clear_channel ( chan );
|
||||
SEVCHK ( status, NULL );
|
||||
return;
|
||||
}
|
||||
|
||||
status = ca_add_exception_event ( noopExceptionCallback, 0 );
|
||||
SEVCHK ( status, NULL );
|
||||
|
||||
fprintf ( stdout, "Please force test channel to disconnect." );
|
||||
fflush ( stdout );
|
||||
do {
|
||||
ca_pend_event ( 0.1 );;
|
||||
if ( count++%50 == 0 ) {
|
||||
fprintf ( stdout, "." );
|
||||
fflush ( stdout );
|
||||
}
|
||||
} while ( ! disconnectFlag );
|
||||
fprintf ( stdout, "confirmed.\n" );
|
||||
/* channel cleared by disconnect handler */
|
||||
|
||||
status = ca_create_channel (
|
||||
pName, 0, 0, 0, & chan );
|
||||
SEVCHK ( status, NULL );
|
||||
|
||||
fprintf ( stdout, "Waiting for test channel to connect." );
|
||||
fflush ( stdout );
|
||||
while ( ca_state ( chan ) != cs_conn ) {
|
||||
ca_pend_event ( 5.0 );
|
||||
fprintf ( stdout, "." );
|
||||
fflush ( stdout );
|
||||
}
|
||||
status = ca_clear_channel ( chan );
|
||||
SEVCHK ( status, NULL );
|
||||
fprintf ( stdout, "confirmed.\n" );
|
||||
|
||||
status = ca_add_exception_event ( 0, 0 );
|
||||
SEVCHK ( status, NULL );
|
||||
}
|
||||
|
||||
void verifyName (
|
||||
const char * pName, unsigned interestLevel )
|
||||
{
|
||||
chid chan;
|
||||
int status = ca_create_channel (
|
||||
pName, 0, 0, 0, & chan );
|
||||
SEVCHK ( status, NULL );
|
||||
if ( strcmp ( pName, ca_name ( chan ) ) != 0 ) {
|
||||
printf ( "Canonical name for channel was \"%s\"\n", ca_name ( chan ) );
|
||||
}
|
||||
status = ca_clear_channel ( chan );
|
||||
SEVCHK ( status, NULL );
|
||||
}
|
||||
|
||||
int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
|
||||
unsigned repetitionCount, enum ca_preemptive_callback_select select )
|
||||
{
|
||||
chid chan;
|
||||
@@ -2718,11 +2843,13 @@ int acctst ( char *pName, unsigned interestLevel, unsigned channelCount,
|
||||
epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString );
|
||||
}
|
||||
|
||||
verifyImmediateTearDown ( pName, select, interestLevel );
|
||||
|
||||
status = ca_context_create ( select );
|
||||
SEVCHK ( status, NULL );
|
||||
|
||||
verifyDisconnect ( pName, interestLevel );
|
||||
verifyImmediateTearDown ( pName, select, interestLevel );
|
||||
verifyTearDownWhenChannelConnected ( pName, select, interestLevel );
|
||||
|
||||
verifyDataTypeMacros ();
|
||||
|
||||
connections = ca_get_ioc_connection_count ();
|
||||
@@ -2733,7 +2860,6 @@ int acctst ( char *pName, unsigned interestLevel, unsigned channelCount,
|
||||
showProgressBegin ( "connecting to test channel", interestLevel );
|
||||
status = ca_search ( pName, & chan );
|
||||
SEVCHK ( status, NULL );
|
||||
assert ( strcmp ( pName, ca_name ( chan ) ) == 0 );
|
||||
status = ca_pend_io ( timeoutToPendIO );
|
||||
SEVCHK ( status, NULL );
|
||||
showProgressEnd ( interestLevel );
|
||||
@@ -2748,6 +2874,7 @@ int acctst ( char *pName, unsigned interestLevel, unsigned channelCount,
|
||||
printf ( "testing with a local channel\n" );
|
||||
}
|
||||
|
||||
verifyName ( pName, interestLevel );
|
||||
clearChannelInGetCallbackTest ( pName, interestLevel );
|
||||
monitorAddConnectionCallbackTest ( pName, interestLevel );
|
||||
verifyConnectWithDisconnectedChannels ( pName, interestLevel );
|
||||
@@ -2830,12 +2957,14 @@ int acctst ( char *pName, unsigned interestLevel, unsigned channelCount,
|
||||
/* status = ca_clear_channel ( chan ); */
|
||||
/* SEVCHK ( status, NULL ); */
|
||||
|
||||
caTaskExistTest ( interestLevel );
|
||||
caTaskExitTest ( interestLevel );
|
||||
|
||||
free ( pChans );
|
||||
|
||||
printf ( "\nTest Complete\n" );
|
||||
|
||||
epicsExit ( EXIT_SUCCESS );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -29,5 +29,11 @@ baseNMIU::~baseNMIU ()
|
||||
{
|
||||
}
|
||||
|
||||
void baseNMIU::forceSubscriptionUpdate (
|
||||
epicsGuard < epicsMutex > & guard, nciu & chan )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "virtualCircuit.h"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
\*************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <epicsStdlib.h>
|
||||
|
||||
#include "caDiagnostics.h"
|
||||
|
||||
@@ -32,7 +32,7 @@ int main ( int argc, char **argv )
|
||||
}
|
||||
|
||||
if ( argc >= 4 ) {
|
||||
int nConverted = sscanf ( argv[3], "%lf", &delay );
|
||||
int nConverted = epicsScanDouble( argv[3], &delay );
|
||||
if ( nConverted != 1 ) {
|
||||
printf ( "conversion failed, changing delay arg \"%s\" to %f\n",
|
||||
argv[2], delay );
|
||||
|
||||
@@ -18,9 +18,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
enum appendNumberFlag {appendNumber, dontAppendNumber};
|
||||
int catime ( char *channelName, unsigned channelCount, enum appendNumberFlag appNF );
|
||||
int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF );
|
||||
|
||||
int acctst ( char *pname, unsigned logggingInterestLevel,
|
||||
int acctst ( const char *pname, unsigned logggingInterestLevel,
|
||||
unsigned channelCount, unsigned repititionCount,
|
||||
enum ca_preemptive_callback_select select );
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* CA UDP repeater standalone executable
|
||||
*
|
||||
@@ -38,7 +37,6 @@
|
||||
int main()
|
||||
{
|
||||
ca_repeater ();
|
||||
assert ( 0 );
|
||||
return ( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
@@ -28,9 +27,12 @@
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "epicsExit.h"
|
||||
#include "errlog.h"
|
||||
#include "locationException.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "oldAccess.h"
|
||||
@@ -40,9 +42,10 @@ epicsShareDef epicsThreadPrivateId caClientCallbackThreadId;
|
||||
|
||||
static epicsThreadOnceId cacOnce = EPICS_THREAD_ONCE_INIT;
|
||||
|
||||
extern "C" void cacExitHandler ()
|
||||
extern "C" void cacExitHandler (void *)
|
||||
{
|
||||
epicsThreadPrivateDelete ( caClientCallbackThreadId );
|
||||
caClientCallbackThreadId = 0;
|
||||
}
|
||||
|
||||
// runs once only for each process
|
||||
@@ -50,7 +53,7 @@ extern "C" void cacOnceFunc ( void * )
|
||||
{
|
||||
caClientCallbackThreadId = epicsThreadPrivateCreate ();
|
||||
assert ( caClientCallbackThreadId );
|
||||
atexit ( cacExitHandler );
|
||||
epicsAtExit ( cacExitHandler,0 );
|
||||
}
|
||||
|
||||
extern epicsThreadPrivateId caClientContextId;
|
||||
@@ -185,22 +188,20 @@ ca_client_context::~ca_client_context ()
|
||||
}
|
||||
}
|
||||
|
||||
void ca_client_context::destroyChannel ( oldChannelNotify & chan )
|
||||
void ca_client_context::destroyChannel (
|
||||
epicsGuard < epicsMutex > & cbGuard,
|
||||
epicsGuard < epicsMutex > & guard,
|
||||
oldChannelNotify & chan )
|
||||
{
|
||||
if ( this->pCallbackGuard.get() ) {
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
try {
|
||||
chan.eliminateExcessiveSendBacklog (
|
||||
this->pCallbackGuard.get(), guard );
|
||||
chan.destructor ( *this->pCallbackGuard.get(), guard );
|
||||
this->oldChannelNotifyFreeList.release ( & chan );
|
||||
&cbGuard, guard );
|
||||
}
|
||||
else {
|
||||
epicsGuard < epicsMutex > cbGuard ( this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
chan.eliminateExcessiveSendBacklog ( &cbGuard, guard );
|
||||
chan.destructor ( cbGuard, guard );
|
||||
this->oldChannelNotifyFreeList.release ( & chan );
|
||||
catch ( cacChannel::notConnected & ) {
|
||||
// intentionally ignored
|
||||
}
|
||||
chan.destructor ( cbGuard, guard );
|
||||
this->oldChannelNotifyFreeList.release ( & chan );
|
||||
}
|
||||
|
||||
void ca_client_context::destroyGetCopy (
|
||||
@@ -745,3 +746,37 @@ void epicsShareAPI caInstallDefaultService ( cacService & service )
|
||||
{
|
||||
ca_client_context::installDefaultService ( service );
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
|
||||
{
|
||||
oldChannelNotify & chan = pMon->channel ();
|
||||
ca_client_context & cac = chan.getClientCtx ();
|
||||
epicsGuard < epicsMutex > * pCBGuard = cac.pCallbackGuard.get();
|
||||
if ( pCBGuard ) {
|
||||
cac.clearSubscriptionPrivate ( *pCBGuard, *pMon );
|
||||
}
|
||||
else {
|
||||
epicsGuard < epicsMutex > cbGuard ( cac.cbMutex );
|
||||
cac.clearSubscriptionPrivate ( cbGuard, *pMon );
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
void ca_client_context::clearSubscriptionPrivate (
|
||||
epicsGuard < epicsMutex > & cbGuard, oldSubscription & subscr )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
oldChannelNotify & chan = subscr.channel ();
|
||||
try {
|
||||
// if this stalls out on a live circuit then an exception
|
||||
// can be forthcoming which we must ignore as the clear
|
||||
// request must always be successful
|
||||
chan.eliminateExcessiveSendBacklog (
|
||||
& cbGuard, guard );
|
||||
}
|
||||
catch ( cacChannel::notConnected & ) {
|
||||
// intentionally ignored
|
||||
}
|
||||
subscr.cancel ( cbGuard, guard );
|
||||
}
|
||||
|
||||
|
||||
102
src/ca/cac.cpp
102
src/ca/cac.cpp
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -29,6 +28,8 @@
|
||||
#include "osiProcess.h"
|
||||
#include "epicsSignal.h"
|
||||
#include "envDefs.h"
|
||||
#include "locationException.h"
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
@@ -44,6 +45,7 @@
|
||||
#include "bhe.h"
|
||||
#include "net_convert.h"
|
||||
#include "autoPtrFreeList.h"
|
||||
#include "noopiiu.h"
|
||||
|
||||
static const char *pVersionCAC =
|
||||
"@(#) " EPICS_VERSION_STRING
|
||||
@@ -138,7 +140,7 @@ cac::cac (
|
||||
initializingThreadsPriority ( epicsThreadGetPrioritySelf() ),
|
||||
maxRecvBytesTCP ( MAX_TCP ),
|
||||
beaconAnomalyCount ( 0u ),
|
||||
circuitsInstalled ( 0u )
|
||||
iiuUninstallInProgress ( false )
|
||||
{
|
||||
if ( ! osiSockAttach () ) {
|
||||
throwWithLocation ( caErrorCode (ECA_INTERNAL) );
|
||||
@@ -233,17 +235,17 @@ cac::~cac ()
|
||||
// waiting for the UDP thread to exit while it is waiting to
|
||||
// get the lock.
|
||||
if ( this->pudpiiu ) {
|
||||
this->pudpiiu->shutdown ();
|
||||
epicsGuard < epicsMutex > cbGuard ( this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->pudpiiu->shutdown ( cbGuard, guard );
|
||||
|
||||
//
|
||||
// shutdown all tcp circuits
|
||||
//
|
||||
epicsGuard < epicsMutex > cbGuard ( this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
tsDLIter < tcpiiu > iter = this->circuitList.firstIter ();
|
||||
while ( iter.valid() ) {
|
||||
// this causes a clean shutdown to occur
|
||||
iter->removeAllChannels ( true, cbGuard, guard, *this->pudpiiu );
|
||||
iter->unlinkAllChannels ( cbGuard, guard );
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
@@ -256,13 +258,12 @@ cac::~cac ()
|
||||
//
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
while ( this->circuitsInstalled ) {
|
||||
while ( this->circuitList.count() > 0 || this->iiuUninstallInProgress ) {
|
||||
epicsGuardRelease < epicsMutex > unguard ( guard );
|
||||
this->iiuUninstall.wait ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( this->pudpiiu ) {
|
||||
delete this->pudpiiu;
|
||||
}
|
||||
@@ -279,14 +280,14 @@ cac::~cac ()
|
||||
this->bheFreeList.release ( pBHE );
|
||||
}
|
||||
|
||||
osiSockRelease ();
|
||||
|
||||
this->timerQueue.release ();
|
||||
|
||||
this->ipToAEngine.release ();
|
||||
|
||||
errlogFlush ();
|
||||
|
||||
osiSockRelease ();
|
||||
|
||||
// its ok for channels and subscriptions to still
|
||||
// exist at this point. The user created them and
|
||||
// its his responsibility to clean them up.
|
||||
@@ -427,7 +428,7 @@ void cac::beaconNotify ( const inetAddrID & addr, const epicsTime & currentTime,
|
||||
|
||||
this->beaconAnomalyCount++;
|
||||
|
||||
this->pudpiiu->beaconAnomalyNotify ( guard, currentTime );
|
||||
this->pudpiiu->beaconAnomalyNotify ( guard );
|
||||
|
||||
# ifdef DEBUG
|
||||
{
|
||||
@@ -459,21 +460,19 @@ cacChannel & cac::createChannel (
|
||||
}
|
||||
|
||||
nciu * pNetChan = new ( this->channelFreeList )
|
||||
nciu ( *this, *this->pudpiiu, chan, pName, pri );
|
||||
nciu ( *this, noopIIU, chan, pName, pri );
|
||||
this->chanTable.idAssignAdd ( *pNetChan );
|
||||
return *pNetChan;
|
||||
}
|
||||
|
||||
bool cac::transferChanToVirtCircuit (
|
||||
void cac::transferChanToVirtCircuit (
|
||||
epicsGuard < epicsMutex > & cbGuard, unsigned cid, unsigned sid, // X aCC 431
|
||||
ca_uint16_t typeCode, arrayElementCount count,
|
||||
unsigned minorVersionNumber, const osiSockAddr & addr )
|
||||
unsigned minorVersionNumber, const osiSockAddr & addr,
|
||||
const epicsTime & currentTime )
|
||||
{
|
||||
bool newIIU = false;
|
||||
tcpiiu * piiu = 0;
|
||||
|
||||
if ( addr.sa.sa_family != AF_INET ) {
|
||||
return false;
|
||||
return ;
|
||||
}
|
||||
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
@@ -483,33 +482,34 @@ bool cac::transferChanToVirtCircuit (
|
||||
*/
|
||||
nciu * pChan = this->chanTable.lookup ( cid );
|
||||
if ( ! pChan ) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ignore duplicate search replies
|
||||
*/
|
||||
* Ignore duplicate search replies
|
||||
*/
|
||||
osiSockAddr chanAddr = pChan->getPIIU(guard)->getNetworkAddress (guard);
|
||||
if ( chanAddr.sa.sa_family != AF_UNSPEC ) {
|
||||
if ( ! sockAddrAreIdentical ( &addr, &chanAddr ) ) {
|
||||
char acc[64];
|
||||
pChan->getPIIU(guard)->hostName ( guard, acc, sizeof ( acc ) );
|
||||
pChan->getPIIU(guard)->getHostName ( guard, acc, sizeof ( acc ) );
|
||||
msgForMultiplyDefinedPV * pMsg = new ( this->mdpvFreeList )
|
||||
msgForMultiplyDefinedPV ( this->ipToAEngine,
|
||||
*this, pChan->pName ( guard ), acc );
|
||||
pMsg->ioInitiate ( addr );
|
||||
}
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* look for an existing virtual circuit
|
||||
*/
|
||||
bool newIIU = false;
|
||||
caServerID servID ( addr.ia, pChan->getPriority(guard) );
|
||||
piiu = this->serverTable.lookup ( servID );
|
||||
tcpiiu * piiu = this->serverTable.lookup ( servID );
|
||||
if ( piiu ) {
|
||||
if ( ! piiu->alive ( guard ) ) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -525,28 +525,30 @@ bool cac::transferChanToVirtCircuit (
|
||||
pBHE = new ( this->bheFreeList )
|
||||
bhe ( this->mutex, epicsTime (), 0u, addr.ia );
|
||||
if ( this->beaconTable.add ( *pBHE ) < 0 ) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->serverTable.add ( *pnewiiu );
|
||||
this->circuitList.add ( *pnewiiu );
|
||||
this->circuitsInstalled++;
|
||||
pBHE->registerIIU ( guard, *pnewiiu );
|
||||
piiu = pnewiiu.release ();
|
||||
newIIU = true;
|
||||
}
|
||||
catch ( std::bad_alloc & ) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
catch ( ... ) {
|
||||
errlogPrintf (
|
||||
"CAC: Unexpected exception during virtual circuit creation\n" );
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this->pudpiiu->uninstallChan ( cbGuard, guard, *pChan );
|
||||
piiu->installChannel ( cbGuard, guard, *pChan, sid, typeCode, count );
|
||||
// must occur before moving to new iiu
|
||||
pChan->getPIIU(guard)->uninstallChanDueToSuccessfulSearchResponse (
|
||||
guard, *pChan, currentTime );
|
||||
piiu->installChannel (
|
||||
cbGuard, guard, *pChan, sid, typeCode, count );
|
||||
|
||||
if ( ! piiu->ca_v42_ok ( guard ) ) {
|
||||
// connect to old server with lock applied
|
||||
@@ -556,8 +558,6 @@ bool cac::transferChanToVirtCircuit (
|
||||
if ( newIIU ) {
|
||||
piiu->start ( guard );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void cac::destroyChannel (
|
||||
@@ -585,9 +585,8 @@ void cac::disconnectAllIO (
|
||||
{
|
||||
cbGuard.assertIdenticalMutex ( this->cbMutex );
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
|
||||
char buf[128];
|
||||
sprintf ( buf, "host = %.100s", chan.pHostName ( guard ) );
|
||||
chan.getHostName ( guard, buf, sizeof ( buf ) );
|
||||
|
||||
tsDLIter < baseNMIU > pNetIO = ioList.firstIter();
|
||||
while ( pNetIO.valid () ) {
|
||||
@@ -923,7 +922,7 @@ bool cac::defaultExcep (
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
char buf[512];
|
||||
char hostName[64];
|
||||
iiu.hostName ( guard, hostName, sizeof ( hostName ) );
|
||||
iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
|
||||
sprintf ( buf, "host=%s ctx=%.400s", hostName, pCtx );
|
||||
this->notify.exception ( guard, status, buf, 0, 0u );
|
||||
return true;
|
||||
@@ -1084,21 +1083,19 @@ bool cac::verifyAndDisconnectChan (
|
||||
if ( ! pChan ) {
|
||||
return true;
|
||||
}
|
||||
this->disconnectChannel ( currentTime, mgr.cbGuard, guard, *pChan );
|
||||
this->disconnectChannel ( mgr.cbGuard, guard, *pChan );
|
||||
return true;
|
||||
}
|
||||
|
||||
void cac::disconnectChannel (
|
||||
const epicsTime & /* currentTime */,
|
||||
epicsGuard < epicsMutex > & cbGuard, // X aCC 431
|
||||
epicsGuard < epicsMutex > & guard, nciu & chan )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
assert ( this->pudpiiu );
|
||||
chan.disconnectAllIO ( cbGuard, guard );
|
||||
chan.getPIIU(guard)->uninstallChan ( cbGuard, guard, chan );
|
||||
this->pudpiiu->installDisconnectedChannel ( chan );
|
||||
chan.setServerAddressUnknown ( *this->pudpiiu, guard );
|
||||
chan.getPIIU(guard)->uninstallChan ( guard, chan );
|
||||
this->pudpiiu->installDisconnectedChannel ( guard, chan );
|
||||
chan.unresponsiveCircuitNotify ( cbGuard, guard );
|
||||
}
|
||||
|
||||
@@ -1107,7 +1104,7 @@ bool cac::badTCPRespAction ( callbackManager &, tcpiiu & iiu,
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
char hostName[64];
|
||||
iiu.hostName ( guard, hostName, sizeof ( hostName ) );
|
||||
iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
|
||||
errlogPrintf ( "CAC: Undecipherable TCP message ( bad response type %u ) from %s\n",
|
||||
hdr.m_cmmd, hostName );
|
||||
return false;
|
||||
@@ -1141,9 +1138,10 @@ void cac::destroyIIU ( tcpiiu & iiu )
|
||||
{
|
||||
epicsGuard < epicsMutex > cbGuard ( this->cbMutex );
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->iiuUninstallInProgress = true;
|
||||
if ( iiu.channelCount ( guard ) ) {
|
||||
char hostNameTmp[64];
|
||||
iiu.hostName ( guard, hostNameTmp, sizeof ( hostNameTmp ) );
|
||||
iiu.getHostName ( guard, hostNameTmp, sizeof ( hostNameTmp ) );
|
||||
genLocalExcep ( cbGuard, guard, *this, ECA_DISCONN, hostNameTmp );
|
||||
}
|
||||
osiSockAddr addr = iiu.getNetworkAddress ( guard );
|
||||
@@ -1156,24 +1154,24 @@ void cac::destroyIIU ( tcpiiu & iiu )
|
||||
}
|
||||
|
||||
assert ( this->pudpiiu );
|
||||
iiu.removeAllChannels ( false, cbGuard, guard, *this->pudpiiu );
|
||||
}
|
||||
iiu.disconnectAllChannels ( cbGuard, guard, *this->pudpiiu );
|
||||
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->serverTable.remove ( iiu );
|
||||
this->circuitList.remove ( iiu );
|
||||
}
|
||||
|
||||
// this destroys a timer that takes the primary mutex
|
||||
// so we must not hold the primary mutex here
|
||||
//
|
||||
// this waits for send/recv threads to exit
|
||||
// this also uses the cac free lists so cac must wait
|
||||
// for this to finish before it shuts down
|
||||
iiu.~tcpiiu ();
|
||||
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
this->freeListVirtualCircuit.release ( & iiu );
|
||||
assert ( this->circuitsInstalled > 0u );
|
||||
this->circuitsInstalled--;
|
||||
this->iiuUninstallInProgress = false;
|
||||
}
|
||||
|
||||
// signal iiu uninstal event so that cac can properly shut down
|
||||
@@ -1199,12 +1197,12 @@ double cac::beaconPeriod (
|
||||
}
|
||||
|
||||
void cac::initiateConnect (
|
||||
epicsGuard < epicsMutex > & guard, nciu & chan )
|
||||
epicsGuard < epicsMutex > & guard,
|
||||
nciu & chan, netiiu * & piiu )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
assert ( this->pudpiiu );
|
||||
this->pudpiiu->installNewChannel (
|
||||
epicsTime::getCurrent(), chan );
|
||||
this->pudpiiu->installNewChannel ( guard, chan, piiu );
|
||||
}
|
||||
|
||||
void *cacComBufMemoryManager::allocate ( size_t size )
|
||||
|
||||
45
src/ca/cac.h
45
src/ca/cac.h
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
@@ -85,14 +84,6 @@ private:
|
||||
cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );
|
||||
};
|
||||
|
||||
class cacDisconnectChannelPrivate { // X aCC 655
|
||||
public:
|
||||
virtual void disconnectChannel (
|
||||
const epicsTime & currentTime,
|
||||
epicsGuard < epicsMutex > & cbGuard,
|
||||
epicsGuard < epicsMutex > & guard, nciu & chan ) = 0;
|
||||
};
|
||||
|
||||
class notifyGuard {
|
||||
public:
|
||||
notifyGuard ( cacContextNotify & );
|
||||
@@ -114,7 +105,6 @@ public:
|
||||
class cac :
|
||||
public cacContext,
|
||||
private cacRecycle,
|
||||
private cacDisconnectChannelPrivate,
|
||||
private callbackForMultiplyDefinedPV
|
||||
{
|
||||
public:
|
||||
@@ -136,15 +126,12 @@ public:
|
||||
const epicsTime & currentTime, caHdrLargeArray &, char *pMsgBody );
|
||||
|
||||
// channel routines
|
||||
bool transferChanToVirtCircuit (
|
||||
void transferChanToVirtCircuit (
|
||||
epicsGuard < epicsMutex > &,
|
||||
unsigned cid, unsigned sid,
|
||||
ca_uint16_t typeCode, arrayElementCount count,
|
||||
unsigned minorVersionNumber, const osiSockAddr & );
|
||||
void disconnectAllChannels (
|
||||
epicsGuard < epicsMutex > & callbackControlGuard,
|
||||
epicsGuard < epicsMutex > & mutualExclusionGuard,
|
||||
tcpiiu & );
|
||||
unsigned minorVersionNumber, const osiSockAddr &,
|
||||
const epicsTime & currentTime );
|
||||
cacChannel & createChannel (
|
||||
epicsGuard < epicsMutex > & guard, const char * pChannelName,
|
||||
cacChannelNotify &, cacChannel::priLev );
|
||||
@@ -153,7 +140,9 @@ public:
|
||||
epicsGuard < epicsMutex > & mutualExclusionGuard,
|
||||
nciu & );
|
||||
void initiateConnect (
|
||||
epicsGuard < epicsMutex > &, nciu & );
|
||||
epicsGuard < epicsMutex > &, nciu &, netiiu * & );
|
||||
nciu * lookupChannel (
|
||||
epicsGuard < epicsMutex > &, const cacChannel::ioid & );
|
||||
|
||||
// IO requests
|
||||
void writeRequest ( epicsGuard < epicsMutex > &, nciu &, unsigned type,
|
||||
@@ -283,9 +272,8 @@ private:
|
||||
unsigned initializingThreadsPriority;
|
||||
unsigned maxRecvBytesTCP;
|
||||
unsigned beaconAnomalyCount;
|
||||
unsigned circuitsInstalled;
|
||||
bool iiuUninstallInProgress;
|
||||
|
||||
void run ();
|
||||
void recycleReadNotifyIO (
|
||||
epicsGuard < epicsMutex > &, netReadNotifyIO &io );
|
||||
void recycleWriteNotifyIO (
|
||||
@@ -294,7 +282,6 @@ private:
|
||||
epicsGuard < epicsMutex > &, netSubscription &io );
|
||||
|
||||
void disconnectChannel (
|
||||
const epicsTime & currentTime,
|
||||
epicsGuard < epicsMutex > & cbGuard,
|
||||
epicsGuard < epicsMutex > & guard, nciu & chan );
|
||||
|
||||
@@ -424,16 +411,6 @@ inline unsigned cac::beaconAnomaliesSinceProgramStart (
|
||||
return this->beaconAnomalyCount;
|
||||
}
|
||||
|
||||
inline void cac::disconnectAllChannels (
|
||||
epicsGuard < epicsMutex > & cbGuard,
|
||||
epicsGuard < epicsMutex > & guard,
|
||||
tcpiiu & iiu )
|
||||
{
|
||||
cbGuard.assertIdenticalMutex ( this->cbMutex );
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
iiu.removeAllChannels ( false, cbGuard, guard, *this->pudpiiu );
|
||||
}
|
||||
|
||||
inline notifyGuard::notifyGuard ( cacContextNotify & notifyIn ) :
|
||||
notify ( notifyIn )
|
||||
{
|
||||
@@ -451,5 +428,13 @@ inline callbackManager::callbackManager (
|
||||
{
|
||||
}
|
||||
|
||||
inline nciu * cac::lookupChannel (
|
||||
epicsGuard < epicsMutex > & guard,
|
||||
const cacChannel::ioid & idIn )
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
return this->chanTable.lookup ( idIn );
|
||||
}
|
||||
|
||||
#endif // ifdef cach
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
\*************************************************************************/
|
||||
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -25,12 +25,12 @@
|
||||
|
||||
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
|
||||
|
||||
#include "iocinf.h"
|
||||
#include "localHostName.h"
|
||||
#include "errlog.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "iocinf.h"
|
||||
#include "localHostName.h"
|
||||
#include "cacIO.h"
|
||||
#undef epicsExportSharedSymbols
|
||||
|
||||
const cacChannel::priLev cacChannel::priorityMax = 99u;
|
||||
const cacChannel::priLev cacChannel::priorityMin = 0u;
|
||||
@@ -81,38 +81,27 @@ bool cacChannel::connected (
|
||||
}
|
||||
|
||||
// the default is to assume that it is a locally hosted channel
|
||||
void cacChannel::hostName (
|
||||
unsigned cacChannel::getHostName (
|
||||
epicsGuard < epicsMutex > &,
|
||||
char *pBuf, unsigned bufLength ) const
|
||||
char * pBuf, unsigned bufLength ) const throw ()
|
||||
{
|
||||
if ( bufLength ) {
|
||||
epicsSingleton < localHostName >::reference
|
||||
ref ( localHostNameAtLoadTime.getReference () );
|
||||
ref->copy ( pBuf, bufLength );
|
||||
return ref->getName ( pBuf, bufLength );
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
|
||||
// deprecated - please do not use
|
||||
// the default is to assume that it is a locally hosted channel
|
||||
const char * cacChannel::pHostName (
|
||||
epicsGuard < epicsMutex > & ) const
|
||||
epicsGuard < epicsMutex > & guard ) const throw ()
|
||||
{
|
||||
epicsSingleton < localHostName >::reference
|
||||
ref ( localHostNameAtLoadTime.getReference () );
|
||||
return ref->pointer ();
|
||||
}
|
||||
|
||||
void cacChannel::operator delete ( void * )
|
||||
{
|
||||
// Visual C++ .net appears to require operator delete if
|
||||
// placement operator delete is defined? I smell a ms rat
|
||||
// because if I declare placement new and delete, but
|
||||
// comment out the placement delete definition there are
|
||||
// no undefined symbols.
|
||||
errlogPrintf ( "%s:%d this compiler is confused about placement delete - memory was probably leaked",
|
||||
__FILE__, __LINE__ );
|
||||
}
|
||||
|
||||
cacContext::~cacContext () {}
|
||||
|
||||
cacService::~cacService () {}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
@@ -137,7 +136,9 @@ public:
|
||||
virtual ~cacChannelNotify () = 0;
|
||||
virtual void connectNotify ( epicsGuard < epicsMutex > & ) = 0;
|
||||
virtual void disconnectNotify ( epicsGuard < epicsMutex > & ) = 0;
|
||||
virtual void serviceShutdownNotify () = 0;
|
||||
virtual void serviceShutdownNotify (
|
||||
epicsGuard < epicsMutex > & callbackControlGuard,
|
||||
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
|
||||
virtual void accessRightsNotify (
|
||||
epicsGuard < epicsMutex > &, const caAccessRights & ) = 0;
|
||||
virtual void exception (
|
||||
@@ -177,8 +178,12 @@ public:
|
||||
epicsGuard < epicsMutex > & callbackControlGuard,
|
||||
epicsGuard < epicsMutex > & mutualExclusionGuard ) = 0;
|
||||
cacChannelNotify & notify () const; // required ?????
|
||||
virtual unsigned getName (
|
||||
epicsGuard < epicsMutex > &,
|
||||
char * pBuf, unsigned bufLen ) const throw () = 0;
|
||||
// !! deprecated, avoid use !!
|
||||
virtual const char * pName (
|
||||
epicsGuard < epicsMutex > & ) const = 0;
|
||||
epicsGuard < epicsMutex > & guard ) const throw () = 0;
|
||||
virtual void show (
|
||||
epicsGuard < epicsMutex > &,
|
||||
unsigned level ) const = 0;
|
||||
@@ -226,11 +231,12 @@ public:
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
virtual bool connected (
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
virtual void hostName (
|
||||
virtual unsigned getHostName (
|
||||
epicsGuard < epicsMutex > &,
|
||||
char * pBuf, unsigned bufLength ) const;
|
||||
char * pBuf, unsigned bufLength ) const throw ();
|
||||
// !! deprecated, avoid use !!
|
||||
virtual const char * pHostName (
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
epicsGuard < epicsMutex > & guard ) const throw ();
|
||||
|
||||
// exceptions
|
||||
class badString {};
|
||||
@@ -252,8 +258,6 @@ private:
|
||||
cacChannelNotify & callback;
|
||||
cacChannel ( const cacChannel & );
|
||||
cacChannel & operator = ( const cacChannel & );
|
||||
void * operator new ( size_t );
|
||||
void operator delete ( void * );
|
||||
};
|
||||
|
||||
class epicsShareClass cacContext { // X aCC 655
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
@@ -677,7 +676,7 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char
|
||||
*/
|
||||
epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel);
|
||||
/* thread safe version */
|
||||
epicsShareFunc void epicsShareAPI ca_get_host_name ( chid pChan,
|
||||
epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan,
|
||||
char *pBuf, unsigned bufLength );
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,14 +7,6 @@
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
$Id$
|
||||
caeventmask.h
|
||||
|
||||
Modification History
|
||||
joh 04-16-90 Created
|
||||
|
||||
*/
|
||||
|
||||
#ifndef INCLcaeventmaskh
|
||||
#define INCLcaeventmaskh
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/* * $Id$
|
||||
/*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
* Los Alamos National Laboratory
|
||||
|
||||
@@ -49,7 +49,12 @@ typedef struct testItem {
|
||||
char name[40];
|
||||
int type;
|
||||
int count;
|
||||
union db_access_val val;
|
||||
union {
|
||||
dbr_double_t doubleval;
|
||||
dbr_float_t fltval;
|
||||
dbr_short_t intval;
|
||||
dbr_string_t strval;
|
||||
} val;
|
||||
} ti;
|
||||
|
||||
typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter );
|
||||
@@ -489,7 +494,8 @@ LOCAL void test ( ti *pItems, unsigned iterations )
|
||||
/*
|
||||
* catime ()
|
||||
*/
|
||||
int catime ( char *channelName, unsigned channelCount, enum appendNumberFlag appNF )
|
||||
int catime ( const char * channelName,
|
||||
unsigned channelCount, enum appendNumberFlag appNF )
|
||||
{
|
||||
unsigned i;
|
||||
unsigned strsize;
|
||||
@@ -554,7 +560,7 @@ int catime ( char *channelName, unsigned channelCount, enum appendNumberFlag app
|
||||
test ( pItemList, channelCount );
|
||||
|
||||
for ( i = 0; i < channelCount; i++ ) {
|
||||
pItemList[i].val.fltval = 0.0f;
|
||||
pItemList[i].val.doubleval = 0.0;
|
||||
pItemList[i].type = DBR_DOUBLE;
|
||||
}
|
||||
printf ( "double test\n" );
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* L O S A L A M O S
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user