Compare commits
351 Commits
R3.12.2.2
...
R3.13.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f39f39d79 | ||
|
|
d807b2ace5 | ||
|
|
18c52e5839 | ||
|
|
81cd82fcca | ||
|
|
f1d714a57e | ||
|
|
7ce03e13e8 | ||
|
|
3ca0a1f556 | ||
|
|
b8a0083745 | ||
|
|
11925a7168 | ||
|
|
e81b990a31 | ||
|
|
edff93791b | ||
|
|
5ca9baaede | ||
|
|
ea0ff36f65 | ||
|
|
a2b8735fe5 | ||
|
|
cb9583a21a | ||
|
|
3d1180b17f | ||
|
|
507a125c2c | ||
|
|
c5bfbfccc0 | ||
|
|
d3e21e87b2 | ||
|
|
9c05191e9e | ||
|
|
9c2248a5c6 | ||
|
|
546bb97e92 | ||
|
|
c556f69387 | ||
|
|
2ec12266ad | ||
|
|
13c03c4cde | ||
|
|
99deec1134 | ||
|
|
1938a00761 | ||
|
|
e50d5375f8 | ||
|
|
30e64505e3 | ||
|
|
0b3df30c4f | ||
|
|
070673fa89 | ||
|
|
bfb6dcc118 | ||
|
|
46c39c3253 | ||
|
|
ad232dd2d9 | ||
|
|
c40ff7da52 | ||
|
|
2af23a4893 | ||
|
|
7260cf15fb | ||
|
|
ee2cf25c35 | ||
|
|
08ec0e69d8 | ||
|
|
e906138c55 | ||
|
|
0e6b238881 | ||
|
|
82e39acd3a | ||
|
|
85ef2f5a10 | ||
|
|
733ed90bd7 | ||
|
|
4c8c63c9e1 | ||
|
|
aeaad63186 | ||
|
|
70a87d2c95 | ||
|
|
41b53c1a67 | ||
|
|
a4ac96afdc | ||
|
|
a5d46a7a07 | ||
|
|
e37d227975 | ||
|
|
adab5e6a1a | ||
|
|
56a11aa90c | ||
|
|
969152088f | ||
|
|
2a5871e303 | ||
|
|
b5c459b036 | ||
|
|
cffd160cf0 | ||
|
|
c4aa64946f | ||
|
|
069c404d64 | ||
|
|
998e413bed | ||
|
|
8fd7fff71c | ||
|
|
d799330ec0 | ||
|
|
631de381fd | ||
|
|
f15f4ad524 | ||
|
|
13156bee16 | ||
|
|
090e6ce3d3 | ||
|
|
fd2a536131 | ||
|
|
6b6c9ce6a1 | ||
|
|
95f4990b98 | ||
|
|
ad2a272e90 | ||
|
|
7438234eb5 | ||
|
|
67eb929b63 | ||
|
|
5d73bdffb2 | ||
|
|
3c603a7e3f | ||
|
|
ec34df23fc | ||
|
|
67dce79b62 | ||
|
|
70c885000e | ||
|
|
f2cd63c68f | ||
|
|
7d342b5276 | ||
|
|
20880b3950 | ||
|
|
6bd6481cbd | ||
|
|
2433b09c1c | ||
|
|
a057f79d75 | ||
|
|
1947538968 | ||
|
|
dc6972ba06 | ||
|
|
c4171b7ec0 | ||
|
|
7f08759c2a | ||
|
|
43b11de6ad | ||
|
|
66ee6135ba | ||
|
|
3c4ffb5cc4 | ||
|
|
72a8c35f55 | ||
|
|
53f2acfaa1 | ||
|
|
fe4cfd8091 | ||
|
|
8c2cefc5a4 | ||
|
|
dbe9f90ac1 | ||
|
|
4b47e7a979 | ||
|
|
d12ce5f58a | ||
|
|
f1b751a3d3 | ||
|
|
c324b8f598 | ||
|
|
64e851e05c | ||
|
|
e3fb1f6c90 | ||
|
|
0844d7132f | ||
|
|
dd8fa0e290 | ||
|
|
276dd19293 | ||
|
|
a312de99b0 | ||
|
|
ccfcd95561 | ||
|
|
2e42535459 | ||
|
|
d3432d487a | ||
|
|
c6701f8475 | ||
|
|
dba800ebb7 | ||
|
|
cda87cbf31 | ||
|
|
376f37eb1e | ||
|
|
2f2f378238 | ||
|
|
4e1d778fc8 | ||
|
|
9c1d4be29d | ||
|
|
291b22271f | ||
|
|
a8db0e5d73 | ||
|
|
4ba33b8259 | ||
|
|
4b7dd0f8b1 | ||
|
|
0c831f7e5a | ||
|
|
4b655c1632 | ||
|
|
01462e1c7c | ||
|
|
5832c6fa25 | ||
|
|
9eab30d3fc | ||
|
|
46beb63264 | ||
|
|
ab9a1d4022 | ||
|
|
0ab1978030 | ||
|
|
845a45d20e | ||
|
|
2486f6b20f | ||
|
|
49e7beed3b | ||
|
|
d175ff7449 | ||
|
|
14a2f1866d | ||
|
|
236cf1ddf8 | ||
|
|
01402c6bbd | ||
|
|
b1450980b5 | ||
|
|
b40676fe20 | ||
|
|
dea19e8846 | ||
|
|
d08070f69b | ||
|
|
3eeee76e99 | ||
|
|
2bcf574f79 | ||
|
|
d4f77948a0 | ||
|
|
1df41d2964 | ||
|
|
9b5fa04dae | ||
|
|
d1c337f7a3 | ||
|
|
543a610bb4 | ||
|
|
eed3471e15 | ||
|
|
b0e533dd75 | ||
|
|
04b02a71a5 | ||
|
|
7a18c98df3 | ||
|
|
a4b092c966 | ||
|
|
9e62be865b | ||
|
|
1969cbb2af | ||
|
|
495d94ee15 | ||
|
|
4ca3bf9217 | ||
|
|
d7f522577f | ||
|
|
cdb0a5719b | ||
|
|
a8bf57750d | ||
|
|
c0bb0d68af | ||
|
|
c2ebb2d91b | ||
|
|
5d0347c8ef | ||
|
|
d9aeca1b19 | ||
|
|
fb3ada00dd | ||
|
|
67e383af94 | ||
|
|
5791d6b61c | ||
|
|
637a046890 | ||
|
|
e61dce7a96 | ||
|
|
a7bf1d42e6 | ||
|
|
a229aaa159 | ||
|
|
c82788102c | ||
|
|
622ad2926d | ||
|
|
4299e39bce | ||
|
|
c3d2e1a46a | ||
|
|
39fdd3f785 | ||
|
|
0f28113959 | ||
|
|
433e81791b | ||
|
|
5e2aea4dab | ||
|
|
0074252862 | ||
|
|
125282e839 | ||
|
|
ea7f95fe17 | ||
|
|
9574829a43 | ||
|
|
9f6c8d2cb4 | ||
|
|
d2adaabbfe | ||
|
|
e32066749b | ||
|
|
f93fa732ac | ||
|
|
2fc14dc03b | ||
|
|
8e8ff2a2f6 | ||
|
|
969479e04f | ||
|
|
9dddad37ca | ||
|
|
741d784ad3 | ||
|
|
97b4200806 | ||
|
|
2727281cb4 | ||
|
|
e1ecb4f2e0 | ||
|
|
22ae937b08 | ||
|
|
1e52376f87 | ||
|
|
17333e4278 | ||
|
|
6467c0a777 | ||
|
|
e6768e0c94 | ||
|
|
a10641575b | ||
|
|
b06c40e470 | ||
|
|
61c525792e | ||
|
|
a7375e363b | ||
|
|
99b8d0d0fd | ||
|
|
a76a338e8e | ||
|
|
f1cd963176 | ||
|
|
d89a50416c | ||
|
|
2d55dafacc | ||
|
|
418fa60dbd | ||
|
|
a75f083371 | ||
|
|
5a8bb49c77 | ||
|
|
5f1ec28daf | ||
|
|
31fd02f8e9 | ||
|
|
ebc6972f74 | ||
|
|
eb437e162f | ||
|
|
7121929f1e | ||
|
|
7942f42242 | ||
|
|
91347ff65f | ||
|
|
aa8cceb119 | ||
|
|
ee0faa077f | ||
|
|
78c7233d0e | ||
|
|
87b2b3b1e6 | ||
|
|
701d2ee9cb | ||
|
|
2b293e286a | ||
|
|
0a824f8b40 | ||
|
|
28c4ce844d | ||
|
|
e9a86c7e26 | ||
|
|
54d746e3f3 | ||
|
|
6a116affea | ||
|
|
e73ba4b3c3 | ||
|
|
4a5a2f463b | ||
|
|
055b8a7149 | ||
|
|
00ca9457c4 | ||
|
|
0238591d9a | ||
|
|
459571b648 | ||
|
|
0646d6795f | ||
|
|
a56d58cf95 | ||
|
|
47171dd159 | ||
|
|
47ad9222a2 | ||
|
|
4376d7b186 | ||
|
|
6f2acd5645 | ||
|
|
87307b87bf | ||
|
|
00d9239af7 | ||
|
|
f119d0556f | ||
|
|
c7667fded7 | ||
|
|
b5bb5a0f46 | ||
|
|
dda17e5eaf | ||
|
|
f67af0cd21 | ||
|
|
160aab02eb | ||
|
|
9a1e7a3034 | ||
|
|
d141e38a80 | ||
|
|
25b5b8d5c2 | ||
|
|
ad26ee285f | ||
|
|
7f00b2034f | ||
|
|
2f6e847cf6 | ||
|
|
484427be12 | ||
|
|
20d75f926c | ||
|
|
922206cbcc | ||
|
|
9ab235fee7 | ||
|
|
dda8b9c9f6 | ||
|
|
117b4c7a9f | ||
|
|
ce6fe283b8 | ||
|
|
f904389afc | ||
|
|
de3bf16215 | ||
|
|
ac20fb5a17 | ||
|
|
88ef5bfc7c | ||
|
|
04a8db049f | ||
|
|
a624ea2c0c | ||
|
|
4609aa45d5 | ||
|
|
473f12132d | ||
|
|
8d43b12d93 | ||
|
|
fcc810efba | ||
|
|
4697f951b9 | ||
|
|
14f53d7844 | ||
|
|
9ea7fc6dd1 | ||
|
|
8f299a1d80 | ||
|
|
7263c8a271 | ||
|
|
41557f3946 | ||
|
|
7cf7fea999 | ||
|
|
391cbf40b6 | ||
|
|
093a0533c4 | ||
|
|
db44eedef4 | ||
|
|
1a78dc9064 | ||
|
|
ca6ed090ff | ||
|
|
df34a2eabc | ||
|
|
ad033dd8c2 | ||
|
|
16e9dc781a | ||
|
|
6e229435d1 | ||
|
|
65c14ab802 | ||
|
|
ef0402dcbd | ||
|
|
506003f300 | ||
|
|
a03cf9b56e | ||
|
|
a8f0ec2338 | ||
|
|
d7f50f503e | ||
|
|
fb82d0de0a | ||
|
|
20eed1bd05 | ||
|
|
4b248c8abe | ||
|
|
bd1b6d4f50 | ||
|
|
62551322b2 | ||
|
|
64809b2c52 | ||
|
|
dbb1fc2aa0 | ||
|
|
b5fc2cd1dd | ||
|
|
755abbeaef | ||
|
|
601cb19fa4 | ||
|
|
5fc13933a5 | ||
|
|
755aebb11b | ||
|
|
29a8aab459 | ||
|
|
f0e6c62973 | ||
|
|
a2939aa9c5 | ||
|
|
f2b70591eb | ||
|
|
7412b68956 | ||
|
|
49173bcb97 | ||
|
|
e52d0e0929 | ||
|
|
470c461102 | ||
|
|
70e01fcb18 | ||
|
|
8c55790b98 | ||
|
|
391565de5c | ||
|
|
b9395b020c | ||
|
|
4ccdf79d2f | ||
|
|
97dc3b8899 | ||
|
|
13a5f820c6 | ||
|
|
da20e059f7 | ||
|
|
2c5958f022 | ||
|
|
a9cad7df54 | ||
|
|
42f6f3c9ce | ||
|
|
87a9b22a15 | ||
|
|
012180ab65 | ||
|
|
ad2128b691 | ||
|
|
7e8bdc7e43 | ||
|
|
e1042ca5ee | ||
|
|
2390c0ace5 | ||
|
|
17989d29fe | ||
|
|
92b1b34e02 | ||
|
|
427ea50c50 | ||
|
|
cdd3e932fb | ||
|
|
3e0445f2ad | ||
|
|
bbbc3b6329 | ||
|
|
14d712b57c | ||
|
|
a6d0a677ee | ||
|
|
b258b2fc14 | ||
|
|
535ef14cf8 | ||
|
|
5a983c11cb | ||
|
|
8bd797aa5b | ||
|
|
28797e7a1a | ||
|
|
2a3fc15e9e | ||
|
|
9fae1fa33c | ||
|
|
13ff432956 | ||
|
|
461584c4d1 | ||
|
|
59e1ef1d77 | ||
|
|
359225dd34 | ||
|
|
6dceef4956 | ||
|
|
81eac9ddec | ||
|
|
3e1e1ae6aa |
21
COPYRIGHT_Combined
Normal file
21
COPYRIGHT_Combined
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
***********************************************************************/
|
||||
24
MakeRelease
24
MakeRelease
@@ -10,6 +10,15 @@
|
||||
# [-b] - For fully built release
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.7 1996/06/25 21:54:42 jba
|
||||
# Command line parm now base dir
|
||||
#
|
||||
# Revision 1.6 1996/06/07 19:19:10 jba
|
||||
# MakeRelease is now in release tar file.
|
||||
#
|
||||
# Revision 1.5 1996/03/04 21:03:48 jba
|
||||
# epicsVersion.h now in src/include.
|
||||
#
|
||||
# Revision 1.4 1996/02/20 21:03:53 jba
|
||||
# Updated README files to reflect directory changes and new installEpics.
|
||||
#
|
||||
@@ -58,14 +67,12 @@
|
||||
#
|
||||
#
|
||||
|
||||
EPICS=${1};
|
||||
|
||||
if [ ! -d src ]; then
|
||||
echo "Cannot find src directory, are you at the top of EPICS base ?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $EPICS/base
|
||||
|
||||
FULLY_BUILT=NO
|
||||
if [ "${2}" = "-b" ]; then
|
||||
@@ -107,11 +114,11 @@ if [ -f ${RELS}.Tar* ];
|
||||
|
||||
# Create list of files and dirs to include in Tar file
|
||||
|
||||
cd $EPICS
|
||||
cd ..
|
||||
|
||||
ls base/README* | xargs tar cvf ${RELS}.Tar
|
||||
|
||||
ls base/Makefile* > /tmp/make_release.out.$$;
|
||||
ls base/Make* > /tmp/make_release.out.$$;
|
||||
|
||||
ls base/*COPYRIGHT* >> /tmp/make_release.out.$$;
|
||||
|
||||
@@ -121,9 +128,6 @@ if [ -d startup ];
|
||||
>> /tmp/make_release.out.$$;
|
||||
fi
|
||||
|
||||
find config -name CVS -prune -o \
|
||||
! -type d -print >> /tmp/make_release.out.$$;
|
||||
|
||||
# binary / library / default.dctsdr / <rec>Record.h / etc.
|
||||
if [ $FULLY_BUILT = "YES" ];
|
||||
then
|
||||
@@ -139,10 +143,14 @@ if [ $FULLY_BUILT = "YES" ];
|
||||
find base/lib -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
find base/rec -name CVS -prune -o ! -type d -print \
|
||||
find base/dbd -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
fi
|
||||
|
||||
find base/config -name CVS -prune -o -name SCCS -prune -o ! -type d -print \
|
||||
| grep -v '/O\..*$' >> /tmp/make_release.out.$$
|
||||
|
||||
find base/src -name CVS -prune -o -name SCCS -prune -o ! -type d -print \
|
||||
| grep -v '/O\..*$' >> /tmp/make_release.out.$$
|
||||
|
||||
|
||||
135
Makefile
135
Makefile
@@ -1,5 +1,4 @@
|
||||
#
|
||||
#
|
||||
# Top Level EPICS Makefile
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
@@ -11,139 +10,25 @@
|
||||
# However, the release dependencies DOES require a complete
|
||||
# install because the release.% syntax is illegal.
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.26 1996/01/25 21:37:09 mrk
|
||||
# uninstall base/man
|
||||
#
|
||||
# Revision 1.25 1996/01/25 21:29:42 mrk
|
||||
# base/rec=>base/db base/include now installed
|
||||
#
|
||||
# Revision 1.24 1995/08/17 20:14:59 jba
|
||||
# Added base/tools scripts functionality to base/Makefile, removed scripts
|
||||
# Moved base/tools/MakeRelease to base dir.
|
||||
#
|
||||
# Revision 1.23 1995/02/13 15:00:09 jba
|
||||
# Changed include file from CONFIG_SITE to CONFIG
|
||||
#
|
||||
# Revision 1.22 1994/11/14 23:12:17 tang
|
||||
# Replace ARCH_TYPE with .
|
||||
#
|
||||
# Revision 1.1.1.1 1994/11/09 01:08:53 epics
|
||||
# Import of R3.12.0Beta
|
||||
#
|
||||
# Revision 1.18 1994/10/13 19:44:34 mda
|
||||
# Introduce temporary symbol (ARCH_TYPE=$$ARCH) and use in later targets/rules
|
||||
# to avoid problem with $* symbol resolution in some versions of gnumake.
|
||||
#
|
||||
# Revision 1.17 1994/10/05 18:45:57 jba
|
||||
# Modified syntax of makefile usage
|
||||
#
|
||||
# Revision 1.16 1994/09/09 17:32:27 jba
|
||||
# Cleanup of files
|
||||
#
|
||||
# Revision 1.15 1994/09/08 17:25:39 mcn
|
||||
# Changed clean to tools/Clean. Added "uninstall" dependency.
|
||||
#
|
||||
# Revision 1.14 1994/09/07 20:42:19 jba
|
||||
# Minor changes
|
||||
#
|
||||
# Revision 1.13 1994/09/07 19:15:17 jba
|
||||
# Modified to eork with extensions and do depends
|
||||
#
|
||||
# Revision 1.12 1994/08/21 00:55:51 mcn
|
||||
# New stuff.
|
||||
#
|
||||
# Revision 1.11 1994/08/19 15:38:01 mcn
|
||||
# Dependencies are now generated with a "make release".
|
||||
#
|
||||
# Revision 1.10 1994/08/12 18:51:29 mcn
|
||||
# Added Log and/or Id.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
EPICS=..
|
||||
include $(EPICS)/config/CONFIG
|
||||
TOP=.
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
all: install
|
||||
DIRS = src config
|
||||
|
||||
build:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
install:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
depends:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
clean:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
uninstall:
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
include $(TOP)/config/RULES_TOP
|
||||
|
||||
release:
|
||||
@echo TOP: Creating Release...
|
||||
@./MakeRelease ${EPICS}
|
||||
@./MakeRelease ${TOP}
|
||||
|
||||
built_release: install
|
||||
@echo TOP: Creating Fully Built Release...
|
||||
@./MakeRelease ${EPICS} -b
|
||||
|
||||
# Notes for single architecture build rules:
|
||||
# CheckArch only has to be run for dirs.% . That
|
||||
# way it will only be run ONCE when filtering down
|
||||
# dependencies.
|
||||
#
|
||||
# CheckArch does not have to be run for cleans
|
||||
# because you might want to eliminate binaries for
|
||||
# an old architecture.
|
||||
|
||||
# DIRS RULE syntax: make depends.arch
|
||||
# e.g.: make depends.mv167
|
||||
#
|
||||
# Create dependencies for an architecture. We MUST
|
||||
# do this separately for each architecture because
|
||||
# some things may be included on a per architecture
|
||||
# basis.
|
||||
|
||||
build.%:
|
||||
@echo $*: Building
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build
|
||||
|
||||
install.%:
|
||||
@echo $*: Installing
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install
|
||||
|
||||
depends.%:
|
||||
@echo $*: Performing Make Depends
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
|
||||
|
||||
# Illegal Syntax
|
||||
|
||||
release.%:
|
||||
@echo
|
||||
@echo "The release.arch syntax is not supported by this build."
|
||||
@echo " Use 'make release' or 'make built_release' instead."
|
||||
@echo
|
||||
|
||||
uninstall.%:
|
||||
@echo "TOP: Uninstalling $* "
|
||||
@rm -rf ./bin/$* ./lib/$* db include man
|
||||
@rm -rf rec.bak rec
|
||||
|
||||
clean.%:
|
||||
@echo "TOP: Cleaning $* "
|
||||
@find src -type d -name "O.$*" -prune -exec rm -rf {} \;
|
||||
|
||||
@./MakeRelease ${TOP} -b
|
||||
|
||||
uninstall::
|
||||
@DIR1=`pwd`;cd $(INSTALL_LOCATION);DIR2=`pwd`;cd $$DIR1;\
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then rm -fr $(INSTALL_LOCATION)/config; fi
|
||||
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#
|
||||
# base $Id$
|
||||
#
|
||||
# EPICS Makefile For Subdirectory Recursions
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.13 1994/09/09 17:32:29 jba
|
||||
# Cleanup of files
|
||||
#
|
||||
# Revision 1.12 1994/09/08 17:25:41 mcn
|
||||
# Changed clean to tools/Clean. Added "uninstall" dependency.
|
||||
#
|
||||
# Revision 1.11 1994/09/07 19:15:19 jba
|
||||
# Modified to eork with extensions and do depends
|
||||
#
|
||||
# Revision 1.10 1994/08/21 00:55:52 mcn
|
||||
# New stuff.
|
||||
#
|
||||
# Revision 1.9 1994/08/19 15:38:03 mcn
|
||||
# Dependencies are now generated with a "make release".
|
||||
#
|
||||
# Revision 1.8 1994/08/12 18:51:28 mcn
|
||||
# Added Log and/or Id.
|
||||
#
|
||||
#
|
||||
|
||||
EPICS=..
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
|
||||
all: build
|
||||
|
||||
build: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$TMP; \
|
||||
done)
|
||||
|
||||
install: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$TMP; \
|
||||
done)
|
||||
|
||||
depends: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$TMP; \
|
||||
done)
|
||||
|
||||
dirs:
|
||||
@echo ${T_A}: Creating Directories
|
||||
@for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; \
|
||||
cd $$DIR ; \
|
||||
if [ -f Makefile.${BUILD_TYPE} ] ; then \
|
||||
test -d O.${T_A} || \
|
||||
mkdir O.${T_A}; \
|
||||
test -f O.${T_A}/Makefile || \
|
||||
ln -s ../Makefile.${BUILD_TYPE} O.${T_A}/Makefile \
|
||||
> /dev/null 2> /dev/null; \
|
||||
test -f O.${T_A}/Target.include || \
|
||||
echo "T_A=${T_A}" > O.${T_A}/Target.include; \
|
||||
test -f O.${T_A}/.DEPENDS || \
|
||||
touch O.${T_A}/.DEPENDS; \
|
||||
fi ; \
|
||||
cd $$TMP; \
|
||||
done
|
||||
|
||||
152
README
152
README
@@ -27,9 +27,9 @@ Notes:
|
||||
|
||||
1.2 To add a target architecture to EPICS:
|
||||
|
||||
cd epics/config
|
||||
cp CONFIG_ARCH.mv167 CONFIG_ARCH.YOUR_ARCH
|
||||
edit CONFIG_ARCH.YOUR_ARCH - For compiler flags / etc.
|
||||
cd base/config
|
||||
cp CONFIG.mv167 CONFIG.YOUR_ARCH
|
||||
edit CONFIG.YOUR_ARCH - For compiler flags / etc.
|
||||
|
||||
cp CONFIG.Vx.68k CONFIG.Vx.YOUR_ARCH_CLASS
|
||||
cp CONFIG_SITE.Vx.68k CONFIG_SITE.Vx.YOUR_ARCH_CLASS
|
||||
@@ -43,20 +43,12 @@ Notes:
|
||||
cd epics/base
|
||||
gnumake - To build and install EPICS.
|
||||
gnumake clean - To clean temporary object files. Top level
|
||||
clean will remove all the O.ARCH dirs, not
|
||||
only those specified in BUILD_ARCHS.
|
||||
clean will remove all the O.ARCH dirs, not
|
||||
only those specified in BUILD_ARCHS.
|
||||
gnumake uninstall - Only available at the top level directory.
|
||||
Cleans directories created by the install.
|
||||
|
||||
1.4 To create an EPICS release:
|
||||
|
||||
edit base/include/version.h - ONLY IF you need to change the EPICS
|
||||
version number.
|
||||
|
||||
gnumake release - Will create Tar file
|
||||
|
||||
gnumake built_release - Will create Tar file, after generating
|
||||
dependencies, INCLUDING BINARIES.
|
||||
|
||||
1.5 "Partial" build commands:
|
||||
1.4 "Partial" build commands:
|
||||
|
||||
gnumake clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only.
|
||||
gnumake install.sun4 - Builds sun4 only.
|
||||
@@ -64,12 +56,12 @@ Notes:
|
||||
be complete before this can be issued).
|
||||
|
||||
NOTES:
|
||||
1. base/MakeRelease will create tar files in the directory ABOVE
|
||||
base. These tar files are then meant to be untarred at that level.
|
||||
This release will include the "epics/config" directory.
|
||||
|
||||
2. EPICS binaries and shellscripts are installed into the bin/ARCH and
|
||||
lib/ARCH directories.
|
||||
1. EPICS binaries and shellscripts are installed into the directory
|
||||
$(INSTALL_LOCATION)/bin/ARCH.
|
||||
|
||||
2. EPICS libraries are installed into the $(INSTALL_LOCATION)/lib/ARCH
|
||||
directory.
|
||||
|
||||
3. During a normal build (a "make" or "make install"), the "depends"
|
||||
dependency will NOT be invoked. Only if "make depends" is run
|
||||
@@ -88,7 +80,7 @@ NOTES:
|
||||
mv167 target.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Part 2 --- Configuration Files in epics/config
|
||||
Part 2 --- Configuration Files in epics/base/config
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG - This file is meant to be included in the low-level EPICS Makefiles.
|
||||
It includes the other EPICS makefiles, and allows individual developers
|
||||
@@ -107,7 +99,7 @@ manager. It specifies:
|
||||
etc.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG_ARCH.ARCH - This file defines a particular architecture. It
|
||||
CONFIG.ARCH - This file defines a particular architecture. It
|
||||
contains the following variables:
|
||||
|
||||
BUILD_TYPE: Unix / Vx
|
||||
@@ -115,23 +107,21 @@ contains the following variables:
|
||||
Architecture dependent build flags. The flag names / contents
|
||||
depend on your architecture class.
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG_SITE.BUILD_TYPE.ARCH_CLASS - Contains definitions of where to
|
||||
find things, like X11 / Motif, etc.
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG.BUILD_TYPE.ARCH_CLASS - Contains definitions pertaining to a
|
||||
particular architecture class. This file's primary usefulness is to
|
||||
define compile and link flags.
|
||||
CONFIG_SITE.ARCH - Contains site specific definitions pertaining to a
|
||||
particular architecture. This file's primary usefulness is to
|
||||
define site specific compile and link flags.
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG_COMMON - Contains definitions describing the layout of base.
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG_BASE
|
||||
CONFIG_EXTENSIONS - Defines what subdirectories get built by default under
|
||||
base and extensions.
|
||||
CONFIG_BASE - Defines what subdirectories get built by default under base.
|
||||
----------------------------------------------------------------------------
|
||||
RULES.Vx - Rules for building with VxWorks makefiles.
|
||||
----------------------------------------------------------------------------
|
||||
RULES.Unix - Rules for building with Unix makefiles.
|
||||
----------------------------------------------------------------------------
|
||||
RULES_TOP - Top level rules for building.
|
||||
----------------------------------------------------------------------------
|
||||
RULES_ARCHS
|
||||
RULES_DIRS - Allows top-level type command syntax in low-level directories.
|
||||
----------------------------------------------------------------------------
|
||||
@@ -143,18 +133,18 @@ Filename SYS_MGR ADD_VX_ARCH ADD_UNIX_ARCH DEVELOPER
|
||||
|
||||
CONFIG m - - m
|
||||
CONFIG_SITE m m m -
|
||||
CONFIG_ARCH.ARCH - c c -
|
||||
CONFIG_SITE.Unix.ARCH_CLASS m - c* -
|
||||
CONFIG_SITE.Vx.ARCH_CLASS m c* - -
|
||||
CONFIG.Unix.ARCH_CLASS - - c* -
|
||||
CONFIG_SITE_ENV m - - -
|
||||
CONFIG.ARCH - c c -
|
||||
CONFIG_SITE.ARCH - c c -
|
||||
CONFIG.Vx.ARCH_CLASS - c* - -
|
||||
RULES.Vx - - - -
|
||||
RULES.Unix - - - -
|
||||
CONFIG_BASE - - - -
|
||||
CONFIG_EXTENSIONS - - - -
|
||||
CONFIG_COMMON - - - -
|
||||
CONFIG_ENV - - - -
|
||||
RULES_ARCHS - - - -
|
||||
RULES_DIRS - - - -
|
||||
RULES_TOP - - - -
|
||||
|
||||
m - Modify an existing file.
|
||||
c - Create a new file.
|
||||
@@ -172,63 +162,57 @@ RULES_DIRS - - - -
|
||||
(files are numbered in the order of their inclusion)
|
||||
|
||||
src/db/Makefile.Vx (An example EPICS makefile)
|
||||
^ ^ ^
|
||||
| | +--- 3. RULES.Vx
|
||||
| | Default rules.
|
||||
| +------- 2. CONFIG
|
||||
| ^ ^ ^ ^ ^
|
||||
| | | | | |
|
||||
| | | | | +- 1. CONFIG_SITE
|
||||
| | | | | HOST_ARCH = sun4
|
||||
| | | | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
|
||||
| | | | | VX_DIR = /vxworks
|
||||
| | | | | More.
|
||||
| | | | +--- 2. CONFIG_COMMON
|
||||
| | | | General info about base.
|
||||
| | | +----- 3. CONFIG_ARCH.hkv2f
|
||||
| | | BUILD_TYPE = Vx
|
||||
| | | ARCH_CLASS = 68k
|
||||
| | | Arch Specific Compiler Flag Setup
|
||||
| | +------- 4. CONFIG_SITE.Vx.68k
|
||||
| | Directory locations
|
||||
| +--------- 5. CONFIG.Vx.68k
|
||||
| Compiler/utility setup for ARCH_CLASS
|
||||
+---------- 1. Target.include
|
||||
T_A definition (target architecture)
|
||||
^ ^
|
||||
| +--- 3. RULES.Vx
|
||||
| Default rules.
|
||||
+------- 2. CONFIG
|
||||
^ ^ ^ ^
|
||||
| | | |
|
||||
| | | +- 1. CONFIG_SITE
|
||||
| | | HOST_ARCH = sun4
|
||||
| | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
|
||||
| | | VX_DIR = /vxworks
|
||||
| | | More.
|
||||
| | +--- 2. CONFIG_COMMON
|
||||
| | General info about base.
|
||||
| +----- 3. CONFIG.hkv2f
|
||||
| ^ BUILD_TYPE = Vx
|
||||
| | ARCH_CLASS = 68k
|
||||
| | Arch Specific Compiler Flag Setup
|
||||
| +--- a. CONFIG.Vx.68k
|
||||
| Compiler/utility setup for ARCH_CLASS
|
||||
+------- 4. CONFIG_SITE.hkv2f
|
||||
Site Specific setup
|
||||
|
||||
---------------------------- sun4 example --------------------------------
|
||||
(files are numbered in the order of their inclusion)
|
||||
|
||||
src/db/Makefile.Unix (An example EPICS makefile)
|
||||
^ ^ ^
|
||||
| | +--- 3. RULES.Unix
|
||||
| | Default rules.
|
||||
| +------- 2. CONFIG
|
||||
| ^ ^ ^ ^ ^
|
||||
| | | | | |
|
||||
| | | | | +- 1. CONFIG_SITE
|
||||
| | | | | HOST_ARCH = sun4
|
||||
| | | | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
|
||||
| | | | | VX_DIR = /vxworks
|
||||
| | | | | More.
|
||||
| | | | +--- 2. CONFIG_COMMON
|
||||
| | | | General info about base.
|
||||
| | | +----- 3. CONFIG_ARCH.sun4
|
||||
| | | BUILD_TYPE = Unix
|
||||
| | | ARCH_CLASS = sun4
|
||||
| | | Arch Specific Compiler Flag Setup
|
||||
| | +------- 4. CONFIG_SITE.Unix.sun4
|
||||
| | Directory locations
|
||||
| +--------- 5. CONFIG.Unix.sun4
|
||||
| Compiler/utility setup for ARCH_CLASS
|
||||
+---------- 1. Target.include
|
||||
T_A definition (target architecture)
|
||||
^ ^
|
||||
| +--- 3. RULES.Unix
|
||||
| Default rules.
|
||||
+------- 2. CONFIG
|
||||
^ ^ ^ ^
|
||||
| | | |
|
||||
| | | +- 1. CONFIG_SITE
|
||||
| | | HOST_ARCH = sun4
|
||||
| | | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
|
||||
| | | VX_DIR = /vxworks
|
||||
| | | More.
|
||||
| | +--- 2. CONFIG_COMMON
|
||||
| | General info about base.
|
||||
| +----- 3. CONFIG.sun4
|
||||
| BUILD_TYPE = Unix
|
||||
| ARCH_CLASS = sun4
|
||||
| Arch Specific Compiler Flag Setup
|
||||
+------- 4. CONFIG_SITE.sun4
|
||||
Directory locations
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Part 4 --- EPICS dependencies
|
||||
Part 4 --- EPICS makefile rules
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Dependencies supported by lower level Makefiles:
|
||||
Rules supported by lower level Makefiles:
|
||||
|
||||
depends - Generate include dependencies
|
||||
build - Builds objects, using libraries from "build_libs"
|
||||
|
||||
34
README.niCpu030
Normal file
34
README.niCpu030
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
The CPU030 may need to have the nivxi path set correctly:
|
||||
From the vxWorks shell type "vxitedit" (you may need to
|
||||
loading the NI vxitedit package first)
|
||||
take option 2
|
||||
take option 3
|
||||
type list
|
||||
type modify 0
|
||||
type in the correct path when promped
|
||||
(the path should end in nivxi
|
||||
and should traverse the niCpu030
|
||||
directories shipped with the 030
|
||||
ie something of the form "???/config/niCPU030/nivxi"
|
||||
type save
|
||||
type exit
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
see "Getting Started with Your VXIcpu-030" from NI
|
||||
|
||||
You may may need to setup front panel to backplane trigger
|
||||
routing:
|
||||
|
||||
To take a TTL input and map it to VXI backplane ECL trigger 0
|
||||
type in (to the vxWorks shell):
|
||||
|
||||
epvxiRouteTriggerECL(<logical address>, 1, 0)
|
||||
|
||||
where <logical address> specifies the card with the
|
||||
front panel trigger connection.
|
||||
|
||||
johill@lanl.gov
|
||||
|
||||
11
SkeletonCOPYRIGHT_Combined
Normal file
11
SkeletonCOPYRIGHT_Combined
Normal file
@@ -0,0 +1,11 @@
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
(C) COPYRIGHT 1991 Regents of the University of California,
|
||||
and the University of Chicago Board of Governors.
|
||||
|
||||
This software was developed under a United States Government license
|
||||
described on the COPYRIGHT_Combined file included as part
|
||||
of this distribution.
|
||||
**********************************************************************/
|
||||
45
config/CONFIG
Normal file
45
config/CONFIG
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# The developer may edit this file.
|
||||
|
||||
# Site-specific build options
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE
|
||||
|
||||
# EPICS base definitions
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_COMMON
|
||||
|
||||
# assume T_A is the host arch if not specified
|
||||
ifndef T_A
|
||||
T_A = $(HOST_ARCH)
|
||||
endif
|
||||
|
||||
# Architecture specific definitions
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG.$(T_A)
|
||||
#
|
||||
-include $(EPICS_BASE)/config/CONFIG_SITE.$(T_A)
|
||||
|
||||
# User specific definitions
|
||||
#
|
||||
-include $(HOME)/.EPICS_CONFIG
|
||||
|
||||
# All EPICS options other than BUILD_TYPE
|
||||
# may be overridden here.
|
||||
#
|
||||
# EXAMPLES
|
||||
# --------
|
||||
# Build client objects statically ? must be either YES or NO
|
||||
#STATIC_BUILD=NO
|
||||
# Unix Optimization, must be either YES or NO
|
||||
#UNIX_OPT=YES
|
||||
# VxWorks Optimization, must be either YES or NO
|
||||
#VX_OPT=YES
|
||||
# Generate Verbose Compiler Warnings for Unix, must be either YES or NO
|
||||
#UNIX_WARN=YES
|
||||
# Generate Verbose Compiler Warnings for VxWorks, must be either YES or NO
|
||||
#VX_WARN=YES
|
||||
#etc.
|
||||
#
|
||||
125
config/CONFIG.Linux
Normal file
125
config/CONFIG.Linux
Normal file
@@ -0,0 +1,125 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
GCC = gcc
|
||||
ACC = acc
|
||||
SUNCC = cc
|
||||
AR = ar
|
||||
ARFLAGS = r
|
||||
RANLIB = ranlib
|
||||
RANLIBFLAGS = -t
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -Xc -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -Xc
|
||||
SUNCC_TRAD_INVOKE_W_NO = $(SUNCC) -w
|
||||
SUNCC_TRAD_INVOKE_W_YES = $(SUNCC)
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SFLAGS_NO=
|
||||
CC_SFLAGS_YES= -Bstatic
|
||||
CC_SFLAGS_NO=
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_X86_ -Dlinux
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.Linux
|
||||
70
config/CONFIG.Vx.68k
Normal file
70
config/CONFIG.Vx.68k
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
AR = $(VX_GNU_BIN)/ar68k
|
||||
RANLIB = $(VX_GNU_BIN)/ranlib68k
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
CC = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CXX = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CPP = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
#CPP = $(CC) -E
|
||||
GCC = $(CC)
|
||||
LD = $(VX_GNU_BIN)/ld68k -r
|
||||
EPICS_LDLIBS =
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
RMDIR=rm -rf
|
||||
|
||||
# special c library requirements
|
||||
SPECIAL_LANG =
|
||||
|
||||
# Compiler flags, don't mess with this
|
||||
# Optimization flags
|
||||
VX_OPT_YES = -O
|
||||
VX_OPT_NO =
|
||||
VX_OPT_FLAGS = $(VX_OPT_$(VX_OPT))
|
||||
|
||||
# Include files
|
||||
VX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE) -I$(VX_INCLUDE)
|
||||
|
||||
# Warnings
|
||||
#At some time we should turn on pedantic
|
||||
#VX_WARN_YES = -Wall -pedantic
|
||||
VX_WARN_YES = -W
|
||||
VX_WARN_NO =
|
||||
VX_WARN_FLAGS = $(VX_WARN_$(VX_WARN))
|
||||
|
||||
# Operating system flags
|
||||
VX_OP_SYS_FLAGS = -DvxWorks -DV5_vxWorks
|
||||
|
||||
# Arch dependent flags are set in CONFIG_ARCH.*
|
||||
VX_CFLAGS = $(VX_OPT_FLAGS) $(VX_WARN_FLAGS) $(USR_INCLUDES) \
|
||||
$(VX_INCLUDES) $(VX_OP_SYS_FLAGS)
|
||||
|
||||
VX_LDFLAGS = -o
|
||||
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
CXXFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# Build compile line here
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(LD) $(LDFLAGS)
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.cc = $(LD) $(LDFLAGS)
|
||||
|
||||
CPPSNCFLAGS = $(USR_INCLUDES) $(VX_INCLUDES)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -M $(SRCS.cc) > .DEPENDS
|
||||
|
||||
118
config/CONFIG.alpha
Normal file
118
config/CONFIG.alpha
Normal file
@@ -0,0 +1,118 @@
|
||||
# CONFIG.Unix.alpha
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = cc -std
|
||||
TRADCC = cc -traditional
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -stdl -w
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -stdl
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC)
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -non_shared
|
||||
ACC_SFLAGS_NO= -call_shared
|
||||
CC_SFLAGS_YES= -non_shared
|
||||
CC_SFLAGS_NO= -call_shared
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
SPECIAL_LDFLAGS =
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_OSF_SOURCE -DLITTLE_ENDIAN
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPEND_RULE.c = @echo echo no DEPENDS_RULE.c defined in CONFIG.Unix.alpha
|
||||
DEPEND_RULE.cc = @echo echo no DEPENDS_RULE.cc defined in CONFIG.Unix.alpha
|
||||
|
||||
17
config/CONFIG.hkv2f
Normal file
17
config/CONFIG.hkv2f
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68020 -m68020 -DCPU_FAMILY=MC680X0
|
||||
|
||||
127
config/CONFIG.hp700
Normal file
127
config/CONFIG.hp700
Normal file
@@ -0,0 +1,127 @@
|
||||
# CONFIG.Unix.hp700
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = cc -Aa
|
||||
HPACC = cc -Aa
|
||||
HPCC = cc -Ac
|
||||
TRADCC = cc
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
ACC_TRAD_INVOKE_W_NO = $(TRADCC) -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(TRADCC)
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC)
|
||||
HPACC_ANSI_INVOKE_W_NO = $(HPACC) -w
|
||||
HPACC_ANSI_INVOKE_W_YES = $(HPACC)
|
||||
HPCC_TRAD_INVOKE_W_NO = $(HPCC) -w
|
||||
HPCC_TRAD_INVOKE_W_YES = $(HPCC)
|
||||
HPACC_STRICT_INVOKE_W_NO = $(HPACC) -w
|
||||
HPACC_STRICT_INVOKE_W_YES = $(HPACC)
|
||||
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Wl,-a,archive
|
||||
ACC_SFLAGS_NO=
|
||||
CC_SFLAGS_YES= -Wl,-a,archive
|
||||
CC_SFLAGS_NO=
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
SPECIAL_LDFLAGS =
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_HPUX_SOURCE -DHP_UX
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
ARFLAGS = rv
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
DEPEND_RULE.c = @echo echo no DEPENDS_RULE.c defined in CONFIG.Unix.hp700
|
||||
DEPEND_RULE.cc = @echo echo no DEPENDS_RULE.cc defined in CONFIG.Unix.hp700
|
||||
|
||||
16
config/CONFIG.mv147
Normal file
16
config/CONFIG.mv147
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68030 -m68030 -DCPU_FAMILY=MC680X0
|
||||
|
||||
17
config/CONFIG.mv162
Normal file
17
config/CONFIG.mv162
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68040 -m68040 -DCPU_FAMILY=MC680X0
|
||||
|
||||
16
config/CONFIG.mv162lc
Normal file
16
config/CONFIG.mv162lc
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68040 -msoft-float -DCPU_FAMILY=MC680X0
|
||||
16
config/CONFIG.mv167
Normal file
16
config/CONFIG.mv167
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68040 -m68040 -DCPU_FAMILY=MC680X0
|
||||
|
||||
16
config/CONFIG.niCpu030
Normal file
16
config/CONFIG.niCpu030
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
#
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
#
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68030 -m68030 -DCPU_FAMILY=MC680X0
|
||||
|
||||
125
config/CONFIG.sgi
Normal file
125
config/CONFIG.sgi
Normal file
@@ -0,0 +1,125 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = cc
|
||||
ACC = cc
|
||||
KRCC = cc -cckr
|
||||
AR = ar
|
||||
ARFLAGS = r
|
||||
RANLIB = ls
|
||||
RANLIBFLAGS =
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -xansi -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -xansi
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -xansi -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs -xansi
|
||||
KRCC_TRAD_INVOKE_W_NO = $(KRCC) -w
|
||||
KRCC_TRAD_INVOKE_W_YES = $(KRCC)
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -ansi -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -ansi
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
|
||||
C_OLD = $(KRCC_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SFLAGS_NO=
|
||||
CC_SFLAGS_YES= -Bstatic
|
||||
CC_SFLAGS_NO=
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -DSGI
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LOAD.c = ld -shared $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.sgi
|
||||
146
config/CONFIG.solaris
Normal file
146
config/CONFIG.solaris
Normal file
@@ -0,0 +1,146 @@
|
||||
#
|
||||
# $Id$: CONFIG.Unix.solaris,v $
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = $(SPARCWORKS)/bin/cc
|
||||
# SUNCC doesn't exist under Solaris
|
||||
|
||||
AR = ar
|
||||
RANLIB =
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = /opt/gnu/bin/g++
|
||||
CCC = /opt/SUNWspro/bin/CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -Xc -v
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs
|
||||
ACC_LD_FLAGS =
|
||||
ACC_LD_LIBS =
|
||||
SUNCC_TRAD_INVOKE_W_NO = $(ACC_TRAD_INVOKE_W_NO)
|
||||
SUNCC_TRAD_INVOKE_W_YES = $(ACC_TRAD_INVOKE_W_YES)
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
GCC_LD_LIBS =
|
||||
GCC_LD_FLAGS =
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
LD_LIBS_OLD = $($(STANDARD)_LD_LIBS)
|
||||
LD_LIBS_ANSI = $($(ANSI)_LD_LIBS)
|
||||
LD_LIBS_STRICT = $($(ANSI)_LD_LIBS)
|
||||
CCOMPILER_LDLIBS = $(LD_LIBS_$(CMPLR))
|
||||
LD_FLAGS_OLD = $($(STANDARD)_LD_FLAGS)
|
||||
LD_FLAGS_ANSI = $($(ANSI)_LD_FLAGS)
|
||||
LD_FLAGS_STRICT = $($(ANSI)_LD_FLAGS)
|
||||
CCOMPILER_LDFLAGS = $(LD_FLAGS_$(CMPLR))
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
# Static Build options
|
||||
#ACC_SFLAGS_YES= -dn
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SLIBS_YES= -lw -lintl -Bdynamic -ldl -Bstatic -lXext -lX
|
||||
ACC_SLIBS_NO=
|
||||
ACC_SFLAGS_NO=
|
||||
CC_SFLAGS_YES= -dn
|
||||
CC_SFLAGS_NO=
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
SL_OLD = $($(STANDARD)_SLIBS_$(STATIC_BUILD))
|
||||
SL_ANSI = $($(ANSI)_SLIBS_$(STATIC_BUILD))
|
||||
SL_STRICT = $(SL_ANSI)
|
||||
UNIX_SLIBS = $(SL_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB) $(CCOMPILER_LDFLAGS)
|
||||
UNIX_LDLIBS = $(UNIX_SLIBS) -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DSOLARIS
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_LDLIBS = -lsocket -lnsl
|
||||
# -lsocket needed by libca.a
|
||||
# -lnsl needed by libca.a
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(USR_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -xM $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.solaris
|
||||
139
config/CONFIG.sun4
Normal file
139
config/CONFIG.sun4
Normal file
@@ -0,0 +1,139 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = /usr/lang/acc
|
||||
SUNCC = cc
|
||||
AR = ar
|
||||
ARFLAGS = r
|
||||
RANLIB = ranlib
|
||||
RANLIBFLAGS = -t
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = /usr/lang/CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -Xc -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -Xc -vc
|
||||
ACC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
ACC_LD_LIBS =
|
||||
SUNCC_TRAD_INVOKE_W_NO = $(SUNCC) -w
|
||||
SUNCC_TRAD_INVOKE_W_YES = $(SUNCC)
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w -D__USE_FIXED_PROTOTYPES__
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi -D__USE_FIXED_PROTOTYPES__
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic -D__USE_FIXED_PROTOTYPES__
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic -D__USE_FIXED_PROTOTYPES__
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
GCC_LD_LIBS = -liberty
|
||||
GCC_LD_FLAGS =
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
LD_LIBS_OLD = $($(STANDARD)_LD_LIBS)
|
||||
LD_LIBS_ANSI = $($(ANSI)_LD_LIBS)
|
||||
LD_LIBS_STRICT = $($(ANSI)_LD_LIBS)
|
||||
CCOMPILER_LDLIBS = $(LD_LIBS_$(CMPLR))
|
||||
LD_FLAGS_OLD = $($(STANDARD)_LD_FLAGS)
|
||||
LD_FLAGS_ANSI = $($(ANSI)_LD_FLAGS)
|
||||
LD_FLAGS_STRICT = $($(ANSI)_LD_FLAGS)
|
||||
CCOMPILER_LDFLAGS = $(LD_FLAGS_$(CMPLR))
|
||||
|
||||
CCC_NORMAL_INVOKE_W_NO = $(CCC) +p
|
||||
CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SFLAGS_NO=
|
||||
CC_SFLAGS_YES= -Bstatic
|
||||
CC_SFLAGS_NO=
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB) $(CCOMPILER_LDFLAGS)
|
||||
|
||||
UNIX_LDLIBS = -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
ARCH_DEP_CFLAGS = -DSUNOS4
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.sun4
|
||||
49
config/CONFIG_BASE
Normal file
49
config/CONFIG_BASE
Normal file
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# the order of following list is important
|
||||
|
||||
DIRS = \
|
||||
tools \
|
||||
include \
|
||||
cxxTemplates \
|
||||
toolsComm\
|
||||
libCom \
|
||||
libvxWorks\
|
||||
cvtDctsdr \
|
||||
dbStatic \
|
||||
db \
|
||||
bpt \
|
||||
ca \
|
||||
gdd \
|
||||
cas \
|
||||
util \
|
||||
misc \
|
||||
sequencer \
|
||||
dbtools \
|
||||
rsrv\
|
||||
rec\
|
||||
as \
|
||||
drv\
|
||||
dev\
|
||||
devOpt\
|
||||
iocCore
|
||||
|
||||
|
||||
EPICS_BASE = $(TOP)
|
||||
|
||||
# EPICS include config file
|
||||
include $(TOP)/config/CONFIG
|
||||
|
||||
EPICS_BASE = $(INSTALL_LOCATION)
|
||||
|
||||
#
|
||||
# this speeds up the build by turning off implicit rules search
|
||||
#
|
||||
.PHONY: $(TOP)/config/CONFIG
|
||||
.PHONY: $(TOP)/config/CONFIG.* $(TOP)/config/CONFIG_*
|
||||
.PHONY: $(TOP)/config/RULES.* $(TOP)/config/RULES_* .DEPENDS
|
||||
.PHONY: $(HOME)/.EPICS_CONFIG
|
||||
.PHONY: ../Makefile.Vx ../Makefile.Unix ../Makefile.Host Makefile
|
||||
|
||||
80
config/CONFIG_COMMON
Normal file
80
config/CONFIG_COMMON
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# CONFIG_COMMON - Another EPICS BASE config file
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
# This file is to be maintained by the EPICS community.
|
||||
#
|
||||
|
||||
# Common Configuration Information
|
||||
|
||||
BUILD_ARCHS=$(HOST_ARCH)
|
||||
ifndef CROSS_COMPILER_HOST_ARCHS
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
else
|
||||
ifeq ($(HOST_ARCH),$(findstring $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
endif
|
||||
endif
|
||||
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
|
||||
INSTALL_LOCATION_LIB = $(INSTALL_LOCATION)/lib
|
||||
INSTALL_LOCATION_BIN = $(INSTALL_LOCATION)/bin
|
||||
|
||||
INSTALL_INCLUDE = $(INSTALL_LOCATION)/include
|
||||
INSTALL_DOC = $(INSTALL_LOCATION)/doc
|
||||
INSTALL_MAN = $(INSTALL_LOCATION)/man
|
||||
INSTALL_TEMPLATES = $(INSTALL_LOCATION)/templates
|
||||
INSTALL_DBD = $(INSTALL_LOCATION)/dbd
|
||||
INSTALL_CONFIG = $(INSTALL_LOCATION)/config
|
||||
|
||||
EPICS_BASE_INCLUDE = $(EPICS_BASE)/include
|
||||
EPICS_BASE_DBD = $(EPICS_BASE)/dbd
|
||||
|
||||
EPICS_EXTENSIONS_INCLUDE = $(EPICS_EXTENSIONS)/include
|
||||
EPICS_EXTENSIONS_TEMPLATES = $(EPICS_EXTENSIONS)/templates
|
||||
|
||||
DIVIDER = .
|
||||
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(EPICS_BASE)/bin/$(HOST_ARCH)/antelope
|
||||
ELEX = $(EPICS_BASE)/bin/$(HOST_ARCH)/e_flex -S$(EPICS_BASE_INCLUDE)/flex.skel.static
|
||||
|
||||
# install from EPICS
|
||||
INSTALL = $(EPICS_BASE)/bin/$(HOST_ARCH)/installEpics
|
||||
INSTALL_PRODUCT = $(INSTALL)
|
||||
|
||||
# dbtools from EPICS
|
||||
|
||||
# state notation language compiler (installed from base/src/sequencer)
|
||||
SNC = $(EPICS_BASE)/bin/$(HOST_ARCH)/snc
|
||||
|
||||
# vxWorks definitions
|
||||
VX_CONFIG_DIR = $(VX_DIR)/config
|
||||
VX_INCLUDE = $(VX_DIR)/h
|
||||
VX_GNU_BIN = $(VX_GNU)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
VX_GNU_LIB = $(VX_GNU)/$(HOST_ARCH).$(ARCH_CLASS)/lib
|
||||
|
||||
ifdef T_A
|
||||
|
||||
INSTALL_LIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_TCLLIB = $(INSTALL_LOCATION_LIB)/$(T_A)
|
||||
INSTALL_BIN = $(INSTALL_LOCATION_BIN)/$(T_A)
|
||||
|
||||
EPICS_BASE_LIB = $(EPICS_BASE)/lib/$(T_A)
|
||||
EPICS_BASE_BIN = $(EPICS_BASE)/bin/$(T_A)
|
||||
|
||||
EPICS_EXTENSIONS_LIB = $(EPICS_EXTENSIONS)/lib/$(T_A)
|
||||
EPICS_EXTENSIONS_BIN = $(EPICS_EXTENSIONS)/bin/$(T_A)
|
||||
|
||||
VX_IMAGE = $(VX_CONFIG_DIR)/$(T_A)/vxWorks
|
||||
VX_IMAGE_SYM = $(VX_CONFIG_DIR)/$(T_A)/vxWorks.sym
|
||||
|
||||
# location of installed vxWorks image
|
||||
EPICS_VX_IMAGE = $(EPICS_BASE_BIN)/vxWorks
|
||||
EPICS_VX_IMAGE_SYM = $(EPICS_BASE_BIN)/vxWorks.sym
|
||||
|
||||
endif
|
||||
|
||||
48
config/CONFIG_ENV
Normal file
48
config/CONFIG_ENV
Normal file
@@ -0,0 +1,48 @@
|
||||
# $Id$
|
||||
# Author: Andrew Johnson
|
||||
# Date: 20 April 1995
|
||||
#
|
||||
# Experimental Physics and Industrial Control System (EPICS)
|
||||
#
|
||||
# CONFIG_ENV - EPICS Environment Parameter configuration file
|
||||
#
|
||||
# This file is interpreted by the Bourne Shell, so spaces are
|
||||
# not allowed around the '=' signs or in unquoted values.
|
||||
# Makefile variables are not defined here.
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
# Default environment settings
|
||||
|
||||
# Channel Access:
|
||||
# EPICS_CA_ADDR_LIST augment beacon/search dest ip addr list
|
||||
# from white space separated ip addresses in this
|
||||
# environment variable. "Quote" if more than one addr.
|
||||
# EPICS_CA_AUTO_ADDR_LIST YES = augment beacon/search dest ip
|
||||
# addr list from interfaces found; NO = only use
|
||||
# EPICS_CA_ADDR_LIST to create this list.
|
||||
# EPICS_CA_CONN_TMO sec before sending echo request from client.
|
||||
# EPICS_CA_BEACON_PERIOD quiescent sec between server beacons.
|
||||
# EPICS_CA_REPEATER_PORT CA repeater port number.
|
||||
# EPICS_CA_SERVER_PORT CA server port number.
|
||||
|
||||
EPICS_CA_ADDR_LIST=""
|
||||
EPICS_CA_AUTO_ADDR_LIST=YES
|
||||
EPICS_CA_CONN_TMO=30.0
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CA_REPEATER_PORT=5065
|
||||
EPICS_CA_SERVER_PORT=5064
|
||||
|
||||
|
||||
# Log Server:
|
||||
# EPICS_IOC_LOG_PORT Log server port number.
|
||||
|
||||
EPICS_IOC_LOG_PORT=7004
|
||||
|
||||
|
||||
# Other services:
|
||||
|
||||
EPICS_CMD_PROTO_PORT=
|
||||
EPICS_AR_PORT=7002
|
||||
|
||||
109
config/CONFIG_SITE
Normal file
109
config/CONFIG_SITE
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# CONFIG_SITE - EPICS BASE config file
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
# This file is to be modified by the EPICS system manager
|
||||
# only.
|
||||
#
|
||||
|
||||
|
||||
# The host architecture performing the build,
|
||||
# i.e.: the arch running DCT/getrel/etc.
|
||||
#
|
||||
# Currently Supporting:
|
||||
# sun4
|
||||
# hp700
|
||||
# alpha
|
||||
# solaris
|
||||
# sgi
|
||||
# Linux
|
||||
#
|
||||
# HOST_ARCH now an environment variable
|
||||
# HOST_ARCH=$(shell /usr/local/epics/startup/HostArch)
|
||||
ifndef HOST_ARCH
|
||||
HOST_ARCH=unsupported
|
||||
endif
|
||||
|
||||
# The architectures to build EPICS for
|
||||
#
|
||||
# Currently Supporting:
|
||||
# mv167
|
||||
# mv162
|
||||
# mv162lc
|
||||
# mv147
|
||||
# hkv2f
|
||||
# niCpu030
|
||||
#
|
||||
CROSS_COMPILER_TARGET_ARCHS=mv167
|
||||
|
||||
# If only a subset of the host architectures perform
|
||||
# the build for the CROSS_COMPILER_TARGET_ARCHS
|
||||
# uncomment the following line and specify them.
|
||||
#
|
||||
#CROSS_COMPILER_HOST_ARCHS=sun4
|
||||
|
||||
# VxWorks directory
|
||||
#VX_DIR=/usr/csite/vw/5.1.1/vw
|
||||
#VX_DIR=/usr/local/vw/vxV51.mm
|
||||
#VX_DIR=/usr/local/vw/vxV52/vw
|
||||
VX_DIR=/usr/local/vw/vxV52p1/vw
|
||||
|
||||
#VX_GNU = $(VX_DIR)
|
||||
VX_GNU = $(VX_DIR)/../vxgccV2.2.3.1
|
||||
|
||||
|
||||
# Client ANSI Compiler
|
||||
# GCC (gcc -ansi)
|
||||
# ACC (acc)
|
||||
# HPACC (cc -Aa)
|
||||
#ANSI=HPACC
|
||||
ANSI=ACC
|
||||
|
||||
# Client Standard C Compiler choice
|
||||
# GCC (gcc -traditional)
|
||||
# ACC (acc -Xs)
|
||||
# SUNCC (cc)
|
||||
# HPCC (cc -Ac)
|
||||
#STANDARD=HPCC
|
||||
STANDARD=ACC
|
||||
|
||||
# Client C++ Compiler (Not supported yet)
|
||||
# G++ (g++) GNU C++
|
||||
# CCC (CC) SUN C++
|
||||
#CPLUSPLUS=G++
|
||||
CPLUSPLUS=CCC
|
||||
|
||||
# Build client objects statically ?
|
||||
# must be either YES or NO
|
||||
STATIC_BUILD=NO
|
||||
|
||||
# Unix Optimization
|
||||
# must be either YES or NO
|
||||
UNIX_OPT=YES
|
||||
|
||||
# VxWorks Optimization
|
||||
# must be either YES or NO
|
||||
VX_OPT=YES
|
||||
|
||||
# Generate Verbose Compiler Warnings for Unix
|
||||
# must be either YES or NO
|
||||
UNIX_WARN=YES
|
||||
|
||||
# Generate Verbose Compiler Warnings for VxWorks
|
||||
# must be either YES or NO
|
||||
VX_WARN=YES
|
||||
|
||||
# sch2edif compiler and flags
|
||||
SCH2EDIF = sch2edif
|
||||
SCH2EDIF_PATH =
|
||||
SCH2EDIF_SYSFLAGS = -n -ap -p.+..+$(SCH2EDIF_PATH)+$(EPICS_EXTENSIONS)/templates/capfast/sym+
|
||||
SCH2EDIF_FLAGS =
|
||||
|
||||
# e2db and flags
|
||||
# - again there is an assumption where edb.def is installed.
|
||||
E2DB = $(EPICS_EXTENSIONS)/bin/$(HOST_ARCH)/e2db
|
||||
E2DB_SYSFLAGS = -ate -d $(EPICS_EXTENSIONS)/templates/capfast/edb.def
|
||||
E2DB_FLAGS =
|
||||
|
||||
20
config/CONFIG_SITE.Linux
Normal file
20
config/CONFIG_SITE.Linux
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default SUN compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
21
config/CONFIG_SITE.alpha
Normal file
21
config/CONFIG_SITE.alpha
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# CONFIG_SITE.Unix.alpha
|
||||
#
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
9
config/CONFIG_SITE.hkv2f
Normal file
9
config/CONFIG_SITE.hkv2f
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
21
config/CONFIG_SITE.hp700
Normal file
21
config/CONFIG_SITE.hp700
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# CONFIG_SITE.Unix.hp700
|
||||
#
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
9
config/CONFIG_SITE.mv147
Normal file
9
config/CONFIG_SITE.mv147
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
9
config/CONFIG_SITE.mv162
Normal file
9
config/CONFIG_SITE.mv162
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
9
config/CONFIG_SITE.mv162lc
Normal file
9
config/CONFIG_SITE.mv162lc
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
9
config/CONFIG_SITE.mv167
Normal file
9
config/CONFIG_SITE.mv167
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
9
config/CONFIG_SITE.niCpu030
Normal file
9
config/CONFIG_SITE.niCpu030
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
27
config/CONFIG_SITE.sgi
Normal file
27
config/CONFIG_SITE.sgi
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Revision 1.2 1994/06/28 00:02:32 bordua
|
||||
# First cut at the RULES and CONFIGS.
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default SUN compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
# Special C library requirements
|
||||
SPECIAL_LANG = /usr/lang/SC2.0.1patch
|
||||
|
||||
|
||||
26
config/CONFIG_SITE.solaris
Normal file
26
config/CONFIG_SITE.solaris
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default SUN compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
# Unbundled C compiler stuff
|
||||
SPARCWORKS = /opt/SUNWspro
|
||||
#SPECIAL_LANG = $(SPARCWORKS)/lib
|
||||
SPECIAL_LANG = .
|
||||
|
||||
|
||||
31
config/CONFIG_SITE.sun4
Normal file
31
config/CONFIG_SITE.sun4
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Default SUN compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default SUN C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
#CMPLR=STRICT
|
||||
#ANSI=GCC
|
||||
#STANDARD=GCC
|
||||
#CPLUSPLUS=G++
|
||||
|
||||
# Special C library requirements
|
||||
#SPECIAL_LANG = /usr/lang/SC3.0.1
|
||||
#SPECIAL_LANG = /usr/lang/lib
|
||||
SPECIAL_LANG = .
|
||||
|
||||
40
config/CONFIG_SITE_ENV
Normal file
40
config/CONFIG_SITE_ENV
Normal file
@@ -0,0 +1,40 @@
|
||||
# $Id$
|
||||
# Author: Andrew Johnson
|
||||
# Date: 1 May 1995
|
||||
#
|
||||
# Experimental Physics and Industrial Control System (EPICS)
|
||||
#
|
||||
# CONFIG_SITE_ENV - EPICS Environment Parameter Site configuration file
|
||||
#
|
||||
# This file is interpreted by the Bourne Shell, so spaces are
|
||||
# not allowed around the '=' signs or in unquoted values.
|
||||
# Makefile variables are not defined here.
|
||||
#
|
||||
|
||||
# Site-specific environment settings
|
||||
|
||||
# Time service:
|
||||
# EPICS_TS_MIN_WEST the local time difference from GMT.
|
||||
# EPICS_TS_NTP_INET ntp or Unix time server ip addr.
|
||||
|
||||
EPICS_TS_MIN_WEST=360
|
||||
EPICS_TS_NTP_INET=
|
||||
|
||||
|
||||
# Log Server:
|
||||
# EPICS_IOC_LOG_INET
|
||||
# Log server ip addr.
|
||||
# EPICS_IOC_LOG_FILE_NAME
|
||||
# pathname to the log file.
|
||||
# EPICS_IOC_LOG_FILE_LIMIT
|
||||
# maximum log file size.
|
||||
# EPICS_IOC_LOG_FILE_COMMAND
|
||||
# A shell command string used to obtain a new
|
||||
# path name in response to SIGHUP - the new path name will
|
||||
# replace any path name supplied in EPICS_IOC_LOG_FILE_NAME
|
||||
|
||||
EPICS_IOC_LOG_INET=164.54.8.167
|
||||
EPICS_IOC_LOG_FILE_NAME=/home/phebos1/epics/apple/log/iocLog.text
|
||||
EPICS_IOC_LOG_FILE_COMMAND=
|
||||
EPICS_IOC_LOG_FILE_LIMIT=1000000
|
||||
|
||||
10
config/Makefile
Normal file
10
config/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
TOP=..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
30
config/Makefile.Unix
Normal file
30
config/Makefile.Unix
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
TOP = ../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CONFIGS += CONFIG
|
||||
CONFIGS += CONFIG_BASE
|
||||
CONFIGS += CONFIG_COMMON
|
||||
CONFIGS += CONFIG_ENV
|
||||
|
||||
CONFIGS += CONFIG.Vx.68k
|
||||
|
||||
CONFIGS += CONFIG_SITE
|
||||
CONFIGS += CONFIG_SITE_ENV
|
||||
|
||||
CONFIGS += $(HOST_ARCH:%=CONFIG.%)
|
||||
CONFIGS += $(CROSS_COMPILER_TARGET_ARCHS:%=CONFIG.%)
|
||||
CONFIGS += $(HOST_ARCH:%=CONFIG_SITE.%)
|
||||
CONFIGS += $(CROSS_COMPILER_TARGET_ARCHS:%=CONFIG_SITE.%)
|
||||
|
||||
CONFIGS += RULES.Unix
|
||||
CONFIGS += RULES.Vx
|
||||
CONFIGS += RULES_ARCHS
|
||||
CONFIGS += RULES_DIRS
|
||||
CONFIGS += RULES_TOP
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
197
config/RULES.Unix
Normal file
197
config/RULES.Unix
Normal file
@@ -0,0 +1,197 @@
|
||||
# $Id$
|
||||
|
||||
VPATH += .:..
|
||||
|
||||
INSTALL_PROD=$(PROD:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_INC=$(INC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_MANS+=$(MAN1:%=$(INSTALL_MAN)/man1/%)
|
||||
INSTALL_MANS+=$(MAN2:%=$(INSTALL_MAN)/man2/%)
|
||||
INSTALL_MANS+=$(MAN3:%=$(INSTALL_MAN)/man3/%)
|
||||
INSTALL_MANS+=$(MAN4:%=$(INSTALL_MAN)/man4/%)
|
||||
INSTALL_MANS+=$(MAN5:%=$(INSTALL_MAN)/man5/%)
|
||||
INSTALL_MANS+=$(MAN6:%=$(INSTALL_MAN)/man6/%)
|
||||
INSTALL_MANS+=$(MAN7:%=$(INSTALL_MAN)/man7/%)
|
||||
INSTALL_MANS+=$(MAN8:%=$(INSTALL_MAN)/man8/%)
|
||||
INSTALL_MANS+=$(MAN9:%=$(INSTALL_MAN)/man9/%)
|
||||
INSTALL_DOCS=$(DOCS:%=$(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS=$(SCRIPTS:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_TEMPLATE=$(TEMPLATES:%=$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%)
|
||||
INSTALL_TCLLIBS=$(TCLLIBNAME:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_TCLINDEX=$(TCLINDEX:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_CONFIGS=$(CONFIGS:%=$(INSTALL_CONFIG)/%)
|
||||
|
||||
all:: install
|
||||
|
||||
pre_build::
|
||||
|
||||
build:: pre_build $(LIBNAME) $(TARGETS) $(PROD)
|
||||
|
||||
inc:: $(INSTALL_INC)
|
||||
|
||||
install:: inc build $(INSTALL_LIBS) $(TARGETS) $(INSTALL_SCRIPTS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MANS) $(INSTALL_DOCS) $(INSTALL_TEMPLATE) \
|
||||
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) $(INSTALL_CONFIGS)
|
||||
|
||||
depends:: $(SRCS.c) $(SRCS.cc)
|
||||
ifdef SRCS
|
||||
echo you have a SRCS in your Makefile
|
||||
exit 2
|
||||
endif
|
||||
ifdef SRCS.c
|
||||
$(DEPENDS_RULE.c)
|
||||
endif
|
||||
ifdef SRCS.cc
|
||||
$(DEPENDS_RULE.cc)
|
||||
endif
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *.o *.a $(TARGETS) $(PROD) $(LIBNAME) $(INC)
|
||||
|
||||
|
||||
$(TARGETS) $(PROD): $(DEPLIBS)
|
||||
|
||||
# The order of the following dependencies is
|
||||
# VERY IMPORTANT !!!!
|
||||
|
||||
%: %.o
|
||||
$(RM) $@
|
||||
$(LINK.c) -o $@ $< $(LDLIBS)
|
||||
|
||||
#$(PROD): $(OBJS) $(DEPLIBS)
|
||||
# $(RM) $@
|
||||
# $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: %.y
|
||||
$(RM) y.tab.c y.tab.h
|
||||
$(YACC) $(YACCOPT) $<
|
||||
@if [ -f y.tab.c ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.c $*.c"; \
|
||||
/bin/mv y.tab.c $*.c; \
|
||||
fi
|
||||
@if [ -f y.tab.h ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.h $*.h"; \
|
||||
/bin/mv y.tab.h $*.h; \
|
||||
fi
|
||||
|
||||
%.c: %.l
|
||||
$(RM) lex.yy.c
|
||||
$(LEX) $(LEXOPT) $<
|
||||
$(RM) $@
|
||||
/bin/mv lex.yy.c $@
|
||||
|
||||
#state notation language rules
|
||||
%.c: %.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@echo "converting $*.i"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
||||
|
||||
%.c: %.stt
|
||||
@echo "converting $<
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $<
|
||||
|
||||
# Capfast Rules:
|
||||
%.db: %.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.edf: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
|
||||
# Mangen Rule:
|
||||
%.1:%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
|
||||
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
@echo Building library $@
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
echo $(RANLIB) $@; \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_LIB)/%.a: %.a
|
||||
@echo "Installing library $@"
|
||||
@test -d $(INSTALL_LOCATION_LIB) || mkdir $(INSTALL_LOCATION_LIB)
|
||||
@test -d $(INSTALL_LIB) || mkdir $(INSTALL_LIB)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
$(RANLIB) $(RANLIBFLAGS) $@; \
|
||||
fi
|
||||
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_CONFIG) || mkdir $(INSTALL_CONFIG)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_CONFIG)
|
||||
|
||||
$(INSTALL_TCLLIB)/%: %
|
||||
@echo "Installing Tcl library $@"
|
||||
@test -d $(INSTALL_LOCATION_LIB) || mkdir $(INSTALL_LOCATION_LIB)
|
||||
@test -d $(INSTALL_LIB) || mkdir $(INSTALL_LIB)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
|
||||
$(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
|
||||
@echo "Updating $@"
|
||||
@echo eval auto_mkindex $(INSTALL_LIB) "$(TCLLIBNAME)" | tclsh
|
||||
|
||||
$(INSTALL_MAN)/man9/% \
|
||||
$(INSTALL_MAN)/man8/% \
|
||||
$(INSTALL_MAN)/man7/% \
|
||||
$(INSTALL_MAN)/man6/% \
|
||||
$(INSTALL_MAN)/man5/% \
|
||||
$(INSTALL_MAN)/man4/% \
|
||||
$(INSTALL_MAN)/man3/% \
|
||||
$(INSTALL_MAN)/man2/% \
|
||||
$(INSTALL_MAN)/man1/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_MAN) || mkdir $(INSTALL_MAN)
|
||||
@test -d $(@D) || mkdir $(@D)
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_INCLUDE) || mkdir $(INSTALL_INCLUDE)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_INCLUDE)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DOC) || mkdir $(INSTALL_DOC)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -d -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
.PHONY: all inc depends build install pre-build clean
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
210
config/RULES.Vx
Normal file
210
config/RULES.Vx
Normal file
@@ -0,0 +1,210 @@
|
||||
# $Id$
|
||||
|
||||
VPATH += .:..
|
||||
|
||||
INCREC +=$(RECTYPES) $(MENUS)
|
||||
INSTALL_PROD=$(PROD:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_INC=$(INC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_INCREC=$(INCREC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_MANS+=$(MAN1:%=$(INSTALL_MAN)/man1/%)
|
||||
INSTALL_MANS+=$(MAN2:%=$(INSTALL_MAN)/man2/%)
|
||||
INSTALL_MANS+=$(MAN3:%=$(INSTALL_MAN)/man3/%)
|
||||
INSTALL_MANS+=$(MAN4:%=$(INSTALL_MAN)/man4/%)
|
||||
INSTALL_MANS+=$(MAN5:%=$(INSTALL_MAN)/man5/%)
|
||||
INSTALL_MANS+=$(MAN6:%=$(INSTALL_MAN)/man6/%)
|
||||
INSTALL_MANS+=$(MAN7:%=$(INSTALL_MAN)/man7/%)
|
||||
INSTALL_MANS+=$(MAN8:%=$(INSTALL_MAN)/man8/%)
|
||||
INSTALL_MANS+=$(MAN9:%=$(INSTALL_MAN)/man9/%)
|
||||
INSTALL_DOCS=$(DOCS:%=$(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS=$(SCRIPTS:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_INSTALLS=$(INSTALLS:%=$(INSTALL_BIN)/%)
|
||||
|
||||
INSTALL_BPTS=$(BPTS:%=$(INSTALL_DBD)/%)
|
||||
INSTALL_DBS=$(DBDINSTALL:%=$(INSTALL_DBD)/%)\
|
||||
$(RECTYPES:%.h=$(INSTALL_DBD)/%.dbd)\
|
||||
$(MENUS:%.h=$(INSTALL_DBD)/%.dbd)
|
||||
|
||||
INSTALL_DBDNAME=$(DBDNAME:%=$(INSTALL_DBD)/%)
|
||||
|
||||
all:: install
|
||||
|
||||
pre_build::
|
||||
|
||||
build:: pre_build $(MENUS) $(RECTYPES) $(BPTS)\
|
||||
$(LIBNAME) $(TARGETS) $(PROD) $(DBDEXPAND)
|
||||
|
||||
inc:: $(INSTALL_INC)
|
||||
|
||||
install:: inc build $(INSTALL_INCREC)\
|
||||
$(INSTALL_LIBS) $(TARGETS) $(INSTALL_PROD) $(INSTALL_MANS)\
|
||||
$(INSTALL_DOCS) $(INSTALL_SCRIPTS)\
|
||||
$(INSTALL_INSTALLS) $(INSTALL_DBS) $(INSTALL_BPTS)\
|
||||
$(INSTALL_DBDNAME)
|
||||
|
||||
depends:: $(SRCS.c) $(SRCS.cc)
|
||||
ifdef SRCS
|
||||
echo you have a SRCS in your Makefile
|
||||
exit 2
|
||||
endif
|
||||
ifdef SRCS.c
|
||||
$(DEPENDS_RULE.c)
|
||||
endif
|
||||
ifdef SRCS.cc
|
||||
$(DEPENDS_RULE.cc)
|
||||
endif
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *.o *.a $(TARGETS) $(PROD) $(LIBNAME) $(INC) \
|
||||
$(DBDINSTALL) $(MENUS) $(RECTYPES) $(BPTS) $(DBDEXPAND)
|
||||
|
||||
|
||||
# The order of the following dependencies is
|
||||
# VERY IMPORTANT !!!!
|
||||
|
||||
%: %.o
|
||||
$(RM) $@
|
||||
$(LINK.c) $@ $<
|
||||
|
||||
#$(PROD): $(OBJS)
|
||||
# $(RM) $@
|
||||
# $(LINK.c) $@ $(OBJS)
|
||||
|
||||
%.o: %.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: %.y
|
||||
$(RM) y.tab.c y.tab.h
|
||||
$(YACC) $(YACCOPT) $<
|
||||
@if [ -f y.tab.c ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.c $*.c"; \
|
||||
/bin/mv y.tab.c $*.c; \
|
||||
fi
|
||||
@if [ -f y.tab.h ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.h $*.h"; \
|
||||
/bin/mv y.tab.h $*.h; \
|
||||
fi
|
||||
|
||||
%.c: %.l
|
||||
$(RM) lex.yy.c
|
||||
$(LEX) $(LEXOPT) $<
|
||||
$(RM) $@
|
||||
/bin/mv lex.yy.c $@
|
||||
|
||||
#state notation language rules
|
||||
%.c: %.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@echo "converting $*.i"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
||||
|
||||
%.c: %.stt
|
||||
@echo "converting $<
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $<
|
||||
|
||||
# Capfast Rules:
|
||||
%.db: %.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.edf: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
|
||||
# Mangen Rule:
|
||||
%.1:%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DBD) || mkdir $(INSTALL_DBD)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DBD)
|
||||
|
||||
%Record.h: %Record.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToRecordtypeH \
|
||||
$(USER_DBDFLAGS) $<
|
||||
|
||||
menu%.h: menu%.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToMenuH $<
|
||||
|
||||
bpt%.dbd: bpt%.data
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/makeBpt $<
|
||||
|
||||
$(DBDNAME): $(DBDEXPAND)
|
||||
@echo expanding dbd
|
||||
@$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbExpand\
|
||||
$(USER_DBDFLAGS) $< > $@
|
||||
|
||||
%.1:%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
@echo Building library $@
|
||||
@$(RM) $@
|
||||
$(LINK.c) $@ $(LIBOBJS)
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_BIN)/%: $(EPICS_BASE_BIN)/%
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_MAN)/man9/% \
|
||||
$(INSTALL_MAN)/man8/% \
|
||||
$(INSTALL_MAN)/man7/% \
|
||||
$(INSTALL_MAN)/man6/% \
|
||||
$(INSTALL_MAN)/man5/% \
|
||||
$(INSTALL_MAN)/man4/% \
|
||||
$(INSTALL_MAN)/man3/% \
|
||||
$(INSTALL_MAN)/man2/% \
|
||||
$(INSTALL_MAN)/man1/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_MAN) || mkdir $(INSTALL_MAN)
|
||||
@test -d $(@D) || mkdir $(@D)
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_INCLUDE) || mkdir $(INSTALL_INCLUDE)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_INCLUDE)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DOC) || mkdir $(INSTALL_DOC)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
.PHONY: all inc depends build install pre-build clean
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
90
config/RULES_ARCHS
Normal file
90
config/RULES_ARCHS
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# EPICS RULES_ARCH
|
||||
# by Matthew Needes and Mike Bordua and Janet Andersoni and Jeff Hill
|
||||
#
|
||||
|
||||
all:: install
|
||||
|
||||
ACTIONS += inc
|
||||
ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += depends
|
||||
|
||||
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
#
|
||||
# hostActionArchTargets
|
||||
#
|
||||
hostArchs = $(HOST_ARCH) $(filter-out $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS))
|
||||
hostActionArchTargets = $(foreach x, $(ACTIONS),\
|
||||
$(foreach arch,$(hostArchs), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.$(BUILD_TYPE), $(wildcard Makefile.$(BUILD_TYPE)))
|
||||
hostDirs = $(addprefix O.,$(hostArchs))
|
||||
$(hostActionArchTargets) : $(hostDirs)
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile.$(BUILD_TYPE) T_A=$(archPart) $(actionPart)
|
||||
$(hostArchs) : % : O.%
|
||||
$(MAKE) -C O.$@ -f ../Makefile.$(BUILD_TYPE) T_A=$@
|
||||
else
|
||||
$(hostActionArchTargets) :
|
||||
$(hostArchs) :
|
||||
endif
|
||||
|
||||
#
|
||||
# crossActionArchTargets
|
||||
#
|
||||
crossArchs = $(CROSS_COMPILER_TARGET_ARCHS)
|
||||
crossActionArchTargets = $(foreach x, $(ACTIONS), \
|
||||
$(foreach arch, $(CROSS_COMPILER_TARGET_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.Vx, $(wildcard Makefile.Vx))
|
||||
crossDirs = $(addprefix O.,$(crossArchs))
|
||||
$(crossActionArchTargets) : $(crossDirs)
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile.Vx T_A=$(archPart) $(actionPart)
|
||||
$(crossArchs) : % : O.%
|
||||
$(MAKE) -C O.$@ -f ../Makefile.Vx T_A=$@
|
||||
else
|
||||
$(crossActionArchTargets) :
|
||||
$(crossArchs) :
|
||||
endif
|
||||
|
||||
$(hostDirs) :
|
||||
$(MKDIR) $@
|
||||
echo "T_A=$(subst O.,,$@)" > $@/Makefile
|
||||
echo "include ../Makefile.$(BUILD_TYPE)" >> $@/Makefile
|
||||
|
||||
$(crossDirs) :
|
||||
$(MKDIR) $@
|
||||
echo "T_A=$(subst O.,,$@)" > $@/Makefile
|
||||
echo "include ../Makefile.Vx" >> $@/Makefile
|
||||
|
||||
#
|
||||
# host/cross action targets
|
||||
#
|
||||
$(ACTIONS) clean : % : %$(DIVIDER)host %$(DIVIDER)cross
|
||||
HostActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)host)
|
||||
CrossActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)cross)
|
||||
$(HostActionTargets) : %$(DIVIDER)host : $(addprefix %$(DIVIDER), $(hostArchs))
|
||||
$(CrossActionTargets) : %$(DIVIDER)cross : $(addprefix %$(DIVIDER), $(crossArchs))
|
||||
|
||||
|
||||
#
|
||||
# arch targets
|
||||
#
|
||||
host : $(hostArchs)
|
||||
cross : $(crossArchs)
|
||||
|
||||
#
|
||||
# special clean rule
|
||||
#
|
||||
clean$(DIVIDER)% :
|
||||
$(RMDIR) O.$*
|
||||
|
||||
.PHONY : $(HostActionTargets)
|
||||
.PHONY : $(CrossActionTargets)
|
||||
.PHONY : $(crossActionArchTargets)
|
||||
.PHONY : $(hostActionArchTargets)
|
||||
.PHONY : $(hostArchs) $(crossArchs)
|
||||
.PHONY : $(ACTIONS) clean all host cross
|
||||
|
||||
42
config/RULES_DIRS
Normal file
42
config/RULES_DIRS
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
|
||||
ARCHS= $(BUILD_ARCHS) host cross
|
||||
ACTIONS = clean inc install depends
|
||||
|
||||
dirPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
actionArchPart = $(subst $(dirPart)$(DIVIDER), ,$@)
|
||||
|
||||
dirActionArchTargets = $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS),\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(dir)$(DIVIDER)$(action)$(DIVIDER)$(arch))))
|
||||
dirArchTargets += $(foreach dir, $(DIRS), \
|
||||
$(foreach arch, $(ARCHS),\
|
||||
$(dir)$(DIVIDER)$(arch)))
|
||||
dirActionTargets += $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS),\
|
||||
$(dir)$(DIVIDER)$(action)))
|
||||
actionArchTargets = $(foreach action, $(ACTIONS),\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
|
||||
all:: inc install
|
||||
|
||||
rebuild:: clean uninstall all
|
||||
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets)$(dirActionArchTargets) ::
|
||||
$(MAKE) -C $(dirPart) $(actionArchPart)
|
||||
|
||||
$(ARCHS) $(ACTIONS) $(actionArchTargets):%: $(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
|
||||
|
||||
.PHONY : $(DIRS)
|
||||
.PHONY : $(ARCHS) $(ACTIONS)
|
||||
.PHONY : $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY : $(dirActionArchTargets)
|
||||
.PHONY : $(actionArchTargets)
|
||||
|
||||
50
config/RULES_TOP
Normal file
50
config/RULES_TOP
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
uninstall$(DIVIDER)%::
|
||||
@$(RMDIR) $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* \
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE)
|
||||
@$(RMDIR) rec.bak rec
|
||||
|
||||
uninstall:: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
|
||||
|
||||
tar:
|
||||
@DIRNAME=$(notdir $(shell pwd)); \
|
||||
echo "TOP: Creating $$DIRNAME.Tar file..."; \
|
||||
ls Makefile* | xargs tar vcf $$DIRNAME.Tar; \
|
||||
if [ -f .current_rel_hist ]; then \
|
||||
ls .current_rel_hist | xargs tar vrf $$DIRNAME.Tar ; \
|
||||
fi ;\
|
||||
if [ -f EPICS_BASE ]; then \
|
||||
ls EPICS_BASE | xargs tar vrf $$DIRNAME.Tar ; \
|
||||
fi ;\
|
||||
for DIR in ${DIRS}; do \
|
||||
find $${DIR} -name CVS -prune -o ! -type d -print \
|
||||
| grep -v "/O\..*$$" | xargs tar vrf $$DIRNAME.Tar; \
|
||||
done
|
||||
|
||||
help:
|
||||
@echo "Usage: gnumake [options] [target] ..."
|
||||
@echo "Targets supported by all Makefiles:"
|
||||
@echo " install - Installs executables in bin/<arch> (default rule)"
|
||||
@echo " build - Builds objects, using libraries from "build_libs"
|
||||
@echo " clean - Cleans objects. Clean removes the" O.<arch> dirs
|
||||
@echo " in all except the O.<arch> level Makefile"
|
||||
@echo " depends - Generates include dependencies"
|
||||
@echo "\"Partial\" build targets supported by Makefiles:"
|
||||
@echo " install.<arch> - Builds and installs <arch> only.
|
||||
@echo " clean.<arch> - Cleans <arch> binaries in O.<arch> dirs only."
|
||||
@echo " build.<arch> - Builds <arch> only.
|
||||
@echo " depends.<arch> - Generates <arch> dependencies only.
|
||||
@echo "Targets supported by top level Makefile:"
|
||||
@echo " uninstall - Cleans directories created by the install."
|
||||
@echo " tar - Create tar file "
|
||||
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
|
||||
@echo " xxxRecord.o
|
||||
|
||||
.PHONY : uninstall tar help
|
||||
.PHONY : $(addprefix uninstall$(DIVIDER), $(BUILDARCHS))
|
||||
|
||||
44
src/Makefile
44
src/Makefile
@@ -1,42 +1,14 @@
|
||||
# $Id$
|
||||
# Author: Robert Zieman (ANL)
|
||||
# Date: 6/03/91
|
||||
#
|
||||
# Experimental Physics and Industrial Control System (EPICS)
|
||||
#
|
||||
# Copyright 1991, the Regents of the University of California,
|
||||
# and the University of Chicago Board of Governors.
|
||||
#
|
||||
# This software was produced under U.S. Government contracts:
|
||||
# (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
# and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
#
|
||||
# Initial development by:
|
||||
# The Controls and Automation Group (AT-8)
|
||||
# Ground Test Accelerator
|
||||
# Accelerator Technology Division
|
||||
# Los Alamos National Laboratory
|
||||
#
|
||||
# Co-developed with
|
||||
# The Controls and Computing Group
|
||||
# Accelerator Systems Division
|
||||
# Advanced Photon Source
|
||||
# Argonne National Laboratory
|
||||
#
|
||||
# Modification Log:
|
||||
# -----------------
|
||||
# .01 mm-dd-yy iii Comment
|
||||
# .02 08-16-93 rcz moving most of these pre-builds back to the
|
||||
# object area Imakefile and adding DependTarget($(EARLYSRC))
|
||||
#
|
||||
# ...
|
||||
# $Id$
|
||||
#
|
||||
|
||||
all: bld_errSym
|
||||
TOP = ..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
bld_errSym:
|
||||
cd libCom; ../../tools/blderrSymTbl
|
||||
#
|
||||
# Directories to build defined in CONFIG_BASE
|
||||
#
|
||||
|
||||
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
clean:
|
||||
/bin/rm -f libCom/errInc.o
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Lowest Level Directroy Makefile
|
||||
# by Janet Anderson
|
||||
#
|
||||
# $Log$
|
||||
#
|
||||
|
||||
EPICS=../../..
|
||||
TOP=../..
|
||||
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(EPICS)/config/RULES_ARCHS
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -D_NO_PROTO
|
||||
USR_LDLIBS = -lAs -lCom -lDb -lCom -lm -s
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libAs.a\
|
||||
$(DEPLIBS_BASE)/libCom.a\
|
||||
$(DEPLIBS_BASE)/libDb.a
|
||||
@@ -20,7 +19,7 @@ LIBOBJS = asLib.o
|
||||
LIBNAME = libAs.a
|
||||
PROD = ascheck
|
||||
|
||||
include $(EPICS)/config/RULES.Unix
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
|
||||
@@ -8,7 +7,7 @@ SRCS.c = ../asDbLib.c ../asCa.c asLib.c
|
||||
LIBOBJS = asDbLib.o asCa.o asLib.o
|
||||
LIBNAME = asLibrary
|
||||
|
||||
include $(EPICS)/config/RULES.Vx
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
|
||||
@@ -65,7 +65,6 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
#include <cadef.h>
|
||||
#include <caerr.h>
|
||||
#include <caeventmask.h>
|
||||
#include <calink.h>
|
||||
#include <task_params.h>
|
||||
#include <alarm.h>
|
||||
|
||||
@@ -131,7 +130,6 @@ LOCAL void eventCallback(struct event_handler_args eha)
|
||||
struct dbr_sts_double *pdata = eha.dbr;
|
||||
int Ilocked=FALSE;
|
||||
|
||||
|
||||
if(!caInitializing) {
|
||||
FASTLOCK(&asLock);
|
||||
Ilocked = TRUE;
|
||||
|
||||
@@ -107,7 +107,7 @@ static long asDbAddRecords(void)
|
||||
dbCommon *precord;
|
||||
|
||||
dbInitEntry(pdbbase,pdbentry);
|
||||
status = dbFirstRecdes(pdbentry);
|
||||
status = dbFirstRecordType(pdbentry);
|
||||
while(!status) {
|
||||
status = dbFirstRecord(pdbentry);
|
||||
while(!status) {
|
||||
@@ -119,7 +119,7 @@ static long asDbAddRecords(void)
|
||||
}
|
||||
status = dbNextRecord(pdbentry);
|
||||
}
|
||||
status = dbNextRecdes(pdbentry);
|
||||
status = dbNextRecordType(pdbentry);
|
||||
}
|
||||
dbFinishEntry(pdbentry);
|
||||
return(0);
|
||||
@@ -301,7 +301,10 @@ ASMEMBERPVT asDbGetMemberPvt(void *paddress)
|
||||
|
||||
static void astacCallback(ASCLIENTPVT clientPvt,asClientStatus status)
|
||||
{
|
||||
printf("astac callback: status=%d",status);
|
||||
char *recordname;
|
||||
|
||||
recordname = (char *)asGetClientPvt(clientPvt);
|
||||
printf("astac callback %s: status=%d",recordname,status);
|
||||
printf(" get %s put %s\n",(asCheckGet(clientPvt) ? "Yes" : "No"),
|
||||
(asCheckPut(clientPvt) ? "Yes" : "No"));
|
||||
}
|
||||
@@ -329,6 +332,7 @@ int astac(char *pname,char *user,char *location)
|
||||
errMessage(status,"asAddClient error");
|
||||
return(1);
|
||||
} else {
|
||||
asPutClientPvt(*pasclientpvt,(void *)precord->name);
|
||||
asRegisterClientCallback(*pasclientpvt,astacCallback);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -4,15 +4,10 @@
|
||||
# Base Lowest Level Directroy Makefile
|
||||
# by Janet Anderson
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.1 1994/09/07 19:26:22 jba
|
||||
# New file
|
||||
#
|
||||
#
|
||||
|
||||
EPICS=../../..
|
||||
TOP=../..
|
||||
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(EPICS)/config/RULES_ARCHS
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += bdt.h
|
||||
|
||||
@@ -8,4 +7,4 @@ LIBOBJS += bdt.o
|
||||
|
||||
LIBNAME = libBdt.a
|
||||
|
||||
include $(EPICS)/config/RULES.Unix
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c += ../bdt.c
|
||||
SRCS.c += ../bdtServ.c
|
||||
@@ -14,7 +13,7 @@ OBJS += bdtServPv.o
|
||||
|
||||
PROD = bdt
|
||||
|
||||
include $(EPICS)/config/RULES.Vx
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
$(PROD): $(OBJS)
|
||||
$(RM) $@
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Lowest Level Directroy Makefile
|
||||
# by Janet Anderson
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.1 1994/09/07 19:25:39 jba
|
||||
# New file
|
||||
#
|
||||
#
|
||||
|
||||
EPICS=../../..
|
||||
TOP=../..
|
||||
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(EPICS)/config/RULES_ARCHS
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += cvtTable.h
|
||||
|
||||
SRCS.c = ../makeBpt
|
||||
OBJS = makeBpt
|
||||
SRCS.c = ../makeBpt.c
|
||||
OBJS = makeBpt.o
|
||||
PROD = makeBpt
|
||||
|
||||
include $(EPICS)/config/RULES.Unix
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
$(PROD): $(OBJS) $(DEPLIBS)
|
||||
$(RM) $@
|
||||
$(LINK.c) -o $@ ${OBJS} $(LDLIBS)
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -ansi
|
||||
VX_WARN_YES = -Wall -pedantic
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.db
|
||||
BPTS += bptTypeJdegF.db
|
||||
BPTS += bptTypeKdegC.db
|
||||
BPTS += bptTypeKdegF.db
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
BPTS += bptTypeJdegF.dbd
|
||||
BPTS += bptTypeKdegC.dbd
|
||||
BPTS += bptTypeKdegF.dbd
|
||||
|
||||
|
||||
SRCS.c = \
|
||||
@@ -21,5 +20,5 @@ LIBOBJS = \
|
||||
|
||||
LIBNAME = pbtLib
|
||||
|
||||
include $(EPICS)/config/RULES.Vx
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ int main(argc, argv)
|
||||
fprintf(stderr,"Input file MUST have .data extension\n");
|
||||
exit(-1);
|
||||
}
|
||||
strcpy(pext,".db");
|
||||
strcpy(pext,".dbd");
|
||||
inFile = fopen(argv[1],"r");
|
||||
if(!inFile) {
|
||||
fprintf(stderr,"Error opening %s\n",argv[1]);
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Lowest Level Directroy Makefile
|
||||
# by Janet Anderson
|
||||
#
|
||||
# $Log$
|
||||
#
|
||||
|
||||
EPICS=../../..
|
||||
TOP=../..
|
||||
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(EPICS)/config/RULES_ARCHS
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_LDLIBS = -lca -lCom -lm
|
||||
USR_LDLIBS = -lca -lCom
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBS = ./libca.a\
|
||||
$(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libca.a $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += cadef.h
|
||||
INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += calink.h
|
||||
INC += bsdProto.h
|
||||
INC += caProto.h
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
@@ -34,13 +30,7 @@ LIBNAME = libca.a
|
||||
|
||||
PROD = caRepeater
|
||||
|
||||
TARGETS = acctst catime
|
||||
|
||||
include $(EPICS)/config/RULES.Unix
|
||||
|
||||
acctst: acctst.o $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
$(LINK.c) -o $@ $< $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
catime: catime.o $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
$(LINK.c) -o $@ $< $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
@@ -14,5 +13,5 @@ LIBOBJS = \
|
||||
|
||||
LIBNAME = caLib
|
||||
|
||||
include $(EPICS)/config/RULES.Vx
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
|
||||
163
src/ca/access.c
163
src/ca/access.c
@@ -99,6 +99,15 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.83 1996/07/09 22:43:29 jhill
|
||||
* silence gcc warnings and default CLOCKS_PER_SEC if it isnt defined (for sunos4 and gcc)
|
||||
*
|
||||
* Revision 1.82 1996/06/19 17:58:59 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.81 1995/12/19 19:28:11 jhill
|
||||
* Dont check the array element count when they add the event (just clip it)
|
||||
*
|
||||
* Revision 1.80 1995/10/18 16:49:23 jhill
|
||||
* recv task is now running at a lower priority than the send task under vxWorks
|
||||
*
|
||||
@@ -183,7 +192,7 @@ static char *sccsId = "@(#) $Id$";
|
||||
/* Macros for syncing message insertion into send buffer */
|
||||
/****************************************************************/
|
||||
#define EXTMSGPTR(PIIU)\
|
||||
((struct extmsg *) &(PIIU)->send.buf[(PIIU)->send.wtix])
|
||||
((caHdr *) &(PIIU)->send.buf[(PIIU)->send.wtix])
|
||||
|
||||
|
||||
|
||||
@@ -214,7 +223,7 @@ static char *sccsId = "@(#) $Id$";
|
||||
} \
|
||||
}
|
||||
|
||||
static struct extmsg nullmsg;
|
||||
static caHdr nullmsg;
|
||||
|
||||
/*
|
||||
* local functions
|
||||
@@ -223,25 +232,28 @@ static struct extmsg nullmsg;
|
||||
LOCAL int cac_alloc_msg(
|
||||
struct ioc_in_use *piiu,
|
||||
unsigned extsize,
|
||||
struct extmsg **ppMsg
|
||||
caHdr **ppMsg
|
||||
);
|
||||
#endif
|
||||
|
||||
LOCAL int cac_alloc_msg_no_flush(
|
||||
struct ioc_in_use *piiu,
|
||||
unsigned extsize,
|
||||
struct extmsg **ppMsg
|
||||
caHdr **ppMsg
|
||||
);
|
||||
LOCAL int issue_get_callback(
|
||||
evid monix,
|
||||
unsigned cmmd
|
||||
);
|
||||
#ifdef vxWorks
|
||||
LOCAL void ca_event_handler(
|
||||
evid monix,
|
||||
struct db_addr *paddr,
|
||||
int hold,
|
||||
void *pfl
|
||||
);
|
||||
LOCAL void ca_put_notify_action(PUTNOTIFY *ppn);
|
||||
#endif
|
||||
LOCAL void ca_pend_io_cleanup();
|
||||
LOCAL void create_udp_fd();
|
||||
static int issue_ca_array_put
|
||||
@@ -253,12 +265,11 @@ unsigned long count,
|
||||
chid chix,
|
||||
void *pvalue
|
||||
);
|
||||
LOCAL void ca_put_notify_action(PUTNOTIFY *ppn);
|
||||
LOCAL void ca_default_exception_handler(struct exception_handler_args args);
|
||||
|
||||
LOCAL int cac_push_msg(
|
||||
struct ioc_in_use *piiu,
|
||||
struct extmsg *pmsg,
|
||||
caHdr *pmsg,
|
||||
void *pext
|
||||
);
|
||||
|
||||
@@ -282,11 +293,11 @@ LOCAL evid caIOBlockCreate(void);
|
||||
*/
|
||||
LOCAL int cac_push_msg(
|
||||
struct ioc_in_use *piiu,
|
||||
struct extmsg *pmsg,
|
||||
caHdr *pmsg,
|
||||
void *pext
|
||||
)
|
||||
{
|
||||
struct extmsg msg;
|
||||
caHdr msg;
|
||||
unsigned bytesAvailable;
|
||||
unsigned actualextsize;
|
||||
unsigned extsize;
|
||||
@@ -431,14 +442,14 @@ void *pext
|
||||
LOCAL int cac_alloc_msg_no_flush(
|
||||
struct ioc_in_use *piiu,
|
||||
unsigned extsize,
|
||||
struct extmsg **ppMsg
|
||||
caHdr **ppMsg
|
||||
)
|
||||
{
|
||||
unsigned msgsize;
|
||||
unsigned long bytesAvailable;
|
||||
struct extmsg *pmsg;
|
||||
caHdr *pmsg;
|
||||
|
||||
msgsize = sizeof(struct extmsg)+extsize;
|
||||
msgsize = sizeof(caHdr)+extsize;
|
||||
|
||||
/*
|
||||
* fail if max message size exceeded
|
||||
@@ -452,7 +463,7 @@ struct extmsg **ppMsg
|
||||
return ECA_TOLARGE;
|
||||
}
|
||||
|
||||
pmsg = (struct extmsg *) &piiu->send.buf[piiu->send.wtix];
|
||||
pmsg = (caHdr *) &piiu->send.buf[piiu->send.wtix];
|
||||
pmsg->m_postsize = extsize;
|
||||
*ppMsg = pmsg;
|
||||
|
||||
@@ -466,7 +477,7 @@ struct extmsg **ppMsg
|
||||
LOCAL void cac_add_msg (IIU *piiu)
|
||||
{
|
||||
unsigned long size;
|
||||
struct extmsg *mp = EXTMSGPTR(piiu);
|
||||
caHdr *mp = EXTMSGPTR(piiu);
|
||||
|
||||
/*
|
||||
* Performs worst case message alignment
|
||||
@@ -477,7 +488,7 @@ LOCAL void cac_add_msg (IIU *piiu)
|
||||
mp->m_postsize = htons(mp->m_postsize);
|
||||
CAC_RING_BUFFER_WRITE_ADVANCE(
|
||||
&piiu->send,
|
||||
sizeof(struct extmsg) + size);
|
||||
sizeof(caHdr) + size);
|
||||
}
|
||||
|
||||
|
||||
@@ -1077,6 +1088,8 @@ int epicsShareAPI ca_search_and_connect
|
||||
chix->type = TYPENOTCONN; /* invalid initial type */
|
||||
chix->count = 0; /* invalid initial count */
|
||||
chix->id.sid = ~0U; /* invalid initial server id */
|
||||
chix->ar.read_access = FALSE;
|
||||
chix->ar.write_access = FALSE;
|
||||
|
||||
chix->state = cs_never_conn;
|
||||
ellInit(&chix->eventq);
|
||||
@@ -1128,13 +1141,13 @@ int reply_type
|
||||
int status;
|
||||
int size;
|
||||
int cmd;
|
||||
struct extmsg *mptr;
|
||||
caHdr *mptr;
|
||||
struct ioc_in_use *piiu;
|
||||
|
||||
piiu = chix->piiu;
|
||||
|
||||
size = strlen((char *)(chix+1))+1;
|
||||
cmd = IOC_SEARCH;
|
||||
cmd = CA_PROTO_SEARCH;
|
||||
|
||||
LOCK;
|
||||
status = cac_alloc_msg_no_flush (piiu, size, &mptr);
|
||||
@@ -1242,7 +1255,7 @@ void *pvalue
|
||||
UNLOCK;
|
||||
|
||||
if (monix) {
|
||||
status = issue_get_callback(monix, IOC_READ);
|
||||
status = issue_get_callback(monix, CA_PROTO_READ);
|
||||
if (status == ECA_NORMAL) {
|
||||
SETPENDRECV;
|
||||
}
|
||||
@@ -1325,7 +1338,7 @@ void *arg
|
||||
UNLOCK;
|
||||
|
||||
if (monix) {
|
||||
status = issue_get_callback (monix, IOC_READ_NOTIFY);
|
||||
status = issue_get_callback (monix, CA_PROTO_READ_NOTIFY);
|
||||
if (status != ECA_NORMAL) {
|
||||
LOCK;
|
||||
if (ca_state(chix)==cs_conn) {
|
||||
@@ -1450,7 +1463,7 @@ LOCAL int issue_get_callback(evid monix, unsigned cmmd)
|
||||
int status;
|
||||
chid chix = monix->chan;
|
||||
unsigned count;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
struct ioc_in_use *piiu;
|
||||
|
||||
piiu = chix->piiu;
|
||||
@@ -1629,7 +1642,7 @@ void *usrarg
|
||||
monix->count = count;
|
||||
|
||||
status = issue_ca_array_put(
|
||||
IOC_WRITE_NOTIFY,
|
||||
CA_PROTO_WRITE_NOTIFY,
|
||||
monix->id,
|
||||
type,
|
||||
count,
|
||||
@@ -1752,7 +1765,7 @@ void *pvalue
|
||||
}
|
||||
#endif /*vxWorks*/
|
||||
|
||||
return issue_ca_array_put(IOC_WRITE, ~0U, type, count, chix, pvalue);
|
||||
return issue_ca_array_put(CA_PROTO_WRITE, ~0U, type, count, chix, pvalue);
|
||||
}
|
||||
|
||||
|
||||
@@ -1771,7 +1784,7 @@ void *pvalue
|
||||
{
|
||||
int status;
|
||||
struct ioc_in_use *piiu;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
int postcnt;
|
||||
unsigned size_of_one;
|
||||
unsigned i;
|
||||
@@ -2037,6 +2050,7 @@ void *arg
|
||||
* Undocumented entry for the VAX OPI which may vanish in the future.
|
||||
*
|
||||
*/
|
||||
#if 0
|
||||
int epicsShareAPI ca_add_io_event
|
||||
(
|
||||
void (*ast)(),
|
||||
@@ -2063,7 +2077,7 @@ void *astarg
|
||||
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -2132,7 +2146,7 @@ long mask
|
||||
monix = (evid)malloc(size);
|
||||
}
|
||||
# else
|
||||
assert (0);
|
||||
return ECA_INTERNAL;
|
||||
# endif
|
||||
}
|
||||
else {
|
||||
@@ -2256,7 +2270,7 @@ int ca_request_event(evid monix)
|
||||
}
|
||||
|
||||
/* msg header */
|
||||
msg.m_header.m_cmmd = htons(IOC_EVENT_ADD);
|
||||
msg.m_header.m_cmmd = htons(CA_PROTO_EVENT_ADD);
|
||||
msg.m_header.m_available = monix->id;
|
||||
msg.m_header.m_type = htons(monix->type);
|
||||
msg.m_header.m_count = htons(count);
|
||||
@@ -2445,7 +2459,7 @@ int epicsShareAPI ca_clear_event (evid monix)
|
||||
{
|
||||
int status;
|
||||
chid chix = monix->chan;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
evid lkup;
|
||||
|
||||
/*
|
||||
@@ -2499,7 +2513,7 @@ int epicsShareAPI ca_clear_event (evid monix)
|
||||
piiu = chix->piiu;
|
||||
|
||||
/* msg header */
|
||||
hdr.m_cmmd = htons(IOC_EVENT_CANCEL);
|
||||
hdr.m_cmmd = htons(CA_PROTO_EVENT_CANCEL);
|
||||
hdr.m_available = monix->id;
|
||||
hdr.m_type = htons(chix->type);
|
||||
hdr.m_count = htons(chix->count);
|
||||
@@ -2545,7 +2559,7 @@ int epicsShareAPI ca_clear_channel (chid chix)
|
||||
int status;
|
||||
evid monix;
|
||||
struct ioc_in_use *piiu = chix->piiu;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
enum channel_state old_chan_state;
|
||||
|
||||
LOOSECHIXCHK(chix);
|
||||
@@ -2631,7 +2645,7 @@ int epicsShareAPI ca_clear_channel (chid chix)
|
||||
*/
|
||||
|
||||
/* msg header */
|
||||
hdr.m_cmmd = htons(IOC_CLEAR_CHANNEL);
|
||||
hdr.m_cmmd = htons(CA_PROTO_CLEAR_CHANNEL);
|
||||
hdr.m_available = chix->cid;
|
||||
hdr.m_cid = chix->id.sid;
|
||||
hdr.m_type = htons(0);
|
||||
@@ -2771,18 +2785,21 @@ int epicsShareAPI ca_pend (ca_real timeout, int early)
|
||||
|
||||
|
||||
/*
|
||||
* If we are no longer waiting any significant
|
||||
* delay then return
|
||||
* (dont wait forever for an itsy bitsy
|
||||
* delay which will no be updated if
|
||||
* select is called with no delay)
|
||||
*
|
||||
* current time is only updated by
|
||||
* cac_select_io() if we specify
|
||||
* at least 1 usec to wait
|
||||
*
|
||||
* If we are not waiting for any significant delay
|
||||
* then force the delay to zero so that we avoid
|
||||
* scheduling delays (which can be substantial
|
||||
* on some os)
|
||||
*/
|
||||
if (remaining <= (1.0/USEC_PER_SEC)) {
|
||||
# ifdef CLOCKS_PER_SEC
|
||||
# define CAC_SIGNIF_INTERVAL (1.0/CLOCKS_PER_SEC)
|
||||
# else
|
||||
/*
|
||||
* we guess (because gcc does not provide
|
||||
* CLOCKS_PER_SEC under sunos4)
|
||||
*/
|
||||
# define CAC_SIGNIF_INTERVAL (1.0/1000000)
|
||||
# endif
|
||||
if (remaining <= CAC_SIGNIF_INTERVAL) {
|
||||
if(early){
|
||||
ca_pend_io_cleanup();
|
||||
ca_static->ca_flush_pending = TRUE;
|
||||
@@ -2881,7 +2898,7 @@ LOCAL void ca_pend_io_cleanup()
|
||||
piiu;
|
||||
piiu = (IIU *) piiu->node.next){
|
||||
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
|
||||
if(piiu == piiuCast || !piiu->conn_up){
|
||||
continue;
|
||||
@@ -2890,7 +2907,7 @@ LOCAL void ca_pend_io_cleanup()
|
||||
piiu->cur_read_seq++;
|
||||
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_READ_SYNC);
|
||||
hdr.m_cmmd = htons(CA_PROTO_READ_SYNC);
|
||||
cac_push_msg(piiu, &hdr, NULL);
|
||||
}
|
||||
UNLOCK;
|
||||
@@ -2953,6 +2970,31 @@ void epicsShareAPI ca_signal(long ca_status,char *message)
|
||||
ca_signal_with_file_and_lineno(ca_status, message, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ca_message (long ca_status)
|
||||
*
|
||||
* - if it is an unknown error code then it possible
|
||||
* that the error string generated below
|
||||
* will be overwritten before (or while) the caller
|
||||
* of this routine is calling this routine
|
||||
* (if they call this routine again).
|
||||
*/
|
||||
const char *ca_message(long ca_status)
|
||||
{
|
||||
unsigned msgNo = CA_EXTRACT_MSG_NO(ca_status);
|
||||
|
||||
if( msgNo < NELEMENTS(ca_message_text) ){
|
||||
return ca_message_text[msgNo];
|
||||
}
|
||||
else {
|
||||
sprintf(ca_static->ca_new_err_code_msg_buf,
|
||||
"new CA message number %u known only by server - see caerr.h",
|
||||
msgNo);
|
||||
return ca_static->ca_new_err_code_msg_buf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ca_signal_with_file_and_lineno()
|
||||
@@ -2975,16 +3017,11 @@ int lineno)
|
||||
"Fatal"
|
||||
};
|
||||
|
||||
if( CA_EXTRACT_MSG_NO(ca_status) >= NELEMENTS(ca_message_text) ){
|
||||
message = "corrupt status";
|
||||
ca_status = ECA_INTERNAL;
|
||||
}
|
||||
|
||||
ca_printf(
|
||||
"CA.Client.Diagnostic..............................................\n");
|
||||
|
||||
ca_printf(
|
||||
" Message: \"%s\"\n", ca_message_text[CA_EXTRACT_MSG_NO(ca_status)]);
|
||||
" Message: \"%s\"\n", ca_message(ca_status));
|
||||
|
||||
if(message)
|
||||
ca_printf(
|
||||
@@ -3030,7 +3067,7 @@ int lineno)
|
||||
*/
|
||||
void ca_busy_message(struct ioc_in_use *piiu)
|
||||
{
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
|
||||
if(!piiu){
|
||||
return;
|
||||
@@ -3043,7 +3080,7 @@ void ca_busy_message(struct ioc_in_use *piiu)
|
||||
return;
|
||||
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_EVENTS_OFF);
|
||||
hdr.m_cmmd = htons(CA_PROTO_EVENTS_OFF);
|
||||
|
||||
cac_push_msg(piiu, &hdr, NULL);
|
||||
|
||||
@@ -3057,7 +3094,7 @@ void ca_busy_message(struct ioc_in_use *piiu)
|
||||
*/
|
||||
void ca_ready_message(struct ioc_in_use *piiu)
|
||||
{
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
|
||||
if(!piiu){
|
||||
return;
|
||||
@@ -3071,7 +3108,7 @@ void ca_ready_message(struct ioc_in_use *piiu)
|
||||
}
|
||||
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_EVENTS_ON);
|
||||
hdr.m_cmmd = htons(CA_PROTO_EVENTS_ON);
|
||||
|
||||
cac_push_msg(piiu, &hdr, NULL);
|
||||
|
||||
@@ -3087,14 +3124,14 @@ void ca_ready_message(struct ioc_in_use *piiu)
|
||||
int echo_request(struct ioc_in_use *piiu, ca_time *pCurrentTime)
|
||||
{
|
||||
int status;
|
||||
struct extmsg *phdr;
|
||||
caHdr *phdr;
|
||||
|
||||
status = cac_alloc_msg_no_flush (piiu, sizeof(*phdr), &phdr);
|
||||
if (status != ECA_NORMAL) {
|
||||
return status;
|
||||
}
|
||||
|
||||
phdr->m_cmmd = htons(IOC_ECHO);
|
||||
phdr->m_cmmd = htons(CA_PROTO_ECHO);
|
||||
phdr->m_type = htons(0);
|
||||
phdr->m_count = htons(0);
|
||||
phdr->m_cid = htons(0);
|
||||
@@ -3118,9 +3155,9 @@ int echo_request(struct ioc_in_use *piiu, ca_time *pCurrentTime)
|
||||
*/
|
||||
void noop_msg(struct ioc_in_use *piiu)
|
||||
{
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
|
||||
hdr.m_cmmd = htons(IOC_NOOP);
|
||||
hdr.m_cmmd = htons(CA_PROTO_NOOP);
|
||||
hdr.m_type = htons(0);
|
||||
hdr.m_count = htons(0);
|
||||
hdr.m_cid = htons(0);
|
||||
@@ -3141,7 +3178,7 @@ void noop_msg(struct ioc_in_use *piiu)
|
||||
void issue_client_host_name(struct ioc_in_use *piiu)
|
||||
{
|
||||
unsigned size;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
char *pName;
|
||||
|
||||
if(!piiu){
|
||||
@@ -3170,7 +3207,7 @@ void issue_client_host_name(struct ioc_in_use *piiu)
|
||||
pName = ca_static->ca_pHostName,
|
||||
size = strlen(pName)+1;
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_HOST_NAME);
|
||||
hdr.m_cmmd = htons(CA_PROTO_HOST_NAME);
|
||||
hdr.m_postsize = size;
|
||||
|
||||
cac_push_msg(piiu, &hdr, pName);
|
||||
@@ -3188,7 +3225,7 @@ void issue_client_host_name(struct ioc_in_use *piiu)
|
||||
void issue_identify_client(struct ioc_in_use *piiu)
|
||||
{
|
||||
unsigned size;
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
char *pName;
|
||||
|
||||
if(!piiu){
|
||||
@@ -3217,7 +3254,7 @@ void issue_identify_client(struct ioc_in_use *piiu)
|
||||
pName = ca_static->ca_pUserName,
|
||||
size = strlen(pName)+1;
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_CLIENT_NAME);
|
||||
hdr.m_cmmd = htons(CA_PROTO_CLIENT_NAME);
|
||||
hdr.m_postsize = size;
|
||||
|
||||
cac_push_msg(piiu, &hdr, pName);
|
||||
@@ -3234,7 +3271,7 @@ void issue_identify_client(struct ioc_in_use *piiu)
|
||||
*/
|
||||
void issue_claim_channel(struct ioc_in_use *piiu, chid pchan)
|
||||
{
|
||||
struct extmsg hdr;
|
||||
caHdr hdr;
|
||||
unsigned size;
|
||||
char *pName;
|
||||
|
||||
@@ -3249,7 +3286,7 @@ void issue_claim_channel(struct ioc_in_use *piiu, chid pchan)
|
||||
return;
|
||||
|
||||
hdr = nullmsg;
|
||||
hdr.m_cmmd = htons(IOC_CLAIM_CIU);
|
||||
hdr.m_cmmd = htons(CA_PROTO_CLAIM_CIU);
|
||||
|
||||
if(CA_V44(CA_PROTOCOL_VERSION, piiu->minor_version_number)){
|
||||
hdr.m_cid = pchan->cid;
|
||||
@@ -3300,7 +3337,7 @@ LOCAL void ca_default_exception_handler(struct exception_handler_args args)
|
||||
*/
|
||||
LOCK;
|
||||
sprintf(sprintf_buf,
|
||||
"%s - with request chan=%s op=%d data type=%s count=%d",
|
||||
"%s - with request chan=%s op=%ld data type=%s count=%ld",
|
||||
args.ctx,
|
||||
pName,
|
||||
args.op,
|
||||
|
||||
145
src/ca/acctst.c
145
src/ca/acctst.c
@@ -7,6 +7,15 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.35 1996/07/01 19:49:15 jhill
|
||||
* turned on analog value wrap-around test
|
||||
*
|
||||
* Revision 1.34 1996/06/19 17:59:02 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.33 1995/12/19 19:29:04 jhill
|
||||
* changed put test
|
||||
*
|
||||
* Revision 1.32 1995/11/29 19:17:25 jhill
|
||||
* more tests
|
||||
*
|
||||
@@ -94,7 +103,7 @@ int acctst(char *pname)
|
||||
NULL);
|
||||
}
|
||||
#else /* not vxWorks */
|
||||
main(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if(argc == 2){
|
||||
doacctst(argv[1]);
|
||||
@@ -155,6 +164,8 @@ int doacctst(char *pname)
|
||||
size = dbr_size_n(DBR_GR_FLOAT, NUM);
|
||||
ptr = (struct dbr_gr_float *) malloc(size);
|
||||
|
||||
printf("Connect/disconnect test");
|
||||
fflush(stdout);
|
||||
for (i = 0; i < 10; i++) {
|
||||
|
||||
status = ca_search(
|
||||
@@ -197,6 +208,9 @@ int doacctst(char *pname)
|
||||
status = ca_pend_io(1000.0);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
printf(".");
|
||||
fflush(stdout);
|
||||
|
||||
assert(ca_test_io() == ECA_IODONE);
|
||||
|
||||
assert(ca_state(chix1) == cs_conn);
|
||||
@@ -209,6 +223,7 @@ int doacctst(char *pname)
|
||||
SEVCHK(ca_clear_channel(chix2), NULL);
|
||||
SEVCHK(ca_clear_channel(chix1), NULL);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
status = ca_search(pname,& chix3);
|
||||
SEVCHK(status, NULL);
|
||||
@@ -266,13 +281,12 @@ int doacctst(char *pname)
|
||||
ca_read_access(chix1),
|
||||
ca_write_access(chix1));
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Verify that we can write and then read back
|
||||
* the same analog value
|
||||
* the same analog value (DBR_FLOAT)
|
||||
*/
|
||||
if( (ca_field_type(chix1)==DBR_FLOAT ||
|
||||
ca_field_type(chix1)==DBR_DOUBLE) &&
|
||||
if( (ca_field_type(chix1)==DBR_DOUBLE ||
|
||||
ca_field_type(chix1)==DBR_FLOAT) &&
|
||||
ca_read_access(chix1) &&
|
||||
ca_write_access(chix1)){
|
||||
|
||||
@@ -285,47 +299,61 @@ int doacctst(char *pname)
|
||||
fflush(stdout);
|
||||
epsil = FLT_EPSILON*4;
|
||||
base = FLT_MIN;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i++) {
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = FLT_MAX;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i++) {
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = - ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = - FLT_MAX;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i++) {
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Verify that we can write and then read back
|
||||
* the same analog value (DBR_DOUBLE)
|
||||
*/
|
||||
if( ca_field_type(chix1)==DBR_DOUBLE &&
|
||||
ca_read_access(chix1) &&
|
||||
ca_write_access(chix1)){
|
||||
|
||||
dbr_double_t incr;
|
||||
dbr_double_t epsil;
|
||||
dbr_double_t base;
|
||||
unsigned long iter;
|
||||
|
||||
printf ("double test ...");
|
||||
fflush(stdout);
|
||||
epsil = DBL_EPSILON*4;
|
||||
base = DBL_MIN;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i++) {
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = DBL_MAX;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i++) {
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = - ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = - DBL_MAX;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i++) {
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
@@ -333,7 +361,33 @@ int doacctst(char *pname)
|
||||
}
|
||||
printf ("done\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ca_pend_io() must block
|
||||
*/
|
||||
if(ca_read_access(chix4)){
|
||||
dbr_float_t req = 3.3;
|
||||
dbr_float_t resp = 0.0;
|
||||
|
||||
printf ("get TMO test ...");
|
||||
fflush(stdout);
|
||||
SEVCHK(ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK(ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
status = ca_pend_io(1.0e-12);
|
||||
if (status==ECA_NORMAL) {
|
||||
assert (resp == req);
|
||||
}
|
||||
else {
|
||||
assert (resp == 0.0);
|
||||
}
|
||||
|
||||
resp = 0.0;
|
||||
SEVCHK (ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK (ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
SEVCHK (ca_pend_io(2000.0),NULL);
|
||||
assert (resp == req);
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
@@ -377,6 +431,7 @@ int doacctst(char *pname)
|
||||
* solicitations
|
||||
*/
|
||||
if(ca_read_access(chix1)){
|
||||
unsigned count=0u;
|
||||
printf("Performing multiple get callback test...");
|
||||
fflush(stdout);
|
||||
for(i=0; i<10000; i++){
|
||||
@@ -385,26 +440,28 @@ int doacctst(char *pname)
|
||||
1,
|
||||
chix1,
|
||||
null_event,
|
||||
NULL);
|
||||
&count);
|
||||
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
SEVCHK(ca_flush_io(), NULL);
|
||||
while (count<10000u) {
|
||||
ca_pend_event(1.0);
|
||||
printf("waiting...");
|
||||
fflush(stdout);
|
||||
}
|
||||
printf("done.\n");
|
||||
}
|
||||
else{
|
||||
printf("Skipped multiple get cb test - no read access\n");
|
||||
}
|
||||
|
||||
if(ca_v42_ok(chix1)){
|
||||
test_sync_groups(chix1);
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* solicitations
|
||||
*/
|
||||
if(ca_write_access(chix1) && ca_v42_ok(chix1)){
|
||||
unsigned count=0u;
|
||||
printf("Performing multiple put callback test...");
|
||||
fflush(stdout);
|
||||
for(i=0; i<10000; i++){
|
||||
@@ -415,17 +472,26 @@ int doacctst(char *pname)
|
||||
chix1,
|
||||
&fval,
|
||||
null_event,
|
||||
NULL);
|
||||
&count);
|
||||
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
SEVCHK(ca_flush_io(), NULL);
|
||||
while (count<10000u) {
|
||||
ca_pend_event(1.0);
|
||||
printf("waiting...");
|
||||
fflush(stdout);
|
||||
}
|
||||
printf("done.\n");
|
||||
}
|
||||
else{
|
||||
printf("Skipped multiple put cb test - no write access\n");
|
||||
}
|
||||
|
||||
if(ca_v42_ok(chix1)){
|
||||
test_sync_groups(chix1);
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we can add many monitors at once
|
||||
*/
|
||||
@@ -437,7 +503,7 @@ int doacctst(char *pname)
|
||||
|
||||
for(i=0; i<NELEMENTS(mid); i++){
|
||||
SEVCHK(ca_add_event(DBR_GR_FLOAT, chix4, null_event,
|
||||
(void *)0x55555555, &mid[i]),NULL);
|
||||
NULL, &mid[i]),NULL);
|
||||
}
|
||||
/*
|
||||
* force all of the monitors requests to
|
||||
@@ -450,7 +516,7 @@ int doacctst(char *pname)
|
||||
status = ca_clear_event(mid[i]);
|
||||
if(status != ECA_NORMAL){
|
||||
printf(
|
||||
"Clear of event %d %x failed because \"%s\"\n",
|
||||
"Clear of event %ld %x failed because \"%s\"\n",
|
||||
i,
|
||||
mid[i]->id,
|
||||
ca_message(status));
|
||||
@@ -472,7 +538,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -480,7 +546,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -489,7 +555,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -499,14 +565,14 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix3,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_add_event(
|
||||
DBR_FLOAT,
|
||||
chix3,
|
||||
write_event,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -519,7 +585,7 @@ int doacctst(char *pname)
|
||||
if (pfloat)
|
||||
for (i = 0; i < NUM; i++) {
|
||||
for (j = 0; j < NUM; j++)
|
||||
sprintf(&pstring[j][0], "%d", j + 100);
|
||||
sprintf(&pstring[j][0], "%ld", j + 100l);
|
||||
SEVCHK(ca_array_put(
|
||||
DBR_STRING,
|
||||
NUM,
|
||||
@@ -645,7 +711,11 @@ unsigned iterations)
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io (100.0);
|
||||
SEVCHK (status, NULL);
|
||||
assert (fabs(fval-fretval) < epsilon);
|
||||
if (fabs(fval-fretval) > epsilon) {
|
||||
printf ("float test failed val written %f\n", fval);
|
||||
printf ("float test failed val read %f\n", fretval);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
fval += increment;
|
||||
}
|
||||
@@ -672,7 +742,11 @@ unsigned iterations)
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io (100.0);
|
||||
SEVCHK (status, NULL);
|
||||
assert (fabs(fval-fretval) < epsilon);
|
||||
if (fabs(fval-fretval) > epsilon) {
|
||||
printf ("float test failed val written %f\n", fval);
|
||||
printf ("float test failed val read %f\n", fretval);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
fval += increment;
|
||||
}
|
||||
@@ -681,9 +755,11 @@ unsigned iterations)
|
||||
void null_event(struct event_handler_args args)
|
||||
{
|
||||
static int i;
|
||||
dbr_double_t fval = 3.8;
|
||||
int status;
|
||||
unsigned *pInc = (unsigned *) args.usr;
|
||||
|
||||
if (pInc) {
|
||||
(*pInc)++;
|
||||
}
|
||||
#if 0
|
||||
if (ca_state(args.chid)==cs_conn) {
|
||||
status = ca_put(DBR_FLOAT, args.chid, &fval);
|
||||
@@ -737,10 +813,11 @@ void conn(struct connection_handler_args args)
|
||||
ca_get_callback(DBR_GR_FLOAT, args.chid, get_cb, NULL);
|
||||
}
|
||||
|
||||
void get_cb(struct event_handler_args args)
|
||||
void get_cb (struct event_handler_args args)
|
||||
{
|
||||
if(!(args.status & CA_M_SUCCESS)){
|
||||
printf("Get cb failed because \"%s\"\n", ca_message(args.status));
|
||||
printf("Get cb failed because \"%s\"\n",
|
||||
ca_message(args.status));
|
||||
}
|
||||
conn_cb_count++;
|
||||
}
|
||||
@@ -773,9 +850,9 @@ void test_sync_groups(chid chix)
|
||||
SEVCHK(status, "SYNC GRP2");
|
||||
status = ca_sg_test(gid1);
|
||||
SEVCHK(status, "SYNC GRP1");
|
||||
status = ca_sg_block(gid1, 15.0);
|
||||
status = ca_sg_block(gid1, 500.0);
|
||||
SEVCHK(status, "SYNC GRP1");
|
||||
status = ca_sg_block(gid2, 15.0);
|
||||
status = ca_sg_block(gid2, 500.0);
|
||||
SEVCHK(status, "SYNC GRP2");
|
||||
status = ca_sg_delete(gid2);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
@@ -78,6 +78,32 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/* Under WIN32, FD_SETSIZE is the number of sockets,
|
||||
* not the max. file descriptor value that you may select() !
|
||||
*
|
||||
* Of course it's not allowed to look into fd_count,
|
||||
* but what shall we do? -kuk-
|
||||
*/
|
||||
|
||||
if (pfdi->readMask.fd_count >= FD_SETSIZE)
|
||||
{
|
||||
ca_printf(
|
||||
"%s.%d: no room for fd %d in fd_set (FD_SETSIZE=%d)\n",
|
||||
__FILE__, __LINE__, piiu->sock_chan, FD_SETSIZE);
|
||||
continue;
|
||||
}
|
||||
|
||||
#else
|
||||
if (piiu->sock_chan>=FD_SETSIZE)
|
||||
{
|
||||
ca_printf(
|
||||
"%s.%d: file number %d > FD_SETSIZE=%d ignored\n",
|
||||
__FILE__, __LINE__, piiu->sock_chan, FD_SETSIZE);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dont bother receiving if we have insufficient
|
||||
* space for the maximum UDP message
|
||||
|
||||
232
src/ca/caProto.h
Normal file
232
src/ca/caProto.h
Normal file
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
|
||||
* ca server installation
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CAPROTO__
|
||||
/* $Id$ */
|
||||
/*
|
||||
* History
|
||||
* .01 01xx90 joh removed status field in favor of a independent m_cmmd-
|
||||
* saves space on every successful operation
|
||||
*
|
||||
* .02 041390 joh moved server ports to above IPPORT_USERRESERVED
|
||||
* see in.h
|
||||
*
|
||||
* .03 060391 joh Bumped protocol version to 4 to support changes for
|
||||
* SPARC alignment in db_access.h
|
||||
*
|
||||
* .04 071291 joh New command added - claim channel in use block
|
||||
*
|
||||
* .05 011294 joh New command added - write notify
|
||||
*
|
||||
* .06 020194 joh New command added for CA V4.1 - client name
|
||||
*
|
||||
* .07 041194 joh New command added for CA V4.2 - access rights
|
||||
*
|
||||
* .08 050594 joh New command added for CA V4.3 - echo request
|
||||
*
|
||||
* .09 050594 joh New command added for CA V4.3 - repeater fanout regis
|
||||
*
|
||||
* .10 050594 joh New command added for CA V4.3 - wakeup the server
|
||||
* $Log$
|
||||
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
|
||||
* ca server installation
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define __CAPROTO__
|
||||
|
||||
/* TCP/UDP port number (bumped each protocol change) */
|
||||
#define CA_PROTOCOL_VERSION 4u
|
||||
#define CA_MINOR_VERSION 7u
|
||||
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
|
||||
#if CA_PROTOCOL_VERSION == 4u
|
||||
#define CA_V41(MAJOR,MINOR) ((MINOR)>=1u)
|
||||
#define CA_V42(MAJOR,MINOR) ((MINOR)>=2u)
|
||||
#define CA_V43(MAJOR,MINOR) ((MINOR)>=3u)
|
||||
#define CA_V44(MAJOR,MINOR) ((MINOR)>=4u)
|
||||
#define CA_V45(MAJOR,MINOR) ((MINOR)>=5u)
|
||||
#define CA_V46(MAJOR,MINOR) ((MINOR)>=6u)
|
||||
#define CA_V47(MAJOR,MINOR) ((MINOR)>=7u)
|
||||
#elif CA_PROTOCOL_VERSION > 4u
|
||||
#define CA_V41(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V42(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V43(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V44(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V45(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V46(MAJOR,MINOR) ( 1u )
|
||||
#define CA_V47(MAJOR,MINOR) ( 1u )
|
||||
#else
|
||||
#define CA_V41(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V42(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V43(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V44(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V45(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V46(MAJOR,MINOR) ( 0u )
|
||||
#define CA_V47(MAJOR,MINOR) ( 0u )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: These port numbers are only used if the CA repeater and
|
||||
* CA server port numbers cant be obtained from the EPICS
|
||||
* environment variables "EPICS_CA_REPEATER_PORT" and
|
||||
* "EPICS_CA_SERVER_PORT"
|
||||
*/
|
||||
#define CA_PORT_BASE IPPORT_USERRESERVED + 56U
|
||||
#define CA_SERVER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2u)
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2u+1u)
|
||||
|
||||
#define MAX_UDP 1024u
|
||||
#define MAX_TCP (MAX_UDP*16u) /* so waveforms fit */
|
||||
#define MAX_MSG_SIZE (MAX_TCP) /* the larger of tcp and udp max */
|
||||
|
||||
/*
|
||||
* architecture independent types
|
||||
*
|
||||
* (so far this works on all archs we have ported to)
|
||||
*/
|
||||
typedef unsigned short ca_uint16_t;
|
||||
typedef unsigned int ca_uint32_t;
|
||||
typedef float ca_float32_t;
|
||||
typedef ca_uint32_t caResId;
|
||||
|
||||
/* values for m_cmmd */
|
||||
#define CA_PROTO_NOOP 0u /* do nothing, but verify TCP */
|
||||
#define CA_PROTO_EVENT_ADD 1u /* add an event */
|
||||
#define CA_PROTO_EVENT_CANCEL 2u /* cancel an event */
|
||||
#define CA_PROTO_READ 3u /* read and return a channel value*/
|
||||
#define CA_PROTO_WRITE 4u /* write a channel value */
|
||||
#define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */
|
||||
#define CA_PROTO_SEARCH 6u /* IOC channel search */
|
||||
#define CA_PROTO_BUILD 7u /* build - obsolete */
|
||||
#define CA_PROTO_EVENTS_OFF 8u /* flow control */
|
||||
#define CA_PROTO_EVENTS_ON 9u /* flow control */
|
||||
#define CA_PROTO_READ_SYNC 10u /* purge old reads */
|
||||
#define CA_PROTO_ERROR 11u /* an operation failed */
|
||||
#define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */
|
||||
#define CA_PROTO_RSRV_IS_UP 13u /* CA server has joined the net */
|
||||
#define CA_PROTO_NOT_FOUND 14u /* channel not found */
|
||||
#define CA_PROTO_READ_NOTIFY 15u /* add a one shot event */
|
||||
#define CA_PROTO_READ_BUILD 16u /* read and build - obsolete */
|
||||
#define REPEATER_CONFIRM 17u /* registration confirmation */
|
||||
#define CA_PROTO_CLAIM_CIU 18u /* client claims resource in server */
|
||||
#define CA_PROTO_WRITE_NOTIFY 19u /* notify after write chan value */
|
||||
#define CA_PROTO_CLIENT_NAME 20u /* CA V4.1 identify client */
|
||||
#define CA_PROTO_HOST_NAME 21u /* CA V4.1 identify client */
|
||||
#define CA_PROTO_ACCESS_RIGHTS 22u /* CA V4.2 asynch access rights chg */
|
||||
#define CA_PROTO_ECHO 23u /* CA V4.3 connection verify */
|
||||
#define REPEATER_REGISTER 24u /* registr for repeater fan out */
|
||||
#define CA_PROTO_SIGNAL 25u /* knock the server out of select */
|
||||
#define CA_PROTO_CLAIM_CIU_FAILED 26u /* unable to create chan resource in server */
|
||||
#define CA_PROTO_SERVER_DISCONN 27u /* server deletes PV (or channel) */
|
||||
|
||||
#define CA_PROTO_LAST_CMMD CA_PROTO_CLAIM_CIU_FAILED
|
||||
|
||||
/*
|
||||
* for use with search and not_found (if search fails and
|
||||
* its not a broadcast tell the client to look elesewhere)
|
||||
*/
|
||||
#define DOREPLY 10u
|
||||
#define DONTREPLY 5u
|
||||
|
||||
/* size of object in bytes rounded up to nearest oct word */
|
||||
#define OCT_ROUND(A) ((((unsigned long)(A))+7u)>>3u)
|
||||
#define OCT_SIZEOF(A) (OCT_ROUND(sizeof(A)))
|
||||
|
||||
/* size of object in bytes rounded up to nearest long word */
|
||||
#define QUAD_ROUND(A) (((unsigned long)(A))+3u)>>2u)
|
||||
#define QUAD_SIZEOF(A) (QUAD_ROUND(sizeof(A)))
|
||||
|
||||
/* size of object in bytes rounded up to nearest short word */
|
||||
#define BI_ROUND(A) ((((unsigned long)(A))+1u)>>1u)
|
||||
#define BI_SIZEOF(A) (BI_ROUND(sizeof(A)))
|
||||
|
||||
/*
|
||||
* For communicating access rights to the clients
|
||||
*
|
||||
* (placed in m_available hdr field of CA_PROTO_ACCESS_RIGHTS cmmd
|
||||
*/
|
||||
#define CA_PROTO_ACCESS_RIGHT_READ (1u<<0u)
|
||||
#define CA_PROTO_ACCESS_RIGHT_WRITE (1u<<1u)
|
||||
|
||||
/*
|
||||
* All structures passed in the protocol must have individual
|
||||
* fields aligned on natural boundaries.
|
||||
*
|
||||
* NOTE: all structures declared in this file must have a
|
||||
* byte count which is evenly divisible by 8 matching
|
||||
* the largest atomic data type in db_access.h.
|
||||
*/
|
||||
#define CA_MESSAGE_ALIGN(A) (OCT_ROUND(A)<<3u)
|
||||
|
||||
/*
|
||||
* the common part of each message sent/recv by the
|
||||
* CA server.
|
||||
*/
|
||||
typedef struct ca_hdr {
|
||||
ca_uint16_t m_cmmd; /* operation to be performed */
|
||||
ca_uint16_t m_postsize; /* size of message extension */
|
||||
ca_uint16_t m_type; /* operation data type */
|
||||
ca_uint16_t m_count; /* operation data count */
|
||||
ca_uint32_t m_cid; /* channel identifier */
|
||||
ca_uint32_t m_available; /* undefined message location for use
|
||||
* by client processes */
|
||||
}caHdr;
|
||||
|
||||
/*
|
||||
* for monitor (event) message extension
|
||||
*/
|
||||
struct mon_info{
|
||||
ca_float32_t m_lval; /* low delta */
|
||||
ca_float32_t m_hval; /* high delta */
|
||||
ca_float32_t m_toval; /* period btween samples */
|
||||
ca_uint16_t m_mask; /* event select mask */
|
||||
ca_uint16_t m_pad; /* extend to 32 bits */
|
||||
};
|
||||
|
||||
struct monops { /* monitor req opi to ioc */
|
||||
caHdr m_header;
|
||||
struct mon_info m_info;
|
||||
};
|
||||
|
||||
/*
|
||||
* PV names greater than this length assumed to be invalid
|
||||
*/
|
||||
#define unreasonablePVNameSize 500u
|
||||
|
||||
#endif /* __CAPROTO__ */
|
||||
|
||||
@@ -145,6 +145,7 @@ typedef struct ca_access_rights{
|
||||
|
||||
|
||||
/* Format for the arguments to user connection handlers */
|
||||
struct channel_in_use;
|
||||
struct connection_handler_args{
|
||||
struct channel_in_use *chid; /* Channel id */
|
||||
long op; /* External codes for CA op */
|
||||
@@ -708,6 +709,7 @@ evid /* EVID R Event id returned by add event */
|
||||
/* early is TRUE then ca_pend() will return immediately without */
|
||||
/* processing outstanding CA labor if no queries are outstanding */
|
||||
/************************************************************************/
|
||||
#define ca_poll() ca_pend((1e-12), 0/*FALSE*/)
|
||||
#define ca_pend_event(TIMEOUT) ca_pend((TIMEOUT), 0/*FALSE*/)
|
||||
#define ca_pend_io(TIMEOUT) ca_pend((TIMEOUT), 1/*TRUE*/)
|
||||
|
||||
@@ -797,6 +799,9 @@ chid /* CHID R Channel ID */
|
||||
* a new fd is added or removed
|
||||
* (for use with a manager of the select system call under UNIX)
|
||||
*
|
||||
* if (opened) then fd was created
|
||||
* if (!opened) then fd was deleted
|
||||
*
|
||||
*/
|
||||
#ifdef CAC_FUNC_PROTO
|
||||
typedef void CAFDHANDLER(void *parg, int fd, int opened);
|
||||
@@ -934,6 +939,15 @@ void * /* PVALUE R pointer to new channel value of type */
|
||||
#endif /*CAC_FUNC_PROTO*/
|
||||
);
|
||||
|
||||
/*
|
||||
* print status of a sync group
|
||||
*/
|
||||
#ifdef CAC_FUNC_PROTO
|
||||
int epicsShareAPI ca_sg_stat(CA_SYNC_GID gid);
|
||||
#else /*CAC_FUNC_PROTO*/
|
||||
int epicsShareAPI ca_sg_stat();
|
||||
#endif /*CAC_FUNC_PROTO*/
|
||||
|
||||
/*
|
||||
* CA_MODIFY_USER_NAME()
|
||||
*
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#define INCLcaerrh
|
||||
|
||||
#include <shareLib.h>
|
||||
#include <epicsTypes.h>
|
||||
|
||||
#ifndef HDRVERSIONID
|
||||
# define HDRVERSIONID(NAME,VERS)
|
||||
@@ -123,22 +124,22 @@ HDRVERSIONID(caerrh, "@(#) $Id$")
|
||||
#define ECA_ADDFAIL DEFMSG(CA_K_WARNING, 21)
|
||||
#define ECA_BADCOUNT DEFMSG(CA_K_WARNING, 22)
|
||||
#define ECA_BADSTR DEFMSG(CA_K_ERROR, 23)
|
||||
#define ECA_DISCONN DEFMSG(CA_K_INFO, 24)
|
||||
#define ECA_DBLCHNL DEFMSG(CA_K_INFO, 25)
|
||||
#define ECA_DISCONN DEFMSG(CA_K_WARNING, 24)
|
||||
#define ECA_DBLCHNL DEFMSG(CA_K_WARNING, 25)
|
||||
#define ECA_EVDISALLOW DEFMSG(CA_K_ERROR, 26)
|
||||
#define ECA_BUILDGET DEFMSG(CA_K_WARNING, 27)
|
||||
#define ECA_NEEDSFP DEFMSG(CA_K_INFO, 28)
|
||||
#define ECA_NEEDSFP DEFMSG(CA_K_WARNING, 28)
|
||||
#define ECA_OVEVFAIL DEFMSG(CA_K_WARNING, 29)
|
||||
#define ECA_BADMONID DEFMSG(CA_K_ERROR, 30)
|
||||
#define ECA_NEWADDR DEFMSG(CA_K_INFO, 31)
|
||||
#define ECA_NEWADDR DEFMSG(CA_K_WARNING, 31)
|
||||
#define ECA_NEWCONN DEFMSG(CA_K_INFO, 32)
|
||||
#define ECA_NOCACTX DEFMSG(CA_K_WARNING, 33)
|
||||
#define ECA_DEFUNCT DEFMSG(CA_K_FATAL, 34)
|
||||
#define ECA_EMPTYSTR DEFMSG(CA_K_WARNING, 35)
|
||||
#define ECA_NOREPEATER DEFMSG(CA_K_INFO, 36)
|
||||
#define ECA_NOCHANMSG DEFMSG(CA_K_INFO, 37)
|
||||
#define ECA_DLCKREST DEFMSG(CA_K_INFO, 38)
|
||||
#define ECA_SERVBEHIND DEFMSG(CA_K_INFO, 39)
|
||||
#define ECA_NOREPEATER DEFMSG(CA_K_WARNING, 36)
|
||||
#define ECA_NOCHANMSG DEFMSG(CA_K_WARNNING, 37)
|
||||
#define ECA_DLCKREST DEFMSG(CA_K_WARNING, 38)
|
||||
#define ECA_SERVBEHIND DEFMSG(CA_K_WARNING, 39)
|
||||
#define ECA_NOCAST DEFMSG(CA_K_WARNING, 40)
|
||||
#define ECA_BADMASK DEFMSG(CA_K_ERROR, 41)
|
||||
#define ECA_IODONE DEFMSG(CA_K_INFO, 42)
|
||||
@@ -149,12 +150,13 @@ HDRVERSIONID(caerrh, "@(#) $Id$")
|
||||
#define ECA_NOWTACCESS DEFMSG(CA_K_WARNING, 47)
|
||||
#define ECA_ANACHRONISM DEFMSG(CA_K_ERROR, 48)
|
||||
#define ECA_NOSEARCHADDR DEFMSG(CA_K_WARNING, 49)
|
||||
#define ECA_NOCONVERT DEFMSG(CA_K_WARNING, 50)
|
||||
|
||||
|
||||
#ifndef CA_ERROR_GLBLSOURCE
|
||||
epicsShareExtern char *ca_message_text[];
|
||||
epicsShareExtern READONLY char *ca_message_text[];
|
||||
#else
|
||||
char *ca_message_text[]
|
||||
READONLY char *ca_message_text[]
|
||||
=
|
||||
{
|
||||
"Normal successful completion",
|
||||
@@ -190,7 +192,7 @@ char *ca_message_text[]
|
||||
"A monitor by that id cant be found",
|
||||
"Remote channel has new network address",
|
||||
"New or resumed network connection",
|
||||
"Attempt to import from a task without a CA context failed",
|
||||
"Specified task isnt a member of a CA context",
|
||||
"Attempt to use defunct CA feature failed",
|
||||
"The supplied string is empty",
|
||||
"Unable to spawn the CA repeater thread- auto reconnect will fail",
|
||||
@@ -206,11 +208,15 @@ char *ca_message_text[]
|
||||
"Read access denied",
|
||||
"Write access denied",
|
||||
"Sorry, that anachronistic feature of CA is no longer supported",
|
||||
"The search request/beacon address list was empty after initialization"
|
||||
"The search request/beacon address list was empty after initialization",
|
||||
"Data conversion between client's type and the server's type failed"
|
||||
};
|
||||
#endif
|
||||
|
||||
#define ca_message(STATUS)\
|
||||
(ca_message_text[CA_EXTRACT_MSG_NO((STATUS))])
|
||||
#ifdef __STDC__
|
||||
READONLY char *ca_message(long ca_status);
|
||||
#else /* __STDC__ */
|
||||
READONLY char *ca_message();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
/* .12 110194 joh improved search scheduling */
|
||||
/* (dont send all chans in a block) */
|
||||
/* */
|
||||
/* $Log$ */
|
||||
/* $Log$
|
||||
* Revision 1.34 1995/08/22 00:19:21 jhill
|
||||
* use current time var to init time stamp in a beacon hash entry
|
||||
* */
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
@@ -208,7 +211,7 @@ void manage_conn(int silent)
|
||||
/*
|
||||
* set the retry interval
|
||||
*/
|
||||
assert(ca_static->ca_search_retry < NBBY*sizeof(idelay));
|
||||
assert(ca_static->ca_search_retry < CHAR_BIT*sizeof(idelay));
|
||||
idelay = 1;
|
||||
idelay = idelay << ca_static->ca_search_retry;
|
||||
delay = idelay * CA_RECAST_DELAY; /* sec */
|
||||
|
||||
@@ -47,6 +47,15 @@
|
||||
/* address in use so that test works on UNIX */
|
||||
/* kernels that support multicast */
|
||||
/* $Log$
|
||||
* Revision 1.63 1996/07/09 22:41:28 jhill
|
||||
* silence gcc warning
|
||||
*
|
||||
* Revision 1.62 1996/06/19 17:59:06 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.61 1995/12/19 19:33:02 jhill
|
||||
* function prototype changes
|
||||
*
|
||||
* Revision 1.60 1995/11/29 19:26:01 jhill
|
||||
* cleaned up interface to recv() and send()
|
||||
* */
|
||||
@@ -548,7 +557,7 @@ void caSetupBCastAddrList (ELLLIST *pList, SOCKET sock, unsigned port)
|
||||
*/
|
||||
void notify_ca_repeater()
|
||||
{
|
||||
struct extmsg msg;
|
||||
caHdr msg;
|
||||
struct sockaddr_in saddr;
|
||||
int status;
|
||||
static int once = FALSE;
|
||||
@@ -1241,7 +1250,7 @@ LOCAL void close_ioc (IIU *piiu)
|
||||
chix = (chid) ellFirst(&piiu->chidlist);
|
||||
while (chix) {
|
||||
pNext = (chid) ellNext(&chix->node);
|
||||
cacDisconnectChannel(chix, TRUE);
|
||||
cacDisconnectChannel(chix, cs_conn);
|
||||
chix = pNext;
|
||||
}
|
||||
}
|
||||
@@ -1278,8 +1287,9 @@ LOCAL void close_ioc (IIU *piiu)
|
||||
|
||||
/*
|
||||
* cacDisconnectChannel()
|
||||
* (LOCK must be applied when calling this routine)
|
||||
*/
|
||||
void cacDisconnectChannel(chid chix, int fullDisconnect)
|
||||
void cacDisconnectChannel(chid chix, enum channel_state state)
|
||||
{
|
||||
struct ioc_in_use *piiu;
|
||||
|
||||
@@ -1297,7 +1307,7 @@ void cacDisconnectChannel(chid chix, int fullDisconnect)
|
||||
/*
|
||||
* call their connection handler as required
|
||||
*/
|
||||
if (fullDisconnect) {
|
||||
if (state==cs_conn) {
|
||||
chix->state = cs_prev_conn;
|
||||
|
||||
/*
|
||||
@@ -1650,12 +1660,12 @@ void caAddConfiguredAddr(ELLLIST *pList, ENV_PARAM *pEnv,
|
||||
return;
|
||||
}
|
||||
|
||||
while(pToken = getToken(&pStr)){
|
||||
while( (pToken = getToken(&pStr)) ){
|
||||
memset((char *)&addr,0,sizeof(addr));
|
||||
addr.in.sin_family = AF_INET;
|
||||
addr.in.sin_port = htons(port);
|
||||
addr.in.sin_addr.s_addr = inet_addr(pToken);
|
||||
if(addr.in.sin_addr.s_addr == -1){
|
||||
if (addr.in.sin_addr.s_addr == ~0ul) {
|
||||
ca_printf(
|
||||
"%s: Parsing '%s'\n",
|
||||
__FILE__,
|
||||
|
||||
@@ -32,6 +32,21 @@
|
||||
/************************************************************************/
|
||||
|
||||
/* $Log$
|
||||
* Revision 1.55 1996/08/05 19:21:26 jhill
|
||||
* removed unused proto
|
||||
*
|
||||
* Revision 1.54 1996/06/20 21:43:15 jhill
|
||||
* restored io_done_sem (removed by cleanup)
|
||||
*
|
||||
* Revision 1.53 1996/06/20 21:19:35 jhill
|
||||
* fixed posix signal problem with "cc -Xc"
|
||||
*
|
||||
* Revision 1.52 1996/06/19 17:59:07 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.51 1995/12/19 19:33:07 jhill
|
||||
* function prototype changes
|
||||
*
|
||||
* Revision 1.50 1995/10/18 16:45:40 jhill
|
||||
* Use recast delay greater than one vxWorks tick
|
||||
*
|
||||
@@ -98,10 +113,10 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <shareLib.h>
|
||||
|
||||
@@ -124,7 +139,7 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
* CA private includes
|
||||
*/
|
||||
#include "addrList.h"
|
||||
#include "iocmsg.h"
|
||||
#include "caProto.h"
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
@@ -134,10 +149,6 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
#define max(A,B) ((A)<(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#ifndef NBBY
|
||||
# define NBBY 8 /* number of bits per byte */
|
||||
#endif
|
||||
|
||||
#define MSEC_PER_SEC 1000L
|
||||
#define USEC_PER_SEC 1000000L
|
||||
|
||||
@@ -159,7 +170,7 @@ if(!ca_static){ \
|
||||
#define VALID_MSG(PIIU) (piiu->read_seq == piiu->cur_read_seq)
|
||||
|
||||
#define SETPENDRECV {pndrecvcnt++;}
|
||||
#define CLRPENDRECV(LOCK) {if(--pndrecvcnt<1){cac_io_done(LOCK); POST_IO_EV;}}
|
||||
#define CLRPENDRECV(LOCK) {if(--pndrecvcnt<1){POST_IO_EV;}}
|
||||
|
||||
struct udpmsglog{
|
||||
long nbytes;
|
||||
@@ -179,12 +190,6 @@ struct putCvrtBuf{
|
||||
#define CA_DO_SENDS (1<<0)
|
||||
#define CA_DO_RECVS (1<<1)
|
||||
|
||||
struct pending_io_event{
|
||||
ELLNODE node;
|
||||
void (*io_done_sub)();
|
||||
void *io_done_arg;
|
||||
};
|
||||
|
||||
typedef struct timeval ca_time;
|
||||
|
||||
#define LD_CA_TIME(FLOAT_TIME,PCATIME) \
|
||||
@@ -287,7 +292,7 @@ typedef struct caclient_put_notify{
|
||||
#define nextFastBucketId (ca_static->ca_nextFastBucketId)
|
||||
|
||||
#if defined(vxWorks)
|
||||
# define io_done_sem (ca_static->ca_io_done_sem)
|
||||
# define io_done_sem (ca_static->ca_io_done_sem)
|
||||
# define evuser (ca_static->ca_evuser)
|
||||
# define client_lock (ca_static->ca_client_lock)
|
||||
# define event_lock (ca_static->ca_event_lock)
|
||||
@@ -358,7 +363,7 @@ typedef struct ioc_in_use{
|
||||
unsigned long curDataBytes;
|
||||
struct ca_buffer send;
|
||||
struct ca_buffer recv;
|
||||
struct extmsg curMsg;
|
||||
caHdr curMsg;
|
||||
struct ca_static *pcas;
|
||||
void *pCurData;
|
||||
void (*sendBytes)(struct ioc_in_use *);
|
||||
@@ -451,6 +456,7 @@ struct ca_static{
|
||||
unsigned short ca_server_port;
|
||||
unsigned short ca_repeater_port;
|
||||
char ca_sprintf_buf[256];
|
||||
char ca_new_err_code_msg_buf[128u];
|
||||
unsigned ca_post_msg_active:1;
|
||||
unsigned ca_manage_conn_active:1;
|
||||
unsigned ca_repeater_contacted:1;
|
||||
@@ -470,7 +476,6 @@ struct ca_static{
|
||||
int ca_event_tid;
|
||||
int ca_tid;
|
||||
int recv_tid;
|
||||
unsigned ca_local_ticks;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -541,7 +546,6 @@ void flow_control(struct ioc_in_use *piiu);
|
||||
int broadcast_addr(struct in_addr *pcastaddr);
|
||||
void ca_repeater(void);
|
||||
void cac_recv_task(int tid);
|
||||
void cac_io_done(int lock);
|
||||
void ca_sg_init(void);
|
||||
void ca_sg_shutdown(struct ca_static *ca_temp);
|
||||
int cac_select_io(struct timeval *ptimeout, int flags);
|
||||
@@ -596,8 +600,6 @@ unsigned short port,
|
||||
int net_proto
|
||||
);
|
||||
|
||||
int ca_check_for_fp(void);
|
||||
|
||||
void caSetupBCastAddrList (ELLLIST *pList, SOCKET sock, unsigned port);
|
||||
|
||||
int ca_os_independent_init (void);
|
||||
@@ -629,7 +631,7 @@ ca_time cac_time_sum(ca_time *pTVA, ca_time *pTVB);
|
||||
void caIOBlockFree(evid pIOBlock);
|
||||
void clearChannelResources(unsigned id);
|
||||
void caSetDefaultPrintfHandler (void);
|
||||
void cacDisconnectChannel(chid chix, int fullDisconnect);
|
||||
void cacDisconnectChannel(chid chix, enum channel_state state);
|
||||
int caSendMsgPending(void);
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,6 +44,7 @@ static char *os_depenhSccsId = "$Id$";
|
||||
#ifdef UNIX
|
||||
# include <unistd.h>
|
||||
# include <errno.h>
|
||||
# include <time.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/ioctl.h>
|
||||
@@ -218,11 +219,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
#define LOCAL static
|
||||
#endif
|
||||
|
||||
/* delay for when a poll is used */
|
||||
/* NOTE: DELAYTICKS must be less than TICKSPERSEC */
|
||||
#define DELAYTICKS 50L /* (adjust units below) */
|
||||
#define TICKSPERSEC 1000L /* mili sec per sec */
|
||||
|
||||
/*
|
||||
* BSD prototypes missing from SUNOS4, MULTINET and
|
||||
* perhaps other environments
|
||||
@@ -230,14 +226,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
#include <epicsTypes.h>
|
||||
#include <bsdProto.h>
|
||||
|
||||
/*
|
||||
* order of ops is important here
|
||||
*
|
||||
* NOTE: large OS dependent SYFREQ might cause an overflow
|
||||
*/
|
||||
#define LOCALTICKS ((SYSFREQ*DELAYTICKS)/TICKSPERSEC)
|
||||
|
||||
|
||||
#if defined(vxWorks)
|
||||
# define VXTASKIDNONE 0
|
||||
# define LOCK semTake(client_lock, WAIT_FOREVER);
|
||||
@@ -255,8 +243,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,(int)C)
|
||||
# define MYERRNO (errnoGet()&0xffff)
|
||||
# define POST_IO_EV semGive(io_done_sem)
|
||||
# define SYSFREQ ((long) sysClkRateGet()) /* usually 60 Hz */
|
||||
# define time(A) (tickGet()/SYSFREQ)
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
@@ -271,7 +257,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
# define MYERRNO errno
|
||||
# define POST_IO_EV
|
||||
# define SYSFREQ 1000000L /* 1 MHz */
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
@@ -297,7 +282,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
# endif
|
||||
# endif
|
||||
# define POST_IO_EV
|
||||
# define SYSFREQ 10000000L /* 10 MHz */
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
@@ -325,7 +309,6 @@ static char *os_depenhSccsId = "$Id$";
|
||||
# define socket_ioctl(A,B,C) ioctlsocket(A,B,C)
|
||||
# define MYERRNO WSAGetLastError()
|
||||
# define POST_IO_EV
|
||||
# define SYSFREQ 1000000L /* 1 MHz */
|
||||
#endif /*WIN32*/
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.18 1996/06/20 21:19:29 jhill
|
||||
* fixed posix signal problem with "cc -Xc"
|
||||
*
|
||||
* Revision 1.17 1995/12/19 19:33:42 jhill
|
||||
* added missing arg to execlp()
|
||||
*
|
||||
* Revision 1.16 1995/10/12 01:35:28 jhill
|
||||
* Moved cac_mux_io() to iocinf.c
|
||||
*
|
||||
@@ -44,19 +50,21 @@
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define _POSIX_C_SOURCE 3 /* for solaris and "cc -Xc" */
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
/*
|
||||
* cac_gettimeval
|
||||
*/
|
||||
void cac_gettimeval(struct timeval *pt)
|
||||
{
|
||||
struct timezone tz;
|
||||
int status;
|
||||
|
||||
/*
|
||||
* Not POSIX but available on most of the systems that we use
|
||||
*/
|
||||
status = gettimeofday(pt, &tz);
|
||||
status = gettimeofday(pt, NULL);
|
||||
assert(status == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,18 @@
|
||||
* datagram socket (and watching for ECONNREFUSED)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.32.6.1 1996/07/12 00:39:59 jhill
|
||||
* fixed client disconnect problem under solaris
|
||||
*
|
||||
* Revision 1.35 1996/07/10 23:30:11 jhill
|
||||
* fixed GNU warnings
|
||||
*
|
||||
* Revision 1.34 1996/06/19 17:59:24 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.33 1995/11/29 19:19:05 jhill
|
||||
* Added $log$
|
||||
*
|
||||
*/
|
||||
|
||||
static char *sccsId = "@(#)$Id$";
|
||||
@@ -89,8 +101,9 @@ static char buf[MAX_UDP];
|
||||
|
||||
LOCAL void register_new_client(struct sockaddr_in *pLocal,
|
||||
struct sockaddr_in *pFrom);
|
||||
LOCAL void verifyClients();
|
||||
#define PORT_ANY 0U
|
||||
LOCAL SOCKET makeSocket(unsigned short port);
|
||||
LOCAL SOCKET makeSocket(unsigned short port, int reuseAddr);
|
||||
LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize);
|
||||
|
||||
|
||||
@@ -116,7 +129,7 @@ void ca_repeater()
|
||||
|
||||
ellInit(&client_list);
|
||||
|
||||
sock = makeSocket(port);
|
||||
sock = makeSocket(port, TRUE);
|
||||
if (sock==INVALID_SOCKET) {
|
||||
/*
|
||||
* test for server was already started
|
||||
@@ -142,7 +155,7 @@ void ca_repeater()
|
||||
#endif
|
||||
|
||||
while(TRUE){
|
||||
struct extmsg *pMsg;
|
||||
caHdr *pMsg;
|
||||
|
||||
size = recvfrom(
|
||||
sock,
|
||||
@@ -167,7 +180,7 @@ void ca_repeater()
|
||||
continue;
|
||||
}
|
||||
|
||||
pMsg = (struct extmsg *) buf;
|
||||
pMsg = (caHdr *) buf;
|
||||
|
||||
/*
|
||||
* both zero length message and a registration message
|
||||
@@ -207,7 +220,7 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize)
|
||||
int status;
|
||||
|
||||
ellInit(&theClients);
|
||||
while (pclient=(struct one_client *)ellGet(&client_list)) {
|
||||
while ( (pclient=(struct one_client *)ellGet(&client_list)) ) {
|
||||
ellAdd(&theClients, &pclient->node);
|
||||
|
||||
/*
|
||||
@@ -250,11 +263,47 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize)
|
||||
ellConcat(&client_list, &theClients);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* verifyClients()
|
||||
* (this is required because solaris has a half baked version of sockets)
|
||||
*/
|
||||
LOCAL void verifyClients()
|
||||
{
|
||||
ELLLIST theClients;
|
||||
SOCKET sock;
|
||||
struct one_client *pclient;
|
||||
|
||||
ellInit(&theClients);
|
||||
while ( (pclient=(struct one_client *)ellGet(&client_list)) ) {
|
||||
ellAdd(&theClients, &pclient->node);
|
||||
|
||||
sock = makeSocket(ntohs(pclient->from.sin_port), FALSE);
|
||||
if (sock>=0) {
|
||||
#ifdef DEBUG
|
||||
ca_printf("Deleted client %d\n",
|
||||
pclient->from.sin_port);
|
||||
#endif
|
||||
ellDelete(&theClients, &pclient->node);
|
||||
socket_close(sock);
|
||||
socket_close(pclient->sock);
|
||||
free(pclient);
|
||||
}
|
||||
else {
|
||||
if (MYERRNO!=EADDRINUSE) {
|
||||
ca_printf(
|
||||
"CA Repeater: bind test err was \"%s\"\n", strerror(MYERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
ellConcat(&client_list, &theClients);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* makeSocket()
|
||||
*/
|
||||
LOCAL SOCKET makeSocket(unsigned short port)
|
||||
LOCAL SOCKET makeSocket(unsigned short port, int reuseAddr)
|
||||
{
|
||||
int status;
|
||||
struct sockaddr_in bd;
|
||||
@@ -268,24 +317,32 @@ LOCAL SOCKET makeSocket(unsigned short port)
|
||||
return sock;
|
||||
}
|
||||
|
||||
status = setsockopt( sock,
|
||||
SOL_SOCKET,
|
||||
SO_REUSEADDR,
|
||||
(char *)&true,
|
||||
sizeof(true));
|
||||
if(status<0){
|
||||
ca_printf( "%s: set socket option failed\n",
|
||||
__FILE__);
|
||||
}
|
||||
/*
|
||||
* no need to bind if unconstrained
|
||||
*/
|
||||
if (port != PORT_ANY) {
|
||||
if (reuseAddr) {
|
||||
status = setsockopt( sock,
|
||||
SOL_SOCKET,
|
||||
SO_REUSEADDR,
|
||||
(char *)&true,
|
||||
sizeof(true));
|
||||
if (status<0) {
|
||||
ca_printf(
|
||||
"%s: set socket option failed because \"%s\"\n",
|
||||
__FILE__, strerror(MYERRNO));
|
||||
}
|
||||
}
|
||||
|
||||
memset((char *)&bd, 0, sizeof(bd));
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = INADDR_ANY;
|
||||
bd.sin_port = htons(port);
|
||||
status = bind(sock, (struct sockaddr *)&bd, sizeof(bd));
|
||||
if(status<0){
|
||||
socket_close(sock);
|
||||
return INVALID_SOCKET;
|
||||
memset((char *)&bd, 0, sizeof(bd));
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = INADDR_ANY;
|
||||
bd.sin_port = htons(port);
|
||||
status = bind(sock, (struct sockaddr *)&bd, (int)sizeof(bd));
|
||||
if(status<0){
|
||||
socket_close(sock);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
|
||||
return sock;
|
||||
@@ -301,28 +358,40 @@ struct sockaddr_in *pFrom)
|
||||
{
|
||||
int status;
|
||||
struct one_client *pclient;
|
||||
struct extmsg confirm;
|
||||
struct extmsg noop;
|
||||
caHdr confirm;
|
||||
caHdr noop;
|
||||
int newClient = FALSE;
|
||||
|
||||
if (pFrom->sin_family != AF_INET) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* the repeater and its clients must be on the same host
|
||||
*/
|
||||
if (pLocal->sin_addr.s_addr != pFrom->sin_addr.s_addr) {
|
||||
return;
|
||||
}
|
||||
|
||||
for( pclient = (struct one_client *) ellFirst(&client_list);
|
||||
pclient;
|
||||
pclient = (struct one_client *) ellNext(&pclient->node)){
|
||||
|
||||
if( pFrom->sin_port == pclient->from.sin_port &&
|
||||
pFrom->sin_addr.s_addr == pclient->from.sin_addr.s_addr)
|
||||
if (pFrom->sin_port == pclient->from.sin_port) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!pclient){
|
||||
if (!pclient) {
|
||||
pclient = (struct one_client *)calloc (1, sizeof(*pclient));
|
||||
if(!pclient){
|
||||
if (!pclient) {
|
||||
ca_printf("%s: no memory for new client\n",
|
||||
__FILE__);
|
||||
return;
|
||||
}
|
||||
|
||||
pclient->sock = makeSocket(PORT_ANY);
|
||||
if (!pclient->sock) {
|
||||
pclient->sock = makeSocket(PORT_ANY, FALSE);
|
||||
if (pclient->sock==INVALID_SOCKET) {
|
||||
free(pclient);
|
||||
ca_printf("%s: no client sock because \"%s\"\n",
|
||||
__FILE__,
|
||||
@@ -336,14 +405,16 @@ struct sockaddr_in *pFrom)
|
||||
if (status<0) {
|
||||
socket_close(pclient->sock);
|
||||
free(pclient);
|
||||
ca_printf("%s: unable to connect client sock\n",
|
||||
__FILE__);
|
||||
ca_printf(
|
||||
"%s: unable to connect client sock because \"%s\"\n",
|
||||
__FILE__, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
pclient->from = *pFrom;
|
||||
|
||||
ellAdd (&client_list, &pclient->node);
|
||||
newClient = TRUE;
|
||||
#ifdef DEBUG
|
||||
ca_printf (
|
||||
"Added %d\n",
|
||||
@@ -359,7 +430,7 @@ struct sockaddr_in *pFrom)
|
||||
(char *)&confirm,
|
||||
sizeof(confirm),
|
||||
0);
|
||||
if(status >= 0){
|
||||
if (status >= 0) {
|
||||
assert(status == sizeof(confirm));
|
||||
}
|
||||
else if (MYERRNO == ECONNREFUSED){
|
||||
@@ -381,7 +452,22 @@ struct sockaddr_in *pFrom)
|
||||
* accumulate sockets when there are no beacons
|
||||
*/
|
||||
memset((char *)&noop, '\0', sizeof(noop));
|
||||
confirm.m_cmmd = htons(IOC_NOOP);
|
||||
confirm.m_cmmd = htons(CA_PROTO_NOOP);
|
||||
fanOut(pFrom, (char *)&noop, sizeof(noop));
|
||||
|
||||
if (newClient) {
|
||||
/*
|
||||
* on solaris we need to verify that the clients
|
||||
* have not gone away (because ICMP does not
|
||||
* get through to send()
|
||||
*
|
||||
* this is done each time that a new client is
|
||||
* created
|
||||
*
|
||||
* this is done here in order to avoid deleting
|
||||
* a client prior to sending its confirm message
|
||||
*/
|
||||
verifyClients();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
144
src/ca/service.c
144
src/ca/service.c
@@ -89,6 +89,8 @@ IIU *piiu,
|
||||
const struct in_addr *pnet_addr
|
||||
);
|
||||
|
||||
LOCAL void verifyChanAndDisconnect(IIU *piiu, enum channel_state state);
|
||||
|
||||
#ifdef CONVERSION_REQUIRED
|
||||
extern CACVRTFUNC *cac_dbr_cvrt[];
|
||||
#endif /*CONVERSION_REQUIRED*/
|
||||
@@ -243,14 +245,14 @@ const struct in_addr *pnet_addr
|
||||
|
||||
switch (piiu->curMsg.m_cmmd) {
|
||||
|
||||
case IOC_NOOP:
|
||||
case CA_PROTO_NOOP:
|
||||
break;
|
||||
|
||||
case IOC_ECHO:
|
||||
case CA_PROTO_ECHO:
|
||||
piiu->echoPending = FALSE;
|
||||
break;
|
||||
|
||||
case IOC_WRITE_NOTIFY:
|
||||
case CA_PROTO_WRITE_NOTIFY:
|
||||
{
|
||||
struct event_handler_args args;
|
||||
|
||||
@@ -297,7 +299,7 @@ const struct in_addr *pnet_addr
|
||||
break;
|
||||
|
||||
}
|
||||
case IOC_READ_NOTIFY:
|
||||
case CA_PROTO_READ_NOTIFY:
|
||||
{
|
||||
struct event_handler_args args;
|
||||
|
||||
@@ -366,7 +368,7 @@ const struct in_addr *pnet_addr
|
||||
|
||||
break;
|
||||
}
|
||||
case IOC_EVENT_ADD:
|
||||
case CA_PROTO_EVENT_ADD:
|
||||
{
|
||||
int v41;
|
||||
struct event_handler_args args;
|
||||
@@ -446,7 +448,7 @@ const struct in_addr *pnet_addr
|
||||
|
||||
break;
|
||||
}
|
||||
case IOC_READ:
|
||||
case CA_PROTO_READ:
|
||||
{
|
||||
evid pIOBlock;
|
||||
|
||||
@@ -505,15 +507,15 @@ const struct in_addr *pnet_addr
|
||||
UNLOCK;
|
||||
break;
|
||||
}
|
||||
case IOC_SEARCH:
|
||||
case CA_PROTO_SEARCH:
|
||||
perform_claim_channel(piiu, pnet_addr);
|
||||
break;
|
||||
|
||||
case IOC_READ_SYNC:
|
||||
case CA_PROTO_READ_SYNC:
|
||||
piiu->read_seq++;
|
||||
break;
|
||||
|
||||
case IOC_RSRV_IS_UP:
|
||||
case CA_PROTO_RSRV_IS_UP:
|
||||
LOCK;
|
||||
{
|
||||
struct in_addr ina;
|
||||
@@ -531,20 +533,20 @@ const struct in_addr *pnet_addr
|
||||
#endif
|
||||
break;
|
||||
|
||||
case IOC_NOT_FOUND:
|
||||
case CA_PROTO_NOT_FOUND:
|
||||
break;
|
||||
|
||||
case IOC_CLEAR_CHANNEL:
|
||||
case CA_PROTO_CLEAR_CHANNEL:
|
||||
clearChannelResources (piiu->curMsg.m_available);
|
||||
break;
|
||||
|
||||
case IOC_ERROR:
|
||||
case CA_PROTO_ERROR:
|
||||
{
|
||||
ELLLIST *pList = NULL;
|
||||
evid monix;
|
||||
char nameBuf[64];
|
||||
char context[255];
|
||||
struct extmsg *req = piiu->pCurData;
|
||||
caHdr *req = piiu->pCurData;
|
||||
int op;
|
||||
struct exception_handler_args args;
|
||||
|
||||
@@ -559,7 +561,7 @@ const struct in_addr *pnet_addr
|
||||
|
||||
caHostFromInetAddr(pnet_addr, nameBuf, sizeof(nameBuf));
|
||||
|
||||
if (piiu->curMsg.m_postsize > sizeof(struct extmsg)){
|
||||
if (piiu->curMsg.m_postsize > sizeof(caHdr)){
|
||||
sprintf(context,
|
||||
"detected by: %s for: %s",
|
||||
nameBuf,
|
||||
@@ -579,14 +581,14 @@ const struct in_addr *pnet_addr
|
||||
args.addr = NULL;
|
||||
LOCK;
|
||||
switch (ntohs(req->m_cmmd)) {
|
||||
case IOC_READ_NOTIFY:
|
||||
case CA_PROTO_READ_NOTIFY:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
pList = &pend_read_list;
|
||||
op = CA_OP_GET;
|
||||
break;
|
||||
case IOC_READ:
|
||||
case CA_PROTO_READ:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
@@ -596,20 +598,20 @@ const struct in_addr *pnet_addr
|
||||
pList = &pend_read_list;
|
||||
op = CA_OP_GET;
|
||||
break;
|
||||
case IOC_WRITE_NOTIFY:
|
||||
case CA_PROTO_WRITE_NOTIFY:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
pList = &pend_write_list;
|
||||
op = CA_OP_PUT;
|
||||
break;
|
||||
case IOC_WRITE:
|
||||
case CA_PROTO_WRITE:
|
||||
op = CA_OP_PUT;
|
||||
break;
|
||||
case IOC_SEARCH:
|
||||
case CA_PROTO_SEARCH:
|
||||
op = CA_OP_SEARCH;
|
||||
break;
|
||||
case IOC_EVENT_ADD:
|
||||
case CA_PROTO_EVENT_ADD:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
@@ -618,7 +620,7 @@ const struct in_addr *pnet_addr
|
||||
pList = &monix->chan->eventq;
|
||||
}
|
||||
break;
|
||||
case IOC_EVENT_CANCEL:
|
||||
case CA_PROTO_EVENT_CANCEL:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
@@ -651,7 +653,7 @@ const struct in_addr *pnet_addr
|
||||
UNLOCKEVENTS;
|
||||
break;
|
||||
}
|
||||
case IOC_ACCESS_RIGHTS:
|
||||
case CA_PROTO_ACCESS_RIGHTS:
|
||||
{
|
||||
int ar;
|
||||
chid chan;
|
||||
@@ -668,8 +670,8 @@ const struct in_addr *pnet_addr
|
||||
}
|
||||
|
||||
ar = ntohl (piiu->curMsg.m_available);
|
||||
chan->ar.read_access = (ar&CA_ACCESS_RIGHT_READ)?1:0;
|
||||
chan->ar.write_access = (ar&CA_ACCESS_RIGHT_WRITE)?1:0;
|
||||
chan->ar.read_access = (ar&CA_PROTO_ACCESS_RIGHT_READ)?1:0;
|
||||
chan->ar.write_access = (ar&CA_PROTO_ACCESS_RIGHT_WRITE)?1:0;
|
||||
|
||||
if (chan->pAccessRightsFunc) {
|
||||
struct access_rights_handler_args args;
|
||||
@@ -680,7 +682,7 @@ const struct in_addr *pnet_addr
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IOC_CLAIM_CIU:
|
||||
case CA_PROTO_CLAIM_CIU:
|
||||
{
|
||||
chid chan;
|
||||
|
||||
@@ -702,31 +704,10 @@ const struct in_addr *pnet_addr
|
||||
reconnect_channel(piiu, chan);
|
||||
break;
|
||||
}
|
||||
case IOC_CLAIM_CIU_FAILED:
|
||||
{
|
||||
chid chan;
|
||||
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(
|
||||
pSlowBucket, &piiu->curMsg.m_cid);
|
||||
UNLOCK;
|
||||
if(!chan){
|
||||
/*
|
||||
* end up here if they delete the channel
|
||||
* prior to this response
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* need to move the channel back to the cast IIU
|
||||
* (so we will be able to reconnect)
|
||||
*/
|
||||
LOCK;
|
||||
cacDisconnectChannel(chan, FALSE);
|
||||
UNLOCK;
|
||||
case CA_PROTO_CLAIM_CIU_FAILED:
|
||||
case CA_PROTO_SERVER_DISCONN:
|
||||
verifyChanAndDisconnect(piiu, cs_conn);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ca_printf("CAC: post_msg(): Corrupt cmd in msg %x\n",
|
||||
piiu->curMsg.m_cmmd);
|
||||
@@ -737,6 +718,33 @@ const struct in_addr *pnet_addr
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* verifyChanAndDisconnect()
|
||||
*/
|
||||
LOCAL void verifyChanAndDisconnect(IIU *piiu, enum channel_state state)
|
||||
{
|
||||
chid chan;
|
||||
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(
|
||||
pSlowBucket, &piiu->curMsg.m_cid);
|
||||
if (!chan) {
|
||||
/*
|
||||
* end up here if they delete the channel
|
||||
* prior to this response
|
||||
*/
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* need to move the channel back to the cast IIU
|
||||
* (so we will be able to reconnect)
|
||||
*/
|
||||
cacDisconnectChannel(chan, chan->state);
|
||||
UNLOCK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -903,7 +911,7 @@ const struct in_addr *pnet_addr
|
||||
v42 = CA_V42(
|
||||
CA_PROTOCOL_VERSION,
|
||||
allocpiiu->minor_version_number);
|
||||
if(!v42){
|
||||
if (!v42) {
|
||||
reconnect_channel(piiu, chan);
|
||||
}
|
||||
}
|
||||
@@ -921,13 +929,19 @@ chid chan
|
||||
enum channel_state prev_cs;
|
||||
int v41;
|
||||
|
||||
prev_cs = chan->state;
|
||||
if (prev_cs == cs_conn) {
|
||||
ca_printf("Ignored connect response to connected channel\n");
|
||||
return;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
|
||||
v41 = CA_V41(
|
||||
CA_PROTOCOL_VERSION,
|
||||
((IIU *)chan->piiu)->minor_version_number);
|
||||
|
||||
/* Update rmt chid fields from extmsg fields */
|
||||
/* Update rmt chid fields from caHdr fields */
|
||||
chan->type = piiu->curMsg.m_type;
|
||||
chan->count = piiu->curMsg.m_count;
|
||||
|
||||
@@ -937,7 +951,6 @@ chid chan
|
||||
* ca_request_event() so their channel
|
||||
* connect tests wont fail
|
||||
*/
|
||||
prev_cs = chan->state;
|
||||
chan->state = cs_conn;
|
||||
|
||||
/*
|
||||
@@ -996,30 +1009,3 @@ chid chan
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* cas_io_done()
|
||||
*
|
||||
*
|
||||
*/
|
||||
void cac_io_done(int lock)
|
||||
{
|
||||
struct pending_io_event *pioe;
|
||||
|
||||
if(ioeventlist.count==0)
|
||||
return;
|
||||
|
||||
if(lock){
|
||||
LOCK;
|
||||
}
|
||||
|
||||
while(pioe = (struct pending_io_event *) ellGet(&ioeventlist)){
|
||||
(*pioe->io_done_sub)(pioe->io_done_arg);
|
||||
free(pioe);
|
||||
}
|
||||
|
||||
if(lock){
|
||||
UNLOCK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.19 1996/06/19 17:59:29 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.18 1995/10/12 01:36:39 jhill
|
||||
* New ca_flush_io() mechanism
|
||||
*
|
||||
* Revision 1.17 1995/09/29 22:13:59 jhill
|
||||
* check for nill dbr pointer
|
||||
*
|
||||
@@ -330,6 +336,42 @@ int epicsShareAPI ca_sg_reset(CA_SYNC_GID gid)
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ca_sg_stat
|
||||
*/
|
||||
int epicsShareAPI ca_sg_stat(CA_SYNC_GID gid)
|
||||
{
|
||||
CASG *pcasg;
|
||||
CASGOP *pcasgop;
|
||||
|
||||
LOCK;
|
||||
pcasg = bucketLookupItemUnsignedId(pSlowBucket, &gid);
|
||||
if(!pcasg || pcasg->magic != CASG_MAGIC){
|
||||
UNLOCK;
|
||||
printf("Bad Sync Group Id\n");
|
||||
return ECA_BADSYNCGRP;
|
||||
}
|
||||
UNLOCK;
|
||||
|
||||
printf("Sync Group: id=%u, magic=%lu, opPend=%lu, seqNo=%lu\n",
|
||||
pcasg->id, pcasg->magic, pcasg->opPendCount,
|
||||
pcasg->seqNo);
|
||||
|
||||
LOCK;
|
||||
pcasgop = (CASGOP *) ellFirst(&ca_static->activeCASGOP);
|
||||
while (pcasgop) {
|
||||
if (pcasg->id == pcasgop->id) {
|
||||
printf(
|
||||
"pending op: id=%u pVal=%x, magic=%lu seqNo=%lu\n",
|
||||
pcasgop->id, (unsigned)pcasgop->pValue, pcasgop->magic,
|
||||
pcasgop->seqNo);
|
||||
}
|
||||
pcasgop = (CASGOP *) ellNext(&pcasgop->node);
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ca_sg_test
|
||||
@@ -354,8 +396,6 @@ int epicsShareAPI ca_sg_test(CA_SYNC_GID gid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ca_sg_array_put()
|
||||
@@ -410,6 +450,7 @@ void *pvalue)
|
||||
|
||||
if(status != ECA_NORMAL){
|
||||
LOCK;
|
||||
assert(pcasg->opPendCount>=1u);
|
||||
pcasg->opPendCount--;
|
||||
ellDelete(&ca_static->activeCASGOP, &pcasgop->node);
|
||||
ellAdd(&ca_static->freeCASGOP, &pcasgop->node);
|
||||
@@ -475,6 +516,7 @@ void *pvalue)
|
||||
|
||||
if(status != ECA_NORMAL){
|
||||
LOCK;
|
||||
assert(pcasg->opPendCount>=1u);
|
||||
pcasg->opPendCount--;
|
||||
ellDelete(&ca_static->activeCASGOP, &pcasgop->node);
|
||||
ellAdd(&ca_static->freeCASGOP, &pcasgop->node);
|
||||
@@ -511,7 +553,7 @@ LOCAL void io_complete(struct event_handler_args args)
|
||||
}
|
||||
|
||||
assert(pcasg->magic == CASG_MAGIC);
|
||||
|
||||
assert(pcasg->id == pcasgop->id);
|
||||
|
||||
if(!(args.status&CA_M_SUCCESS)){
|
||||
ca_printf(
|
||||
@@ -534,9 +576,8 @@ LOCAL void io_complete(struct event_handler_args args)
|
||||
/*
|
||||
* decrement the outstanding IO ops count
|
||||
*/
|
||||
if(pcasg->opPendCount!=0){
|
||||
pcasg->opPendCount--;
|
||||
}
|
||||
assert(pcasg->opPendCount>=1u);
|
||||
pcasg->opPendCount--;
|
||||
|
||||
UNLOCK;
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
* cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.19 1995/12/19 19:35:24 jhill
|
||||
* -cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
* Revision 1.18 1995/10/12 01:35:30 jhill
|
||||
* Moved cac_mux_io() to iocinf.c
|
||||
*
|
||||
@@ -64,10 +67,9 @@
|
||||
*/
|
||||
void cac_gettimeval(struct timeval *pt)
|
||||
{
|
||||
struct timezone tz;
|
||||
int status;
|
||||
|
||||
status = gettimeofday(pt, &tz);
|
||||
status = gettimeofday(pt, (struct timezone *) NULL);
|
||||
assert(status==0);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,15 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.23 1996/08/05 19:18:56 jhill
|
||||
* better msg for lack of fp
|
||||
*
|
||||
* Revision 1.22 1996/06/19 17:59:31 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.21 1995/10/18 16:44:36 jhill
|
||||
* select time out must be greater than a vxWorks tick
|
||||
*
|
||||
* Revision 1.20 1995/10/12 01:35:31 jhill
|
||||
* Moved cac_mux_io() to iocinf.c
|
||||
*
|
||||
@@ -48,6 +57,17 @@ LOCAL void ca_extra_event_labor(void *pArg);
|
||||
LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid);
|
||||
LOCAL int cac_add_task_variable (struct ca_static *ca_temp);
|
||||
LOCAL void deleteCallBack(CALLBACK *pcb);
|
||||
LOCAL void ca_check_for_fp();
|
||||
|
||||
/*
|
||||
* order of ops is important here
|
||||
*
|
||||
* NOTE: large OS dependent SYFREQ might cause an overflow
|
||||
* NOTE: POLLDELAY must be less than TICKSPERSEC
|
||||
*/
|
||||
#define POLLDELAY 50 /* milli sec */
|
||||
#define TICKSPERSEC 1000 /* milli sec per sec */
|
||||
#define LOCALTICKS ((sysClkRateGet()*POLLDELAY)/TICKSPERSEC)
|
||||
|
||||
|
||||
|
||||
@@ -100,8 +120,8 @@ void cac_gettimeval(struct timeval *pt)
|
||||
void cac_block_for_io_completion(struct timeval *pTV)
|
||||
{
|
||||
struct timeval itimeout;
|
||||
unsigned long ticks;
|
||||
unsigned long rate = sysClkRateGet();
|
||||
int ticks;
|
||||
int rate = sysClkRateGet();
|
||||
|
||||
#ifdef NOASYNCRECV
|
||||
cac_mux_io(pTV);
|
||||
@@ -114,7 +134,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
|
||||
itimeout.tv_sec = 0;
|
||||
cac_mux_io(&itimeout);
|
||||
|
||||
ticks = pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC;
|
||||
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
|
||||
ticks = min(LOCALTICKS, ticks);
|
||||
|
||||
semTake(io_done_sem, ticks);
|
||||
@@ -168,8 +188,8 @@ void os_specific_sg_io_complete(CASG *pcasg)
|
||||
void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
|
||||
{
|
||||
struct timeval itimeout;
|
||||
unsigned long ticks;
|
||||
unsigned long rate = sysClkRateGet();
|
||||
int ticks;
|
||||
int rate = sysClkRateGet();
|
||||
|
||||
#ifdef NOASYNCRECV
|
||||
cac_mux_io(pTV);
|
||||
@@ -182,7 +202,7 @@ void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
|
||||
itimeout.tv_sec = 0;
|
||||
cac_mux_io(&itimeout);
|
||||
|
||||
ticks = pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC;
|
||||
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
|
||||
ticks = min(LOCALTICKS, ticks);
|
||||
|
||||
semTake (pcasg->sem, ticks);
|
||||
@@ -206,10 +226,7 @@ LOCAL int cac_add_task_variable (struct ca_static *ca_temp)
|
||||
TVIU *ptviu;
|
||||
int status;
|
||||
|
||||
status = ca_check_for_fp();
|
||||
if(status != ECA_NORMAL){
|
||||
return status;
|
||||
}
|
||||
ca_check_for_fp();
|
||||
|
||||
# ifdef DEBUG
|
||||
ca_printf("CAC: adding task variable\n");
|
||||
@@ -339,7 +356,6 @@ int cac_os_depen_init(struct ca_static *pcas)
|
||||
ellInit(&pcas->ca_putNotifyQue);
|
||||
|
||||
pcas->ca_tid = taskIdSelf();
|
||||
pcas->ca_local_ticks = LOCALTICKS;
|
||||
pcas->ca_client_lock = semMCreate(SEM_DELETE_SAFE);
|
||||
assert(pcas->ca_client_lock);
|
||||
pcas->ca_event_lock = semMCreate(SEM_DELETE_SAFE);
|
||||
@@ -617,10 +633,7 @@ int ca_import(int tid)
|
||||
struct ca_static *pcas;
|
||||
TVIU *ptviu;
|
||||
|
||||
status = ca_check_for_fp();
|
||||
if(status != ECA_NORMAL){
|
||||
return status;
|
||||
}
|
||||
ca_check_for_fp();
|
||||
|
||||
/*
|
||||
* just return success if they have already done
|
||||
@@ -668,27 +681,51 @@ int ca_import(int tid)
|
||||
*/
|
||||
int ca_import_cancel(int tid)
|
||||
{
|
||||
int status;
|
||||
TVIU *ptviu;
|
||||
int status;
|
||||
TVIU *ptviu;
|
||||
struct ca_static *pcas;
|
||||
|
||||
if (tid == taskIdSelf()) {
|
||||
pcas = NULL;
|
||||
}
|
||||
else {
|
||||
pcas = ca_static;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attempt to attach to the specified context
|
||||
*/
|
||||
ca_static = (struct ca_static *)
|
||||
taskVarGet(tid, (int *)&ca_static);
|
||||
if (ca_static == (struct ca_static *) ERROR){
|
||||
ca_static = pcas;
|
||||
return ECA_NOCACTX;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
ptviu = (TVIU *) ca_static->ca_taskVarList.node.next;
|
||||
while(ptviu){
|
||||
ptviu = (TVIU *) ellFirst(&ca_static->ca_taskVarList);
|
||||
while (ptviu) {
|
||||
if(ptviu->tid == tid){
|
||||
break;
|
||||
}
|
||||
ptviu = (TVIU *) ellNext(&ptviu->node);
|
||||
}
|
||||
|
||||
if(!ptviu){
|
||||
ca_static = pcas;
|
||||
UNLOCK;
|
||||
return ECA_NOCACTX;
|
||||
}
|
||||
|
||||
ellDelete(&ca_static->ca_taskVarList, &ptviu->node);
|
||||
free(ptviu);
|
||||
UNLOCK;
|
||||
|
||||
status = taskVarDelete(tid, (void *)&ca_static);
|
||||
assert (status == OK);
|
||||
|
||||
ca_static = pcas;
|
||||
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
@@ -696,15 +733,14 @@ int ca_import_cancel(int tid)
|
||||
/*
|
||||
* ca_check_for_fp()
|
||||
*/
|
||||
int ca_check_for_fp()
|
||||
LOCAL void ca_check_for_fp()
|
||||
{
|
||||
int options;
|
||||
|
||||
assert(taskOptionsGet(taskIdSelf(), &options) == OK);
|
||||
if (!(options & VX_FP_TASK)) {
|
||||
return ECA_NEEDSFP;
|
||||
ca_signal(ECA_NEEDSFP, taskName(taskIdSelf()));
|
||||
}
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,8 +32,14 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.20 1995/12/19 19:36:20 jhill
|
||||
* function prototype changes
|
||||
*
|
||||
* Revision 1.19 1995/11/29 19:15:42 jhill
|
||||
* added $Log$ to the header
|
||||
* added $Log$
|
||||
* Revision 1.20 1995/12/19 19:36:20 jhill
|
||||
* function prototype changes
|
||||
* to the header
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -466,7 +472,7 @@ BOOL epicsShareAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
SetConsoleTitle("Channel Access Status");
|
||||
freopen( "CONOUT$", "a", stderr );
|
||||
}
|
||||
fprintf(stderr, "Process attached to ca.dll R3.12.1\n");
|
||||
fprintf(stderr, "Process attached to ca.dll\n");
|
||||
#endif /* init. winsock */
|
||||
if ((status = WSAStartup(MAKEWORD(1,1), &WsaData)) != 0) {
|
||||
fprintf(stderr,"Cant init winsock \n");
|
||||
@@ -497,13 +503,13 @@ BOOL epicsShareAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
#if _DEBUG
|
||||
fprintf(stderr, "Thread attached to ca.dll R3.12.1\n");
|
||||
fprintf(stderr, "Thread attached to ca.dll\n");
|
||||
#endif
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
#if _DEBUG
|
||||
fprintf(stderr, "Thread detached from ca.dll R3.12.1\n");
|
||||
fprintf(stderr, "Thread detached from ca.dll\n");
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
26
src/cas/.ftp
Normal file
26
src/cas/.ftp
Normal file
@@ -0,0 +1,26 @@
|
||||
open aota1
|
||||
user jeffhill
|
||||
prompt
|
||||
macdef archcd
|
||||
lcd O.sun4
|
||||
|
||||
mkdir [.cas]
|
||||
cd [.cas]
|
||||
lcd ~/epics/base/src/cas
|
||||
mput *.c
|
||||
mput *.h
|
||||
lcd os/vms
|
||||
mput *.c
|
||||
mput *.h
|
||||
put BUILD_VMS.COM
|
||||
lcd ../../../libCom
|
||||
mput *.c
|
||||
mput *.h
|
||||
$archcd
|
||||
mput *.c
|
||||
lcd ../../ca
|
||||
mput *.h
|
||||
mput *.c
|
||||
lcd ../../include
|
||||
mput *.h
|
||||
|
||||
11
src/cas/.ftp2
Normal file
11
src/cas/.ftp2
Normal file
@@ -0,0 +1,11 @@
|
||||
open aota1
|
||||
user jeffhill
|
||||
mkdir [.cas]
|
||||
cd [.cas]
|
||||
prompt
|
||||
lcd ~/epics/base/src/cas
|
||||
lcd os/vms
|
||||
put BUILD_VMS.COM
|
||||
lcd ../../../libCom
|
||||
lcd ../ca
|
||||
lcd ../../include
|
||||
10
src/cas/Makefile
Normal file
10
src/cas/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
DIRS = generic build example
|
||||
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
|
||||
29
src/cas/README
Normal file
29
src/cas/README
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
$Id$
|
||||
|
||||
README file for the EPICS Channel Access Server
|
||||
|
||||
Author Jeff Hill johill@lanl.gov
|
||||
|
||||
$Log$
|
||||
|
||||
Directory Structure
|
||||
-------------------
|
||||
o example - example server tool
|
||||
o generic - generic server lib source code
|
||||
o os - os dependnet server lib source code
|
||||
o io - io dependnet server lib source code
|
||||
o build - server lib object code
|
||||
|
||||
Internal Source Code Naming Conventions
|
||||
---------------------------------------
|
||||
o API class X will almost always have associated internal (usually
|
||||
private base) class named XI
|
||||
o for class X there will be
|
||||
o X.h - the class declaration (and simple inlines)
|
||||
o XIL.h - complex inline functions (that will not
|
||||
compile with until the compiler has seen
|
||||
the declarations of other classes)
|
||||
o X.cc - all other source code for the class
|
||||
|
||||
|
||||
10
src/cas/build/Makefile
Normal file
10
src/cas/build/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
TOP=../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
DIRS = singleThread
|
||||
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
|
||||
78
src/cas/build/multiThread/Makefile.Unix
Normal file
78
src/cas/build/multiThread/Makefile.Unix
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
TOP = ../../..
|
||||
CAS = ../../..
|
||||
SRC = $(CAS)/generic
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/posix
|
||||
VPATH = $(SRC) $(IOSRC) $(OSSRC)
|
||||
|
||||
include Target.include
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_INCLUDES = -I$(CAS)/../ca -I$(OSSRC) -I$(IOSRC) -I$(CAS)/gdd
|
||||
USR_LDLIBS = -lcas -lm
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
#CPLUSPLUS = G++
|
||||
|
||||
SRCS.cc += $(SRC)/caServer.cc
|
||||
SRCS.cc += $(SRC)/casClient.cc
|
||||
SRCS.cc += $(SRC)/casDGClient.cc
|
||||
SRCS.cc += $(SRC)/casStreamClient.cc
|
||||
SRCS.cc += $(SRC)/casPV.cc
|
||||
SRCS.cc += $(SRC)/casPVI.cc
|
||||
SRCS.cc += $(SRC)/casChannel.cc
|
||||
SRCS.cc += $(SRC)/casChannelI.cc
|
||||
SRCS.cc += $(SRC)/casClientMon.cc
|
||||
SRCS.cc += $(SRC)/casMsgIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIOI.cc
|
||||
SRCS.cc += $(SRC)/casEventSys.cc
|
||||
SRCS.cc += $(SRC)/outBuf.cc
|
||||
SRCS.cc += $(SRC)/inBuf.cc
|
||||
SRCS.cc += $(SRC)/casMapDBR.cc
|
||||
|
||||
SRCS.cc += $(OSSRC)/casDGOS.cc
|
||||
SRCS.cc += $(OSSRC)/casServerOS.cc
|
||||
SRCS.cc += $(OSSRC)/casStreamOS.cc
|
||||
|
||||
SRCS.cc += $(IOSRC)/casDGIO.cc
|
||||
SRCS.cc += $(IOSRC)/casStreamIO.cc
|
||||
SRCS.cc += $(IOSRC)/caServerIO.cc
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStreamClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casMapDBR.o
|
||||
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casServerOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += caServerIO.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
8
src/cas/build/singleThread/Makefile
Normal file
8
src/cas/build/singleThread/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
TOP= ../../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
88
src/cas/build/singleThread/Makefile.Unix
Normal file
88
src/cas/build/singleThread/Makefile.Unix
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
CAS = ../../..
|
||||
TOP = $(CAS)/../..
|
||||
SRC = $(CAS)/generic
|
||||
CA = $(CAS)/../ca
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/posix
|
||||
VPATH = $(SRC) $(IOSRC) $(OSSRC)
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES = -I$(SRC) -I$(OSSRC) -I$(IOSRC) -I$(CA)
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
SRCS.cc += $(SRC)/caServer.cc
|
||||
SRCS.cc += $(SRC)/caServerI.cc
|
||||
SRCS.cc += $(SRC)/casCoreClient.cc
|
||||
SRCS.cc += $(SRC)/casClient.cc
|
||||
SRCS.cc += $(SRC)/casDGClient.cc
|
||||
SRCS.cc += $(SRC)/casStrmClient.cc
|
||||
SRCS.cc += $(SRC)/casPV.cc
|
||||
SRCS.cc += $(SRC)/casPVI.cc
|
||||
SRCS.cc += $(SRC)/casChannel.cc
|
||||
SRCS.cc += $(SRC)/casChannelI.cc
|
||||
SRCS.cc += $(SRC)/casClientMon.cc
|
||||
SRCS.cc += $(SRC)/casChanDelEv.cc
|
||||
SRCS.cc += $(SRC)/casMsgIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIOI.cc
|
||||
SRCS.cc += $(SRC)/casEventSys.cc
|
||||
SRCS.cc += $(SRC)/casMonitor.cc
|
||||
SRCS.cc += $(SRC)/casMonEvent.cc
|
||||
SRCS.cc += $(SRC)/outBuf.cc
|
||||
SRCS.cc += $(SRC)/inBuf.cc
|
||||
SRCS.cc += $(SRC)/casEventMask.cc
|
||||
|
||||
SRCS.cc += $(OSSRC)/caServerOS.cc
|
||||
SRCS.cc += $(OSSRC)/casDGOS.cc
|
||||
SRCS.cc += $(OSSRC)/casStreamOS.cc
|
||||
|
||||
SRCS.cc += $(IOSRC)/caServerIO.cc
|
||||
SRCS.cc += $(IOSRC)/casDGIO.cc
|
||||
SRCS.cc += $(IOSRC)/casStreamIO.cc
|
||||
SRCS.c += $(IOSRC)/sigPipeIgnore.c
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += caServerI.o
|
||||
LIBOBJS += casCoreClient.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStrmClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casChanDelEv.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += casMonitor.o
|
||||
LIBOBJS += casMonEvent.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casEventMask.o
|
||||
|
||||
LIBOBJS += caServerOS.o
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += caServerIO.o
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += sigPipeIgnore.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
7
src/cas/example/Makefile
Normal file
7
src/cas/example/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
TOP=../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
84
src/cas/example/Makefile.Unix
Normal file
84
src/cas/example/Makefile.Unix
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
CAS = ../../
|
||||
TOP = $(CAS)/../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES =
|
||||
USR_LDLIBS = -lcas -lca -lCom -lgdd
|
||||
|
||||
USR_LDFLAGS =
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBSWOCAS = $(DEPLIBS_BASE)/libca.a $(DEPLIBS_BASE)/libCom.a \
|
||||
$(DEPLIBS_BASE)/libgdd.a
|
||||
DEPLIBS = $(DEPLIBS_BASE)/libcas.a $(DEPLIBSWOCAS)
|
||||
|
||||
SRCS.cc += ../exServer.cc
|
||||
SRCS.cc += ../exPV.cc
|
||||
SRCS.cc += ../exSyncPV.cc
|
||||
SRCS.cc += ../exAsyncPV.cc
|
||||
SRCS.cc += ../exChannel.cc
|
||||
|
||||
OBJS += exServer.o
|
||||
OBJS += exPV.o
|
||||
OBJS += exSyncPV.o
|
||||
OBJS += exAsyncPV.o
|
||||
OBJS += exChannel.o
|
||||
|
||||
PROD += excas
|
||||
|
||||
BUILDDIR = $(CAS)/build/singleThread/O.sun4/
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServer.o
|
||||
GLOMBOBJ += $(BUILDDIR)caServerI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casCoreClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStrmClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPV.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPVI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannel.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannelI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClientMon.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChanDelEv.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMsgIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventSys.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonitor.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonEvent.o
|
||||
GLOMBOBJ += $(BUILDDIR)outBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)inBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventMask.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamOS.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)sigPipeIgnore.o
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
excas: $(OBJS) $(DEPLIBS)
|
||||
$(LINK.cc) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
#
|
||||
# fast link (without library build)
|
||||
#
|
||||
#PURIFY = /remote/lear_local/pure/purify-3.0a-sunos4/purify
|
||||
nolib: $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
$(PURIFY) $(LINK.cc) -o $@ $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
|
||||
clean::
|
||||
@$(RM) excas
|
||||
@$(RM) nolib
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
|
||||
|
||||
81
src/cas/example/exAsyncPV.cc
Normal file
81
src/cas/example/exAsyncPV.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
#include <exServer.h>
|
||||
|
||||
//
|
||||
// exAsyncPV::maxSimultAsyncOps()
|
||||
// (virtual replacement for the default)
|
||||
//
|
||||
unsigned exAsyncPV::maxSimultAsyncOps () const
|
||||
{
|
||||
return 500u;
|
||||
}
|
||||
|
||||
//
|
||||
// exAsyncPV::read()
|
||||
// (virtual replacement for the default)
|
||||
//
|
||||
caStatus exAsyncPV::read (const casCtx &ctx, gdd &valueIn)
|
||||
{
|
||||
exAsyncIO *pIO;
|
||||
|
||||
pIO = new exAsyncReadIO(ctx, *this, valueIn);
|
||||
if (!pIO) {
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
|
||||
return S_casApp_asyncCompletion;
|
||||
}
|
||||
|
||||
//
|
||||
// exAsyncPV::write()
|
||||
// (virtual replacement for the default)
|
||||
//
|
||||
caStatus exAsyncPV::write (const casCtx &ctx, gdd &valueIn)
|
||||
{
|
||||
exAsyncIO *pIO;
|
||||
|
||||
pIO = new exAsyncWriteIO(ctx, *this, valueIn);
|
||||
if (!pIO) {
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
|
||||
return S_casApp_asyncCompletion;
|
||||
}
|
||||
|
||||
//
|
||||
// exAsyncWriteIO::expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
//
|
||||
void exAsyncWriteIO::expire()
|
||||
{
|
||||
caStatus status;
|
||||
status = this->pv.update(*this->getValuePtr());
|
||||
this->clrValue();
|
||||
this->postIOCompletion (status);
|
||||
}
|
||||
|
||||
//
|
||||
// exAsyncReadIO::expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
//
|
||||
void exAsyncReadIO::expire()
|
||||
{
|
||||
caStatus status;
|
||||
gdd *pValue = this->getValuePtr();
|
||||
|
||||
//
|
||||
// map between the prototype in and the
|
||||
// current value
|
||||
//
|
||||
status = exServer::read(this->pv, *pValue);
|
||||
|
||||
//
|
||||
// post IO completion
|
||||
//
|
||||
this->postIOCompletion(status);
|
||||
}
|
||||
|
||||
7
src/cas/example/exChannel.cc
Normal file
7
src/cas/example/exChannel.cc
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
#include <exServer.h>
|
||||
|
||||
377
src/cas/example/exPV.cc
Normal file
377
src/cas/example/exPV.cc
Normal file
@@ -0,0 +1,377 @@
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
#include <exServer.h>
|
||||
#include <gddApps.h>
|
||||
|
||||
const double myPI = 3.14159265358979323846;
|
||||
|
||||
osiTime exPV::currentTime;
|
||||
|
||||
//
|
||||
// exPV::exPV()
|
||||
//
|
||||
exPV::exPV (const casCtx &ctxIn, const pvInfo &setup) :
|
||||
pValue(NULL),
|
||||
pScanTimer(NULL),
|
||||
info(setup),
|
||||
casPV(ctxIn, setup.getName().string()),
|
||||
interest(aitFalse)
|
||||
{
|
||||
//
|
||||
// load initial value
|
||||
//
|
||||
this->scanPV();
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::~exPV()
|
||||
//
|
||||
exPV::~exPV()
|
||||
{
|
||||
if (this->pScanTimer) {
|
||||
delete this->pScanTimer;
|
||||
this->pScanTimer = NULL;
|
||||
}
|
||||
if (this->pValue) {
|
||||
this->pValue->unreference();
|
||||
this->pValue = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::scanPV();
|
||||
//
|
||||
void exPV::scanPV()
|
||||
{
|
||||
caStatus status;
|
||||
double radians;
|
||||
gdd *pDD;
|
||||
float newValue;
|
||||
float limit;
|
||||
caServer *pCAS = this->getCAS();
|
||||
|
||||
if (!pCAS) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// update current time (so we are not required to do
|
||||
// this every time that we write the PV which impacts
|
||||
// throughput under sunos4 because gettimeofday() is
|
||||
// slow)
|
||||
//
|
||||
this->currentTime = osiTime::getCurrent();
|
||||
|
||||
pDD = new gddScalar (gddAppType_value, aitEnumFloat32);
|
||||
if (!pDD) {
|
||||
return;
|
||||
}
|
||||
|
||||
radians = (rand () * 2.0 * myPI)/RAND_MAX;
|
||||
if (this->pValue) {
|
||||
this->pValue->getConvert(newValue);
|
||||
}
|
||||
else {
|
||||
newValue = 0.0f;
|
||||
}
|
||||
newValue += (float) (sin (radians) / 10.0);
|
||||
limit = (float) this->info.getHopr();
|
||||
newValue = min (newValue, limit);
|
||||
limit = (float) this->info.getLopr();
|
||||
newValue = max (newValue, limit);
|
||||
*pDD = newValue;
|
||||
pDD->setStat (epicsAlarmNone);
|
||||
pDD->setSevr (epicsSevNone);
|
||||
status = this->update (*pDD);
|
||||
if (status) {
|
||||
errMessage (status, "scan update failed\n");
|
||||
}
|
||||
|
||||
pDD->unreference();
|
||||
}
|
||||
|
||||
//
|
||||
// exScanTimer::expire ()
|
||||
//
|
||||
void exScanTimer::expire ()
|
||||
{
|
||||
pv.scanPV();
|
||||
}
|
||||
|
||||
//
|
||||
// exScanTimer::again()
|
||||
//
|
||||
osiBool exScanTimer::again()
|
||||
{
|
||||
return osiTrue;
|
||||
}
|
||||
|
||||
//
|
||||
// exScanTimer::delay()
|
||||
//
|
||||
const osiTime exScanTimer::delay()
|
||||
{
|
||||
return pv.getScanRate();
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::update ()
|
||||
//
|
||||
caStatus exPV::update(gdd &valueIn)
|
||||
{
|
||||
gdd *pNewValue;
|
||||
caServer *pCAS = this->getCAS();
|
||||
//
|
||||
// gettimeofday() is very slow under sunos4
|
||||
//
|
||||
osiTime cur (this->currentTime);
|
||||
struct timespec t;
|
||||
gddStatus gdds;
|
||||
|
||||
|
||||
if (!pCAS) {
|
||||
return S_casApp_noSupport;
|
||||
}
|
||||
|
||||
# if DEBUG
|
||||
printf("%s = %f\n",
|
||||
this->info.getName().string, valueIn);
|
||||
# endif
|
||||
|
||||
if (valueIn.isScalar()) {
|
||||
pNewValue = &valueIn;
|
||||
pNewValue->reference();
|
||||
}
|
||||
else {
|
||||
//
|
||||
// this does not modify the current value
|
||||
// (because it may be referenced in the event queue)
|
||||
//
|
||||
pNewValue = new gddScalar (gddAppType_value, aitEnumFloat32);
|
||||
if (!pNewValue) {
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
|
||||
gdds = gddApplicationTypeTable::
|
||||
app_table.smartCopy(pNewValue, &valueIn);
|
||||
if (gdds) {
|
||||
pNewValue->unreference();
|
||||
return S_cas_noConvert;
|
||||
}
|
||||
|
||||
pNewValue->setStat (epicsAlarmNone);
|
||||
pNewValue->setSevr (epicsSevNone);
|
||||
}
|
||||
|
||||
cur.get (t.tv_sec, t.tv_nsec);
|
||||
pNewValue->setTimeStamp(&t);
|
||||
|
||||
//
|
||||
// release old value and replace it
|
||||
// with the new one
|
||||
//
|
||||
if (this->pValue) {
|
||||
this->pValue->unreference();
|
||||
}
|
||||
this->pValue = pNewValue;
|
||||
|
||||
if (this->interest==aitTrue) {
|
||||
casEventMask select(pCAS->valueEventMask|pCAS->logEventMask);
|
||||
this->postEvent (select, *this->pValue);
|
||||
}
|
||||
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// exPV::bestExternalType()
|
||||
//
|
||||
aitEnum exPV::bestExternalType()
|
||||
{
|
||||
return aitEnumFloat32;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::interestRegister()
|
||||
//
|
||||
caStatus exPV::interestRegister()
|
||||
{
|
||||
caServer *pCAS = this->getCAS();
|
||||
|
||||
if (!pCAS) {
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
if (!this->pScanTimer) {
|
||||
this->pScanTimer = new exScanTimer
|
||||
(this->info.getScanRate(), *this);
|
||||
if (!this->pScanTimer) {
|
||||
errPrintf (S_cas_noMemory, __FILE__, __LINE__,
|
||||
"Scan init for %s failed\n",
|
||||
this->info.getName().string());
|
||||
return S_cas_noMemory;
|
||||
}
|
||||
}
|
||||
|
||||
this->interest = aitTrue;
|
||||
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::interestDelete()
|
||||
//
|
||||
void exPV::interestDelete()
|
||||
{
|
||||
if (this->pScanTimer) {
|
||||
delete this->pScanTimer;
|
||||
this->pScanTimer = NULL;
|
||||
}
|
||||
this->interest = aitFalse;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::show()
|
||||
//
|
||||
void exPV::show(unsigned level)
|
||||
{
|
||||
if (level>1u) {
|
||||
if (this->pValue) {
|
||||
printf("exPV: cond=%d\n", this->pValue->getStat());
|
||||
printf("exPV: sevr=%d\n", this->pValue->getSevr());
|
||||
printf("exPV: value=%f\n", (double) *this->pValue);
|
||||
}
|
||||
printf("exPV: interest=%d\n", this->interest);
|
||||
printf("exPV: pScanTimer=%x\n", (unsigned) this->pScanTimer);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getStatus()
|
||||
//
|
||||
caStatus exPV::getStatus(gdd &value)
|
||||
{
|
||||
if (this->pValue) {
|
||||
value.put(this->pValue->getStat());
|
||||
}
|
||||
else {
|
||||
value.put((aitUint16)epicsAlarmUDF);
|
||||
}
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getSeverity()
|
||||
//
|
||||
caStatus exPV::getSeverity(gdd &value)
|
||||
{
|
||||
if (this->pValue) {
|
||||
value.put(this->pValue->getSevr());
|
||||
}
|
||||
else {
|
||||
value.put((aitUint16)epicsSevInvalid);
|
||||
}
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getTS()
|
||||
//
|
||||
inline aitTimeStamp exPV::getTS()
|
||||
{
|
||||
aitTimeStamp ts;
|
||||
if (this->pValue) {
|
||||
this->pValue->getTimeStamp(&ts);
|
||||
}
|
||||
else {
|
||||
osiTime cur(osiTime::getCurrent());
|
||||
cur.get(ts.tv_sec, ts.tv_nsec);
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getSeconds()
|
||||
//
|
||||
caStatus exPV::getSeconds(gdd &value)
|
||||
{
|
||||
aitUint32 sec (this->getTS().tv_sec);
|
||||
value.put(sec);
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getNanoseconds()
|
||||
//
|
||||
caStatus exPV::getNanoseconds(gdd &value)
|
||||
{
|
||||
aitUint32 nsec (this->getTS().tv_nsec);
|
||||
value.put(nsec);
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getPrecision()
|
||||
//
|
||||
caStatus exPV::getPrecision(gdd &prec)
|
||||
{
|
||||
prec.put(4u);
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getHighLimit()
|
||||
//
|
||||
caStatus exPV::getHighLimit(gdd &value)
|
||||
{
|
||||
value.put(info.getHopr());
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getLowLimit()
|
||||
//
|
||||
caStatus exPV::getLowLimit(gdd &value)
|
||||
{
|
||||
value.put(info.getLopr());
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getUnits()
|
||||
//
|
||||
caStatus exPV::getUnits(gdd &units)
|
||||
{
|
||||
static aitString str("@#$%");
|
||||
units.put(str);
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// exPV::getValue()
|
||||
//
|
||||
caStatus exPV::getValue(gdd &value)
|
||||
{
|
||||
caStatus status;
|
||||
|
||||
if (this->pValue) {
|
||||
gddStatus gdds;
|
||||
|
||||
gdds = gddApplicationTypeTable::
|
||||
app_table.smartCopy(&value, this->pValue);
|
||||
if (gdds) {
|
||||
status = S_cas_noConvert;
|
||||
}
|
||||
else {
|
||||
status = S_cas_success;
|
||||
}
|
||||
}
|
||||
else {
|
||||
status = S_casApp_undefined;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
214
src/cas/example/exServer.cc
Normal file
214
src/cas/example/exServer.cc
Normal file
@@ -0,0 +1,214 @@
|
||||
//
|
||||
// fileDescriptorManager.process(delay);
|
||||
// (the name of the global symbol has leaked in here)
|
||||
//
|
||||
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
|
||||
#include <exServer.h>
|
||||
#include <fdManager.h>
|
||||
|
||||
const pvInfo exServer::pvList[] = {
|
||||
pvInfo (1.0e-1, "jane", 10.0f, 0.0f, excasIoSync),
|
||||
pvInfo (2.0, "fred", 10.0f, -10.0f, excasIoSync),
|
||||
pvInfo (1.0e-1, "janet", 10.0f, 0.0f, excasIoAsync),
|
||||
pvInfo (2.0, "freddy", 10.0f, -10.0f, excasIoAsync)
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// static data for exServer
|
||||
//
|
||||
gddAppFuncTable<exPV> exServer::ft;
|
||||
|
||||
//
|
||||
// main()
|
||||
//
|
||||
int main (int argc, const char **argv)
|
||||
{
|
||||
osiTime begin(osiTime::getCurrent());
|
||||
exServer *pCAS;
|
||||
unsigned debugLevel = 0u;
|
||||
float executionTime;
|
||||
aitBool forever = aitTrue;
|
||||
int i;
|
||||
|
||||
pCAS = new exServer(32u,5u,500u);
|
||||
if (!pCAS) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
for (i=1; i<argc; i++) {
|
||||
if (sscanf(argv[i], "-d %u", &debugLevel)==1) {
|
||||
continue;
|
||||
}
|
||||
if (sscanf(argv[i],"-t %f", &executionTime)==1) {
|
||||
forever = aitFalse;
|
||||
continue;
|
||||
}
|
||||
printf ("usage: %s -d<debug level> -t<execution time>\n",
|
||||
argv[0]);
|
||||
return (1);
|
||||
}
|
||||
|
||||
pCAS->setDebugLevel(debugLevel);
|
||||
|
||||
if (forever) {
|
||||
osiTime delay(1000u,0u);
|
||||
//
|
||||
// loop here forever
|
||||
//
|
||||
while (aitTrue) {
|
||||
fileDescriptorManager.process(delay);
|
||||
}
|
||||
}
|
||||
else {
|
||||
osiTime total(executionTime);
|
||||
osiTime delay(osiTime::getCurrent() - begin);
|
||||
//
|
||||
// loop here untime the specified execution time
|
||||
// expires
|
||||
//
|
||||
while (delay < total) {
|
||||
fileDescriptorManager.process(delay);
|
||||
delay = osiTime::getCurrent() - begin;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
//
|
||||
// exServer::exServer()
|
||||
//
|
||||
exServer::exServer(unsigned pvMaxNameLength, unsigned pvCountEstimate,
|
||||
unsigned maxSimultaneousIO) :
|
||||
caServer(pvMaxNameLength, pvCountEstimate, maxSimultaneousIO)
|
||||
{
|
||||
ft.installReadFunc("status",exPV::getStatus);
|
||||
ft.installReadFunc("severity",exPV::getSeverity);
|
||||
ft.installReadFunc("seconds",exPV::getSeconds);
|
||||
ft.installReadFunc("nanoseconds",exPV::getNanoseconds);
|
||||
ft.installReadFunc("precision",exPV::getPrecision);
|
||||
ft.installReadFunc("graphicHigh",exPV::getHighLimit);
|
||||
ft.installReadFunc("graphicLow",exPV::getLowLimit);
|
||||
ft.installReadFunc("controlHigh",exPV::getHighLimit);
|
||||
ft.installReadFunc("controlLow",exPV::getLowLimit);
|
||||
ft.installReadFunc("alarmHigh",exPV::getHighLimit);
|
||||
ft.installReadFunc("alarmLow",exPV::getLowLimit);
|
||||
ft.installReadFunc("alarmHighWarning",exPV::getHighLimit);
|
||||
ft.installReadFunc("alarmLowWarning",exPV::getLowLimit);
|
||||
ft.installReadFunc("units",exPV::getUnits);
|
||||
ft.installReadFunc("value",exPV::getValue);
|
||||
}
|
||||
|
||||
//
|
||||
// exServer::pvExistTest()
|
||||
//
|
||||
caStatus exServer::pvExistTest(const casCtx &ctxIn, const char *pPVName,
|
||||
gdd &canonicalPVName)
|
||||
{
|
||||
const pvInfo *pPVI;
|
||||
|
||||
pPVI = exServer::findPV(pPVName);
|
||||
if (pPVI) {
|
||||
if (pPVI->getIOType()==excasIoAsync) {
|
||||
exAsyncExistIO *pIO;
|
||||
pIO = new exAsyncExistIO(pPVI, ctxIn, canonicalPVName);
|
||||
if (pIO) {
|
||||
return S_casApp_asyncCompletion;
|
||||
}
|
||||
else {
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// there are no name aliases in this
|
||||
// server's PV name syntax
|
||||
//
|
||||
canonicalPVName.put (pPVI->getName());
|
||||
return S_casApp_success;
|
||||
}
|
||||
|
||||
return S_casApp_pvNotFound;
|
||||
}
|
||||
|
||||
//
|
||||
// findPV()
|
||||
//
|
||||
const pvInfo *exServer::findPV(const char *pName)
|
||||
{
|
||||
const pvInfo *pPVI;
|
||||
const pvInfo *pPVAfter =
|
||||
&exServer::pvList[NELEMENTS(exServer::pvList)];
|
||||
|
||||
for (pPVI = exServer::pvList; pPVI < pPVAfter; pPVI++) {
|
||||
if (strcmp (pName, pPVI->getName().string()) == '\0') {
|
||||
return pPVI;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// exServer::createPV()
|
||||
//
|
||||
casPV *exServer::createPV (const casCtx &ctxIn, const char *pPVName)
|
||||
{
|
||||
const pvInfo *pInfo;
|
||||
|
||||
pInfo = exServer::findPV(pPVName);
|
||||
if (!pInfo) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (pInfo->getIOType()){
|
||||
case excasIoSync:
|
||||
return new exSyncPV (ctxIn, *pInfo);
|
||||
case excasIoAsync:
|
||||
return new exAsyncPV (ctxIn, *pInfo);
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// exServer::createPV()
|
||||
//
|
||||
void exServer::show (unsigned level)
|
||||
{
|
||||
//
|
||||
// server tool specific show code goes here
|
||||
//
|
||||
|
||||
//
|
||||
// print information about ca server libarary
|
||||
// internals
|
||||
//
|
||||
this->caServer::show(level);
|
||||
}
|
||||
|
||||
//
|
||||
// this is a noop that postpones the timer expiration
|
||||
// destroy so the exAsyncIO class will hang around until the
|
||||
// casAsyncIO::destroy() is called
|
||||
//
|
||||
void exAsyncIOTimer::destroy()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// exAsyncExistIO::expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
//
|
||||
void exAsyncExistIO::expire()
|
||||
{
|
||||
//
|
||||
// post IO completion
|
||||
//
|
||||
this->postIOCompletion(S_cas_success);
|
||||
}
|
||||
|
||||
370
src/cas/example/exServer.h
Normal file
370
src/cas/example/exServer.h
Normal file
@@ -0,0 +1,370 @@
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
//
|
||||
// ANSI C
|
||||
//
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
||||
//
|
||||
// SUN C++ does not have RAND_MAX yet
|
||||
//
|
||||
#if !defined(RAND_MAX)
|
||||
//
|
||||
// Apparently SUN C++ is using the SYSV version of rand
|
||||
//
|
||||
#if 0
|
||||
#define RAND_MAX INT_MAX
|
||||
#else
|
||||
#define RAND_MAX SHRT_MAX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// EPICS
|
||||
//
|
||||
#include <epicsAssert.h>
|
||||
#include <casdef.h>
|
||||
#include <gddAppFuncTable.h>
|
||||
#include <osiTimer.h>
|
||||
|
||||
#ifndef max
|
||||
#define max(A,B) ((A)<(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#ifndef NELEMENTS
|
||||
# define NELEMENTS(A) (sizeof(A)/sizeof(A[0]))
|
||||
#endif
|
||||
|
||||
#define LOCAL static
|
||||
|
||||
//
|
||||
// info about all pv in this server
|
||||
//
|
||||
enum excasIoType {excasIoSync, excasIoAsync};
|
||||
|
||||
class pvInfo {
|
||||
public:
|
||||
pvInfo (double scanRateIn, const char *pName,
|
||||
aitFloat32 hoprIn, aitFloat32 loprIn,
|
||||
excasIoType ioTypeIn) :
|
||||
scanRate(scanRateIn), name(pName), hopr(hoprIn),
|
||||
lopr(loprIn), ioType(ioTypeIn)
|
||||
{
|
||||
}
|
||||
|
||||
const double getScanRate () const { return this->scanRate; }
|
||||
const aitString &getName () const { return this->name; }
|
||||
const double getHopr () const { return this->hopr; }
|
||||
const double getLopr () const { return this->lopr; }
|
||||
const excasIoType getIOType () const { return this->ioType; }
|
||||
private:
|
||||
const double scanRate;
|
||||
const aitString name;
|
||||
const double hopr;
|
||||
const double lopr;
|
||||
const excasIoType ioType;
|
||||
};
|
||||
|
||||
class exPV;
|
||||
|
||||
|
||||
//
|
||||
// exScanTimer
|
||||
//
|
||||
class exScanTimer : public osiTimer {
|
||||
public:
|
||||
exScanTimer (double delayIn, exPV &pvIn) :
|
||||
pv(pvIn), osiTimer(delayIn) {}
|
||||
void expire ();
|
||||
osiBool again();
|
||||
const osiTime delay();
|
||||
const char *name()
|
||||
{
|
||||
return "exScanTimer";
|
||||
}
|
||||
private:
|
||||
exPV &pv;
|
||||
};
|
||||
|
||||
//
|
||||
// exPV
|
||||
//
|
||||
class exPV : public casPV {
|
||||
|
||||
public:
|
||||
exPV (const casCtx &ctxIn, const pvInfo &setup);
|
||||
virtual ~exPV();
|
||||
|
||||
void scanPV();
|
||||
|
||||
void show(unsigned level);
|
||||
|
||||
//
|
||||
// Called by the server libary each time that it wishes to
|
||||
// subscribe for PV the server tool via postEvent() below.
|
||||
//
|
||||
caStatus interestRegister();
|
||||
|
||||
//
|
||||
// called by the server library each time that it wishes to
|
||||
// remove its subscription for PV value change events
|
||||
// from the server tool via caServerPostEvents()
|
||||
//
|
||||
void interestDelete();
|
||||
|
||||
aitEnum bestExternalType();
|
||||
|
||||
//
|
||||
// chCreate() is called each time that a PV is attached to
|
||||
// by a client. The server tool must create a casChannel object
|
||||
// (or a derived class) each time that this routine is called
|
||||
//
|
||||
// If the operation must complete asynchronously then return
|
||||
// the status code S_casApp_asyncCompletion and then
|
||||
// create the casChannel object at some time in the future
|
||||
//
|
||||
//casChannel *createChannel ();
|
||||
|
||||
caStatus update (gdd &value);
|
||||
|
||||
//
|
||||
// Std PV Attribute fetch support
|
||||
//
|
||||
gddAppFuncTableStatus getStatus(gdd &value);
|
||||
gddAppFuncTableStatus getSeverity(gdd &value);
|
||||
gddAppFuncTableStatus getSeconds(gdd &value);
|
||||
gddAppFuncTableStatus getNanoseconds(gdd &value);
|
||||
gddAppFuncTableStatus getPrecision(gdd &value);
|
||||
gddAppFuncTableStatus getHighLimit(gdd &value);
|
||||
gddAppFuncTableStatus getLowLimit(gdd &value);
|
||||
gddAppFuncTableStatus getUnits(gdd &value);
|
||||
gddAppFuncTableStatus getValue(gdd &value);
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
aitTimeStamp getTS();
|
||||
|
||||
const float getScanRate()
|
||||
{
|
||||
return this->info.getScanRate();
|
||||
}
|
||||
protected:
|
||||
gdd *pValue;
|
||||
exScanTimer *pScanTimer;
|
||||
const pvInfo & info;
|
||||
aitBool interest;
|
||||
private:
|
||||
static osiTime currentTime;
|
||||
};
|
||||
|
||||
//
|
||||
// exServer
|
||||
//
|
||||
class exServer : public caServer {
|
||||
public:
|
||||
exServer(unsigned pvMaxNameLength, unsigned pvCountEstimate=0x3ff,
|
||||
unsigned maxSimultaneousIO=1u);
|
||||
void show (unsigned level);
|
||||
caStatus pvExistTest (const casCtx &ctxIn, const char *pPVName,
|
||||
gdd &canonicalPVName);
|
||||
casPV *createPV (const casCtx &ctxIn, const char *pPVName);
|
||||
|
||||
static const pvInfo *findPV(const char *pName);
|
||||
|
||||
static gddAppFuncTableStatus read(exPV &pv, gdd &value)
|
||||
{
|
||||
return exServer::ft.read(pv, value);
|
||||
}
|
||||
private:
|
||||
static const pvInfo pvList[];
|
||||
static gddAppFuncTable<exPV> ft;
|
||||
};
|
||||
|
||||
//
|
||||
// exSyncPV
|
||||
//
|
||||
class exSyncPV : public exPV {
|
||||
public:
|
||||
exSyncPV (const casCtx &ctxIn, const pvInfo &setup);
|
||||
~exSyncPV();
|
||||
|
||||
//
|
||||
// read
|
||||
//
|
||||
caStatus read(const casCtx &ctxIn, gdd &value);
|
||||
|
||||
//
|
||||
// write
|
||||
//
|
||||
caStatus write(const casCtx &ctxIn, gdd &value);
|
||||
private:
|
||||
};
|
||||
|
||||
//
|
||||
// exAsyncPV
|
||||
// (asychronous PV)
|
||||
//
|
||||
class exAsyncPV : public exPV {
|
||||
public:
|
||||
//
|
||||
// exAsyncPV()
|
||||
//
|
||||
exAsyncPV (const casCtx &ctxIn, const pvInfo &setup) :
|
||||
exPV (ctxIn, setup) {}
|
||||
|
||||
//
|
||||
// read
|
||||
//
|
||||
caStatus read(const casCtx &ctxIn, gdd &value);
|
||||
|
||||
//
|
||||
// write
|
||||
//
|
||||
caStatus write(const casCtx &ctxIn, gdd &value);
|
||||
|
||||
unsigned maxSimultAsyncOps () const;
|
||||
private:
|
||||
};
|
||||
|
||||
//
|
||||
// exChannel
|
||||
//
|
||||
class exChannel : public casChannel{
|
||||
public:
|
||||
exChannel(const casCtx &ctxIn) : casChannel(ctxIn) {}
|
||||
|
||||
//void setOwner(const char *pUserName, const char *pHostName){};
|
||||
|
||||
//
|
||||
// called when the first client begins to monitor the PV
|
||||
//
|
||||
caStatus interestRegister ()
|
||||
{
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
//
|
||||
// called when the last client stops monitoring the PV
|
||||
//
|
||||
void interestDelete () {}
|
||||
|
||||
//
|
||||
// the following are encouraged to change during an channel's
|
||||
// lifetime
|
||||
//
|
||||
aitBool readAccess () const {return aitTrue;};
|
||||
aitBool writeAccess () const {return aitTrue;};
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// exAsyncIOTimer
|
||||
//
|
||||
class exAsyncIOTimer : public osiTimer {
|
||||
public:
|
||||
exAsyncIOTimer (osiTime delayIn) : osiTimer(delayIn) {}
|
||||
//
|
||||
// this is a noop that postpones the timer expiration
|
||||
// destroy so this object will hang around until the
|
||||
// casAsyncIO::destroy() is called
|
||||
//
|
||||
void destroy();
|
||||
|
||||
const char *name()
|
||||
{
|
||||
return "exAsyncIOTimer";
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// exAsyncIO()
|
||||
//
|
||||
class exAsyncIO : public casAsyncIO, public exAsyncIOTimer {
|
||||
public:
|
||||
exAsyncIO(const casCtx &ctxIn, gdd *pValue = 0) :
|
||||
casAsyncIO(ctxIn, pValue),
|
||||
exAsyncIOTimer(osiTime(0.010)) {} // 10 mSec
|
||||
};
|
||||
|
||||
//
|
||||
// exAsyncWriteIO
|
||||
//
|
||||
class exAsyncWriteIO : public exAsyncIO {
|
||||
public:
|
||||
//
|
||||
// exAsyncWriteIO()
|
||||
//
|
||||
exAsyncWriteIO(const casCtx &ctxIn, exAsyncPV &pvIn, gdd &valueIn) :
|
||||
exAsyncIO(ctxIn, &valueIn), pv(pvIn) {}
|
||||
|
||||
//
|
||||
// expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
// see exAsyncPV.cc
|
||||
//
|
||||
void expire();
|
||||
private:
|
||||
exAsyncPV &pv;
|
||||
};
|
||||
|
||||
//
|
||||
// exAsyncReadIO
|
||||
//
|
||||
class exAsyncReadIO : public exAsyncIO {
|
||||
public:
|
||||
//
|
||||
// exAsyncReadIO()
|
||||
//
|
||||
exAsyncReadIO(const casCtx &ctxIn, exAsyncPV &pvIn, gdd &protoIn) :
|
||||
exAsyncIO(ctxIn, &protoIn), pv(pvIn) {}
|
||||
|
||||
//
|
||||
// expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
// see exAsyncPV.cc
|
||||
//
|
||||
void expire();
|
||||
|
||||
private:
|
||||
exAsyncPV &pv;
|
||||
};
|
||||
|
||||
//
|
||||
// exAsyncExistIO
|
||||
// (PV exist async IO)
|
||||
//
|
||||
class exAsyncExistIO : public exAsyncIO {
|
||||
public:
|
||||
//
|
||||
// exAsyncExistIO()
|
||||
//
|
||||
exAsyncExistIO(const pvInfo *pPVI,
|
||||
const casCtx &ctxIn, gdd &canonicalPVName) :
|
||||
exAsyncIO(ctxIn, &canonicalPVName)
|
||||
{
|
||||
canonicalPVName.put (pPVI->getName());
|
||||
}
|
||||
|
||||
//
|
||||
// expire()
|
||||
// (a virtual function that runs when the base timer expires)
|
||||
// see exServer.cc
|
||||
//
|
||||
void expire();
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
38
src/cas/example/exSyncPV.cc
Normal file
38
src/cas/example/exSyncPV.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
//
|
||||
// Example EPICS CA server
|
||||
//
|
||||
|
||||
#include <exServer.h>
|
||||
|
||||
//
|
||||
// exSyncPV::exSyncPV()
|
||||
//
|
||||
exSyncPV::exSyncPV (const casCtx &ctxIn, const pvInfo &setup) :
|
||||
exPV (ctxIn, setup)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// exSyncPV::~exSyncPV()
|
||||
//
|
||||
exSyncPV::~exSyncPV()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// exSyncPV::write()
|
||||
//
|
||||
caStatus exSyncPV::write (const casCtx &, gdd &valueIn)
|
||||
{
|
||||
return this->update (valueIn);
|
||||
}
|
||||
|
||||
//
|
||||
// exSyncPV::read()
|
||||
//
|
||||
caStatus exSyncPV::read (const casCtx &, gdd &protoIn)
|
||||
{
|
||||
return exServer::read(*this, protoIn);
|
||||
}
|
||||
|
||||
846
src/cas/example/test.adl
Normal file
846
src/cas/example/test.adl
Normal file
@@ -0,0 +1,846 @@
|
||||
file {
|
||||
name="test.dl"
|
||||
}
|
||||
display {
|
||||
magic="305419896"
|
||||
majv="2"
|
||||
mnrv="2"
|
||||
ndyng="0"
|
||||
npc="5"
|
||||
nstr="8"
|
||||
ndynamic="12"
|
||||
nplot="0"
|
||||
nrd="0"
|
||||
nes="0"
|
||||
nkd="0"
|
||||
object {
|
||||
x="0"
|
||||
y="0"
|
||||
width="421"
|
||||
height="306"
|
||||
}
|
||||
clr="0"
|
||||
bclr="1"
|
||||
nwords_dspy="1106"
|
||||
nwords_sta="28"
|
||||
nwords_cmap="36"
|
||||
nwords_crules="106"
|
||||
odyng="306"
|
||||
osta="278"
|
||||
odynamic="306"
|
||||
oplot="1106"
|
||||
ord="1106"
|
||||
oes="1106"
|
||||
okd="1106"
|
||||
opc="58"
|
||||
ostr="88"
|
||||
ocmap="136"
|
||||
ocrules="172"
|
||||
style="solid"
|
||||
fill="outline"
|
||||
width="0"
|
||||
clrmod="static"
|
||||
vismod="static"
|
||||
RISC_pad1="0"
|
||||
RISC_pad2="0"
|
||||
clrrule="alarm"
|
||||
pv=""
|
||||
cmap=""
|
||||
}
|
||||
"<<color map>>" {
|
||||
ncolors="8"
|
||||
dl_color {
|
||||
r="255"
|
||||
g="255"
|
||||
b="255"
|
||||
inten="255"
|
||||
blink="off"
|
||||
RISCpad="128"
|
||||
}
|
||||
dl_color {
|
||||
r="0"
|
||||
g="0"
|
||||
b="0"
|
||||
inten="0"
|
||||
blink="off"
|
||||
RISCpad="75"
|
||||
}
|
||||
dl_color {
|
||||
r="255"
|
||||
g="0"
|
||||
b="0"
|
||||
inten="255"
|
||||
blink="off"
|
||||
RISCpad="-14684"
|
||||
}
|
||||
dl_color {
|
||||
r="255"
|
||||
g="0"
|
||||
b="0"
|
||||
inten="255"
|
||||
blink="on"
|
||||
RISCpad="14744"
|
||||
}
|
||||
dl_color {
|
||||
r="255"
|
||||
g="255"
|
||||
b="0"
|
||||
inten="255"
|
||||
blink="off"
|
||||
RISCpad="-16536"
|
||||
}
|
||||
dl_color {
|
||||
r="255"
|
||||
g="255"
|
||||
b="0"
|
||||
inten="255"
|
||||
blink="on"
|
||||
RISCpad="-15536"
|
||||
}
|
||||
dl_color {
|
||||
r="0"
|
||||
g="0"
|
||||
b="255"
|
||||
inten="255"
|
||||
blink="off"
|
||||
RISCpad="-28408"
|
||||
}
|
||||
dl_color {
|
||||
r="0"
|
||||
g="0"
|
||||
b="255"
|
||||
inten="255"
|
||||
blink="on"
|
||||
RISCpad="0"
|
||||
}
|
||||
}
|
||||
"<<color rules>>" {
|
||||
nrules="1"
|
||||
dl_color_rule {
|
||||
name="alarm"
|
||||
info[0] {
|
||||
chan="$(C).SEVR"
|
||||
value="MAJOR"
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="2"
|
||||
RISCpad="0"
|
||||
}
|
||||
info[1] {
|
||||
chan="$(C).SEVR"
|
||||
value="MINOR"
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="4"
|
||||
RISCpad="127"
|
||||
}
|
||||
info[2] {
|
||||
chan="$(C).SEVR"
|
||||
value="INFO"
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="6"
|
||||
RISCpad="44"
|
||||
}
|
||||
info[3] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="-128"
|
||||
}
|
||||
info[4] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="-1"
|
||||
}
|
||||
info[5] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="-104"
|
||||
}
|
||||
info[6] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="-1"
|
||||
}
|
||||
info[7] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="8"
|
||||
}
|
||||
info[8] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="120"
|
||||
}
|
||||
info[9] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="1"
|
||||
}
|
||||
info[10] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="7"
|
||||
}
|
||||
info[11] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="19"
|
||||
}
|
||||
info[12] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="48"
|
||||
}
|
||||
info[13] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="28"
|
||||
}
|
||||
info[14] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="-88"
|
||||
}
|
||||
info[15] {
|
||||
chan=""
|
||||
value=""
|
||||
connector="use"
|
||||
comparator="equals"
|
||||
clr="1"
|
||||
RISCpad="0"
|
||||
}
|
||||
fg_enable="on"
|
||||
bg_enable="on"
|
||||
default_fg="0"
|
||||
default_bg="1"
|
||||
}
|
||||
}
|
||||
"<<basic attribute>>" {
|
||||
attr {
|
||||
clr="0"
|
||||
style="solid"
|
||||
fill="outline"
|
||||
width="0"
|
||||
}
|
||||
}
|
||||
"text" {
|
||||
object {
|
||||
x="44"
|
||||
y="16"
|
||||
width="104"
|
||||
height="14"
|
||||
groupid="0"
|
||||
}
|
||||
textix="Sync"
|
||||
align="horiz. left"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"text" {
|
||||
object {
|
||||
x="260"
|
||||
y="13"
|
||||
width="92"
|
||||
height="17"
|
||||
groupid="0"
|
||||
}
|
||||
textix="Async"
|
||||
align="horiz. left"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"indicator" {
|
||||
object {
|
||||
x="15"
|
||||
y="88"
|
||||
width="170"
|
||||
height="22"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="fred"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="limits"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"text update" {
|
||||
object {
|
||||
x="16"
|
||||
y="133"
|
||||
width="169"
|
||||
height="17"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="fred"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="append"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
align="horiz. left"
|
||||
format="decimal"
|
||||
}
|
||||
"valuator" {
|
||||
object {
|
||||
x="15"
|
||||
y="43"
|
||||
width="168"
|
||||
height="26"
|
||||
groupid="0"
|
||||
}
|
||||
control {
|
||||
chan="fred"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
gain="coarse"
|
||||
sendMode="send on motion"
|
||||
increment="0"
|
||||
}
|
||||
"indicator" {
|
||||
object {
|
||||
x="215"
|
||||
y="81"
|
||||
width="170"
|
||||
height="30"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="freddy"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="limits"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"text update" {
|
||||
object {
|
||||
x="216"
|
||||
y="133"
|
||||
width="171"
|
||||
height="18"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="freddy"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="append"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
align="horiz. left"
|
||||
format="decimal"
|
||||
}
|
||||
"valuator" {
|
||||
object {
|
||||
x="215"
|
||||
y="43"
|
||||
width="168"
|
||||
height="28"
|
||||
groupid="0"
|
||||
}
|
||||
control {
|
||||
chan="freddy"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
gain="coarse"
|
||||
sendMode="send on motion"
|
||||
increment="0"
|
||||
}
|
||||
"indicator" {
|
||||
object {
|
||||
x="16"
|
||||
y="225"
|
||||
width="171"
|
||||
height="19"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="jane"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="limits"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"text update" {
|
||||
object {
|
||||
x="17"
|
||||
y="259"
|
||||
width="170"
|
||||
height="20"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="jane"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="append"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
align="horiz. left"
|
||||
format="decimal"
|
||||
}
|
||||
"valuator" {
|
||||
object {
|
||||
x="15"
|
||||
y="187"
|
||||
width="170"
|
||||
height="19"
|
||||
groupid="0"
|
||||
}
|
||||
control {
|
||||
chan="jane"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
gain="coarse"
|
||||
sendMode="send on motion"
|
||||
increment="0"
|
||||
}
|
||||
"indicator" {
|
||||
object {
|
||||
x="219"
|
||||
y="218"
|
||||
width="173"
|
||||
height="23"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="janet"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="limits"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
RISC_pad="0"
|
||||
}
|
||||
"text update" {
|
||||
object {
|
||||
x="220"
|
||||
y="257"
|
||||
width="174"
|
||||
height="20"
|
||||
groupid="0"
|
||||
}
|
||||
monitor {
|
||||
chan="janet"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="append"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
align="horiz. left"
|
||||
format="decimal"
|
||||
}
|
||||
"valuator" {
|
||||
object {
|
||||
x="219"
|
||||
y="188"
|
||||
width="171"
|
||||
height="21"
|
||||
groupid="0"
|
||||
}
|
||||
control {
|
||||
chan="janet"
|
||||
clr="0"
|
||||
bclr="1"
|
||||
label="none"
|
||||
clrmod="static"
|
||||
rulechan[0] = ""
|
||||
rulechan[1] = ""
|
||||
rulechan[2] = ""
|
||||
rulechan[3] = ""
|
||||
rulechan[4] = ""
|
||||
rulechan[5] = ""
|
||||
rulechan[6] = ""
|
||||
rulechan[7] = ""
|
||||
rulechan[8] = ""
|
||||
rulechan[9] = ""
|
||||
rulechan[10] = ""
|
||||
rulechan[11] = ""
|
||||
rulechan[12] = ""
|
||||
rulechan[13] = ""
|
||||
rulechan[14] = ""
|
||||
rulechan[15] = ""
|
||||
clrrule="alarm"
|
||||
clrargs=""
|
||||
rulecolorbg="0"
|
||||
rulecolorfg="0"
|
||||
hdl="0"
|
||||
ldl="0"
|
||||
prec="0"
|
||||
newunits=""
|
||||
units="none"
|
||||
decorate="none"
|
||||
convertFunc=""
|
||||
convertParams=""
|
||||
}
|
||||
direction="down"
|
||||
gain="coarse"
|
||||
sendMode="send on motion"
|
||||
increment="0"
|
||||
}
|
||||
8
src/cas/generic/Makefile
Normal file
8
src/cas/generic/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
TOP = ../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
11
src/cas/generic/Makefile.Unix
Normal file
11
src/cas/generic/Makefile.Unix
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += casdef.h
|
||||
INC += casInternal.h
|
||||
INC += casEventMask.h
|
||||
INC += gddAppFuncTable.h
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
6
src/cas/generic/README
Normal file
6
src/cas/generic/README
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
this directory contains the generic source for
|
||||
the EPICS ca server
|
||||
|
||||
|
||||
71
src/cas/generic/caCommonDef.h
Normal file
71
src/cas/generic/caCommonDef.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Author Jeffrey O. Hill
|
||||
* johill@lanl.gov
|
||||
* 505 665 1831
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
|
||||
* ca server installation
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef includeCasCommonDefH
|
||||
#define includeCasCommonDefH
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef NELEMENTS
|
||||
#define NELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef LOCAL
|
||||
#define LOCAL static
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#ifndef max
|
||||
#define max(A,B) ((A)<(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#endif /* ifndef includeCasCommonDefH (last line in this file) */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user