Compare commits
682 Commits
R3.12.0-be
...
R3.13.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
3ed241a857 | ||
|
|
6e37e4a8b7 | ||
|
|
45910c7eae | ||
|
|
ab72202752 | ||
|
|
b728e45751 | ||
|
|
8b4249b582 | ||
|
|
bf260930ea | ||
|
|
e460c225da | ||
|
|
4a07ca3a11 | ||
|
|
2aeca30e8f | ||
|
|
6ad8e0f575 | ||
|
|
18822cda96 | ||
|
|
acaa1b6fbf | ||
|
|
38875dd8a7 | ||
|
|
af39a62adc | ||
|
|
fc981f3f7b | ||
|
|
f726540476 | ||
|
|
759d10c50e | ||
|
|
27d9d4d708 | ||
|
|
8643ae7413 | ||
|
|
f04b9fd8d3 | ||
|
|
574eb184cf | ||
|
|
ff33b704aa | ||
|
|
b23500efe6 | ||
|
|
14f0ea61dd | ||
|
|
6dc0835a7d | ||
|
|
ade952f351 | ||
|
|
dd34fb320b | ||
|
|
86e4be2f04 | ||
|
|
06626adbb8 | ||
|
|
5a32f7143d | ||
|
|
717ace8079 | ||
|
|
95294e2f3e | ||
|
|
341ec908c2 | ||
|
|
f91c3356ab | ||
|
|
6b6ef88793 | ||
|
|
adea6a0894 | ||
|
|
866e676a7a | ||
|
|
a8da2b9da4 | ||
|
|
ff6d6cb70a | ||
|
|
d205dc9b10 | ||
|
|
777e2d093d | ||
|
|
dbfab6b29e | ||
|
|
ecaaeb439a | ||
|
|
a635590f31 | ||
|
|
795b9645c9 | ||
|
|
fcf601fbf1 | ||
|
|
b95596f602 | ||
|
|
d0766a4f38 | ||
|
|
a650cd3ca2 | ||
|
|
96bd0f11c9 | ||
|
|
aaa2580224 | ||
|
|
84f32df855 | ||
|
|
79baa59608 | ||
|
|
853031bc90 | ||
|
|
c3734dcfee | ||
|
|
f2a8150e2d | ||
|
|
5b8ef5a985 | ||
|
|
3aff8d6754 | ||
|
|
c12944df48 | ||
|
|
a09ab523bb | ||
|
|
c02903d397 | ||
|
|
33608d5c23 | ||
|
|
293294cb48 | ||
|
|
03104dd373 | ||
|
|
6a922b6515 | ||
|
|
2be40c2ade | ||
|
|
2228ec3417 | ||
|
|
f8dd9b2bf7 | ||
|
|
4c5497c74e | ||
|
|
02feda47e1 | ||
|
|
cf209e1411 | ||
|
|
c00216a941 | ||
|
|
b3726f1cb4 | ||
|
|
c3ea9b769e | ||
|
|
4e1826d238 | ||
|
|
2792f1fc6b | ||
|
|
7a51dc30f2 | ||
|
|
01a4f1f64b | ||
|
|
144397decb | ||
|
|
edcd482415 | ||
|
|
2b7d67509e | ||
|
|
e113a5bed2 | ||
|
|
ebd6a8d8ca | ||
|
|
4407b2f24f | ||
|
|
0a9a3422b8 | ||
|
|
e96488dbb6 | ||
|
|
09b0f88c24 | ||
|
|
83ee1e7a8a | ||
|
|
df60df8a94 | ||
|
|
c3a7602526 | ||
|
|
5d91c2f5f3 | ||
|
|
3b6fc10bfe | ||
|
|
a043177422 | ||
|
|
f4a34606e1 | ||
|
|
3df522162b | ||
|
|
c0e611dcb8 | ||
|
|
1a133c65bb | ||
|
|
40237457e9 | ||
|
|
a9f37ef407 | ||
|
|
a2b2fe76fd | ||
|
|
75d1f5ef3e | ||
|
|
e25aa85707 | ||
|
|
93b26eee79 | ||
|
|
fb6f4ce704 | ||
|
|
8d8f5754a1 | ||
|
|
6c1d42f41d | ||
|
|
0bad952311 | ||
|
|
6128d3ac15 | ||
|
|
13c861d190 | ||
|
|
5aeafaf416 | ||
|
|
c3081b11d6 | ||
|
|
ef13c2bb75 | ||
|
|
b2ad0b6e1d | ||
|
|
636c7ba56c | ||
|
|
1f61d4acc2 | ||
|
|
6b0f997b20 | ||
|
|
0f0083ce46 | ||
|
|
25a6340993 | ||
|
|
a3652fd54e | ||
|
|
107ae2cee8 | ||
|
|
deb5e9c973 | ||
|
|
196f2302a4 | ||
|
|
2a21b01b0e | ||
|
|
56465da07f | ||
|
|
ee9457970a | ||
|
|
89a3746869 | ||
|
|
5be8f4999d | ||
|
|
b278c803ce | ||
|
|
50b8361078 | ||
|
|
2a121a4276 | ||
|
|
7b03ab0182 | ||
|
|
73a224a6ce | ||
|
|
f4af420e22 | ||
|
|
b0177729b8 | ||
|
|
c7b5592846 | ||
|
|
2f5202a4e4 | ||
|
|
ecb106fb71 | ||
|
|
b637c15e18 | ||
|
|
d1102b06c0 | ||
|
|
2fb23fd27b | ||
|
|
752b7e257e | ||
|
|
025b13b977 | ||
|
|
4c2822dd2e | ||
|
|
9dcee4c068 | ||
|
|
9bf802557e | ||
|
|
2566ee1e26 | ||
|
|
5a16ba053b | ||
|
|
ad3e5a3272 | ||
|
|
17511136a1 | ||
|
|
ffa22f89bd | ||
|
|
2e7075bd31 | ||
|
|
278eaf84d7 | ||
|
|
d957aebbf4 | ||
|
|
5ac2a99686 | ||
|
|
b782f63a7d | ||
|
|
e62f7d0ae2 | ||
|
|
1ca96e0116 | ||
|
|
44d65d9477 | ||
|
|
dc3ba94fc8 | ||
|
|
41ad7ae2ab | ||
|
|
017c55f9d9 | ||
|
|
196d7538c3 | ||
|
|
5ace66b609 | ||
|
|
0be218bed4 | ||
|
|
297f0b8c31 | ||
|
|
cc20412693 | ||
|
|
7021cd3589 | ||
|
|
b7acf453c2 | ||
|
|
c9abc2c82e | ||
|
|
a7484494c4 | ||
|
|
52cfbe92bf | ||
|
|
75f0fb2b0c | ||
|
|
ed36723d6c | ||
|
|
f7a5da9139 | ||
|
|
254c5b1620 | ||
|
|
c6aab85d79 | ||
|
|
d54724fce1 | ||
|
|
60c0acab3c | ||
|
|
69f33b9e23 | ||
|
|
9191863094 | ||
|
|
1beb157ab0 | ||
|
|
41ae285075 | ||
|
|
222063ac53 | ||
|
|
3342ca120f | ||
|
|
13b785e594 | ||
|
|
6931273fef | ||
|
|
8d52177933 | ||
|
|
b64fa8bd87 | ||
|
|
34ce2ab6ac | ||
|
|
43ef20b90c | ||
|
|
818bc0d475 | ||
|
|
ca2f9aff52 | ||
|
|
64a93df872 | ||
|
|
ecc03e9ad9 | ||
|
|
db1b46e5f9 | ||
|
|
d87295397e | ||
|
|
7277c336f7 | ||
|
|
30ad5b1149 | ||
|
|
c6bcd1a10b | ||
|
|
f3cf369071 | ||
|
|
adffe02a2d | ||
|
|
e635080cef | ||
|
|
be85da6a3a | ||
|
|
c16006f34d | ||
|
|
72491d8829 | ||
|
|
cb78c5adb8 | ||
|
|
1a2cd5953d | ||
|
|
5da79a5f56 | ||
|
|
9f2d9587f0 | ||
|
|
74e405969a | ||
|
|
89a6d17353 | ||
|
|
d9666a8f30 | ||
|
|
7cb76ae9e4 | ||
|
|
46e00da251 | ||
|
|
39d98562fc | ||
|
|
8624be05d4 | ||
|
|
c0da182217 | ||
|
|
6dab97f8e7 | ||
|
|
1abcc71e71 | ||
|
|
f8f17eeb33 | ||
|
|
db50e1bdd7 | ||
|
|
96605d4439 | ||
|
|
593bc413bf | ||
|
|
3e20abece8 | ||
|
|
79c01170e8 | ||
|
|
6c21758d23 | ||
|
|
d2347c497c | ||
|
|
099f63fb20 | ||
|
|
665a5134d3 | ||
|
|
e1b04e69bb | ||
|
|
8375a2cf18 | ||
|
|
300f38584b | ||
|
|
b9a5acc88c | ||
|
|
2ff81c09f0 | ||
|
|
63eefd2ba8 | ||
|
|
f9f8e55035 | ||
|
|
0f8f36c4bb | ||
|
|
fd6e666256 | ||
|
|
d492d665fc | ||
|
|
6b659e8404 | ||
|
|
43ecde53f3 | ||
|
|
e6ffa71c54 | ||
|
|
be6ecdfe24 | ||
|
|
e6bec6af38 | ||
|
|
59a2f10867 | ||
|
|
00abe6b876 | ||
|
|
b0e9cc9fba | ||
|
|
6eb04984bd | ||
|
|
d9a05d6051 | ||
|
|
d9233e4864 | ||
|
|
34bd710ffa | ||
|
|
438f00a708 | ||
|
|
622a225308 | ||
|
|
1c14ac4941 | ||
|
|
df2ce01069 | ||
|
|
f7aa394524 | ||
|
|
ed6047ec51 | ||
|
|
a3573cd384 | ||
|
|
81deb4fceb | ||
|
|
b7378bbc62 | ||
|
|
bdffdb0369 | ||
|
|
98809f8141 | ||
|
|
8a0f66cb9b | ||
|
|
0462aed01d | ||
|
|
ea279855da | ||
|
|
66210afed7 | ||
|
|
c13d342680 | ||
|
|
549a4ba978 | ||
|
|
cf7fe3deb4 | ||
|
|
ef8abaa44f | ||
|
|
5624aaefe1 | ||
|
|
2b7e4ff84d | ||
|
|
fb2c2f0925 | ||
|
|
55dae7db1c | ||
|
|
524da0d2df | ||
|
|
93c191ffe9 | ||
|
|
0dc2be41d3 | ||
|
|
11af4456c7 | ||
|
|
f232999d32 | ||
|
|
ca13bfdff9 | ||
|
|
21cbea930a | ||
|
|
8b06e22907 | ||
|
|
f3dcfd60bb | ||
|
|
1b33e449c6 | ||
|
|
afa208a5e1 | ||
|
|
5903ff0cdb | ||
|
|
51d44c6200 | ||
|
|
a362731044 | ||
|
|
0e225a4335 | ||
|
|
8c0527c25a | ||
|
|
92f91ee2cc | ||
|
|
1bd52dfef9 | ||
|
|
c7005b4783 | ||
|
|
d9e3f09760 | ||
|
|
07a265d299 | ||
|
|
feb73d85b3 | ||
|
|
f18238a8b9 | ||
|
|
8ff5572e6c | ||
|
|
865e69d7d3 | ||
|
|
38f82f342d | ||
|
|
20fd27263a | ||
|
|
7760d16956 | ||
|
|
3fab82780b | ||
|
|
fd679234dd | ||
|
|
7f949f441b | ||
|
|
48640936f5 | ||
|
|
1e2d258c66 | ||
|
|
83d4ee2313 | ||
|
|
67324dc7b7 | ||
|
|
47843d49a0 | ||
|
|
d27f70a883 | ||
|
|
bcde03d0a0 | ||
|
|
1887fbd7f8 | ||
|
|
f3e0f33d15 | ||
|
|
09e1c40650 | ||
|
|
0de34c3162 | ||
|
|
ef12c444d8 | ||
|
|
cded07df78 | ||
|
|
81fb796c8d | ||
|
|
b3af9b389a | ||
|
|
9b76f9d9c0 | ||
|
|
302f4ef6c8 | ||
|
|
64b7a679a0 | ||
|
|
e9624769cb | ||
|
|
5ccee17d09 | ||
|
|
5e67b97e89 | ||
|
|
7cd16f8ad6 | ||
|
|
b5aa0e300c | ||
|
|
c27c38d531 | ||
|
|
b46166314f | ||
|
|
593df59742 | ||
|
|
561e2e9fb9 | ||
|
|
18b173eeb6 | ||
|
|
47b3da99a0 | ||
|
|
dd0ce8918a | ||
|
|
a655930baf | ||
|
|
84773e71a0 | ||
|
|
214b9ae5c1 | ||
|
|
420249caac | ||
|
|
17a0f487a8 | ||
|
|
bbfcd9ff78 | ||
|
|
b9dc0dad91 | ||
|
|
50be068a02 | ||
|
|
a90bdf0098 | ||
|
|
a58a2439cd | ||
|
|
962b520be8 | ||
|
|
6747d4e0e9 | ||
|
|
043eeb6a7c | ||
|
|
6b50908dd6 | ||
|
|
2d9514e8ad | ||
|
|
2e7e1416d3 | ||
|
|
ed2f5648b2 | ||
|
|
96da4b1121 | ||
|
|
3c6191cccd | ||
|
|
60a488940c | ||
|
|
1c1d8228c7 | ||
|
|
b2ee2f2347 | ||
|
|
2c2673dcea | ||
|
|
0e760bfc70 | ||
|
|
f0234af637 | ||
|
|
96f58790c4 | ||
|
|
2c1004fb41 | ||
|
|
f6025d2a1f | ||
|
|
4d046c8424 | ||
|
|
e7e17f07af | ||
|
|
8a23d381c4 | ||
|
|
46b9bb6e6a | ||
|
|
9ab85124d3 | ||
|
|
b8f07e873d | ||
|
|
0cfd58942f | ||
|
|
b75d3964d7 | ||
|
|
b9c8cd50e0 | ||
|
|
e7b8b42452 | ||
|
|
4cc62a1fce | ||
|
|
333c985399 | ||
|
|
f513681bc0 | ||
|
|
ddb459d08a | ||
|
|
6aa5ecfa0e | ||
|
|
9bdea89b06 | ||
|
|
3c8b4bf8c0 | ||
|
|
a912205614 | ||
|
|
3b094ac9ae | ||
|
|
13a7380a47 | ||
|
|
f1bc683bd4 | ||
|
|
5d3ded4397 | ||
|
|
4a5cb2a6e5 | ||
|
|
9300dded40 | ||
|
|
cb86cd03a7 | ||
|
|
cee91cb578 | ||
|
|
679e1b8a56 | ||
|
|
f6d91b8876 | ||
|
|
a86c813415 | ||
|
|
be2491bc51 | ||
|
|
1634c70c06 | ||
|
|
df876abf50 | ||
|
|
d5873d5e8a | ||
|
|
b6c87ce10e | ||
|
|
00d40d3e73 | ||
|
|
410e6d9c00 | ||
|
|
03944c94e3 | ||
|
|
b5f31b4b13 | ||
|
|
7bb7e8a884 | ||
|
|
d153387372 | ||
|
|
d4a4b23a55 | ||
|
|
14a152ba72 | ||
|
|
20b6539144 | ||
|
|
93b6da9b3c | ||
|
|
542c0115c5 | ||
|
|
15440b9b6c | ||
|
|
4cb9699c03 | ||
|
|
6460c2fc1d | ||
|
|
9b858b8a5f | ||
|
|
ed30327d93 | ||
|
|
35aba51c7f | ||
|
|
12fd359a3c | ||
|
|
e0b6ce3867 | ||
|
|
c5fce1bd6c | ||
|
|
2dfbf28c1b | ||
|
|
32add4c78f | ||
|
|
9ea5c86ab5 | ||
|
|
48efca8456 | ||
|
|
382c496b24 | ||
|
|
13173544a9 | ||
|
|
19bf9ec448 | ||
|
|
a08656090e | ||
|
|
7b03f77e30 | ||
|
|
80dbdf6814 | ||
|
|
103bd7492a | ||
|
|
e55693525c | ||
|
|
64bd8e03dc | ||
|
|
49b77d096f | ||
|
|
ae720e75af | ||
|
|
bca7b39ab6 | ||
|
|
3600bb9513 | ||
|
|
339d08b71d | ||
|
|
687e1a2c16 | ||
|
|
a53bffb128 | ||
|
|
4a7c1b1715 | ||
|
|
e75c3729b8 | ||
|
|
7cc6c1993d | ||
|
|
63a3b6827c | ||
|
|
b1f570f66d | ||
|
|
239e6cfa2e |
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
|
||||
***********************************************************************/
|
||||
45
COPYRIGHT_UniversityOfChicago
Normal file
45
COPYRIGHT_UniversityOfChicago
Normal file
@@ -0,0 +1,45 @@
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
THE FOLLOWING IS A NOTICE OF COPYRIGHT, AVAILABILITY OF THE CODE,
|
||||
AND DISCLAIMER WHICH MUST BE INCLUDED IN THE PROLOGUE OF THE CODE
|
||||
AND IN ALL SOURCE LISTINGS OF THE CODE.
|
||||
|
||||
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
|
||||
|
||||
Argonne National Laboratory (ANL), with facilities in the States of
|
||||
Illinois and Idaho, is owned by the United States Government, and
|
||||
operated by the University of Chicago under provision of a contract
|
||||
with the Department of Energy.
|
||||
|
||||
Portions of this material resulted from work developed under a U.S.
|
||||
Government contract and are subject to the following license: For
|
||||
a period of five years from March 30, 1993, the Government is
|
||||
granted for itself and others acting on its behalf a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, and perform
|
||||
publicly and display publicly. With the approval of DOE, this
|
||||
period may be renewed for two additional five year periods.
|
||||
Following the expiration of this period or periods, the Government
|
||||
is granted for itself and others acting on its behalf, a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, distribute copies
|
||||
to the public, perform publicly and display publicly, and to permit
|
||||
others to do so.
|
||||
|
||||
*****************************************************************
|
||||
DISCLAIMER
|
||||
*****************************************************************
|
||||
|
||||
NEITHER THE UNITED STATES GOVERNMENT NOR ANY AGENCY THEREOF, NOR
|
||||
THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES OR OFFICERS,
|
||||
MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL
|
||||
LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
|
||||
USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS
|
||||
DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY
|
||||
OWNED RIGHTS.
|
||||
|
||||
*****************************************************************
|
||||
LICENSING INQUIRIES MAY BE DIRECTED TO THE INDUSTRIAL TECHNOLOGY
|
||||
DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
160
MakeRelease
Executable file
160
MakeRelease
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Make Release - Creates an EPICS release
|
||||
# By Matthew Needes and Bob Zieman
|
||||
#
|
||||
# MakeRelease [-b]
|
||||
#
|
||||
# [-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.
|
||||
#
|
||||
# Revision 1.3 1995/10/03 15:42:26 jba
|
||||
# Added *COPYRIGHT* files to release tar file.
|
||||
#
|
||||
# Revision 1.2 1995/08/28 15:49:54 jba
|
||||
# Added startup directory to release tar file
|
||||
#
|
||||
# Revision 1.1 1995/08/17 20:14:56 jba
|
||||
# Added base/tools scripts functionality to base/Makefile, removed scripts
|
||||
# Moved base/tools/MakeRelease to base dir.
|
||||
#
|
||||
# Revision 1.14 1994/12/19 18:42:08 tang
|
||||
# Make the args length compatible for HP and SUN.
|
||||
#
|
||||
# Revision 1.13 1994/12/15 19:19:18 tang
|
||||
# Replace -I opt by cat and xargs for tar for HP compatibility.
|
||||
#
|
||||
# Revision 1.12 1994/12/14 23:57:55 tang
|
||||
# Take out \< and \> pair for hp compatible
|
||||
#
|
||||
# Revision 1.11 1994/10/31 21:44:17 jba
|
||||
# Moved print stmnt, added cd $(EPICS)
|
||||
#
|
||||
# Revision 1.10 1994/10/05 18:29:34 jba
|
||||
# Renamed version.h to epicsVersion.h
|
||||
#
|
||||
# Revision 1.9 1994/09/22 01:41:47 mcn
|
||||
# MakeRelease - MAJOR bug fix. GetVar / MakeDirs - minor fix.
|
||||
#
|
||||
# Revision 1.8 1994/09/07 20:59:15 mcn
|
||||
# Revamped GetVar, modified scripts for new GetVar.
|
||||
#
|
||||
# Revision 1.7 1994/09/02 20:58:00 mcn
|
||||
# minor change.
|
||||
#
|
||||
# Revision 1.6 1994/08/21 00:56:41 mcn
|
||||
# New Stuff
|
||||
#
|
||||
# Revision 1.5 1994/08/02 18:36:29 mcn
|
||||
# Support new configuration.
|
||||
#
|
||||
# Revision 1.4 1994/07/14 22:13:32 mcn
|
||||
# Now include SDR Makefile/Headers
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
if [ ! -d src ]; then
|
||||
echo "Cannot find src directory, are you at the top of EPICS base ?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
FULLY_BUILT=NO
|
||||
if [ "${2}" = "-b" ]; then
|
||||
FULLY_BUILT=YES
|
||||
shift
|
||||
fi
|
||||
|
||||
# Retrieve EPICS release string from src/include/epicsVersion.h
|
||||
grep EPICS_VERSION_STRING src/include/epicsVersion.h > /dev/null 2>&1 || ERR=1;
|
||||
|
||||
if [ "$ERR" = "1" ];
|
||||
then
|
||||
echo "TOP: Cannot retrieve release number from include/epicsVersion.h";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
RELS=`grep "EPICS_VERSION_STRING" src/include/epicsVersion.h \
|
||||
| sed -e 's-.*Version--' \
|
||||
-e 's-[ ][ ]*--g' \
|
||||
-e 's-".*--' \
|
||||
-e 's-\.0$--'`;
|
||||
|
||||
if [ -z "${RELS}" ];
|
||||
then
|
||||
echo "TOP: Cannot retrieve release number from src/include/epicsVersion.h";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
RELS="R${RELS}";
|
||||
|
||||
echo TOP: Creating ../${RELS}.Tar;
|
||||
|
||||
if [ -f ${RELS}.Tar* ];
|
||||
then
|
||||
echo "TOP: This release has already been created.";
|
||||
echo "TOP: Remove Tar file or edit src/include/epicsVersion.h.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# Create list of files and dirs to include in Tar file
|
||||
|
||||
cd ..
|
||||
|
||||
ls base/README* | xargs tar cvf ${RELS}.Tar
|
||||
|
||||
ls base/Make* > /tmp/make_release.out.$$;
|
||||
|
||||
ls base/*COPYRIGHT* >> /tmp/make_release.out.$$;
|
||||
|
||||
if [ -d startup ];
|
||||
then
|
||||
find startup -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
fi
|
||||
|
||||
# binary / library / default.dctsdr / <rec>Record.h / etc.
|
||||
if [ $FULLY_BUILT = "YES" ];
|
||||
then
|
||||
find base/include -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
find base/man -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
find base/bin -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
find base/lib -name CVS -prune -o ! -type d -print \
|
||||
>> /tmp/make_release.out.$$;
|
||||
|
||||
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.$$
|
||||
|
||||
cat /tmp/make_release.out.$$ | xargs tar rvf ${RELS}.Tar
|
||||
|
||||
rm /tmp/make_release.out.$$
|
||||
|
||||
113
Makefile
113
Makefile
@@ -1,5 +1,4 @@
|
||||
#
|
||||
#
|
||||
# Top Level EPICS Makefile
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
@@ -11,84 +10,46 @@
|
||||
# However, the release dependencies DOES require a complete
|
||||
# install because the release.% syntax is illegal.
|
||||
#
|
||||
# $Log$
|
||||
# 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
|
||||
|
||||
build:
|
||||
@(for ARCH in ${BUILD_ARCHS}; \
|
||||
do \
|
||||
ARCH_TYPE=$$ARCH \
|
||||
${MAKE} ${MFLAGS} $@.$$ARCH; \
|
||||
done)
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
install:
|
||||
@(for ARCH in ${BUILD_ARCHS}; \
|
||||
do \
|
||||
ARCH_TYPE=$$ARCH \
|
||||
${MAKE} ${MFLAGS} $@.$$ARCH; \
|
||||
done)
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
depends:
|
||||
@(for ARCH in ${BUILD_ARCHS}; \
|
||||
do \
|
||||
ARCH_TYPE=$$ARCH \
|
||||
${MAKE} ${MFLAGS} $@.$$ARCH; \
|
||||
done)
|
||||
@(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)
|
||||
|
||||
release:
|
||||
@echo TOP: Creating Release...
|
||||
@tools/MakeRelease
|
||||
@./MakeRelease ${TOP}
|
||||
|
||||
built_release: install
|
||||
@echo TOP: Creating Fully Built Release...
|
||||
@tools/MakeRelease -b
|
||||
|
||||
clean:
|
||||
@echo "TOP: Cleaning"
|
||||
@tools/Clean
|
||||
|
||||
uninstall:
|
||||
rm -rf bin/* lib/* rec.bak
|
||||
rm -f rec/default.dctsdr rec/default.sdrSum rec/*.h
|
||||
@./MakeRelease ${TOP} -b
|
||||
|
||||
# Notes for single architecture build rules:
|
||||
# CheckArch only has to be run for dirs.% . That
|
||||
@@ -107,20 +68,15 @@ uninstall:
|
||||
# some things may be included on a per architecture
|
||||
# basis.
|
||||
|
||||
dirs.%:
|
||||
@tools/CheckArch $*
|
||||
@echo $*: Creating Directories
|
||||
@tools/MakeDirs $*
|
||||
|
||||
build.%: dirs.%
|
||||
build.%:
|
||||
@echo $*: Building
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build
|
||||
|
||||
install.%: dirs.%
|
||||
install.%:
|
||||
@echo $*: Installing
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install
|
||||
|
||||
depends.%: dirs.%
|
||||
depends.%:
|
||||
@echo $*: Performing Make Depends
|
||||
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
|
||||
|
||||
@@ -133,11 +89,16 @@ release.%:
|
||||
@echo
|
||||
|
||||
uninstall.%:
|
||||
@echo
|
||||
@echo "The uninstall.arch syntax is not supported by this build."
|
||||
@echo
|
||||
@echo "TOP: Uninstalling $* "
|
||||
@rm -rf $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* \
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE)
|
||||
@rm -rf rec.bak rec
|
||||
@DIR1=`pwd`;cd $(INSTALL_LOCATION);DIR2=`pwd`;cd $$DIR1;\
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then rm -fr $(INSTALL_LOCATION)/config; fi
|
||||
|
||||
clean.%:
|
||||
@echo "$*: Cleaning"
|
||||
@tools/Clean $*
|
||||
@echo "TOP: Cleaning $* "
|
||||
@find src -type d -name "O.$*" -prune -exec rm -rf {} \;
|
||||
@find config -type d -name "O.$*" -prune -exec rm -rf {} \;
|
||||
|
||||
|
||||
|
||||
@@ -4,50 +4,52 @@
|
||||
# EPICS Makefile For Subdirectory Recursions
|
||||
# by Matthew Needes and Mike Bordua
|
||||
#
|
||||
# $Log$
|
||||
# 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
|
||||
TOP=.
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
build: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} $@ ; \
|
||||
cd $$TMP; \
|
||||
done)
|
||||
|
||||
install:
|
||||
install: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} $@ ; \
|
||||
cd $$TMP; \
|
||||
done)
|
||||
|
||||
depends:
|
||||
depends: dirs
|
||||
@(for DIR in ${DIRS}; \
|
||||
do \
|
||||
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} ${MFLAGS} $@; \
|
||||
cd $$DIR/O.${T_A}; ${MAKE} $@ ; \
|
||||
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 || \
|
||||
( echo "T_A=${T_A}" > O.${T_A}/Makefile; \
|
||||
echo "include ../Makefile.${BUILD_TYPE}" \
|
||||
>> O.${T_A}/Makefile;); \
|
||||
test -f O.${T_A}/.DEPENDS || \
|
||||
touch O.${T_A}/.DEPENDS; \
|
||||
fi ; \
|
||||
cd $$TMP; \
|
||||
done
|
||||
|
||||
|
||||
96
README
96
README
@@ -7,21 +7,13 @@ $Id$
|
||||
|
||||
Notes:
|
||||
|
||||
1. Before you can build or really use EPICS, you must set your
|
||||
path properly:
|
||||
|
||||
set path = ( $path EPICS/base/tools EPICS/base/bin/HOST_ARCH )
|
||||
|
||||
e.g.:
|
||||
|
||||
set path = ( $path /home/epics/base/tools /home/epics/base/bin/sun4 )
|
||||
1. Before you can build or really use EPICS, you must properly set the
|
||||
environemnt variable HOST_ARCH. The epics/startup/HostArch script file
|
||||
has been provided to set HOST_ARCH.
|
||||
|
||||
2. You must use GNU make (which is now THE supported make utility) for
|
||||
the build. A script, gmake, exists in the base/tools directory to invoke
|
||||
it with the --no-print-directory option. This option will turn off the
|
||||
annoying messages GNU make produces upon entering a directory.
|
||||
|
||||
gmake
|
||||
the build, gnumake. Set your path so that a recent version (e.g.
|
||||
V3.70) of gnumake is available.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Part 1 - Configuring and Building EPICS Base
|
||||
@@ -35,65 +27,65 @@ gmake
|
||||
|
||||
1.2 To add a target architecture to EPICS:
|
||||
|
||||
cd epics/config
|
||||
cd config
|
||||
cp CONFIG_ARCH.mv167 CONFIG_ARCH.YOUR_ARCH
|
||||
edit CONFIG_ARCH.YOUR_ARCH - For compiler flags / etc.
|
||||
edit CONFIG_ARCH.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
|
||||
- ONLY IF you are adding a new architecture class,
|
||||
see note in Appendix A.
|
||||
|
||||
edit CONFIG_BASE - Add architecture to list.
|
||||
edit CONFIG_BASE - Add architecture to list.
|
||||
|
||||
1.3 To build EPICS:
|
||||
|
||||
cd epics/base
|
||||
gmake - To build and install EPICS.
|
||||
gmake clean - To clean temporary object files. Clean will
|
||||
remove files from ALL O.ARCH dirs, not
|
||||
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.
|
||||
|
||||
1.4 To create an EPICS release:
|
||||
|
||||
edit base/include/version.h - ONLY IF you need to change the EPICS
|
||||
version number.
|
||||
edit src/include/epicsVersion.h - ONLY IF you need to change the EPICS
|
||||
version number.
|
||||
|
||||
gmake release - Will create Tar file
|
||||
gnumake release - Will create Tar file
|
||||
|
||||
gmake built_release - Will create Tar file, after generating
|
||||
dependencies, INCLUDING BINARIES.
|
||||
gnumake built_release - Will create Tar file, after generating
|
||||
dependencies, INCLUDING BINARIES.
|
||||
|
||||
1.5 "Partial" build commands:
|
||||
|
||||
gmake clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only.
|
||||
gmake install.sun4 - Builds sun4 only.
|
||||
gmake install.mv167 - Builds mv167 only (a HOST_ARCH build must
|
||||
be complete before this can be issued).
|
||||
gnumake clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only.
|
||||
gnumake install.sun4 - Builds sun4 only.
|
||||
gnumake install.mv167 - Builds mv167 only (a HOST_ARCH build must
|
||||
be complete before this can be issued).
|
||||
|
||||
NOTES:
|
||||
1. tools/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.
|
||||
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/startup" directory.
|
||||
|
||||
2. EPICS binaries are kept in the bin/ARCH and lib/ARCH directories.
|
||||
EPICS shellscripts are kept in the tools directory.
|
||||
2. EPICS binaries and shellscripts are installed into the bin/ARCH and
|
||||
lib/ARCH directories.
|
||||
|
||||
3. During a normal build (a "make" or "make install"), the "depends"
|
||||
dependency will NOT be invoked. Only if "make depends" is run
|
||||
explicitly, or a "make built_release" is performed will dependencies
|
||||
be generated automatically.
|
||||
dependency will NOT be invoked. Only if "make depends" is run
|
||||
explicitly, or a "make built_release" is performed will dependencies
|
||||
be generated automatically.
|
||||
|
||||
4. Temporary objects are stored in src/DIR/O.ARCH, This allows objects
|
||||
for multiple architectures to be maintained at the same time.
|
||||
While developing source for EPICS, merely cd src/DIR/O.ARCH, and
|
||||
invoke "make":
|
||||
for multiple architectures to be maintained at the same time.
|
||||
While developing source for EPICS, merely cd src/DIR/O.ARCH, and
|
||||
invoke "make":
|
||||
|
||||
cd epics/base/src/db/O.mv167
|
||||
make dbAccess.o
|
||||
cd epics/base/src/db/O.mv167
|
||||
make dbAccess.o
|
||||
|
||||
The above example instructs make to build dbAccess.o for the
|
||||
mv167 target.
|
||||
The above example instructs make to build dbAccess.o for the
|
||||
mv167 target.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Part 2 --- Configuration Files in epics/config
|
||||
@@ -107,7 +99,9 @@ CONFIG_SITE - This file is meant to be changed only by the EPICS system
|
||||
manager. It specifies:
|
||||
|
||||
HOST_ARCH: The system's host architecture (sun4/hp700/etc).
|
||||
BUILD_ARCHS: List of architectures to be built.
|
||||
This now come from an environment variable.
|
||||
CROSS_COMPILER_HOST_ARCHS: List of unix architectures with cross_compilers.
|
||||
CROSS_COMPILER_TARGET_ARCHS: List of architectures to build epics for.
|
||||
VX_DIR: Location of vxWorks.
|
||||
STATIC_BUILD: Whether or not to build clients statically.
|
||||
etc.
|
||||
@@ -130,11 +124,16 @@ define compile and link flags.
|
||||
----------------------------------------------------------------------------
|
||||
CONFIG_COMMON - Contains definitions describing the layout of base.
|
||||
----------------------------------------------------------------------------
|
||||
HRULES - Rules for traversing hierarchical directories.
|
||||
CONFIG_BASE
|
||||
CONFIG_EXTENSIONS - Defines what subdirectories get built by default under
|
||||
base and extensions.
|
||||
----------------------------------------------------------------------------
|
||||
RULES.Vx - Rules for building with VxWorks makefiles.
|
||||
----------------------------------------------------------------------------
|
||||
RULES.Unix - Rules for building with Unix makefiles.
|
||||
----------------------------------------------------------------------------
|
||||
RULES_ARCHS
|
||||
RULES_DIRS - Allows top-level type command syntax in low-level directories.
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Table of files to change when building and adding architectures.
|
||||
@@ -149,10 +148,13 @@ CONFIG_SITE.Unix.ARCH_CLASS m - c* -
|
||||
CONFIG_SITE.Vx.ARCH_CLASS m c* - -
|
||||
CONFIG.Unix.ARCH_CLASS - - c* -
|
||||
CONFIG.Vx.ARCH_CLASS - c* - -
|
||||
CONFIG_COMMON - - - -
|
||||
HRULES - - - -
|
||||
RULES.Vx - - - -
|
||||
RULES.Unix - - - -
|
||||
CONFIG_BASE - - - -
|
||||
CONFIG_EXTENSIONS - - - -
|
||||
CONFIG_COMMON - - - -
|
||||
RULES_ARCHS - - - -
|
||||
RULES_DIRS - - - -
|
||||
|
||||
m - Modify an existing file.
|
||||
c - Create a new file.
|
||||
|
||||
23
README.Linux
Normal file
23
README.Linux
Normal file
@@ -0,0 +1,23 @@
|
||||
Special Notes on Linux
|
||||
1) The epics makefiles use GNU make which is the make that comes
|
||||
with Linux. You need to make a link from make to gnumake and
|
||||
have it in your path. After you have defined the EPICS environement
|
||||
variable, you can use:
|
||||
|
||||
ln -s /usr/bin/make $EPICS/base/tools/gnumake
|
||||
|
||||
2) At this point, support for Linux only involves channel access
|
||||
clients. Since Vxworks is not available for Linux, you must
|
||||
use other platforms for developing server side code.
|
||||
|
||||
3) You MUST start caRepeater by hand before running a client.
|
||||
Prior to running a client, you must run:
|
||||
|
||||
caRepeater &
|
||||
|
||||
---
|
||||
jpq@nwu.edu
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,42 +4,9 @@
|
||||
# M. Anderson and J. Tang
|
||||
|
||||
|
||||
- EPICS environment variable - set by hand prior to build
|
||||
|
||||
For EPICS builds on HP700 and Alpha OSF/1, set an environment variable "EPICS"
|
||||
to the base of the EPICS directory to do builds in (the directory where
|
||||
this file resides, for instance).
|
||||
|
||||
If you are currently in the base directory, then do the following:
|
||||
% setenv EPICS $cwd
|
||||
|
||||
|
||||
- set path to include gnu make and base/tools and base/bin/<arch>
|
||||
|
||||
Then set the path such that a recent version (e.g. V3.70) of gnumake
|
||||
is available (as make) before any system supplied makes, and that
|
||||
$EPICS/base/tools and $EPICS/base/bin/<arch> are included as well.
|
||||
|
||||
For example:
|
||||
|
||||
% set path=(/usr/local/bin $EPICS/base/tools $EPICS/base/bin/hp700 $path)
|
||||
|
||||
|
||||
- to build multiple architectures in same tree
|
||||
|
||||
To build multiple architectures in the same directory tree, you
|
||||
can avoid editing CONFIG_SITE by simply issuing make with HOST_ARCH=<arch>
|
||||
|
||||
For example:
|
||||
|
||||
% make HOST_ARCH=hp700
|
||||
|
||||
|
||||
Also, directory permissions may not be correct across multiple machines,
|
||||
so a
|
||||
- Directory permissions may not be correct across multiple machines, so a
|
||||
|
||||
% chmod -R ugo+rw base extensions
|
||||
|
||||
might be necessary.
|
||||
|
||||
- bsdinstall is written to replace install for hp.
|
||||
|
||||
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
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
----------------------------------------------------------------------------
|
||||
EPICS R3.12 Notes for Solaris 2.3
|
||||
EPICS R3.12.2 Notes for Solaris
|
||||
- By Andrew Johnson
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Notes:
|
||||
|
||||
1. In order to build and use EPICS under Solaris 2, you must include
|
||||
various directories in your path in the order given below, in addition
|
||||
to those named in base/README. Some of these directories may already be
|
||||
included in your path from your .login script or .cshrc file, so be
|
||||
careful that the ordering is correct.
|
||||
1. In order to build EPICS under Solaris 2, you must ensure that the
|
||||
solaris directory /usr/ccs/bin is in your search path.
|
||||
|
||||
setenv PATH /usr/ucb:/usr/bin:/usr/ccs/bin:$PATH
|
||||
2. It is not possible to compile EPICS under Solaris 2 using only the
|
||||
GNU gcc compiler -- you must have the Sun SPARCworks ANSI C compiler.
|
||||
|
||||
2. It is not possible to compile the whole of EPICS under Solaris 2
|
||||
using only the GNU gcc compiler - some routines which are needed (for
|
||||
example quiet_nan()) have been unbundled by Sun and are provided with
|
||||
their ANSI C compiler. The path to the Sun compiler is explicitly set
|
||||
using the SPARCWORKS definition in the file CONFIG_SITE.Unix.solaris
|
||||
|
||||
3. EPICS must be compiled and linked using the UCB compatability
|
||||
libraries. The definitions UCB_LIB and UCB_INCLUDE are used here to
|
||||
refer to these libraries and their header files, and the tools provided
|
||||
within /usr/ucb must be used in preference to the System V ones, hence
|
||||
the above path ordering.
|
||||
3. EPICS under Solaris 2 no longer uses the UCB compatability libraries.
|
||||
In order to ensure that the /usr/ucblib files are not inherited, you
|
||||
should ensure that your LD_LIBRARY_PATH environment variable does not
|
||||
include /usr/ucblib when you build any of the host tools.
|
||||
|
||||
--
|
||||
anj@mail.ast.cam.ac.uk
|
||||
anj@ast.cam.ac.uk
|
||||
|
||||
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.
|
||||
**********************************************************************/
|
||||
10
SkeletonCOPYRIGHT_UniversityOfChicago
Normal file
10
SkeletonCOPYRIGHT_UniversityOfChicago
Normal file
@@ -0,0 +1,10 @@
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
|
||||
|
||||
This software was developed under a United States Government license
|
||||
described on the COPYRIGHT_UniversityOfChicago file included as part
|
||||
of this distribution.
|
||||
**********************************************************************/
|
||||
41
config/CONFIG
Normal file
41
config/CONFIG
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
ifdef T_A
|
||||
|
||||
# Architecture specific definitions
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG.$(T_A)
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE.$(T_A)
|
||||
|
||||
endif
|
||||
|
||||
# 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.
|
||||
#
|
||||
|
||||
106
config/CONFIG.Linux
Normal file
106
config/CONFIG.Linux
Normal file
@@ -0,0 +1,106 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -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))
|
||||
|
||||
# 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)
|
||||
CXX =$($(CPLUSPLUS))
|
||||
|
||||
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
|
||||
61
config/CONFIG.Vx.68k
Normal file
61
config/CONFIG.Vx.68k
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
# $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
|
||||
CPP = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
#CPP = $(CC) -E
|
||||
GCC = $(CC)
|
||||
LD = $(VX_GNU_BIN)/ld68k -r
|
||||
EPICS_LDLIBS =
|
||||
|
||||
# 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)
|
||||
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)
|
||||
|
||||
CPPSNCFLAGS = $(USR_INCLUDES) $(VX_INCLUDES)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) >> .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Vx.68k
|
||||
99
config/CONFIG.alpha
Normal file
99
config/CONFIG.alpha
Normal file
@@ -0,0 +1,99 @@
|
||||
# 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
|
||||
|
||||
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))
|
||||
|
||||
# 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)
|
||||
CXX =$($(CPLUSPLUS))
|
||||
|
||||
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
|
||||
|
||||
108
config/CONFIG.hp700
Normal file
108
config/CONFIG.hp700
Normal file
@@ -0,0 +1,108 @@
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
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)
|
||||
CXX =$($(CPLUSPLUS))
|
||||
|
||||
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
|
||||
|
||||
105
config/CONFIG.sgi
Normal file
105
config/CONFIG.sgi
Normal file
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
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))
|
||||
|
||||
# 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)
|
||||
CXX =$($(CPLUSPLUS))
|
||||
|
||||
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
|
||||
114
config/CONFIG.solaris
Normal file
114
config/CONFIG.solaris
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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= -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)
|
||||
UNIX_LDLIBS = $(UNIX_SLIBS) -lm
|
||||
|
||||
# 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)
|
||||
CXX = $(CCC)
|
||||
|
||||
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
|
||||
118
config/CONFIG.sun4
Normal file
118
config/CONFIG.sun4
Normal file
@@ -0,0 +1,118 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -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
|
||||
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
|
||||
|
||||
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= -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)
|
||||
|
||||
#
|
||||
# The three nested if stmnts here document the fact that current
|
||||
# organization here requires that we must use gcc for
|
||||
# all compilation or not at all (no mixed compiler compilation)
|
||||
#
|
||||
UNIX_LDLIBS = -lm
|
||||
#ifeq ($(ANSI), GCC)
|
||||
#ifeq ($(STANDARD), GCC)
|
||||
#ifeq ($(CPLUSPLUS), G++)
|
||||
UNIX_LDLIBS += -liberty
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
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)
|
||||
CXX =$($(CPLUSPLUS))
|
||||
|
||||
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
|
||||
57
config/CONFIG_BASE
Normal file
57
config/CONFIG_BASE
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# the order of following lists are important
|
||||
|
||||
DIRS_Vx= \
|
||||
src/libCom\
|
||||
src/libvxWorks\
|
||||
src/bpt\
|
||||
src/util\
|
||||
src/sequencer\
|
||||
src/misc\
|
||||
src/db\
|
||||
src/ca\
|
||||
src/rsrv\
|
||||
src/dbStatic\
|
||||
src/dbtools\
|
||||
src/rec\
|
||||
src/as\
|
||||
src/drv/ansi\
|
||||
src/drv/old\
|
||||
src/dev\
|
||||
src/devOpt\
|
||||
src/iocCore
|
||||
|
||||
DIRS_Unix= \
|
||||
src/tools \
|
||||
src/include \
|
||||
src/cxxTemplates \
|
||||
src/db \
|
||||
src/toolsComm/antelope \
|
||||
src/toolsComm/flex \
|
||||
src/libCom \
|
||||
src/cvtDctsdr \
|
||||
src/dbStatic \
|
||||
src/bpt \
|
||||
src/ca \
|
||||
src/gdd \
|
||||
src/cas/generic \
|
||||
src/cas/build/singleThread \
|
||||
src/cas/example \
|
||||
src/as \
|
||||
src/util \
|
||||
src/sequencer \
|
||||
src/dbtools \
|
||||
config
|
||||
|
||||
DIRS = $(DIRS_$(BUILD_TYPE))
|
||||
|
||||
EPICS_BASE = $(TOP)
|
||||
|
||||
# EPICS include config file
|
||||
include $(TOP)/config/CONFIG
|
||||
|
||||
EPICS_BASE = $(INSTALL_LOCATION)
|
||||
|
||||
79
config/CONFIG_COMMON
Normal file
79
config/CONFIG_COMMON
Normal file
@@ -0,0 +1,79 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
97
config/CONFIG_SITE
Normal file
97
config/CONFIG_SITE
Normal file
@@ -0,0 +1,97 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
13
config/CONFIG_SITE.Linux
Normal file
13
config/CONFIG_SITE.Linux
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
14
config/CONFIG_SITE.alpha
Normal file
14
config/CONFIG_SITE.alpha
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
|
||||
14
config/CONFIG_SITE.hp700
Normal file
14
config/CONFIG_SITE.hp700
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
|
||||
21
config/CONFIG_SITE.sgi
Normal file
21
config/CONFIG_SITE.sgi
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
# Special C library requirements
|
||||
SPECIAL_LANG = /usr/lang/SC2.0.1patch
|
||||
SPECIAL_LDFLAGS = -L$(SPECIAL_LANG)
|
||||
|
||||
|
||||
20
config/CONFIG_SITE.solaris
Normal file
20
config/CONFIG_SITE.solaris
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
|
||||
|
||||
# Unbundled C compiler stuff
|
||||
SPARCWORKS = /opt/SUNWspro
|
||||
#SPECIAL_LANG = $(SPARCWORKS)/SC3.0/lib
|
||||
#SPECIAL_LANG = .
|
||||
#SPECIAL_LDFLAGS = -L$(SPECIAL_LANG)
|
||||
|
||||
|
||||
23
config/CONFIG_SITE.sun4
Normal file
23
config/CONFIG_SITE.sun4
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# $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
|
||||
|
||||
#CMPLR=STRICT
|
||||
#ANSI=GCC
|
||||
#STANDARD=GCC
|
||||
#CPLUSPLUS=G++
|
||||
|
||||
# Special C library requirements
|
||||
SPECIAL_LANG = /usr/lang/SC2.0.1patch
|
||||
SPECIAL_LDFLAGS = -L$(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
|
||||
|
||||
53
config/Makefile.Unix
Normal file
53
config/Makefile.Unix
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
TOP = ../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CONFIGS += CONFIG
|
||||
CONFIGS += CONFIG_BASE
|
||||
CONFIGS += CONFIG_COMMON
|
||||
CONFIGS += CONFIG_ENV
|
||||
|
||||
CONFIGS += CONFIG.Linux
|
||||
CONFIGS += CONFIG.alpha
|
||||
CONFIGS += CONFIG.hp700
|
||||
CONFIGS += CONFIG.sgi
|
||||
CONFIGS += CONFIG.solaris
|
||||
CONFIGS += CONFIG.sun4
|
||||
CONFIGS += CONFIG.hkv2f
|
||||
CONFIGS += CONFIG.mv147
|
||||
CONFIGS += CONFIG.mv162
|
||||
CONFIGS += CONFIG.mv162lc
|
||||
CONFIGS += CONFIG.mv167
|
||||
CONFIGS += CONFIG.niCpu030
|
||||
|
||||
CONFIGS += CONFIG.Vx.68k
|
||||
|
||||
CONFIGS += CONFIG_SITE
|
||||
CONFIGS += CONFIG_SITE_ENV
|
||||
|
||||
CONFIGS += CONFIG_SITE.Linux
|
||||
CONFIGS += CONFIG_SITE.alpha
|
||||
CONFIGS += CONFIG_SITE.hp700
|
||||
CONFIGS += CONFIG_SITE.sgi
|
||||
CONFIGS += CONFIG_SITE.solaris
|
||||
CONFIGS += CONFIG_SITE.sun4
|
||||
CONFIGS += CONFIG_SITE.hkv2f
|
||||
CONFIGS += CONFIG_SITE.mv147
|
||||
CONFIGS += CONFIG_SITE.mv162lc
|
||||
CONFIGS += CONFIG_SITE.mv162
|
||||
CONFIGS += CONFIG_SITE.mv167
|
||||
CONFIGS += CONFIG_SITE.niCpu030
|
||||
|
||||
CONFIGS += RULES.Unix
|
||||
CONFIGS += RULES.Vx
|
||||
CONFIGS += RULES_ARCHS
|
||||
CONFIGS += RULES_DIRS
|
||||
CONFIGS += RULES_TOP
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
|
||||
|
||||
200
config/RULES.Unix
Normal file
200
config/RULES.Unix
Normal file
@@ -0,0 +1,200 @@
|
||||
# $Id$
|
||||
|
||||
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)
|
||||
|
||||
install: build $(INSTALL_INC) $(INSTALL_LIBS) $(TARGETS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MANS) $(INSTALL_DOCS) $(INSTALL_SCRIPTS) $(INSTALL_TEMPLATE) \
|
||||
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) $(INSTALL_CONFIGS)
|
||||
|
||||
depends: $(SRCS.c) $(SRCS.cc)
|
||||
rm -f .DEPENDS
|
||||
touch .DEPENDS
|
||||
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: ../%.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.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 rule
|
||||
%.c: ../%.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@echo "converting $*.i"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
||||
|
||||
$(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_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_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 $@"
|
||||
@test -d $(INSTALL_TEMPLATES) || mkdir $(INSTALL_TEMPLATES)
|
||||
@test -d $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR) || \
|
||||
mkdir $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_TEMPLATES) || mkdir $(INSTALL_TEMPLATES)
|
||||
@test -d $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR) || \
|
||||
mkdir $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
include .DEPENDS
|
||||
|
||||
199
config/RULES.Vx
Normal file
199
config/RULES.Vx
Normal file
@@ -0,0 +1,199 @@
|
||||
# $Id$
|
||||
|
||||
INC +=$(RECTYPES) $(MENUS)
|
||||
INSTALL_PROD=$(PROD:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_BIN)/%)
|
||||
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_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_DBDEXPAND=$(DBDEXPAND:%=$(INSTALL_DBD)/%)
|
||||
all: install
|
||||
|
||||
pre_build:
|
||||
|
||||
build: pre_build $(MENUS) $(RECTYPES) $(BPTS)\
|
||||
$(LIBNAME) $(TARGETS) $(PROD) $(DBDEXPAND)
|
||||
|
||||
install: build $(INSTALL_INC)\
|
||||
$(INSTALL_LIBS) $(TARGETS) $(INSTALL_PROD) $(INSTALL_MANS)\
|
||||
$(INSTALL_DOCS) $(INSTALL_SCRIPTS)\
|
||||
$(INSTALL_INSTALLS) $(INSTALL_DBS)\
|
||||
$(INSTALL_MENUS) $(INSTALL_RECTYPES) $(INSTALL_BPTS)\
|
||||
$(INSTALL_DBDEXPAND)
|
||||
|
||||
depends: $(SRCS.c) $(SRCS.cc)
|
||||
rm -f .DEPENDS
|
||||
touch .DEPENDS
|
||||
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: ../%.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.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 rule
|
||||
%.c: ../%.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@echo "converting $*.i"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DBD) || mkdir $(INSTALL_DBD)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DBD)
|
||||
|
||||
$(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 $<
|
||||
|
||||
%.dbd: ../%.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbExpand\
|
||||
$(USER_DBDFLAGS) $< > $(<F)
|
||||
|
||||
$(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)/%: ../%
|
||||
@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_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
|
||||
|
||||
include .DEPENDS
|
||||
|
||||
75
config/RULES_ARCHS
Normal file
75
config/RULES_ARCHS
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# EPICS RULES_ARCH
|
||||
# by Matthew Needes and Mike Bordua and Janet Anderson
|
||||
#
|
||||
|
||||
all:: install
|
||||
|
||||
dirs::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} dir "T_A=${ARCH}"; \
|
||||
done)
|
||||
|
||||
depends::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} arch "T_A=$${ARCH}" ACTION=$@; \
|
||||
done)
|
||||
|
||||
build::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} arch "T_A=$${ARCH}" ACTION=$@; \
|
||||
done)
|
||||
|
||||
install::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} arch "T_A=$${ARCH}" ACTION=$@; \
|
||||
done)
|
||||
|
||||
clean::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} arch "T_A=$${ARCH}" ACTION=$@; \
|
||||
done)
|
||||
|
||||
|
||||
dirs.%::
|
||||
@${MAKE} dir T_A=$*
|
||||
|
||||
depends.%::
|
||||
@${MAKE} arch T_A=$* ACTION=depends
|
||||
|
||||
build.%::
|
||||
@${MAKE} arch T_A=$* ACTION=build
|
||||
|
||||
install.%::
|
||||
@${MAKE} arch T_A=$* ACTION=install
|
||||
|
||||
clean.%::
|
||||
@${MAKE} arch T_A=$* ACTION=clean
|
||||
|
||||
${BUILD_ARCHS}::
|
||||
@${MAKE} arch T_A=$@ ACTION=install
|
||||
|
||||
|
||||
arch: dir
|
||||
@if [ -f Makefile.${BUILD_TYPE} ] ; then \
|
||||
echo "${T_A}: ${ACTION}"; \
|
||||
cd O.${T_A}; ${MAKE} ${ACTION} ; \
|
||||
fi
|
||||
|
||||
dir:
|
||||
@if [ -f Makefile.${BUILD_TYPE} ] ; then \
|
||||
test -f ./.cvsignore || \
|
||||
echo "O.*" > ./.cvsignore; \
|
||||
test -d O.${T_A} || \
|
||||
( echo "Creating O.${T_A}"; mkdir O.${T_A};); \
|
||||
test -f O.${T_A}/Makefile || \
|
||||
( echo "T_A=${T_A}" > O.${T_A}/Makefile; \
|
||||
echo "include ../Makefile.${BUILD_TYPE}" \
|
||||
>> O.${T_A}/Makefile;); \
|
||||
test -f O.${T_A}/.DEPENDS || \
|
||||
touch O.${T_A}/.DEPENDS; \
|
||||
fi
|
||||
|
||||
|
||||
70
config/RULES_DIRS
Normal file
70
config/RULES_DIRS
Normal file
@@ -0,0 +1,70 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Top level rules For Subdirectory Recursions
|
||||
#
|
||||
|
||||
all:: install
|
||||
|
||||
dirs::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
depends::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
build::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
install::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
clean::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
|
||||
|
||||
dirs.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
depends.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
build.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
install.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
clean.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
96
config/RULES_TOP
Normal file
96
config/RULES_TOP
Normal file
@@ -0,0 +1,96 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
all:: install
|
||||
|
||||
dirs::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
depends::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
build::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
install::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
clean::
|
||||
@echo "TOP: Cleaning
|
||||
@for DIR in ${DIRS}; do \
|
||||
find $$DIR/src -type d -name "O.*" -prune -exec rm -rf {} \; ; \
|
||||
done
|
||||
|
||||
uninstall::
|
||||
@(for ARCH in ${BUILD_ARCHS}; do \
|
||||
${MAKE} $@.$${ARCH}; \
|
||||
done)
|
||||
|
||||
|
||||
|
||||
dirs.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
depends.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
build.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
install.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
clean.%::
|
||||
@for DIR in ${DIRS}; do \
|
||||
echo "$@: $$DIR"; \
|
||||
if [ -d $$DIR ]; then TMP=`pwd`; cd $$DIR; ${MAKE} $@; cd $${TMP}; fi; \
|
||||
done
|
||||
|
||||
uninstall.%::
|
||||
@echo "TOP: Uninstalling $* "
|
||||
@rm -rf ./bin/$* ./lib/$* dbd include man
|
||||
@rm -rf rec.bak rec
|
||||
|
||||
|
||||
DIRNAME=$(notdir $(shell pwd))
|
||||
|
||||
tar:
|
||||
@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
|
||||
|
||||
|
||||
@@ -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,18 +1,17 @@
|
||||
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
|
||||
|
||||
LEX = $(ELEX)
|
||||
YACC = $(EYACC)
|
||||
INC += asDbLib.h
|
||||
INC += asLib.h
|
||||
|
||||
SRCS.c = ../ascheck.c asLib.c
|
||||
OBJS = ascheck.o
|
||||
@@ -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,14 +1,13 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
|
||||
SRCS.c = ../asDbLib.c ../asCa.c asLib.c
|
||||
OBJS = asDbLib.o asCa.o asLib.o
|
||||
PROD = asLibrary
|
||||
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
|
||||
@@ -18,7 +17,4 @@ asLib.o: asLib_lex.c ../asLibRoutines.c
|
||||
clean::
|
||||
@$(RM) asLib_lex.c asLib.c
|
||||
|
||||
asLibrary : $(OBJS)
|
||||
$(RM) $@
|
||||
$(LINK.c) $@ $(OBJS) $(LDLIBS)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -58,9 +58,13 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <taskwd.h>
|
||||
#include <alarm.h>
|
||||
#include <caeventmask.h>
|
||||
#include <dbStaticLib.h>
|
||||
#include <dbAccess.h>
|
||||
#include <asLib.h>
|
||||
#include <asDbLib.h>
|
||||
#include <dbCommon.h>
|
||||
@@ -68,7 +72,7 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
#include <subRecord.h>
|
||||
#include <task_params.h>
|
||||
|
||||
extern struct dbBase *pdbBase;
|
||||
extern struct dbBase *pdbbase;
|
||||
static FILE *stream;
|
||||
|
||||
#define BUF_SIZE 100
|
||||
@@ -97,13 +101,13 @@ static int my_yyinput(char *buf, int max_size)
|
||||
|
||||
static long asDbAddRecords(void)
|
||||
{
|
||||
DBENTRY dbentry;
|
||||
DBENTRY *pdbentry=&dbentry;
|
||||
long status;
|
||||
struct dbCommon *precord;
|
||||
DBENTRY dbentry;
|
||||
DBENTRY *pdbentry=&dbentry;
|
||||
long status;
|
||||
dbCommon *precord;
|
||||
|
||||
dbInitEntry(pdbBase,pdbentry);
|
||||
status = dbFirstRecdes(pdbentry);
|
||||
dbInitEntry(pdbbase,pdbentry);
|
||||
status = dbFirstRecordType(pdbentry);
|
||||
while(!status) {
|
||||
status = dbFirstRecord(pdbentry);
|
||||
while(!status) {
|
||||
@@ -115,7 +119,7 @@ static long asDbAddRecords(void)
|
||||
}
|
||||
status = dbNextRecord(pdbentry);
|
||||
}
|
||||
status = dbNextRecdes(pdbentry);
|
||||
status = dbNextRecordType(pdbentry);
|
||||
}
|
||||
dbFinishEntry(pdbentry);
|
||||
return(0);
|
||||
@@ -148,13 +152,16 @@ static long asInitCommon(void)
|
||||
long status;
|
||||
char buffer[BUF_SIZE];
|
||||
|
||||
if(!pacf) return(0);
|
||||
if(asLockInit) {
|
||||
FASTLOCKINIT(&asLock);
|
||||
asLockInit = FALSE;
|
||||
}
|
||||
FASTLOCK(&asLock);
|
||||
if(asActive)asCaStop();
|
||||
if(!pacf) {
|
||||
asActive = FALSE;
|
||||
return(0);
|
||||
}
|
||||
buffer[0] = 0;
|
||||
my_buffer = buffer;
|
||||
my_buffer_ptr = my_buffer;
|
||||
@@ -177,8 +184,9 @@ static long asInitCommon(void)
|
||||
int asInit(void)
|
||||
{
|
||||
|
||||
asInitCommon();
|
||||
return(0);
|
||||
/*If no access configuration file defined return success*/
|
||||
if(!pacf) return(0);
|
||||
return(asInitCommon());
|
||||
}
|
||||
|
||||
static void wdCallback(ASDBCALLBACK *pcallback)
|
||||
@@ -232,7 +240,7 @@ int asInitAsyn(ASDBCALLBACK *pcallback)
|
||||
static void myCallback(CALLBACK *pcallback)
|
||||
{
|
||||
ASDBCALLBACK *pasdbcallback = (ASDBCALLBACK *)pcallback;
|
||||
struct subRecord *precord;
|
||||
subRecord *precord;
|
||||
struct rset *prset;
|
||||
|
||||
callbackGetUser(precord,pcallback);
|
||||
@@ -242,12 +250,12 @@ static void myCallback(CALLBACK *pcallback)
|
||||
recGblSetSevr(precord,READ_ALARM,precord->brsv);
|
||||
recGblRecordError(pasdbcallback->status,precord,"asInit Failed");
|
||||
}
|
||||
dbScanLock((struct dbCommon *)precord);
|
||||
(*prset->process)((struct dbCommon *)precord);
|
||||
dbScanUnlock((struct dbCommon *)precord);
|
||||
dbScanLock((dbCommon *)precord);
|
||||
(*prset->process)((dbCommon *)precord);
|
||||
dbScanUnlock((dbCommon *)precord);
|
||||
}
|
||||
|
||||
long asSubInit(struct subRecord *precord,int pass)
|
||||
long asSubInit(subRecord *precord,int pass)
|
||||
{
|
||||
ASDBCALLBACK *pcallback;
|
||||
|
||||
@@ -258,7 +266,7 @@ long asSubInit(struct subRecord *precord,int pass)
|
||||
return(0);
|
||||
}
|
||||
|
||||
long asSubProcess(struct subRecord *precord)
|
||||
long asSubProcess(subRecord *precord)
|
||||
{
|
||||
ASDBCALLBACK *pcallback = (ASDBCALLBACK *)precord->dpvt;
|
||||
|
||||
@@ -275,8 +283,8 @@ long asSubProcess(struct subRecord *precord)
|
||||
|
||||
int asDbGetAsl(void *paddress)
|
||||
{
|
||||
struct dbAddr *paddr = paddress;
|
||||
struct fldDes *pflddes;
|
||||
DBADDR *paddr = paddress;
|
||||
dbFldDes *pflddes;
|
||||
|
||||
pflddes = paddr->pfldDes;
|
||||
return((int)pflddes->as_level);
|
||||
@@ -284,8 +292,8 @@ int asDbGetAsl(void *paddress)
|
||||
|
||||
ASMEMBERPVT asDbGetMemberPvt(void *paddress)
|
||||
{
|
||||
struct dbAddr *paddr = paddress;
|
||||
struct dbCommon *precord;
|
||||
DBADDR *paddr = paddress;
|
||||
dbCommon *precord;
|
||||
|
||||
precord = paddr->precord;
|
||||
return((ASMEMBERPVT)precord->asp);
|
||||
@@ -293,20 +301,23 @@ 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"));
|
||||
}
|
||||
|
||||
int astac(char *pname,char *user,char *location)
|
||||
{
|
||||
struct dbAddr *paddr;
|
||||
long status;
|
||||
ASCLIENTPVT *pasclientpvt=NULL;
|
||||
struct dbCommon *precord;
|
||||
struct fldDes *pflddes;
|
||||
DBADDR *paddr;
|
||||
long status;
|
||||
ASCLIENTPVT *pasclientpvt=NULL;
|
||||
dbCommon *precord;
|
||||
dbFldDes *pflddes;
|
||||
|
||||
paddr = dbCalloc(1,sizeof(struct dbAddr) + sizeof(ASCLIENTPVT));
|
||||
paddr = dbCalloc(1,sizeof(DBADDR) + sizeof(ASCLIENTPVT));
|
||||
pasclientpvt = (ASCLIENTPVT *)(paddr + 1);
|
||||
status=dbNameToAddr(pname,paddr);
|
||||
if(status) {
|
||||
@@ -321,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);
|
||||
@@ -328,7 +340,7 @@ int astac(char *pname,char *user,char *location)
|
||||
|
||||
static void myMemberCallback(ASMEMBERPVT memPvt)
|
||||
{
|
||||
struct dbCommon *precord;
|
||||
dbCommon *precord;
|
||||
|
||||
precord = asGetMemberPvt(memPvt);
|
||||
if(precord) printf(" Record:%s",precord->name);
|
||||
|
||||
78
src/as/asDbLib.h
Normal file
78
src/as/asDbLib.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/* share/epicsH/dbAsLib.h */
|
||||
/* $Id$ */
|
||||
/* Author: Marty Kraimer Date: 02-23-94*/
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
THE FOLLOWING IS A NOTICE OF COPYRIGHT, AVAILABILITY OF THE CODE,
|
||||
AND DISCLAIMER WHICH MUST BE INCLUDED IN THE PROLOGUE OF THE CODE
|
||||
AND IN ALL SOURCE LISTINGS OF THE CODE.
|
||||
|
||||
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
|
||||
|
||||
Argonne National Laboratory (ANL), with facilities in the States of
|
||||
Illinois and Idaho, is owned by the United States Government, and
|
||||
operated by the University of Chicago under provision of a contract
|
||||
with the Department of Energy.
|
||||
|
||||
Portions of this material resulted from work developed under a U.S.
|
||||
Government contract and are subject to the following license: For
|
||||
a period of five years from March 30, 1993, the Government is
|
||||
granted for itself and others acting on its behalf a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, and perform
|
||||
publicly and display publicly. With the approval of DOE, this
|
||||
period may be renewed for two additional five year periods.
|
||||
Following the expiration of this period or periods, the Government
|
||||
is granted for itself and others acting on its behalf, a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, distribute copies
|
||||
to the public, perform publicly and display publicly, and to permit
|
||||
others to do so.
|
||||
|
||||
*****************************************************************
|
||||
DISCLAIMER
|
||||
*****************************************************************
|
||||
|
||||
NEITHER THE UNITED STATES GOVERNMENT NOR ANY AGENCY THEREOF, NOR
|
||||
THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES OR OFFICERS,
|
||||
MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL
|
||||
LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
|
||||
USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS
|
||||
DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY
|
||||
OWNED RIGHTS.
|
||||
|
||||
*****************************************************************
|
||||
LICENSING INQUIRIES MAY BE DIRECTED TO THE INDUSTRIAL TECHNOLOGY
|
||||
DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 02-23-94 mrk Initial Implementation
|
||||
*/
|
||||
|
||||
#ifndef INCdbAsLibh
|
||||
#define INCdbAsLibh
|
||||
#include <asLib.h>
|
||||
#include <callback.h>
|
||||
|
||||
typedef struct {
|
||||
CALLBACK callback;
|
||||
long status;
|
||||
} ASDBCALLBACK;
|
||||
|
||||
int asSetFilename(char *acf);
|
||||
int asInit(void);
|
||||
int asInitAsyn(ASDBCALLBACK *pcallback);
|
||||
int asDbGetAsl( void *paddr);
|
||||
ASMEMBERPVT asDbGetMemberPvt( void *paddr);
|
||||
int asdbdump( void);
|
||||
int aspuag(char *uagname);
|
||||
int asphag(char *hagname);
|
||||
int asprules(char *asgname);
|
||||
int aspmem(char *asgname,int clients);
|
||||
void asCaStart(void);
|
||||
void asCaStop(void);
|
||||
|
||||
#endif /*INCdbAsLibh*/
|
||||
223
src/as/asLib.h
Normal file
223
src/as/asLib.h
Normal file
@@ -0,0 +1,223 @@
|
||||
/* $Id$ */
|
||||
/* Author: Marty Kraimer Date: 09-27-93*/
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
THE FOLLOWING IS A NOTICE OF COPYRIGHT, AVAILABILITY OF THE CODE,
|
||||
AND DISCLAIMER WHICH MUST BE INCLUDED IN THE PROLOGUE OF THE CODE
|
||||
AND IN ALL SOURCE LISTINGS OF THE CODE.
|
||||
|
||||
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
|
||||
|
||||
Argonne National Laboratory (ANL), with facilities in the States of
|
||||
Illinois and Idaho, is owned by the United States Government, and
|
||||
operated by the University of Chicago under provision of a contract
|
||||
with the Department of Energy.
|
||||
|
||||
Portions of this material resulted from work developed under a U.S.
|
||||
Government contract and are subject to the following license: For
|
||||
a period of five years from March 30, 1993, the Government is
|
||||
granted for itself and others acting on its behalf a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, and perform
|
||||
publicly and display publicly. With the approval of DOE, this
|
||||
period may be renewed for two additional five year periods.
|
||||
Following the expiration of this period or periods, the Government
|
||||
is granted for itself and others acting on its behalf, a paid-up,
|
||||
nonexclusive, irrevocable worldwide license in this computer
|
||||
software to reproduce, prepare derivative works, distribute copies
|
||||
to the public, perform publicly and display publicly, and to permit
|
||||
others to do so.
|
||||
|
||||
*****************************************************************
|
||||
DISCLAIMER
|
||||
*****************************************************************
|
||||
|
||||
NEITHER THE UNITED STATES GOVERNMENT NOR ANY AGENCY THEREOF, NOR
|
||||
THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES OR OFFICERS,
|
||||
MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL
|
||||
LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
|
||||
USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS
|
||||
DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY
|
||||
OWNED RIGHTS.
|
||||
|
||||
*****************************************************************
|
||||
LICENSING INQUIRIES MAY BE DIRECTED TO THE INDUSTRIAL TECHNOLOGY
|
||||
DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 09-27-93 mrk Initial Implementation
|
||||
*/
|
||||
#ifndef INCasLibh
|
||||
#define INCasLibh
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <errMdef.h>
|
||||
#include <ellLib.h>
|
||||
|
||||
typedef struct asgMember *ASMEMBERPVT;
|
||||
typedef struct asgClient *ASCLIENTPVT;
|
||||
typedef int (*ASINPUTFUNCPTR)(char *buf,int max_size);
|
||||
typedef enum{
|
||||
asClientCOAR /*Change of access rights*/
|
||||
/*For now this is all*/
|
||||
} asClientStatus;
|
||||
typedef void (*ASCLIENTCALLBACK) (ASCLIENTPVT,asClientStatus);
|
||||
/* The following routines are macros with the following syntax
|
||||
long asCheckGet(ASCLIENTPVT asClientPvt);
|
||||
long asCheckPut(ASCLIENTPVT asClientPvt);
|
||||
end of macros
|
||||
*/
|
||||
int asInit(void);
|
||||
long asInitialize(ASINPUTFUNCPTR inputfunction);
|
||||
/*caller must provide permanent storage for asgName*/
|
||||
long asAddMember(ASMEMBERPVT *asMemberPvt,char *asgName);
|
||||
long asRemoveMember(ASMEMBERPVT *asMemberPvt);
|
||||
/*caller must provide permanent storage for newAsgName*/
|
||||
long asChangeGroup(ASMEMBERPVT *asMemberPvt,char *newAsgName);
|
||||
void *asGetMemberPvt(ASMEMBERPVT asMemberPvt);
|
||||
void asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt);
|
||||
/*client must provide permanent storage for user and host*/
|
||||
long asAddClient(ASCLIENTPVT *asClientPvt,ASMEMBERPVT asMemberPvt,
|
||||
int asl,char *user,char *host);
|
||||
/*client must provide permanent storage for user and host*/
|
||||
long asChangeClient(ASCLIENTPVT asClientPvt,int asl,char *user,char *host);
|
||||
long asRemoveClient(ASCLIENTPVT *asClientPvt);
|
||||
void *asGetClientPvt(ASCLIENTPVT asClientPvt);
|
||||
void asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt);
|
||||
long asRegisterClientCallback(ASCLIENTPVT asClientPvt,
|
||||
ASCLIENTCALLBACK pcallback);
|
||||
long asComputeAllAsg(void);
|
||||
/*asComputeAsg is defined after ASG is defined*/
|
||||
long asCompute(ASCLIENTPVT asClientPvt);
|
||||
int asDump(void (*memcallback)(ASMEMBERPVT),void (*clientcallback)(ASCLIENTPVT),int verbose);
|
||||
int asDumpUag(char *uagname);
|
||||
int asDumpHag(char *hagname);
|
||||
int asDumpRules(char *asgname);
|
||||
int asDumpMem(char *asgname,void (*memcallback)(ASMEMBERPVT),int clients);
|
||||
int asDumpHash(void);
|
||||
|
||||
#define S_asLib_clientsExist (M_asLib| 1) /*Client Exists*/
|
||||
#define S_asLib_noUag (M_asLib| 2) /*User Access Group does not exist*/
|
||||
#define S_asLib_noHag (M_asLib| 3) /*Host Access Group does not exist*/
|
||||
#define S_asLib_noAccess (M_asLib| 4) /*access security: no access allowed*/
|
||||
#define S_asLib_noModify (M_asLib| 5) /*access security: no modification allowed*/
|
||||
#define S_asLib_badConfig (M_asLib| 6) /*access security: bad configuration file*/
|
||||
#define S_asLib_badCalc (M_asLib| 7) /*access security: bad calculation espression*/
|
||||
#define S_asLib_dupAsg (M_asLib| 8) /*Duplicate Access Security Group */
|
||||
#define S_asLib_InitFailed (M_asLib| 9) /*access security: Init failed*/
|
||||
#define S_asLib_asNotActive (M_asLib|10) /*access security is not active*/
|
||||
#define S_asLib_badMember (M_asLib|11) /*access security: bad ASMEMBERPVT*/
|
||||
#define S_asLib_badClient (M_asLib|12) /*access security: bad ASCLIENTPVT*/
|
||||
#define S_asLib_badAsg (M_asLib|13) /*access security: bad ASG*/
|
||||
#define S_asLib_noMemory (M_asLib|14) /*access security: no Memory */
|
||||
|
||||
/*Private declarations */
|
||||
#define ASMAXINP 12
|
||||
#ifdef vxWorks
|
||||
#include <fast_lock.h>
|
||||
extern FAST_LOCK asLock;
|
||||
extern int asLockInit;
|
||||
#endif
|
||||
extern int asActive;
|
||||
/* definition of access rights*/
|
||||
typedef enum{asNOACCESS,asREAD,asWRITE} asAccessRights;
|
||||
|
||||
/*Base pointers for access security*/
|
||||
typedef struct asBase{
|
||||
ELLLIST uagList;
|
||||
ELLLIST hagList;
|
||||
ELLLIST asgList;
|
||||
void *phash;
|
||||
} ASBASE;
|
||||
/*Defs for User Access Groups*/
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
char *user;
|
||||
} UAGNAME;
|
||||
typedef struct uag{
|
||||
ELLNODE node;
|
||||
char *name;
|
||||
ELLLIST list; /*list of UAGNAME*/
|
||||
} UAG;
|
||||
/*Defs for Host Access Groups*/
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
char *host;
|
||||
} HAGNAME;
|
||||
typedef struct hag{
|
||||
ELLNODE node;
|
||||
char *name;
|
||||
ELLLIST list; /*list of HAGNAME*/
|
||||
} HAG;
|
||||
/*Defs for Access SecurityGroups*/
|
||||
typedef struct {
|
||||
ELLNODE node;
|
||||
UAG *puag;
|
||||
}ASGUAG;
|
||||
typedef struct {
|
||||
ELLNODE node;
|
||||
HAG *phag;
|
||||
}ASGHAG;
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
asAccessRights access;
|
||||
int level;
|
||||
int inpUsed; /*mask for which inputs are used*/
|
||||
int result; /*Result of calc converted to TRUE/FALSE*/
|
||||
char *calc;
|
||||
void *rpcl;
|
||||
ELLLIST uagList; /*List of ASGUAG*/
|
||||
ELLLIST hagList; /*List of ASGHAG*/
|
||||
} ASGRULE;
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
char *inp;
|
||||
void *capvt;
|
||||
struct asg *pasg;
|
||||
int inpIndex;
|
||||
}ASGINP;
|
||||
typedef struct asg{
|
||||
ELLNODE node;
|
||||
char *name;
|
||||
ELLLIST inpList;
|
||||
ELLLIST ruleList;
|
||||
ELLLIST memberList;
|
||||
double *pavalue; /*pointer to array of input values*/
|
||||
int inpBad; /*mask for which inputs are bad*/
|
||||
int inpChanged; /*mask showing inputs that have changed*/
|
||||
} ASG;
|
||||
typedef struct asgMember {
|
||||
ELLNODE node;
|
||||
ASG *pasg;
|
||||
ELLLIST clientList;
|
||||
char *asgName;
|
||||
void *userPvt;
|
||||
} ASGMEMBER;
|
||||
typedef struct asgClient {
|
||||
ELLNODE node;
|
||||
ASGMEMBER *pasgMember;
|
||||
char *user;
|
||||
char *host;
|
||||
void *userPvt;
|
||||
ASCLIENTCALLBACK pcallback;
|
||||
int level;
|
||||
asAccessRights access;
|
||||
} ASGCLIENT;
|
||||
/* function prototypes*/
|
||||
void *asCalloc(size_t nobj,size_t size);
|
||||
long asComputeAsg(ASG *pasg);
|
||||
/*macros*/
|
||||
#define asCheckGet(asClientPvt)\
|
||||
(asActive ?\
|
||||
((asClientPvt)->access>=asREAD ? TRUE : FALSE)\
|
||||
: TRUE)
|
||||
#define asCheckPut(asClientPvt)\
|
||||
(asActive ?\
|
||||
((asClientPvt)->access>=asWRITE ? TRUE : FALSE)\
|
||||
: TRUE)
|
||||
|
||||
#endif /*INCasLibh*/
|
||||
@@ -52,6 +52,10 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
* .01 10-15-93 mrk Initial Implementation
|
||||
*/
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
#endif
|
||||
#include <dbDefs.h>
|
||||
#include <asLib.h>
|
||||
#include <string.h>
|
||||
@@ -60,9 +64,6 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
#include <stdio.h>
|
||||
#include <gpHash.h>
|
||||
#include <freeList.h>
|
||||
#ifdef vxWorks
|
||||
#include <taskLib.h>
|
||||
#endif
|
||||
|
||||
/*Declare storage for Global Variables */
|
||||
ASBASE *pasbase=NULL;
|
||||
@@ -122,7 +123,7 @@ long asInitialize(ASINPUTFUNCPTR inputfunction)
|
||||
pasg->pavalue = asCalloc(ASMAXINP,sizeof(double));
|
||||
pasg = (ASG *)ellNext((ELLNODE *)pasg);
|
||||
}
|
||||
gphInitPvt(&pasbase->phash);
|
||||
gphInitPvt(&pasbase->phash,256);
|
||||
/*Hash each uagname and each hagname*/
|
||||
puag = (UAG *)ellFirst(&pasbase->uagList);
|
||||
while(puag) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
integer [0-9]
|
||||
name [a-zA-Z0-9_\.]
|
||||
pvname [a-zA-Z0-9_:\.\[\]<>]
|
||||
pvname [a-zA-Z0-9_\-:\.\[\]<>;]
|
||||
string [a-zA-Z0-9_\,\./\*#\[\]%: ;!|\'\-&\(\)@\?\+<>=\$]
|
||||
|
||||
%{
|
||||
|
||||
13
src/bdt/Makefile
Normal file
13
src/bdt/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Base Lowest Level Directroy Makefile
|
||||
# by Janet Anderson
|
||||
#
|
||||
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
10
src/bdt/Makefile.Unix
Normal file
10
src/bdt/Makefile.Unix
Normal file
@@ -0,0 +1,10 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += bdt.h
|
||||
|
||||
LIBOBJS += bdt.o
|
||||
|
||||
LIBNAME = libBdt.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
20
src/bdt/Makefile.Vx
Normal file
20
src/bdt/Makefile.Vx
Normal file
@@ -0,0 +1,20 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c += ../bdt.c
|
||||
SRCS.c += ../bdtServ.c
|
||||
SRCS.c += ../bdtServName.c
|
||||
SRCS.c += ../bdtServPv.c
|
||||
|
||||
OBJS += bdt.o
|
||||
OBJS += bdtServ.o
|
||||
OBJS += bdtServName.o
|
||||
OBJS += bdtServPv.o
|
||||
|
||||
PROD = bdt
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
$(PROD): $(OBJS)
|
||||
$(RM) $@
|
||||
$(LINK.c) $@ $(OBJS) $(LDLIBS)
|
||||
701
src/bdt/bdt.c
Normal file
701
src/bdt/bdt.c
Normal file
@@ -0,0 +1,701 @@
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef linux
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <vxWorks.h>
|
||||
#include <in.h>
|
||||
#include <inetLib.h>
|
||||
#include <taskLib.h>
|
||||
#include <ioLib.h>
|
||||
#include <selectLib.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "bdt.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* server mode functions */
|
||||
|
||||
#ifndef vxWorks /* server mode functions */
|
||||
static char* filename=(char*)NULL;
|
||||
|
||||
/* ----------------------------- */
|
||||
/* signal catcher for the server */
|
||||
/* ----------------------------- */
|
||||
static void catch_sig(int sig)
|
||||
{
|
||||
fprintf(stderr,"\nbdt server exiting\n");
|
||||
unlink(filename);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* -------------------------------- */
|
||||
/* child reaper for the server mode */
|
||||
/* -------------------------------- */
|
||||
static void get_child(int sig)
|
||||
{
|
||||
while(wait3((int *)NULL,WNOHANG,(struct rusage *)NULL)>0);
|
||||
#ifdef linux
|
||||
signal(SIGCHLD,get_child); /* for reaping children */
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ------------------------------- */
|
||||
/* Clear the signals for a process */
|
||||
/* ------------------------------- */
|
||||
int BdtServerClearSignals()
|
||||
{
|
||||
signal(SIGCHLD,SIG_DFL);
|
||||
signal(SIGHUP,SIG_DFL);
|
||||
signal(SIGINT,SIG_DFL);
|
||||
signal(SIGTERM,SIG_DFL);
|
||||
signal(SIGQUIT,SIG_DFL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------- */
|
||||
/* Make a unix process into a generic background process */
|
||||
/* ----------------------------------------------------- */
|
||||
int BdtMakeServer(char** argv)
|
||||
{
|
||||
FILE* fd;
|
||||
|
||||
if(filename) return -1;
|
||||
|
||||
/* set up signal handling for the server */
|
||||
signal(SIGCHLD,get_child); /* for reaping children */
|
||||
signal(SIGHUP,catch_sig);
|
||||
signal(SIGINT,catch_sig);
|
||||
signal(SIGTERM,catch_sig);
|
||||
signal(SIGQUIT,catch_sig);
|
||||
|
||||
/* disconnect from parent */
|
||||
switch(fork())
|
||||
{
|
||||
case -1: /* error */
|
||||
perror("Cannot fork");
|
||||
return -1;
|
||||
case 0: /* child */
|
||||
#ifdef linux
|
||||
setpgrp();
|
||||
#else
|
||||
setpgrp(0,0);
|
||||
#endif
|
||||
setsid();
|
||||
break;
|
||||
default: /* parent goes away */
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* save process ID */
|
||||
filename=(char*)malloc(strlen(argv[0])+10);
|
||||
sprintf(filename,"%s.%d",argv[0],getpid());
|
||||
fd=fopen(filename,"w");
|
||||
fprintf(fd,"%d",getpid());
|
||||
fprintf(stderr,"\npv server pid: %d\n",getpid());
|
||||
fclose(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* server mode functions */
|
||||
|
||||
/* ------------------------------------------ */
|
||||
/* unimplemented channel access open function */
|
||||
/* ------------------------------------------ */
|
||||
BDT* BdtPvOpen(char *IocName, char* PvName)
|
||||
{
|
||||
BDT *bdt;
|
||||
|
||||
if((bdt = BdtIpOpen(IocName, BDT_TCP_PORT)) == NULL)
|
||||
{
|
||||
fprintf(stderr,"open of address %s failed\n", IocName);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if(BdtServiceConnect(bdt, BDT_SERVICE_PV, PvName) < 0)
|
||||
{
|
||||
fprintf(stderr,"connect to PV %s failed\n", PvName);
|
||||
BdtClose(bdt);
|
||||
return(NULL);
|
||||
}
|
||||
return(bdt);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* open a bulk data socket to a server given the server IP address */
|
||||
/* --------------------------------------------------------------- */
|
||||
BDT* BdtIpOpen(char* address, int Port)
|
||||
{
|
||||
struct hostent *pHostent;
|
||||
struct sockaddr_in tsin;
|
||||
unsigned long addr;
|
||||
int osoc;
|
||||
BDT *bdt;
|
||||
|
||||
#ifndef vxWorks
|
||||
/* Deal with the name -vs- IP number issue. */
|
||||
if (isdigit(address[0]))
|
||||
#endif
|
||||
addr=inet_addr(address);
|
||||
#ifndef vxWorks
|
||||
else
|
||||
{
|
||||
if ((pHostent = gethostbyname (address)) == NULL)
|
||||
return(NULL);
|
||||
bcopy (pHostent->h_addr, (char *) &addr, sizeof(addr));
|
||||
printf("Converting name >%s< to IP number %08.8X\n", address, addr);
|
||||
}
|
||||
#endif
|
||||
|
||||
tsin.sin_port=0;
|
||||
tsin.sin_family=AF_INET;
|
||||
tsin.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||
|
||||
if((osoc=socket(AF_INET,SOCK_STREAM,BDT_TCP))<0)
|
||||
{
|
||||
perror("BdtIpOpen: create socket failed");
|
||||
return (BDT*)NULL;
|
||||
}
|
||||
|
||||
if((bind(osoc,(struct sockaddr*)&tsin,sizeof(tsin)))<0)
|
||||
{
|
||||
perror("BdtIpOpen: local address bind failed");
|
||||
return (BDT*)NULL;
|
||||
}
|
||||
|
||||
tsin.sin_port=htons(Port);
|
||||
memcpy((char*)&tsin.sin_addr,(char*)&addr,sizeof(addr));
|
||||
|
||||
if(connect(osoc,(struct sockaddr*)&tsin,sizeof(tsin))<0)
|
||||
{
|
||||
perror("BdtIpOpen: connect failed");
|
||||
close(osoc);
|
||||
return (BDT*)NULL;
|
||||
}
|
||||
|
||||
bdt=(BDT*)malloc(sizeof(BDT));
|
||||
bdt->soc=osoc;
|
||||
bdt->remaining_send=0;
|
||||
bdt->remaining_recv=0;
|
||||
bdt->state=BdtUnbound;
|
||||
|
||||
#ifndef vxWorks
|
||||
{
|
||||
int j;
|
||||
j = fcntl(bdt->soc, F_GETFL, 0);
|
||||
fcntl(bdt->soc, F_SETFL, j|O_NDELAY);
|
||||
}
|
||||
#endif
|
||||
/* now connected to the bulk data socket on the IOC */
|
||||
return bdt;
|
||||
}
|
||||
|
||||
/* -------------------------------------- */
|
||||
/* write size bytes from buffer to socket */
|
||||
/* -------------------------------------- */
|
||||
int BdtWrite(int soc,void* buffer,int size)
|
||||
{
|
||||
int rc;
|
||||
int total;
|
||||
unsigned char* data;
|
||||
fd_set fds;
|
||||
struct timeval to;
|
||||
|
||||
data=(unsigned char*)buffer;
|
||||
total=size;
|
||||
|
||||
to.tv_sec = 5;
|
||||
to.tv_usec = 0;
|
||||
|
||||
do
|
||||
{
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(soc, &fds);
|
||||
if (select(soc+1, NULL, &fds, NULL, &to) != 1)
|
||||
{
|
||||
printf("BdtWrite: timeout waiting to write data\n");
|
||||
return(-1);
|
||||
}
|
||||
/* send block of data */
|
||||
if((rc=send(soc,&data[size-total],total,0))<0)
|
||||
{
|
||||
if(errno == EINTR)
|
||||
rc = 0;
|
||||
else
|
||||
perror("BdtWrite: Send to remote failed");
|
||||
}
|
||||
else
|
||||
total-=rc;
|
||||
}
|
||||
while(rc>0 && total>0);
|
||||
|
||||
return (rc<=0)?-1:0;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
/* send a message header down a BDT socket */
|
||||
/* --------------------------------------- */
|
||||
int BdtSendHeader(BDT* bdt,unsigned short verb,int size)
|
||||
{
|
||||
BdtMsgHead buf;
|
||||
|
||||
if(bdt->state!=BdtIdle)
|
||||
{
|
||||
fprintf(stderr,"BdtSendHeader: Interface not idle\n");
|
||||
bdt->state=BdtBad;
|
||||
return -1;
|
||||
}
|
||||
|
||||
buf.verb=htons(verb);
|
||||
buf.size=htonl((unsigned long)size);
|
||||
|
||||
if(BdtWrite(bdt->soc,&buf.verb, sizeof(buf.verb))<0)
|
||||
{
|
||||
fprintf(stderr,"BdtSendHeader: write to remote failed");
|
||||
return -1;
|
||||
}
|
||||
if(BdtWrite(bdt->soc,&buf.size, sizeof(buf.size))<0)
|
||||
{
|
||||
fprintf(stderr,"BdtSendHeader: write to remote failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* don't wait for response if data must go out */
|
||||
if(size)
|
||||
{
|
||||
bdt->remaining_send=size;
|
||||
bdt->state=BdtSData;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------- */
|
||||
/* send a message data chunk down a BDT socket */
|
||||
/* ------------------------------------------- */
|
||||
int BdtSendData(BDT* bdt,void* buffer,int size)
|
||||
{
|
||||
int len;
|
||||
int remaining;
|
||||
int rc;
|
||||
|
||||
if(bdt->state!=BdtSData)
|
||||
{
|
||||
fprintf(stderr,"BdtSendData: Interface not in send data mode\n");
|
||||
bdt->state=BdtBad;
|
||||
return -1;
|
||||
}
|
||||
|
||||
remaining=bdt->remaining_send-size;
|
||||
|
||||
if(remaining<0)
|
||||
{
|
||||
fprintf(stderr,"WARNING -- BdtSendData: To much data to send\n");
|
||||
len=bdt->remaining_send;
|
||||
}
|
||||
else
|
||||
len=size;
|
||||
|
||||
if (BdtWrite(bdt->soc, buffer, len) < 0)
|
||||
return -1;
|
||||
|
||||
bdt->remaining_send-=len;
|
||||
|
||||
if(bdt->remaining_send<0)
|
||||
{
|
||||
fprintf(stderr,"BdtSendData: To much data Sent\n");
|
||||
bdt->remaining_send=0;
|
||||
}
|
||||
|
||||
if(bdt->remaining_send==0)
|
||||
bdt->state=BdtIdle;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int BdtFlushOutput(BDT* bdt)
|
||||
{
|
||||
#ifdef vxWorks
|
||||
ioctl(bdt->soc, FIOWFLUSH, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* Read exactly size bytes from remote */
|
||||
/* ------------------------------------- */
|
||||
int BdtRead(int soc,void* buffer,int size)
|
||||
{
|
||||
int rc,total;
|
||||
unsigned char* data;
|
||||
fd_set fds;
|
||||
struct timeval to;
|
||||
|
||||
to.tv_sec = 5;
|
||||
to.tv_usec = 0;
|
||||
|
||||
data=(unsigned char*)buffer;
|
||||
total=size;
|
||||
|
||||
do
|
||||
{
|
||||
#if 1
|
||||
/* wait for data chunk */
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(soc, &fds);
|
||||
if (select(soc+1, &fds, NULL, NULL, &to) != 1)
|
||||
{
|
||||
printf("BdtRead: timeout waiting for data\n");
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
if((rc=recv(soc,&data[size-total],total,0))<0)
|
||||
{
|
||||
if(errno==EINTR)
|
||||
{
|
||||
printf("BdtRead: EINTR");
|
||||
rc=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
perror("BdtRead: Receive data chunk failed");
|
||||
}
|
||||
}
|
||||
else
|
||||
total-=rc;
|
||||
}
|
||||
while(rc>0 && total>0);
|
||||
|
||||
return (rc<=0)?-1:0;
|
||||
}
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* wait for a message header from remote */
|
||||
/* ------------------------------------- */
|
||||
int BdtReceiveHeader(BDT* bdt,int* verb,int* size)
|
||||
{
|
||||
BdtMsgHead buf;
|
||||
|
||||
/* can only receive header when in the idle state */
|
||||
if (bdt->state == BdtEof)
|
||||
return -1;
|
||||
|
||||
if(bdt->state != BdtIdle)
|
||||
{
|
||||
fprintf(stderr,"BdtReceiveHeader: Interface not idle\n");
|
||||
bdt->state=BdtBad;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(BdtRead(bdt->soc,&buf.verb,sizeof(buf.verb))<0)
|
||||
{
|
||||
fprintf(stderr,"BdtReceiveHeader: Read failed\n");
|
||||
return -1;
|
||||
}
|
||||
if(BdtRead(bdt->soc,&buf.size,sizeof(buf.size))<0)
|
||||
{
|
||||
fprintf(stderr,"BdtReceiveHeader: Read failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* copy message data to user */
|
||||
*verb=ntohs(buf.verb);
|
||||
*size=ntohl(buf.size);
|
||||
|
||||
if(*size)
|
||||
bdt->state=BdtRData;
|
||||
|
||||
bdt->remaining_recv=*size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Wait for a chunk of data from remote.
|
||||
User can continually call this with a maximum size until it return 0.
|
||||
------------------------------------------------------------------------ */
|
||||
int BdtReceiveData(BDT* bdt,void* buffer,int size)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* can only receive data when in the receive data state */
|
||||
switch(bdt->state)
|
||||
{
|
||||
case BdtRData: break;
|
||||
case BdtIdle: return 0;
|
||||
default:
|
||||
fprintf(stderr,"BdtReceiveData: bad receive state\n");
|
||||
bdt->state=BdtBad;
|
||||
break;
|
||||
}
|
||||
|
||||
if (bdt->remaining_recv < size)
|
||||
size = bdt->remaining_recv;
|
||||
|
||||
if(BdtRead(bdt->soc,buffer,size)<0)
|
||||
{
|
||||
fprintf(stderr,"BdtReceiveData: Read failed\n");
|
||||
bdt->state = BdtEof;
|
||||
return -1;
|
||||
}
|
||||
|
||||
bdt->remaining_recv-=size;
|
||||
|
||||
if(bdt->remaining_recv<0)
|
||||
{
|
||||
fprintf(stderr,"BdtReceiveData: To much data received\n");
|
||||
bdt->remaining_recv=0;
|
||||
}
|
||||
|
||||
if(bdt->remaining_recv==0)
|
||||
bdt->state=BdtIdle;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------ */
|
||||
/* connect to a process variable, useful if raw open used */
|
||||
/* ------------------------------------------------------ */
|
||||
int BdtServiceConnect(BDT* bdt, char* Name, char *Args)
|
||||
{
|
||||
int len;
|
||||
int rc;
|
||||
int size;
|
||||
int verb;
|
||||
unsigned char NameLen;
|
||||
unsigned char ArgLen;
|
||||
|
||||
if(bdt->state!=BdtUnbound)
|
||||
{
|
||||
fprintf(stderr,"BdtServiceConnect: can only bind to one service\n");
|
||||
return -1;
|
||||
}
|
||||
bdt->state=BdtIdle;
|
||||
NameLen = strlen(Name)+1;
|
||||
if (Args != NULL)
|
||||
ArgLen = strlen(Args)+1;
|
||||
else
|
||||
ArgLen = 0;
|
||||
|
||||
/* send out connect message */
|
||||
if(BdtSendHeader(bdt, BDT_Connect, NameLen+ArgLen) < 0)
|
||||
{
|
||||
fprintf(stderr,"BdtServiceConnect: send of connect header failed\n");
|
||||
bdt->state=BdtUnbound;
|
||||
return -1;
|
||||
}
|
||||
|
||||
NameLen--;
|
||||
ArgLen--;
|
||||
/* send out the process variable to connect to */
|
||||
if((BdtSendData(bdt, &NameLen, 1) < 0) || (BdtSendData(bdt, Name, NameLen) < 0))
|
||||
|
||||
{
|
||||
fprintf(stderr,"BdtServiceConnect: send of connect body failed\n");
|
||||
bdt->state=BdtUnbound;
|
||||
return -1;
|
||||
}
|
||||
if (ArgLen > 0)
|
||||
{
|
||||
if ((BdtSendData(bdt, &ArgLen, 1) < 0) || (BdtSendData(bdt, Args, ArgLen) < 0))
|
||||
{
|
||||
fprintf(stderr,"BdtServiceConnect: send of connect body failed\n");
|
||||
bdt->state=BdtUnbound;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
rc=0;
|
||||
|
||||
/* wait for response from connect to process variable */
|
||||
if(BdtReceiveHeader(bdt,&verb,&size)<0)
|
||||
{
|
||||
fprintf(stderr,"BdtServiceConnect: receive reponse failed\n");
|
||||
bdt->state=BdtUnbound;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* check response */
|
||||
switch(verb)
|
||||
{
|
||||
case BDT_Ok:
|
||||
rc=0;
|
||||
break;
|
||||
case BDT_Error:
|
||||
fprintf(stderr,"BdtServiceConnect: connection rejected\n");
|
||||
bdt->state=BdtUnbound;
|
||||
rc=-1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"BdtServiceConnect: unknown response from remote\n");
|
||||
bdt->state=BdtUnbound;
|
||||
rc=-1;
|
||||
break;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* -------------------- */
|
||||
/* close the connection */
|
||||
/* -------------------- */
|
||||
int BdtClose(BDT* bdt)
|
||||
{
|
||||
int verb,size,done;
|
||||
|
||||
/* send a close message out */
|
||||
if(BdtSendHeader(bdt,BDT_Close,0)<0)
|
||||
{
|
||||
fprintf(stderr,"BdtClose: Cannot send close message\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
done=0;
|
||||
|
||||
do
|
||||
{
|
||||
/* check response */
|
||||
if(BdtReceiveHeader(bdt,&verb,&size)<0)
|
||||
{
|
||||
fprintf(stderr,"BdtClose: Close message response error\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch(verb)
|
||||
{
|
||||
case BDT_Ok:
|
||||
done=1;
|
||||
break;
|
||||
case BDT_Error:
|
||||
fprintf(stderr,"BdtClose: Close rejected\n");
|
||||
return -1;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
while(done==0);
|
||||
|
||||
bdt->state=BdtUnbound;
|
||||
free(bdt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
/* make a listener socket for UDP - simple */
|
||||
/* --------------------------------------- */
|
||||
int BdtOpenListenerUDP(int Port)
|
||||
{
|
||||
int nsoc;
|
||||
struct sockaddr_in tsin;
|
||||
|
||||
tsin.sin_port=htons(Port);
|
||||
tsin.sin_family=AF_INET;
|
||||
tsin.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||
|
||||
if((nsoc=socket(AF_INET,SOCK_DGRAM,BDT_UDP))<0)
|
||||
{
|
||||
perror("BdtOpenListenerUDP: open socket failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if((bind(nsoc,(struct sockaddr*)&tsin,sizeof(tsin)))<0)
|
||||
{
|
||||
perror("BdtOpenListenerUDP: local bind failed");
|
||||
close(nsoc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nsoc;
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
/* make a listener socket for TCP - simple */
|
||||
/* --------------------------------------- */
|
||||
int BdtOpenListenerTCP(int Port)
|
||||
{
|
||||
int nsoc;
|
||||
struct sockaddr_in tsin;
|
||||
|
||||
memset (&tsin, 0, sizeof(struct sockaddr_in));
|
||||
tsin.sin_port=htons(Port);
|
||||
tsin.sin_family=htons(AF_INET);
|
||||
tsin.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||
|
||||
if((nsoc=socket(AF_INET,SOCK_STREAM,BDT_TCP))<0)
|
||||
{
|
||||
perror("BdtOpenListenerTCP: open socket failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if((bind(nsoc,(struct sockaddr*)&tsin,sizeof(tsin)))<0)
|
||||
{
|
||||
perror("BdtOpenListenerTCP: local bind failed");
|
||||
close(nsoc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
listen(nsoc,5);
|
||||
return nsoc;
|
||||
}
|
||||
|
||||
/* ------------------------------- */
|
||||
/* make BDT from a socket - simple */
|
||||
/* ------------------------------- */
|
||||
BDT* BdtMakeBDT(int soc)
|
||||
{
|
||||
BDT* bdt;
|
||||
bdt=(BDT*)malloc(sizeof(BDT));
|
||||
bdt->soc=soc;
|
||||
bdt->remaining_send=0;
|
||||
bdt->remaining_recv=0;
|
||||
bdt->state=BdtIdle;
|
||||
return bdt;
|
||||
}
|
||||
|
||||
/* --------------------------- */
|
||||
/* free a BDT and close socket */
|
||||
/* --------------------------- */
|
||||
int BdtFreeBDT(BDT* bdt)
|
||||
{
|
||||
close(bdt->soc);
|
||||
free(bdt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int BdtPvPutArray(BDT *bdt, short DbrType, void *Buf, unsigned long NumElements,
|
||||
unsigned long ElementSize)
|
||||
{
|
||||
int Verb;
|
||||
int Size;
|
||||
unsigned long BufSize;
|
||||
|
||||
BufSize = NumElements * ElementSize;
|
||||
if (BdtSendHeader(bdt, BDT_Put, 6 + BufSize) != 0)
|
||||
return(-1);
|
||||
if (BdtSendData(bdt, &DbrType, 2) < 0)
|
||||
return(-1);
|
||||
if (BdtSendData(bdt, &NumElements, 4) < 0)
|
||||
return(-1);
|
||||
if (BdtSendData(bdt, Buf, BufSize) < 0)
|
||||
return(-1);
|
||||
if (BdtReceiveHeader(bdt, &Verb, &Size) != 0)
|
||||
return(-1);
|
||||
if (Verb != BDT_Ok)
|
||||
return(-1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
304
src/bdt/bdt.h
Normal file
304
src/bdt/bdt.h
Normal file
@@ -0,0 +1,304 @@
|
||||
#ifndef __BDT_H
|
||||
#define __BDT_H
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.4 1995/07/27 14:21:58 winans
|
||||
* General mods for first release.
|
||||
*
|
||||
* Revision 1.3 1995/05/30 14:47:17 winans
|
||||
* Added BDT_Ping and a port parm to BdtIpOpen.
|
||||
*
|
||||
* Revision 1.2 1995/05/16 15:38:00 winans
|
||||
* Added BdtEof to BdtState enum list.
|
||||
* Added WriteLock and DeltaFlagLock to vxWorks-side BDTs.
|
||||
* Added port number args to BdtOpenListenerTCP() and BdtOpenListenerUDP().
|
||||
*
|
||||
* Revision 1.1 1995/05/11 02:08:44 jbk
|
||||
* new file for the bulk data transfer stuff
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
Author: Jim Kowalkowski
|
||||
Date: 5/1/95
|
||||
*/
|
||||
|
||||
/* got from protocols(5) (cheated) or /etc/protocols */
|
||||
#define BDT_UDP 17
|
||||
#define BDT_TCP 6
|
||||
|
||||
/* server ports - in the user reserved area */
|
||||
#define BDT_UDP_PORT 50296
|
||||
#define BDT_TCP_PORT 50297
|
||||
|
||||
/* Well known service names */
|
||||
#define BDT_SERVICE_PV "pv"
|
||||
#define BDT_SERVICE_NAME "name"
|
||||
#define BDT_SERVICE_DRV "drv"
|
||||
|
||||
#define PV_TRANSFER_SIZE 512
|
||||
|
||||
/* How often some type of message is expected to arrive at each end-point */
|
||||
#define BDT_PING_INTERVAL 10 /* Specified in seconds */
|
||||
#define BDT_CONENCTION_TIMEOUT 25 /* Specified in seconds */
|
||||
|
||||
/* message types */
|
||||
#define BDT_Ok 0
|
||||
#define BDT_Connect 1
|
||||
#define BDT_Error 2
|
||||
#define BDT_Get 3
|
||||
#define BDT_Put 4
|
||||
#define BDT_Close 5
|
||||
#define BDT_Monitor 6
|
||||
#define BDT_Value 7
|
||||
#define BDT_Delta 8
|
||||
#define BDT_Add 9
|
||||
#define BDT_Delete 10
|
||||
#define BDT_Ping 11
|
||||
|
||||
#define BDT_LAST_VERB 11
|
||||
|
||||
/* protocol states */
|
||||
typedef enum
|
||||
{ BdtIdle,BdtUnbound,BdtSData,BdtRData,BdtBad,BdtEof } BdtState;
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* The format of a BDT_Connect message is:
|
||||
*
|
||||
* BdtMsgHead.verb (unsigned 16 binary = BDT_Connect)
|
||||
* BdtMsgHead.size (unsigned 32 bit binary)
|
||||
* service name length (unsigned 8 bit binary)
|
||||
* service name string (service name length characters)
|
||||
* arg1 string length (unsigned 8 bit binary)
|
||||
* arg1 string (arg1 string length characters)
|
||||
* ...
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* NOTICE!!!!!!!! MONITORS ARE NOT CURRENTLY SUPPORTED!!!!!!!
|
||||
*
|
||||
* The BdtMonitor structure is created on the server-side when ever a client
|
||||
* registers a monitor. It contains a tag string that is given by the client
|
||||
* when the monitor is established. This tag string is an arbitrary binary
|
||||
* string of bytes... presumably used by the client as a pointer or index
|
||||
* to a status structure that represents the resource being monitored.
|
||||
*
|
||||
* The Message portion of the BdtMonitor represents the body of the message
|
||||
* that is to be sent to the client to indicate the status of the event that
|
||||
* happened. (It may not be present in the message.)
|
||||
*
|
||||
* The BdtMonitor structures are only hooked into the bdt.pMonitor list if they
|
||||
* are waiting to be sent to the client.
|
||||
*
|
||||
* The format of a BDT_Monitor message is:
|
||||
*
|
||||
* BdtMsgHead.verb (unsigned 16 binary = BDT_Monitor)
|
||||
* BdtMsgHead.size (unsigned 32 bit binary)
|
||||
* TagLength (unsigned 32 bit binary)
|
||||
* Tag (TagLength characters)
|
||||
* service name string (BdtMsgHead.size-TagLength-4 characters)
|
||||
*
|
||||
* The <service name string> for a monitor message should include the object
|
||||
* name(s) that are to be monitored.
|
||||
*
|
||||
*
|
||||
* The format of a BDT_Delta message is:
|
||||
*
|
||||
* BdtMsgHead.verb (unsigned 16 binary = BDT_Delta)
|
||||
* BdtMsgHead.size (unsigned 32 bit binary)
|
||||
* BdtMonitor.TagLength (unsigned 32 bit binary)
|
||||
* BdtMonitor.Tag (BdtMonitor.TagLength characters)
|
||||
* BdtMonitor.MessageLength (unsigned 32 bit binary)
|
||||
* BdtMonitor.Message (BdtMonitor.MessageLength characters)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
struct bdt;
|
||||
typedef struct BdtMonitor
|
||||
{
|
||||
struct bdt *pBdt; /* Connection to send notices back to */
|
||||
char *Tag; /* Client-generated tag */
|
||||
int TagLength; /* Length of tag */
|
||||
char *Message; /* Server-gen'd status change message */
|
||||
int MessageLength; /* Length of Message */
|
||||
struct BdtMonitor *pNext; /* Allow queue of N outbound on BDT */
|
||||
} BdtMonitor;
|
||||
|
||||
typedef int (*BdthandlerFunc)(struct bdt *Bdt);
|
||||
typedef struct BdtHandlers
|
||||
{
|
||||
BdthandlerFunc Ok;
|
||||
BdthandlerFunc Connect;
|
||||
BdthandlerFunc Error;
|
||||
BdthandlerFunc Get;
|
||||
BdthandlerFunc Put;
|
||||
BdthandlerFunc Close;
|
||||
BdthandlerFunc Monitor;
|
||||
BdthandlerFunc Value;
|
||||
BdthandlerFunc Delta;
|
||||
BdthandlerFunc Add;
|
||||
BdthandlerFunc Delete;
|
||||
BdthandlerFunc Ping;
|
||||
} BdtHandlers;
|
||||
|
||||
struct bdt
|
||||
{
|
||||
int soc;
|
||||
int remaining_send;
|
||||
int remaining_recv;
|
||||
BdtState state;
|
||||
|
||||
#ifdef vxWorks
|
||||
char *Name; /* Service name (used for messages) */
|
||||
SEM_ID WriteLock;
|
||||
SEM_ID MonitorLock;
|
||||
BdtMonitor *pMonitor; /* List of pending monitor events */
|
||||
BdthandlerFunc *pHandlers; /* Support routines for messages */
|
||||
void *pService; /* Provate pointer for service */
|
||||
#endif
|
||||
};
|
||||
typedef struct bdt BDT;
|
||||
|
||||
struct BdtMsgHead
|
||||
{
|
||||
unsigned short verb;
|
||||
unsigned long size;
|
||||
};
|
||||
typedef struct BdtMsgHead BdtMsgHead;
|
||||
|
||||
#define BdtGetSocket(BDT) (BDT->soc)
|
||||
#define BdtGetResidualWrite(BDT) (BDT->remaining_send)
|
||||
#define BdtGetResidualRead(BDT) (BDT->remaining_recv)
|
||||
#define BdtGetProtoState(BDT) (BDT->state)
|
||||
#ifdef vxWorks
|
||||
#define BdtGetServiceName(BDT) (BDT->Name)
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Server functions:
|
||||
|
||||
BdtOpenListenerTCP:
|
||||
Open a socket locally bound to the bulk data transfer TCP server port.
|
||||
Set the socket up as a listener. Return the open socket.
|
||||
|
||||
BdtOpenListenerUDP:
|
||||
Open a socket locally bound to the bulk data transfer UDP server port.
|
||||
Return the open socket.
|
||||
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
int BdtOpenListenerTCP(int Port);
|
||||
int BdtOpenListenerUDP(int Port);
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Utilities functions:
|
||||
|
||||
BdtMakeServer:
|
||||
Available under unix only. Put process in the background, disassociate
|
||||
process from controlling terminal and parent process, and prepare
|
||||
signals for reaping children spawned by the process.
|
||||
|
||||
BdtServerClearSignals:
|
||||
Clear the signal handlers for a process, set them to default.
|
||||
|
||||
BdtMakeBDT:
|
||||
Allocate and initialize a BDT from a socket.
|
||||
|
||||
BdtFreeBDT:
|
||||
Close the open socket and free the memory for the BDT.
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
#ifndef vxWorks
|
||||
int BdtMakeServer(char** argv);
|
||||
int BdtServerClearSignals();
|
||||
#endif
|
||||
|
||||
BDT* BdtMakeBDT(int socket); /* make a BDT from a socket */
|
||||
int BdtFreeBDT(BDT* bdt); /* free a BDT */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Client functions:
|
||||
|
||||
BdtIpOpen:
|
||||
Open a connection to an bulk data transfer given the IP address of the
|
||||
machine where the server exists. The returned BDT is returned unbound,
|
||||
a connect must be issued before data transactions can take place.
|
||||
|
||||
BdtPvOpen:
|
||||
Open and connect (bind) to a process variable. Data transfers can
|
||||
take place after this call.
|
||||
|
||||
BdtServiceConnect:
|
||||
Used in conjunction with BdtIpOpen(). Bind an unbound BDT to a
|
||||
generic service provided by the server at the other end of the open
|
||||
connection.
|
||||
|
||||
BdtPvConnect:
|
||||
Used in conjunction with BdtIpOpen(). Bind an unbound BDT to a
|
||||
process variable on the server at the other end of the open
|
||||
connection.
|
||||
|
||||
BdtClose:
|
||||
Completely close a connection to a server and free the BDT.
|
||||
|
||||
BdtDeltaPending:
|
||||
Check if a delta message arrived at an unexpected time. This function
|
||||
clears the pending condition.
|
||||
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
BDT* BdtIpOpen(char* address, int port);
|
||||
BDT* BdtPvOpen(char *IocName, char* PvName);
|
||||
int BdtServiceConnect(BDT* bdt, char* service_name, char *args);
|
||||
int BdtPvConnect(BDT* bdt, char* pv_name);
|
||||
int BdtClose(BDT* bdt);
|
||||
int BdtPvDeltaPending(BDT* bdt);
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Client and Server shared functions:
|
||||
|
||||
BdtSendHeader:
|
||||
Send a message header out to a connect BDT with command and message body
|
||||
size information.
|
||||
|
||||
BdtSendData:
|
||||
Send a portion or all the message body out a connected BDT. A header
|
||||
must have previously been sent with length information. The interface
|
||||
will only allow the amount of data specified in the header to be sent.
|
||||
|
||||
BdtWrite:
|
||||
This call will block until all the data specified in the size parameter
|
||||
are sent down the socket.
|
||||
|
||||
BdtRead:
|
||||
This call will block until all the data specified in the size parameter
|
||||
is read from the socket.
|
||||
|
||||
BdtReceiveHeader:
|
||||
Wait until a message header appears at the BDT, return the action and
|
||||
remaining message body size.
|
||||
|
||||
BdtReceiveData:
|
||||
Wait for a chunk or the entire body of a message to appear at the BDT.
|
||||
Put the data into the buffer for a maximum size. Return the amount of
|
||||
data actually received, or zero if there is no data remaining for the
|
||||
current message.
|
||||
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
int BdtSendHeader(BDT* bdt, unsigned short verb, int size);
|
||||
int BdtSendData(BDT* bdt, void* buffer, int size);
|
||||
int BdtReceiveHeader(BDT* bdt, int* verb, int* size);
|
||||
int BdtReceiveData(BDT* bdt, void* buffer, int size);
|
||||
int BdtRead(int socket, void* buffer, int size);
|
||||
int BdtWrite(int socket, void* buffer, int size);
|
||||
int BdtFlushOutput(BDT* bdt);
|
||||
int BdtPvPutArray(BDT *bdt, short DbrType, void *Buf, unsigned long NumElements, unsigned long ElementSize);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
392
src/bdt/bdtServ.c
Normal file
392
src/bdt/bdtServ.c
Normal file
@@ -0,0 +1,392 @@
|
||||
/*
|
||||
*
|
||||
* Author: John Winans
|
||||
* Date: 95-05-22
|
||||
*
|
||||
* $Log$
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* IOC listener task blocks on accept calls waiting for binders.
|
||||
* If a bind arrives, a receiver task is spawned.
|
||||
*
|
||||
* IOC receiver task blocks on read calls waiting for transactions.
|
||||
* When a transaction arrives it is serviced.
|
||||
* At the end of a transaction service, a response is sent back.
|
||||
* After the response is sent, a chack is made to see if a delta transmission
|
||||
* was blocked by the transaction's use of the socket... if so, it is sent.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <selectLib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <vxWorks.h>
|
||||
#include <sys/socket.h>
|
||||
#include <in.h>
|
||||
#include <inetLib.h>
|
||||
#include <taskLib.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "bdt.h"
|
||||
|
||||
#define BDT_TASK_PRIO 200
|
||||
#define BDT_TASK_OPTIONS VX_FP_TASK
|
||||
#define BDT_TASK_STACK 5000
|
||||
#define STATIC static
|
||||
|
||||
/* used for debugging */
|
||||
STATIC char *BdtNames[] = {
|
||||
"BDT_Ok",
|
||||
"BDT_Connect",
|
||||
"BDT_Error",
|
||||
"BDT_Get",
|
||||
"BDT_Put",
|
||||
"BDT_Close",
|
||||
"BDT_Monitor",
|
||||
"BDT_Value",
|
||||
"BDT_Delta",
|
||||
"BDT_Add",
|
||||
"BDT_Delete",
|
||||
"BDT_Ping"
|
||||
};
|
||||
|
||||
STATIC int HexDump(char *ReadBuffer, int rbytes);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* A debugging routine that hex-dumps a message to the console.
|
||||
*
|
||||
*****************************************************************************/
|
||||
void BDT_DumpMessage(BDT *Bdt)
|
||||
{
|
||||
char Buf[16*4];
|
||||
int RecvLen;
|
||||
|
||||
while(Bdt->remaining_recv)
|
||||
{
|
||||
RecvLen = (Bdt->remaining_recv > sizeof(Buf)) ? sizeof(Buf): Bdt->remaining_recv;
|
||||
if (BdtReceiveData(Bdt, Buf, RecvLen) != RecvLen)
|
||||
return; /* Got EOF, (EOM handled by the while() */
|
||||
|
||||
HexDump(Buf, RecvLen);
|
||||
}
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Throw away a message.
|
||||
*
|
||||
****************************************************************************/
|
||||
void BDT_DiscardMessage(BDT *Bdt)
|
||||
{
|
||||
char Buf[16*4];
|
||||
int RecvLen;
|
||||
|
||||
while(Bdt->remaining_recv)
|
||||
{
|
||||
RecvLen = (Bdt->remaining_recv > sizeof(Buf)) ? sizeof(Buf): Bdt->remaining_recv;
|
||||
if (BdtReceiveData(Bdt, Buf, RecvLen) != RecvLen)
|
||||
return; /* Got EOF, (EOM handled by the while() */
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Process a single Connect message. And return a response.
|
||||
*
|
||||
******************************************************************************/
|
||||
STATIC int BDT_ProcessConnect(BDT *Bdt)
|
||||
{
|
||||
SYM_TYPE Type;
|
||||
unsigned char length;
|
||||
char Buf[50];
|
||||
char HandlerName[70];
|
||||
|
||||
if (Bdt->remaining_recv > sizeof(Buf))
|
||||
{
|
||||
printf("BDT_ProcessConnect Connect Message too long %d\n", Bdt->remaining_recv);
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
if (Bdt->remaining_recv < 2)
|
||||
{
|
||||
printf("BDT_ProcessConnect Connect Message w/missing service name\n");
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
BdtReceiveData(Bdt, &length, 1);
|
||||
if (length > sizeof(Buf))
|
||||
{
|
||||
printf("BDT_ProcessConnect Connect Message service name too long %d\n", length);
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
BdtReceiveData(Bdt, Buf, length);
|
||||
Buf[length] = '\0';
|
||||
|
||||
sprintf(HandlerName, "_BDT_ServiceHandler_%s", Buf);
|
||||
printf("BDT_ProcessConnect NAME service (%s)\n", HandlerName);
|
||||
|
||||
/*Bdt->pHandlers = (BdthandlerFunc *)(&BDT_NameServicehandlers);*/
|
||||
if (symFindByName(sysSymTbl, HandlerName, (char **)&(Bdt->pHandlers), &Type) != OK)
|
||||
{
|
||||
printf("BDT_ProcessConnect Connect to unknown service (%s)\n", Buf);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bdt->Name = (char *)malloc(strlen(Buf)+1);
|
||||
strcpy(Bdt->Name, Buf);
|
||||
if (Bdt->pHandlers[BDT_Connect] != NULL)
|
||||
return((*(Bdt->pHandlers[BDT_Connect]))(Bdt));
|
||||
else
|
||||
{
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Process a single message. And return a response.
|
||||
*
|
||||
******************************************************************************/
|
||||
STATIC int BDT_ProcMessage(BDT *Bdt, unsigned short Command)
|
||||
{
|
||||
int RecvLen;
|
||||
|
||||
if (Command > BDT_LAST_VERB)
|
||||
{
|
||||
printf("BDT: %s Invalid command %d, length = %d\n", Bdt->Name, Command, Bdt->remaining_recv);
|
||||
BDT_DumpMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (Bdt->pHandlers == NULL)
|
||||
{
|
||||
if (Command == BDT_Connect)
|
||||
BDT_ProcessConnect(Bdt);
|
||||
else
|
||||
{
|
||||
printf("BDT_ProcMessage: %s got %s before connect\n", Bdt->Name, BdtNames[Command]);
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
if (Bdt->pHandlers[Command] == NULL)
|
||||
{
|
||||
printf("BDT_ProcMessage: service %s got %s... invalid\n", Bdt->Name, BdtNames[Command]);
|
||||
}
|
||||
return((*(Bdt->pHandlers[Command]))(Bdt));
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Wait on a socket read for a message. When one arrives, read the header,
|
||||
* decode it, and call the message handler routine to process and respond to it.
|
||||
*
|
||||
******************************************************************************/
|
||||
STATIC void BDT_ReceiverTask(int Sock)
|
||||
{
|
||||
int Verb;
|
||||
int Size;
|
||||
BDT Bdt;
|
||||
int MonitorLockTimeout = (BDT_PING_INTERVAL*sysClkRateGet())/2;
|
||||
static char *NoBdtName = "(No Name)";
|
||||
fd_set FdSet;
|
||||
struct timeval TimeVal;
|
||||
int PollStatus;
|
||||
int SocketState;
|
||||
|
||||
Bdt.soc = Sock;
|
||||
Bdt.pMonitor = NULL;
|
||||
Bdt.WriteLock = semBCreate(SEM_Q_PRIORITY, SEM_FULL);
|
||||
Bdt.MonitorLock = semBCreate(SEM_Q_PRIORITY, SEM_FULL);
|
||||
Bdt.state = BdtIdle;
|
||||
Bdt.pHandlers = NULL;
|
||||
Bdt.Name = NoBdtName;
|
||||
|
||||
printf("BDT_ReceiverTask(%d) started\n", Sock);
|
||||
|
||||
TimeVal.tv_sec = BDT_CONENCTION_TIMEOUT;
|
||||
TimeVal.tv_usec = 0;
|
||||
FD_ZERO(&FdSet);
|
||||
FD_SET(Bdt.soc, &FdSet);
|
||||
|
||||
SocketState = 0;
|
||||
while (((PollStatus = select(FD_SETSIZE, &FdSet, NULL, NULL, &TimeVal)) > 0) && (BdtReceiveHeader(&Bdt, &Verb, &Size) == 0))
|
||||
{
|
||||
semTake(Bdt.WriteLock, WAIT_FOREVER);
|
||||
|
||||
SocketState = BDT_ProcMessage(&Bdt, Verb);
|
||||
|
||||
if (SocketState != 0)
|
||||
break;
|
||||
|
||||
#if 0
|
||||
if (semTake(Bdt.MonitorLock, MonitorLockTimeout) == OK)
|
||||
{
|
||||
/* Check for delta flag and send if so */
|
||||
|
||||
/* Change this to run thru a delta-message linked list */
|
||||
if (Bdt.pMonitor != NULL)
|
||||
{
|
||||
/* Send delta notifier */
|
||||
}
|
||||
semGive(Bdt.WriteLock); /* Order important for BDT_SendDelta */
|
||||
semGive(Bdt.MonitorLock);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("BDT_ReceiverTask timeout on monitor semaphore. Monitors are stuck!\n");
|
||||
semGive(Bdt.WriteLock);
|
||||
}
|
||||
#else
|
||||
semGive(Bdt.WriteLock);
|
||||
#endif
|
||||
BdtFlushOutput(&Bdt);
|
||||
|
||||
FD_ZERO(&FdSet);
|
||||
FD_SET(Bdt.soc, &FdSet);
|
||||
}
|
||||
if (SocketState == 0)
|
||||
{
|
||||
if (PollStatus == 0)
|
||||
printf("BDT_ReceiverTask(%d) exiting on client timeout\n", Sock);
|
||||
else
|
||||
printf("BDT_ReceiverTask(%d) exiting on I/O error talking to Client\n", Sock);
|
||||
}
|
||||
else
|
||||
printf("BDT_ReceiverTask(%d) received close from client\n", Sock);
|
||||
|
||||
/* Free up resources */
|
||||
if (Bdt.Name != NoBdtName)
|
||||
free(Bdt.Name);
|
||||
|
||||
close(Sock);
|
||||
semDelete(Bdt.WriteLock);
|
||||
semDelete(Bdt.MonitorLock);
|
||||
return;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
******************************************************************************/
|
||||
#if 0
|
||||
int BDT_SendDelta(int Socket, char *Message)
|
||||
{
|
||||
semTake (DeltaFlagLock, WAIT_FOREVER);
|
||||
if (if (semTake(SocketWriteLock, no wait) == failed)
|
||||
{
|
||||
/* Reader task is busy... Post message for future transmission */
|
||||
Bdt.pending_delta = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
write(Message); /* This COULD block */
|
||||
semGive(SocketWriteLock);
|
||||
}
|
||||
semGive(DeltaFlagLock);
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* This task listens on a port for new connections. When one is made, it
|
||||
* spawns a task to manage it.
|
||||
*
|
||||
******************************************************************************/
|
||||
void BDT_ListenerTask(int Port)
|
||||
{
|
||||
/* Open a socket to listen on */
|
||||
struct sockaddr_in ListenerAddr;
|
||||
struct sockaddr_in ClientAddr;
|
||||
int ListenerSock;
|
||||
int ClientSock;
|
||||
int ClientAddrLen;
|
||||
int SockAddrSize = sizeof(struct sockaddr_in);
|
||||
|
||||
if (Port == 0)
|
||||
Port = BDT_TCP_PORT;
|
||||
|
||||
printf("BDT_Listener(%d) started\n", Port);
|
||||
|
||||
if ((ListenerSock = BdtOpenListenerTCP(Port)) < 0)
|
||||
{
|
||||
printf("BDT_ListenerTask(%d) can't start listener\n", Port);
|
||||
return;
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
ClientAddrLen = sizeof(ClientAddr);
|
||||
if((ClientSock = accept(ListenerSock, (struct sockaddr*)&ClientAddr, &ClientAddrLen)) < 0)
|
||||
{
|
||||
if(errno!=EINTR)
|
||||
{
|
||||
printf("BDT_ListenerTask(%d) accept() failed\n", Port);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Spawn a task to handle the new connection */
|
||||
printf("Accepted a connection\n");
|
||||
taskSpawn("BDT", BDT_TASK_PRIO, BDT_TASK_OPTIONS, BDT_TASK_STACK, (FUNCPTR)BDT_ReceiverTask, ClientSock, 2,3,4,5,6,7,8,9,0);
|
||||
}
|
||||
}
|
||||
/* Never reached */
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* A handy routine to assist in debugging.
|
||||
*
|
||||
******************************************************************************/
|
||||
STATIC int HexDump(char *ReadBuffer, int rbytes)
|
||||
{
|
||||
int c = 0;
|
||||
int i = 0;
|
||||
int firsttime;
|
||||
char ascii[20]; /* To hold printable portion of string */
|
||||
|
||||
if (!rbytes)
|
||||
return(0);
|
||||
|
||||
firsttime = 1;
|
||||
while(c < rbytes)
|
||||
{
|
||||
if ((c % 16) == 0)
|
||||
{
|
||||
if (!firsttime)
|
||||
{
|
||||
ascii[i] = '\0';
|
||||
printf(" *%s*\n", ascii);
|
||||
}
|
||||
firsttime=0;
|
||||
i = 0;
|
||||
}
|
||||
printf(" %02.2X", ReadBuffer[c] & 0xff);
|
||||
ascii[i] = ReadBuffer[c];
|
||||
if (!isprint(ascii[i]))
|
||||
ascii[i] = '.';
|
||||
++i;
|
||||
++c;
|
||||
}
|
||||
while (c%16)
|
||||
{
|
||||
fputs(" ", stdout);
|
||||
++c;
|
||||
}
|
||||
ascii[i] = '\0';
|
||||
printf(" *%s*\n", ascii);
|
||||
return(0);
|
||||
}
|
||||
129
src/bdt/bdtServName.c
Normal file
129
src/bdt/bdtServName.c
Normal file
@@ -0,0 +1,129 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Author: John Winans
|
||||
* Date: 95-06-05
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include <selectLib.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* IOC listener task blocks on accept calls waiting for binders.
|
||||
* If a bind arrives, a receiver task is spawned.
|
||||
*
|
||||
* IOC receiver task blocks on read calls waiting for transactions.
|
||||
* When a transaction arrives it is serviced.
|
||||
* At the end of a transaction service, a response is sent back.
|
||||
* After the response is sent, a chack is made to see if a delta transmission
|
||||
* was blocked by the transaction's use of the socket... if so, it is sent.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sys/socket.h>
|
||||
#include <in.h>
|
||||
#include <inetLib.h>
|
||||
#include <taskLib.h>
|
||||
|
||||
#include "bdt.h"
|
||||
|
||||
#define STATIC static
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_NameServiceOk(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceOk \n");
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_NameServiceConnect(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceConnect \n");
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceError(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceError \n");
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceGet(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceGet \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServicePut(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServicePut \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceClose(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceClose \n");
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceMonitor(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceMonitor \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceValue(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceValue \n");
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceDelta(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceDelta \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceAdd(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceAdd \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServiceDelete(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServiceDelete \n");
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
STATIC int BDT_NameServicePing(BDT *Bdt)
|
||||
{
|
||||
printf("BDT_NameServicePing \n");
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
BdtHandlers BDT_ServiceHandler_name =
|
||||
{
|
||||
BDT_NameServiceOk,
|
||||
BDT_NameServiceConnect,
|
||||
BDT_NameServiceError,
|
||||
BDT_NameServiceGet,
|
||||
BDT_NameServicePut,
|
||||
BDT_NameServiceClose,
|
||||
BDT_NameServiceMonitor,
|
||||
BDT_NameServiceValue,
|
||||
BDT_NameServiceDelta,
|
||||
BDT_NameServiceAdd,
|
||||
BDT_NameServiceDelete,
|
||||
BDT_NameServicePing
|
||||
};
|
||||
377
src/bdt/bdtServPv.c
Normal file
377
src/bdt/bdtServPv.c
Normal file
@@ -0,0 +1,377 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Author: John Winans
|
||||
* Date: 95-06-05
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <semLib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <dbCommon.h>
|
||||
#include <dbAccess.h>
|
||||
|
||||
#include "bdt.h"
|
||||
|
||||
#define STATIC static
|
||||
#define MESSAGE_PREFIX "BDT PV server:"
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* These conversion finctions take care of one of the most insane parts
|
||||
* of dealing with database access... having two different interfaces that
|
||||
* have the same named enumerators in two seperate header files... that
|
||||
* therefore can not be both included in the same file.
|
||||
*
|
||||
* This is so bad, I wanted to vomit when typing it in.
|
||||
*
|
||||
******************************************************************************/
|
||||
STATIC int DbrOld2New(int Old)
|
||||
{
|
||||
switch (Old)
|
||||
{
|
||||
case 0: return(DBR_STRING);
|
||||
case 1: return(DBR_SHORT);
|
||||
case 2: return(DBR_FLOAT);
|
||||
case 3: return(DBR_ENUM);
|
||||
case 4: return(DBR_CHAR);
|
||||
case 5: return(DBR_LONG);
|
||||
case 6: return(DBR_DOUBLE);
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC int DbrNew2Old(int New)
|
||||
{
|
||||
switch (New)
|
||||
{
|
||||
case DBR_STRING: return(0);
|
||||
case DBR_CHAR: return(4);
|
||||
case DBR_UCHAR: return(4);
|
||||
case DBR_SHORT: return(1);
|
||||
case DBR_USHORT: return(1);
|
||||
case DBR_LONG: return(5);
|
||||
case DBR_ULONG: return(5);
|
||||
case DBR_FLOAT: return(2);
|
||||
case DBR_DOUBLE: return(6);
|
||||
case DBR_ENUM: return(3);
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of an OK message.
|
||||
*
|
||||
* The OK message is received as a confirmation of the last operation. It is
|
||||
* not normally responded to.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceOk(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Ok message\n", MESSAGE_PREFIX);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Connect message.
|
||||
*
|
||||
* The Connect is received when a new connection is first made.
|
||||
* Any arguments left in the message body have not yet been read.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceConnect(BDT *Bdt)
|
||||
{
|
||||
unsigned char Length;
|
||||
char Buf[100];
|
||||
struct dbAddr *pDbAddr;
|
||||
|
||||
Buf[0] = '\0';
|
||||
if (Bdt->remaining_recv > 0)
|
||||
{
|
||||
BdtReceiveData(Bdt, &Length, 1);
|
||||
if (Length <= sizeof(Buf))
|
||||
{
|
||||
BdtReceiveData(Bdt, Buf, Length);
|
||||
Buf[Length] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s Connect message argument list too long\n", MESSAGE_PREFIX);
|
||||
BDT_DiscardMessage(Bdt);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf("%s got Connect >%s<\n", MESSAGE_PREFIX, Buf);
|
||||
#endif
|
||||
/* Find the PV in the database */
|
||||
Bdt->pService = malloc(sizeof(struct dbAddr));
|
||||
pDbAddr = (struct dbAddr *)(Bdt->pService);
|
||||
if (dbNameToAddr(Buf, pDbAddr))
|
||||
{
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
free(Bdt->pService);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pDbAddr->dbr_field_type != pDbAddr->field_type)
|
||||
{
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
free(Bdt->pService);
|
||||
}
|
||||
else
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of an Error message.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceError(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Error message\n", MESSAGE_PREFIX);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Get message.
|
||||
*
|
||||
* The response to a Get message is either an Error or a Value:
|
||||
*
|
||||
* Value message body format:
|
||||
* SHORT EPICS data type enumerator (in old format)
|
||||
* LONG Number of elements
|
||||
* CHAR[] Value image
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceGet(BDT *Bdt)
|
||||
{
|
||||
void *Buf;
|
||||
struct dbAddr *pDbAddr = (struct dbAddr *)(Bdt->pService);
|
||||
long NumElements;
|
||||
long Size;
|
||||
long l;
|
||||
short OldType;
|
||||
int stat;
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf("%s got a Get message\n", MESSAGE_PREFIX);
|
||||
|
||||
printf("field type=%d, field size=%d, elements=%d\n", pDbAddr->field_type, pDbAddr->field_size, pDbAddr->no_elements);
|
||||
#endif
|
||||
|
||||
OldType = DbrNew2Old(pDbAddr->field_type);
|
||||
if (OldType < 0)
|
||||
{
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
/* Allocate a buffer to hold the response message data */
|
||||
Buf = malloc(pDbAddr->field_size * pDbAddr->no_elements);
|
||||
if (Buf == NULL)
|
||||
{
|
||||
printf("Can't allocate %d-byte buffer for get request to %s\n",
|
||||
pDbAddr->field_size * pDbAddr->no_elements,
|
||||
pDbAddr->precord->name);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
/* Get the response message data */
|
||||
NumElements = pDbAddr->no_elements;
|
||||
if (stat=dbGetField(pDbAddr, pDbAddr->field_type, Buf, 0, &NumElements, NULL))
|
||||
{
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
#if 0
|
||||
/* Test hack to transfer HUGE buffers */
|
||||
NumElements = pDbAddr->no_elements;
|
||||
#endif
|
||||
/* Send the response message */
|
||||
Size = NumElements * pDbAddr->field_size;
|
||||
BdtSendHeader(Bdt, BDT_Value, Size + sizeof(long) + sizeof(short));
|
||||
BdtSendData(Bdt, &OldType, sizeof(short));
|
||||
BdtSendData(Bdt, &NumElements, sizeof(long));
|
||||
if (Size)
|
||||
BdtSendData(Bdt, Buf, Size);
|
||||
free(Buf);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Put message.
|
||||
*
|
||||
* Put message body format:
|
||||
* SHORT EPICS data type enumerator
|
||||
* LONG Number of elements
|
||||
* CHAR[] Value image
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServicePut(BDT *Bdt)
|
||||
{
|
||||
long Size;
|
||||
void *Buf;
|
||||
short DbrType;
|
||||
long NumElements;
|
||||
struct dbAddr *pDbAddr = (struct dbAddr *)(Bdt->pService);
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf("%s got a Put message\n", MESSAGE_PREFIX);
|
||||
#endif
|
||||
if (BdtGetResidualRead(Bdt) < 6)
|
||||
{
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
if (BdtGetResidualRead(Bdt) == 6)
|
||||
{ /* Do data contents, just toss it */
|
||||
BDT_DiscardMessage(Bdt);
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
Buf = malloc(BdtGetResidualRead(Bdt) - 6);
|
||||
if (Buf == NULL)
|
||||
{
|
||||
printf("Can't allocate %d-byte buffer for put request to %s\n",
|
||||
BdtGetResidualRead(Bdt), pDbAddr->precord->name);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
BdtReceiveData(Bdt, &DbrType, 2);
|
||||
BdtReceiveData(Bdt, &NumElements, 4);
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf("record field type=%d, field size=%d, elements=%d\n", pDbAddr->field_type, pDbAddr->field_size, pDbAddr->no_elements);
|
||||
printf("message field type=%d, field size=%d, elements=%d total %d\n", DbrType, pDbAddr->field_type ,NumElements, BdtGetResidualRead(Bdt));
|
||||
#endif
|
||||
|
||||
BdtReceiveData(Bdt, Buf, BdtGetResidualRead(Bdt));
|
||||
DbrType = DbrOld2New(DbrType);
|
||||
|
||||
if (DbrType < 0)
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
else if (dbPutField(pDbAddr, DbrType, Buf, NumElements))
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
else
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
|
||||
free(Buf);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Close message.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceClose(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Close message\n", MESSAGE_PREFIX);
|
||||
free(Bdt->pService);
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(1);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Monitor message.
|
||||
*
|
||||
* Not Supported.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceMonitor(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Monitor message\n", MESSAGE_PREFIX);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Value message.
|
||||
*
|
||||
* Not Supported.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceValue(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Value message\n", MESSAGE_PREFIX);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Delta message.
|
||||
*
|
||||
* Not Supported.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceDelta(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Delta message\n", MESSAGE_PREFIX);
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of an Add message.
|
||||
*
|
||||
* Not Supported.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceAdd(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Add message\n", MESSAGE_PREFIX);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Delete message.
|
||||
*
|
||||
* Not Supported.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServiceDelete(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Delete message\n", MESSAGE_PREFIX);
|
||||
BdtSendHeader(Bdt, BDT_Error, 0);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Handle the receipt of a Ping message.
|
||||
*
|
||||
*****************************************************************************/
|
||||
STATIC int BDT_ServicePing(BDT *Bdt)
|
||||
{
|
||||
printf("%s got a Ping message\n", MESSAGE_PREFIX);
|
||||
BdtSendHeader(Bdt, BDT_Ok, 0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
BdtHandlers BDT_ServiceHandler_pv =
|
||||
{
|
||||
BDT_ServiceOk,
|
||||
BDT_ServiceConnect,
|
||||
BDT_ServiceError,
|
||||
BDT_ServiceGet,
|
||||
BDT_ServicePut,
|
||||
BDT_ServiceClose,
|
||||
BDT_ServiceMonitor,
|
||||
BDT_ServiceValue,
|
||||
BDT_ServiceDelta,
|
||||
BDT_ServiceAdd,
|
||||
BDT_ServiceDelete,
|
||||
BDT_ServicePing
|
||||
};
|
||||
7
src/bpt/Makefile
Normal file
7
src/bpt/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
11
src/bpt/Makefile.Unix
Normal file
11
src/bpt/Makefile.Unix
Normal file
@@ -0,0 +1,11 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += cvtTable.h
|
||||
|
||||
SRCS.c = ../makeBpt
|
||||
OBJS = makeBpt
|
||||
PROD = makeBpt
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
24
src/bpt/Makefile.Vx
Normal file
24
src/bpt/Makefile.Vx
Normal file
@@ -0,0 +1,24 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -ansi
|
||||
VX_WARN_YES = -Wall -pedantic
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
BPTS += bptTypeJdegF.dbd
|
||||
BPTS += bptTypeKdegC.dbd
|
||||
BPTS += bptTypeKdegF.dbd
|
||||
|
||||
|
||||
SRCS.c = \
|
||||
../cvtBpt.c
|
||||
|
||||
LIBOBJS = \
|
||||
cvtBpt.o
|
||||
|
||||
LIBNAME = pbtLib
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
142
src/bpt/bptTypeJdegC.data
Normal file
142
src/bpt/bptTypeJdegC.data
Normal file
@@ -0,0 +1,142 @@
|
||||
!header
|
||||
"typeJdegC" 0 0 700 4095 .5 -210 760 1
|
||||
!data
|
||||
|
||||
-8.096 -8.076 -8.057 -8.037 -8.017 -7.996 -7.976 -7.955 -7.934 -7.912
|
||||
|
||||
|
||||
-7.890 -7.868 -7.846 -7.824 -7.801 -7.778 -7.755 -7.731 -7.707 -7.683
|
||||
-7.659 -7.634 -7.609 -7.584 -7.559 -7.533 -7.508 -7.482 -7.455 -7.429
|
||||
-7.402 -7.375 -7.348 -7.321 -7.293 -7.265 -7.237 -7.209 -7.180 -7.151
|
||||
-7.122 -7.093 -7.064 -7.034 -7.004 -6.974 -6.944 -6.914 -6.883 -6.852
|
||||
-6.821 -6.790 -6.758 -6.727 -6.695 -6.663 -6.630 -6.598 -6.565 -6.532
|
||||
|
||||
|
||||
-6.499 -6.466 -6.433 -6.399 -6.365 -6.331 -6.297 -6.263 -6.228 -6.194
|
||||
-6.159 -6.124 -6.089 -6.053 -6.018 -5.982 -5.946 -5.910 -5.874 -5.837
|
||||
-5.801 -5.764 -5.727 -5.690 -5.653 -5.615 -5.578 -5.540 -5.502 -5.464
|
||||
-5.426 -5.388 -5.349 -5.311 -5.272 -5.233 -5.194 -5.155 -5.115 -5.076
|
||||
-5.036 -4.996 -4.956 -4.916 -4.876 -4.836 -4.795 -4.755 -4.714 -4.673
|
||||
|
||||
|
||||
-4.632 -4.591 -4.550 -4.508 -4.467 -4.425 -4.383 -4.341 -4.299 -4.257
|
||||
-4.215 -4.172 -4.130 -4.087 -4.044 -4.001 -3.958 -3.915 -3.872 -3.829
|
||||
-3.785 -3.742 -3.698 -3.654 -3.610 -3.566 -3.522 -3.478 -3.433 -3.389
|
||||
-3.344 -3.299 -3.255 -3.210 -3.165 -3.120 -3.074 -3.029 -2.984 -2.938
|
||||
-2.892 -2.847 -2.801 -2.755 -2.709 -2.663 -2.617 -2.570 -2.524 -2.478
|
||||
|
||||
|
||||
-2.431 -2.384 -2.338 -2.291 -2.244 -2.197 -2.150 -2.102 -2.055 -2.008
|
||||
-1.960 -1.913 -1.865 -1.818 -1.770 -1.722 -1.674 -1.626 -1.578 -1.530
|
||||
-1.481 -1.433 -1.385 -1.336 -1.288 -1.239 -1.190 -1.141 -1.093 -1.044
|
||||
-0.995 -0.945 -0.896 -0.847 -0.798 -0.748 -0.699 -0.650 -0.600 -0.550
|
||||
-0.501 -0.451 -0.401 -0.351 -0.301 -0.251 -0.201 -0.151 -0.101 -0.050
|
||||
|
||||
|
||||
0.0 0.050 0.101 0.151 0.202 0.253 0.303 0.354 0.405 0.456
|
||||
0.507 0.558 0.609 0.660 0.711 0.762 0.813 0.865 0.916 0.967
|
||||
1.019 1.070 1.122 1.174 1.225 1.277 1.329 1.381 1.432 1.484
|
||||
1.536 1.588 1.640 1.693 1.745 1.797 1.849 1.901 1.954 2.006
|
||||
2.058 2.111 2.163 2.216 2.268 2.321 2.374 2.426 2.479 2.532
|
||||
|
||||
|
||||
2.585 2.638 2.691 2.743 2.796 2.849 2.902 2.956 3.009 3.062
|
||||
3.115 3.168 3.221 3.275 3.328 3.381 3.435 3.488 3.542 3.595
|
||||
3.649 3.702 3.756 3.809 3.863 3.917 3.971 4.024 4.078 4.132
|
||||
4.186 4.239 4.293 4.347 4.401 4.455 4.509 4.563 4.617 4.671
|
||||
4.725 4.780 4.834 4.888 4.942 4.996 5.050 5.105 5.159 5.213
|
||||
|
||||
|
||||
5.268 5.322 5.376 5.431 5.485 5.540 5.594 5.649 5.703 5.758
|
||||
5.812 5.867 5.921 5.976 6.031 6.085 6.140 6.195 6.249 6.304
|
||||
6.359 6.414 6.468 6.523 6.578 6.633 6.688 6.742 6.797 6.852
|
||||
6.907 6.962 7.017 7.072 7.127 7.182 7.237 7.292 7.347 7.402
|
||||
7.457 7.512 7.567 7.622 7.677 7.732 7.787 7.843 7.898 7.953
|
||||
|
||||
|
||||
8.008 8.063 8.118 8.174 8.229 8.284 8.339 8.394 8.450 8.505
|
||||
8.560 8.616 8.671 8.726 8.781 8.837 8.892 8.947 9.003 9.058
|
||||
9.113 9.169 9.224 9.279 9.335 9.390 9.446 9.501 9.556 9.612
|
||||
9.667 9.723 9.778 9.834 9.889 9.944 10.000 10.055 10.111 10.166
|
||||
10.222 10.277 10.333 10.388 10.444 10.499 10.555 10.610 10.666 10.721
|
||||
|
||||
|
||||
10.777 10.832 10.888 10.943 10.999 11.054 11.110 11.165 11.221 11.276
|
||||
11.332 11.387 11.443 11.498 11.554 11.609 11.665 11.720 11.776 11.831
|
||||
11.887 11.943 11.998 12.054 12.109 12.165 12.220 12.276 12.331 12.387
|
||||
12.442 12.498 12.553 12.609 12.664 12.720 12.776 12.831 12.887 12.942
|
||||
12.998 13.053 13.109 13.164 13.220 13.275 13.331 13.386 13.442 13.497
|
||||
|
||||
|
||||
13.553 13.608 13.664 13.719 13.775 13.830 13.886 13.941 13.997 14.052
|
||||
14.108 14.163 14.219 14.274 14.330 14.385 14.441 14.496 14.552 14.607
|
||||
14.663 14.718 14.774 14.829 14.885 14.940 14.995 15.051 15.106 15.162
|
||||
15.217 15.273 15.328 15.383 15.439 15.494 15.550 15.605 15.661 15.716
|
||||
15.771 15.827 15.882 15.938 15.993 16.048 16.104 16.159 16.214 16.270
|
||||
|
||||
|
||||
16.325 16.380 16.436 16.491 16.547 16.602 16.657 16.713 16.768 16.823
|
||||
16.879 16.934 16.989 17.044 17.100 17.155 17.210 17.266 17.321 17.376
|
||||
17.432 17.487 17.542 17.597 17.653 17.708 17.763 17.818 17.874 17.929
|
||||
17.984 18.039 18.095 18.150 18.205 18.260 18.316 18.371 18.426 18.481
|
||||
18.537 18.592 18.647 18.702 18.757 18.813 18.868 18.923 18.978 19.033
|
||||
|
||||
|
||||
19.089 19.144 19.199 19.254 19.309 19.364 19.420 19.475 19.530 19.585
|
||||
19.640 19.695 19.751 19.806 19.861 19.916 19.971 20.026 20.081 20.137
|
||||
20.192 20.247 20.302 20.357 20.412 20.467 20.523 20.578 20.633 20.688
|
||||
20.743 20.798 20.853 20.909 20.964 21.019 21.074 21.129 21.184 21.239
|
||||
21.295 21.350 21.405 21.460 21.515 21.570 21.625 21.680 21.736 21.791
|
||||
|
||||
|
||||
21.846 21.901 21.956 22.011 22.066 22.122 22.177 22.232 22.287 22.342
|
||||
22.397 22.453 22.508 22.563 22.618 22.673 22.728 22.784 22.839 22.894
|
||||
22.949 23.004 23.060 23.115 23.170 23.225 23.280 23.336 23.391 23.446
|
||||
23.501 23.556 23.612 23.667 23.722 23.777 23.833 23.888 23.943 23.999
|
||||
24.054 24.109 24.164 24.220 24.275 24.330 24.386 24.441 24.496 24.552
|
||||
|
||||
|
||||
24.607 24.662 24.718 24.773 24.829 24.884 24.939 24.995 25.050 25.106
|
||||
25.161 25.217 25.272 25.327 25.383 25.438 25.494 25.549 25.605 25.661
|
||||
25.716 25.772 25.827 25.883 25.938 25.994 26.050 26.105 26.161 26.216
|
||||
26.272 26.328 26.383 26.439 26.495 26.551 26.606 26.662 26.718 26.774
|
||||
26.829 26.885 26.941 26.997 27.053 27.109 27.165 27.220 27.276 27.332
|
||||
|
||||
|
||||
27.388 27.444 27.500 27.556 27.612 27.668 27.724 27.780 27.836 27.893
|
||||
27.949 28.005 28.061 28.117 28.173 28.230 28.286 28.342 28.398 28.455
|
||||
28.511 28.567 28.624 28.680 28.736 28.793 28.849 28.906 28.962 29.019
|
||||
29.075 29.132 29.188 29.245 29.301 29.358 29.415 29.471 29.528 29.585
|
||||
29.642 29.698 29.755 29.812 29.869 29.926 29.983 30.039 30.096 30.153
|
||||
|
||||
|
||||
30.210 30.267 30.324 30.381 30.439 30.496 30.553 30.610 30.667 30.724
|
||||
30.782 30.839 30.896 30.954 31.011 31.068 31.126 31.183 31.241 31.298
|
||||
31.356 31.413 31.471 31.528 31.586 31.644 31.702 31.759 31.817 31.875
|
||||
31.933 31.991 32.048 32.106 32.164 32.222 32.280 32.338 32.396 32.455
|
||||
32.513 32.571 32.629 32.687 32.746 32.804 32.862 32.921 32.979 33.038
|
||||
|
||||
|
||||
33.096 33.155 33.213 33.272 33.330 33.389 33.448 33.506 33.565 33.624
|
||||
33.683 33.742 33.800 33.859 33.918 33.977 34.036 34.095 34.155 34.214
|
||||
34.273 34.332 34.391 34.451 34.510 34.569 34.629 34.688 34.748 34.807
|
||||
34.867 34.926 34.986 35.046 35.105 35.165 35.225 35.285 35.344 35.404
|
||||
35.464 35.524 35.584 35.644 35.704 35.764 35.825 35.885 35.945 36.005
|
||||
|
||||
|
||||
36.066 36.126 36.186 36.247 36.307 36.368 36.428 36.489 36.549 36.610
|
||||
36.671 36.732 36.792 36.853 36.914 36.975 37.036 37.097 37.158 37.219
|
||||
37.280 37.341 37.402 37.463 37.525 37.586 37.647 37.709 37.770 37.831
|
||||
37.893 37.954 38.016 38.078 38.139 38.201 38.262 38.324 38.386 38.448
|
||||
38.510 38.572 38.633 38.695 38.757 38.819 38.882 38.944 39.006 39.068
|
||||
|
||||
|
||||
39.130 39.192 39.255 39.317 39.379 39.442 39.504 39.567 39.629 39.692
|
||||
39.754 39.817 39.880 39.942 40.005 40.068 40.131 40.193 40.256 40.319
|
||||
40.382 40.445 40.508 40.571 40.634 40.697 40.760 40.823 40.886 40.950
|
||||
41.013 41.076 41.139 41.203 41.266 41.329 41.393 41.456 41.520 41.583
|
||||
41.647 41.710 41.774 41.837 41.901 41.965 42.028 42.092 42.156 42.219
|
||||
|
||||
|
||||
42.283 42.347 42.411 42.475 42.538 42.602 42.666 42.730 42.794 42.858
|
||||
42.922
|
||||
213
src/bpt/bptTypeJdegF.data
Normal file
213
src/bpt/bptTypeJdegF.data
Normal file
@@ -0,0 +1,213 @@
|
||||
! cvtTypeJdegF.data
|
||||
"typeJdegF" 32 0 1200 4095 1.0 -350 1400 1
|
||||
!
|
||||
-8.137 -8.127 -8.117 -8.106 -8.096 -8.085 -8.074 -8.063 -8.052 -8.041
|
||||
-8.030 -8.019 -8.008 -7.996 -7.985 -7.973 -7.962 -7.950 -7.938 -7.927
|
||||
-7.915 -7.903 -7.890 -7.878 -7.866 -7.854 -7.841 -7.829 -7.816 -7.803
|
||||
-7.791 -7.778 -7.765 -7.752 -7.739 -7.726 -7.712 -7.699 -7.686 -7.672
|
||||
-7.659 -7.645 -7.631 -7.618 -7.604 -7.590 -7.576 -7.562 -7.548 -7.533
|
||||
|
||||
-7.519 -7.505 -7.490 -7.476 -7.461 -7.447 -7.432 -7.417 -7.402 -7.387
|
||||
-7.372 -7.357 -7.342 -7.327 -7.311 -7.296 -7.281 -7.265 -7.250 -7.234
|
||||
-7.218 -7.202 -7.187 -7.171 -7.155 -7.139 -7.122 -7.106 -7.090 -7.074
|
||||
-7.057 -7.041 -7.024 -7.008 -6.991 -6.974 -6.958 -6.941 -6.924 -6.907
|
||||
-6.890 -6.873 -6.856 -6.838 -6.821 -6.804 -6.786 -6.769 -6.751 -6.734
|
||||
|
||||
-6.716 -6.698 -6.680 -6.663 -6.645 -6.627 -6.609 -6.591 -6.572 -6.554
|
||||
-6.536 -6.518 -6.499 -6.481 -6.462 -6.444 -6.425 -6.407 -6.388 -6.369
|
||||
-6.350 -6.331 -6.312 -6.293 -6.274 -6.255 -6.236 -6.217 -6.198 -6.178
|
||||
-6.159 -6.139 -6.120 -6.100 -6.081 -6.061 -6.041 -6.022 -6.002 -5.982
|
||||
-5.962 -5.942 -5.922 -5.902 -5.882 -5.861 -5.841 -5.821 -5.801 -5.780
|
||||
|
||||
-5.760 -5.739 -5.719 -5.698 -5.678 -5.657 -5.636 -5.615 -5.594 -5.574
|
||||
-5.553 -5.532 -5.511 -5.490 -5.468 -5.447 -5.426 -5.405 -5.383 -5.362
|
||||
-5.341 -5.319 -5.298 -5.276 -5.255 -5.233 -5.211 -5.190 -5.168 -5.146
|
||||
-5.124 -5.102 -5.080 -5.058 -5.036 -5.014 -4.992 -4.970 -4.948 -4.925
|
||||
-4.903 -4.881 -4.858 -4.836 -4.813 -4.791 -4.768 -4.746 -4.723 -4.700
|
||||
|
||||
-4.678 -4.655 -4.632 -4.609 -4.586 -4.563 -4.540 -4.517 -4.494 -4.471
|
||||
-4.448 -4.425 -4.402 -4.379 -4.355 -4.332 -4.309 -4.285 -4.262 -4.238
|
||||
-4.215 -4.191 -4.168 -4.144 -4.120 -4.097 -4.073 -4.049 -4.025 -4.001
|
||||
-3.978 -3.954 -3.930 -3.906 -3.882 -3.858 -3.833 -3.809 -3.785 -3.761
|
||||
-3.737 -3.712 -3.688 -3.664 -3.639 -3.615 -3.590 -3.566 -3.541 -3.517
|
||||
|
||||
-3.492 -3.468 -3.443 -3.418 -3.394 -3.369 -3.344 -3.319 -3.294 -3.270
|
||||
-3.245 -3.220 -3.195 -3.170 -3.145 -3.120 -3.094 -3.069 -3.044 -3.019
|
||||
-2.994 -2.968 -2.943 -2.918 -2.892 -2.867 -2.842 -2.816 -2.791 -2.765
|
||||
-2.740 -2.714 -2.689 -2.663 -2.637 -2.612 -2.586 -2.560 -2.534 -2.509
|
||||
-2.483 -2.457 -2.431 -2.405 -2.379 -2.353 -2.327 -2.301 -2.275 -2.249
|
||||
|
||||
-2.223 -2.197 -2.171 -2.144 -2.118 -2.092 -2.066 -2.039 -2.013 -1.987
|
||||
-1.960 -1.934 -1.908 -1.881 -1.855 -1.828 -1.802 -1.775 -1.748 -1.722
|
||||
-1.695 -1.669 -1.642 -1.615 -1.589 -1.562 -1.535 -1.508 -1.481 -1.455
|
||||
-1.428 -1.401 -1.374 -1.347 -1.320 -1.293 -1.266 -1.239 -1.212 -1.185
|
||||
-1.158 -1.131 -1.103 -1.076 -1.049 -1.022 -0.995 -0.967 -0.940 -0.913
|
||||
|
||||
-0.885 -0.858 -0.831 -0.803 -0.776 -0.748 -0.721 -0.694 -0.666 -0.639
|
||||
-0.611 -0.583 -0.556 -0.528 -0.501 -0.473 -0.445 -0.418 -0.390 -0.362
|
||||
-0.334 -0.307 -0.279 -0.251 -0.223 -0.195 -0.168 -0.140 -0.112 -0.084
|
||||
-0.056 -0.028 0.000 0.028 0.056 0.084 0.112 0.140 0.168 0.196
|
||||
0.224 0.253 0.281 0.309 0.337 0.365 0.394 0.422 0.450 0.478
|
||||
|
||||
0.507 0.535 0.563 0.592 0.620 0.648 0.677 0.705 0.734 0.762
|
||||
0.791 0.819 0.848 0.876 0.905 0.933 0.962 0.990 1.019 1.048
|
||||
1.076 1.105 1.134 1.162 1.191 1.220 1.248 1.277 1.306 1.335
|
||||
1.363 1.392 1.421 1.450 1.479 1.507 1.536 1.565 1.594 1.623
|
||||
1.652 1.681 1.710 1.739 1.768 1.797 1.826 1.855 1.884 1.913
|
||||
|
||||
1.942 1.971 2.000 2.029 2.058 2.088 2.117 2.146 2.175 2.204
|
||||
2.233 2.263 2.292 2.321 2.350 2.380 2.409 2.438 2.467 2.497
|
||||
2.526 2.555 2.585 2.614 2.644 2.673 2.702 2.732 2.761 2.791
|
||||
2.820 2.849 2.879 2.908 2.938 2.967 2.997 3.026 3.056 3.085
|
||||
3.115 3.145 3.174 3.204 3.233 3.263 3.293 3.322 3.352 3.381
|
||||
|
||||
3.411 3.441 3.470 3.500 3.530 3.560 3.589 3.619 3.649 3.678
|
||||
3.708 3.738 3.768 3.798 3.827 3.857 3.887 3.917 3.947 3.976
|
||||
4.006 4.036 4.066 4.096 4.126 4.156 4.186 4.216 4.245 4.275
|
||||
4.305 4.335 4.365 4.395 4.425 4.455 4.485 4.515 4.545 4.575
|
||||
4.605 4.635 4.665 4.695 4.725 4.755 4.786 4.816 4.846 4.876
|
||||
|
||||
4.906 4.936 4.966 4.996 5.026 5.057 5.087 5.117 5.147 5.177
|
||||
5.207 5.238 5.268 5.298 5.328 5.358 5.389 5.419 5.449 5.479
|
||||
5.509 5.540 5.570 5.600 5.630 5.661 5.691 5.721 5.752 5.782
|
||||
5.812 5.843 5.873 5.903 5.934 5.964 5.994 6.025 6.055 6.085
|
||||
6.116 6.146 6.176 6.207 6.237 6.268 6.298 6.328 6.359 6.389
|
||||
|
||||
6.420 6.450 6.481 6.511 6.541 6.572 6.602 6.633 6.663 6.694
|
||||
6.724 6.755 6.785 6.816 6.846 6.877 6.907 6.938 6.968 6.999
|
||||
7.029 7.060 7.090 7.121 7.151 7.182 7.212 7.243 7.274 7.304
|
||||
7.335 7.365 7.396 7.426 7.457 7.488 7.518 7.549 7.579 7.610
|
||||
7.641 7.671 7.702 7.732 7.763 7.794 7.824 7.855 7.885 7.916
|
||||
|
||||
7.947 7.977 8.008 8.039 8.069 8.100 8.131 8.161 8.192 8.223
|
||||
8.253 8.284 8.315 8.345 8.376 8.407 8.437 8.468 8.499 8.530
|
||||
8.560 8.591 8.622 8.652 8.683 8.714 8.745 8.775 8.806 8.837
|
||||
8.867 8.898 8.929 8.960 8.990 9.021 9.052 9.083 9.113 9.144
|
||||
9.175 9.206 9.236 9.267 9.298 9.329 9.359 9.390 9.421 9.452
|
||||
|
||||
9.483 9.513 9.544 9.575 9.606 9.636 9.667 9.698 9.729 9.760
|
||||
9.790 9.821 9.852 9.883 9.914 9.944 9.975 10.006 10.037 10.068
|
||||
10.098 10.129 10.160 10.191 10.222 10.252 10.283 10.314 10.345 10.376
|
||||
10.407 10.437 10.468 10.499 10.530 10.561 10.592 10.622 10.653 10.684
|
||||
10.715 10.746 10.777 10.807 10.838 10.869 10.900 10.931 10.962 10.992
|
||||
|
||||
11.023 11.054 11.085 11.116 11.147 11.177 11.208 11.239 11.270 11.301
|
||||
11.332 11.363 11.393 11.424 11.455 11.486 11.517 11.548 11.578 11.609
|
||||
11.640 11.671 11.702 11.733 11.764 11.794 11.825 11.856 11.887 11.918
|
||||
11.949 11.980 12.010 12.041 12.072 12.103 12.134 12.165 12.196 12.226
|
||||
12.257 12.288 12.319 12.350 12.381 12.411 12.442 12.473 12.504 12.535
|
||||
|
||||
12.566 12.597 12.627 12.658 12.689 12.720 12.751 12.782 12.813 12.843
|
||||
12.874 12.905 12.936 12.967 12.998 13.029 13.059 13.090 13.121 13.152
|
||||
13.183 13.214 13.244 13.275 13.306 13.337 13.368 13.399 13.430 13.460
|
||||
13.491 13.522 13.553 13.584 13.615 13.645 13.676 13.707 13.738 13.769
|
||||
13.800 13.830 13.861 13.892 13.923 13.954 13.985 14.015 14.046 14.077
|
||||
|
||||
14.108 14.139 14.170 14.200 14.231 14.262 14.293 14.324 14.355 14.385
|
||||
14.416 14.447 14.478 14.509 14.539 14.570 14.601 14.632 14.663 14.694
|
||||
14.724 14.755 14.786 14.817 14.848 14.878 14.909 14.940 14.971 15.002
|
||||
15.032 15.063 15.094 15.125 15.156 15.186 15.217 15.248 15.279 15.310
|
||||
15.340 15.371 15.402 15.433 15.464 15.494 15.525 15.556 15.587 15.617
|
||||
|
||||
15.648 15.679 15.710 15.741 15.771 15.802 15.833 15.864 15.894 15.925
|
||||
15.956 15.987 16.018 16.048 16.079 16.110 16.141 16.171 16.202 16.233
|
||||
16.264 16.294 16.325 16.356 16.387 16.417 16.448 16.479 16.510 16.540
|
||||
16.571 16.602 16.633 16.663 16.694 16.725 16.756 16.786 16.817 16.848
|
||||
16.879 16.909 16.940 16.971 17.001 17.032 17.063 17.094 17.124 17.155
|
||||
|
||||
17.186 17.217 17.247 17.278 17.309 17.339 17.370 17.401 17.432 17.462
|
||||
17.493 17.524 17.554 17.585 17.616 17.646 17.677 17.708 17.739 17.769
|
||||
17.800 17.831 17.861 17.892 17.923 17.953 17.984 18.015 18.046 18.076
|
||||
18.107 18.138 18.168 18.199 18.230 18.260 18.291 18.322 18.352 18.383
|
||||
18.414 18.444 18.475 18.506 18.537 18.567 18.598 18.629 18.659 18.690
|
||||
|
||||
18.721 18.751 18.782 18.813 18.843 18.874 18.905 18.935 18.966 18.997
|
||||
19.027 19.058 19.089 19.119 19.150 19.180 19.211 19.242 19.272 19.303
|
||||
19.334 19.364 19.395 19.426 19.456 19.487 19.518 19.548 19.579 19.610
|
||||
19.640 19.671 19.702 19.732 19.763 19.793 19.824 19.855 19.885 19.916
|
||||
19.947 19.977 20.008 20.039 20.069 20.100 20.131 20.161 20.192 20.222
|
||||
|
||||
20.253 20.284 20.314 20.345 20.376 20.406 20.437 20.467 20.498 20.529
|
||||
20.559 20.590 20.621 20.651 20.682 20.713 20.743 20.774 20.804 20.835
|
||||
20.866 20.896 20.927 20.958 20.988 21.019 21.049 21.080 21.111 21.141
|
||||
21.172 21.203 21.233 21.264 21.295 21.325 21.356 21.386 21.417 21.448
|
||||
21.478 21.509 21.540 21.570 21.601 21.631 21.662 21.693 21.723 21.754
|
||||
|
||||
21.785 21.815 21.846 21.877 21.907 21.938 21.968 21.999 22.030 22.060
|
||||
22.091 22.122 22.152 22.183 22.214 22.244 22.275 22.305 22.336 22.367
|
||||
22.397 22.428 22.459 22.489 22.520 22.551 22.581 22.612 22.643 22.673
|
||||
22.704 22.735 22.765 22.796 22.826 22.857 22.888 22.918 22.949 22.980
|
||||
23.010 23.041 23.072 23.102 23.133 23.164 23.194 23.225 23.256 23.286
|
||||
|
||||
23.317 23.348 23.378 23.409 23.440 23.471 23.501 23.532 23.563 23.593
|
||||
23.624 23.655 23.685 23.716 23.747 23.777 23.808 23.839 23.870 23.900
|
||||
23.931 23.962 23.992 24.023 24.054 24.085 24.115 24.146 24.177 24.207
|
||||
24.238 24.269 24.300 24.330 24.361 24.392 24.423 24.453 24.484 24.515
|
||||
24.546 24.576 24.607 24.638 24.669 24.699 24.730 24.761 24.792 24.822
|
||||
|
||||
24.853 24.854 24.915 24.946 24.976 25.007 25.038 25.069 25.099 25.130
|
||||
25.161 25.192 25.223 25.254 25.284 25.315 25.346 25.377 25.408 25.438
|
||||
25.469 25.500 25.531 25.562 25.593 25.623 25.654 25.685 25.716 25.747
|
||||
25.778 25.809 25.840 25.870 25.901 25.932 25.963 25.994 26.025 26.056
|
||||
26.087 26.118 26.148 26.179 26.210 26.241 26.272 26.303 26.334 26.365
|
||||
|
||||
26.396 26.427 26.458 26.489 26.520 26.551 26.582 26.613 26.644 26.675
|
||||
26.705 26.736 26.767 26.798 26.829 26.860 26.891 26.922 26.954 26.985
|
||||
27.016 27.047 27.078 27.109 27.140 27.171 27.202 27.233 27.264 27.295
|
||||
27.326 27.357 27.388 27.419 27.450 27.482 27.513 27.544 27.575 27.606
|
||||
27.637 27.668 27.699 27.731 27.762 27.793 27.824 27.855 27.886 27.917
|
||||
|
||||
27.949 27.980 28.011 28.042 28.073 28.105 28.136 28.167 28.198 28.230
|
||||
28.261 28.292 28.323 28.355 28.386 28.417 28.448 28.480 28.511 28.542
|
||||
28.573 28.605 28.636 28.667 28.699 28.730 28.761 28.793 28.824 28.855
|
||||
28.887 28.918 28.950 28.981 29.012 29.044 29.075 29.107 29.138 29.169
|
||||
29.201 29.232 29.264 29.295 29.327 29.358 29.390 29.421 29.452 29.484
|
||||
|
||||
29.515 29.547 29.578 29.610 29.642 29.673 29.705 29.736 29.768 29.799
|
||||
29.831 29.862 29.894 29.926 29.957 29.989 30.020 30.052 30.084 30.115
|
||||
30.147 30.179 30.210 30.242 30.274 30.305 30.337 30.369 30.400 30.432
|
||||
30.464 30.496 30.527 30.559 30.591 30.623 30.654 30.686 30.718 30.750
|
||||
30.782 30.813 30.845 30.877 30.909 30.941 30.973 31.005 31.036 31.068
|
||||
|
||||
31.100 31.132 31.164 31.196 31.228 31.260 31.292 31.324 31.356 31.388
|
||||
31.420 31.452 31.484 31.516 31.548 31.580 31.612 31.644 31.676 31.708
|
||||
31.740 31.772 31.804 31.836 31.868 31.901 31.933 31.965 31.997 32.029
|
||||
32.061 32.094 32.126 32.158 32.190 32.222 32.255 32.287 32.319 32.351
|
||||
32.384 32.416 32.448 32.480 32.513 32.545 32.577 32.610 32.642 32.674
|
||||
|
||||
32.707 32.739 32.772 32.804 32.836 32.869 32.901 32.934 32.966 32.999
|
||||
33.031 33.064 33.096 33.129 33.161 33.194 33.226 33.259 33.291 33.324
|
||||
33.356 33.389 33.422 33.454 33.487 33.519 33.552 33.585 33.617 33.650
|
||||
33.683 33.715 33.748 33.781 33.814 33.846 33.879 33.912 33.945 33.977
|
||||
34.010 34.043 34.076 34.109 34.141 34.174 34.207 34.240 34.273 34.306
|
||||
|
||||
34.339 34.372 34.405 34.437 34.470 34.503 34.536 34.569 34.602 34.635
|
||||
34.668 34.701 34.734 34.767 34.801 34.834 34.867 34.900 34.933 34.966
|
||||
34.999 35.032 35.065 35.099 35.132 35.165 35.198 35.231 35.265 35.298
|
||||
35.331 35.364 35.398 35.431 35.464 35.498 35.531 35.564 35.598 35.631
|
||||
35.664 35.698 35.731 35.764 35.798 35.831 35.865 35.898 35.932 35.965
|
||||
|
||||
35.999 36.032 36.066 36.099 36.133 36.166 36.200 36.233 36.267 36.301
|
||||
36.334 36.368 36.401 36.435 36.469 36.502 36.536 36.570 36.603 36.637
|
||||
36.671 36.705 36.738 36.772 36.806 36.840 36.873 36.907 36.941 36.975
|
||||
37.009 37.043 37.076 37.110 37.144 37.178 37.212 37.246 37.280 37.314
|
||||
37.348 37.382 37.416 37.450 37.484 37.518 37.552 37.586 37.620 37.654
|
||||
|
||||
37.688 37.722 37.756 37.790 37.825 37.859 37.893 37.927 37.961 37.995
|
||||
38.030 38.064 38.098 38.132 38.167 38.201 38.235 38.269 38.304 38.338
|
||||
38.372 38.407 38.441 38.475 38.510 38.544 38.578 38.613 38.647 38.682
|
||||
38.716 38.751 38.785 38.819 38.854 38.888 38.923 38.957 38.992 39.027
|
||||
39.061 39.096 39.130 39.165 39.199 39.234 39.269 39.303 39.338 39.373
|
||||
|
||||
39.407 39.442 39.477 39.511 39.546 39.581 39.615 39.650 39.685 39.720
|
||||
39.754 39.789 39.824 39.859 39.894 39.928 39.963 39.998 40.033 40.068
|
||||
40.103 40.138 40.172 40.207 40.242 40.277 40.312 40.347 40.382 40.417
|
||||
40.452 40.487 40.522 40.557 40.592 40.627 40.662 40.697 40.732 40.767
|
||||
40.802 40.837 40.872 40.908 40.943 40.978 41.013 41.048 41.083 41.118
|
||||
|
||||
41.154 41.189 41.224 41.259 41.294 41.329 41.365 41.400 41.435 41.470
|
||||
41.506 41.541 41.576 41.611 41.647 41.682 41.717 41.753 41.788 41.823
|
||||
41.859 41.894 41.929 41.965 42.000 42.035 42.071 42.106 42.142 42.177
|
||||
42.212 42.248 42.283 42.319 42.354 42.390 42.425 42.460 42.496 42.531
|
||||
42.567 42.602 42.638 42.673 42.709 42.744 42.780 42.815 42.851 42.886
|
||||
42.922
|
||||
201
src/bpt/bptTypeKdegC.data
Normal file
201
src/bpt/bptTypeKdegC.data
Normal file
@@ -0,0 +1,201 @@
|
||||
! cvtTypeKdegC.data
|
||||
"typeKdegC" 0 0 1000 4095 .5 -270 1372 1
|
||||
!
|
||||
-6.458 -6.457 -6.456 -6.455 -6.453 -6.452 -6.450 -6.448 -6.446 -6.444
|
||||
-6.441 -6.438 -6.435 -6.432 -6.429 -6.425 -6.421 -6.417 -6.413 -6.408
|
||||
|
||||
-6.404 -6.399 -6.394 -6.388 -6.382 -6.377 -6.371 -6.364 -6.358 -6.351
|
||||
-6.344 -6.337 -6.329 -6.322 -6.314 -6.306 -6.297 -6.289 -6.280 -6.271
|
||||
-6.262 -6.253 -6.243 -6.233 -6.223 -6.213 -6.202 -6.192 -6.181 -6.170
|
||||
-6.158 -6.147 -6.135 -6.123 -6.111 -6.099 -6.087 -6.074 -6.061 -6.048
|
||||
-6.035 -6.021 -6.007 -5.994 -5.980 -5.965 -5.951 -5.936 -5.922 -5.907
|
||||
|
||||
-5.891 -5.876 -5.860 -5.845 -5.829 -5.813 -5.796 -5.780 -5.763 -5.747
|
||||
-5.730 -5.712 -5.695 -5.678 -5.660 -5.642 -5.624 -5.606 -5.587 -5.569
|
||||
-5.550 -5.531 -5.512 -5.493 -5.474 -5.454 -5.434 -5.414 -5.394 -5.374
|
||||
-5.354 -5.333 -5.313 -5.292 -5.271 -5.249 -5.228 -5.207 -5.185 -5.163
|
||||
-5.141 -5.119 -5.097 -5.074 -5.051 -5.029 -5.006 -4.983 -4.959 -4.936
|
||||
|
||||
-4.912 -4.889 -4.865 -4.841 -4.817 -4.792 -4.768 -4.743 -4.719 -4.694
|
||||
-4.669 -4.644 -4.618 -4.593 -4.567 -4.541 -4.515 -4.489 -4.463 -4.437
|
||||
-4.410 -4.384 -4.357 -4.330 -4.303 -4.276 -4.248 -4.221 -4.193 -4.166
|
||||
-4.138 -4.110 -4.082 -4.053 -4.025 -3.997 -3.968 -3.939 -3.910 -3.881
|
||||
-3.852 -3.823 -3.793 -3.764 -3.734 -3.704 -3.674 -3.644 -3.614 -3.584
|
||||
|
||||
-3.553 -3.523 -3.492 -3.461 -3.430 -3.399 -3.368 -3.337 -3.305 -3.274
|
||||
-3.242 -3.211 -3.179 -3.147 -3.115 -3.082 -3.050 -3.018 -2.985 -2.953
|
||||
-2.920 -2.887 -2.854 -2.821 -2.788 -2.754 -2.721 -2.687 -2.654 -2.620
|
||||
-2.586 -2.552 -2.518 -2.484 -2.450 -2.416 -2.381 -2.347 -2.312 -2.277
|
||||
-2.243 -2.208 -2.173 -2.137 -2.102 -2.067 -2.032 -1.996 -1.961 -1.925
|
||||
|
||||
-1.889 -1.853 -1.817 -1.781 -1.745 -1.709 -1.673 -1.636 -1.600 -1.563
|
||||
-1.527 -1.490 -1.453 -1.416 -1.379 -1.342 -1.305 -1.268 -1.231 -1.193
|
||||
-1.156 -1.118 -1.081 -1.043 -1.005 -0.968 -0.930 -0.892 -0.854 -0.816
|
||||
-0.777 -0.739 -0.701 -0.662 -0.624 -0.585 -0.547 -0.508 -0.469 -0.431
|
||||
-0.392 -0.353 -0.314 -0.275 -0.236 -0.197 -0.157 -0.118 -0.079 -0.039
|
||||
|
||||
0.000 0.039 0.079 0.119 0.158 0.198 0.238 0.277 0.317 0.357
|
||||
0.397 0.437 0.477 0.517 0.557 0.597 0.637 0.677 0.718 0.758
|
||||
0.798 0.838 0.879 0.919 0.960 1.000 1.041 1.081 1.122 1.162
|
||||
1.203 1.244 1.285 1.325 1.366 1.407 1.448 1.489 1.529 1.570
|
||||
1.611 1.652 1.693 1.734 1.776 1.817 1.858 1.899 1.940 1.981
|
||||
|
||||
2.022 2.064 2.105 2.146 2.188 2.229 2.270 2.312 2.353 2.394
|
||||
2.436 2.477 2.519 2.560 2.601 2.643 2.684 2.726 2.767 2.809
|
||||
2.850 2.892 2.933 2.975 3.016 3.058 3.100 3.141 3.183 3.224
|
||||
3.266 3.307 3.349 3.390 3.432 3.473 3.515 3.556 3.598 3.639
|
||||
3.681 3.722 3.764 3.805 3.847 3.888 3.930 3.971 4.012 4.054
|
||||
|
||||
4.095 4.137 4.178 4.219 4.261 4.302 4.343 4.384 4.426 4.467
|
||||
4.508 4.549 4.590 4.632 4.673 4.714 4.755 4.796 4.837 4.878
|
||||
4.919 4.960 5.001 5.042 5.083 5.124 5.164 5.205 5.246 5.287
|
||||
5.327 5.368 5.409 5.450 5.490 5.531 5.571 5.612 5.652 5.693
|
||||
5.733 5.774 5.814 5.855 5.895 5.936 5.976 6.016 6.057 6.097
|
||||
|
||||
6.137 6.177 6.218 6.258 6.298 6.338 6.378 6.419 6.459 6.499
|
||||
6.539 6.579 6.619 6.659 6.699 6.739 6.779 6.819 6.859 6.899
|
||||
6.939 6.979 7.019 7.059 7.099 7.139 7.179 7.219 7.259 7.299
|
||||
7.338 7.378 7.418 7.458 7.498 7.538 7.578 7.618 7.658 7.697
|
||||
7.737 7.777 7.817 7.857 7.897 7.937 7.977 8.017 8.057 8.097
|
||||
|
||||
8.137 8.177 8.216 8.256 8.296 8.336 8.376 8.416 8.456 8.497
|
||||
8.537 8.577 8.617 8.657 8.697 8.737 8.777 8.817 8.857 8.898
|
||||
8.938 8.978 9.018 9.058 9.099 9.139 9.179 9.220 9.260 9.300
|
||||
9.341 9.381 9.421 9.462 9.502 9.543 9.583 9.624 9.664 9.705
|
||||
9.745 9.786 9.826 9.867 9.907 9.948 9.989 10.029 10.070 10.111
|
||||
|
||||
10.151 10.192 10.233 10.274 10.315 10.355 10.396 10.437 10.478 10.519
|
||||
10.560 10.600 10.641 10.682 10.723 10.764 10.805 10.846 10.887 10.928
|
||||
10.969 11.010 11.051 11.093 11.134 11.175 11.216 11.257 11.298 11.339
|
||||
11.381 11.422 11.463 11.504 11.546 11.587 11.628 11.669 11.711 11.752
|
||||
11.793 11.835 11.876 11.918 11.959 12.000 12.042 12.083 12.125 12.166
|
||||
|
||||
12.207 12.249 12.290 12.332 12.373 12.415 12.456 12.498 12.539 12.581
|
||||
12.623 12.664 12.706 12.747 12.789 12.831 12.872 12.914 12.955 12.997
|
||||
13.039 13.080 13.122 13.164 13.205 13.247 13.289 13.331 13.372 13.414
|
||||
13.456 13.497 13.539 13.581 13.623 13.665 13.706 13.748 13.790 13.832
|
||||
13.874 13.915 13.957 13.999 14.041 14.083 14.125 14.167 14.208 14.250
|
||||
|
||||
14.292 14.334 14.376 14.418 14.460 14.502 14.544 14.586 14.628 14.670
|
||||
14.712 14.754 14.796 14.838 14.880 14.922 14.964 15.006 15.048 15.090
|
||||
15.132 15.174 15.216 15.258 15.300 15.342 15.384 15.426 15.468 15.510
|
||||
15.552 15.594 15.636 15.679 15.721 15.763 15.805 15.847 15.889 15.931
|
||||
15.974 16.016 16.058 16.100 16.142 16.184 16.227 16.269 16.311 16.353
|
||||
|
||||
16.395 16.438 16.480 16.522 16.564 16.607 16.649 16.691 16.733 16.776
|
||||
16.818 16.860 16.902 16.945 16.987 17.029 17.072 17.114 17.156 17.199
|
||||
17.241 17.283 17.326 17.368 17.410 17.453 17.495 17.537 17.580 17.622
|
||||
17.664 17.707 17.749 17.792 17.834 17.876 17.919 17.961 18.004 18.046
|
||||
18.088 18.131 18.173 18.216 18.258 18.301 18.343 18.385 18.428 18.470
|
||||
|
||||
18.513 18.555 18.598 18.640 18.683 18.725 18.768 18.810 18.853 18.895
|
||||
18.938 18.980 19.023 19.065 19.108 19.150 19.193 19.235 19.278 19.320
|
||||
19.363 19.405 19.448 19.490 19.533 19.576 19.618 19.661 19.703 19.746
|
||||
19.788 19.831 19.873 19.916 19.959 20.001 20.044 20.086 20.129 20.172
|
||||
20.214 20.257 20.299 20.342 20.385 20.427 20.470 20.512 20.555 20.598
|
||||
|
||||
20.640 20.683 20.725 20.768 20.811 20.853 20.896 20.938 20.981 21.024
|
||||
21.066 21.109 21.152 21.194 21.237 21.280 21.322 21.365 21.407 21.450
|
||||
21.493 21.535 21.578 21.621 21.663 21.706 21.749 21.791 21.834 21.876
|
||||
21.919 21.962 22.004 22.047 22.090 22.132 22.175 22.218 22.260 22.303
|
||||
22.346 22.388 22.431 22.473 22.516 22.559 22.601 22.644 22.687 22.729
|
||||
|
||||
22.772 22.815 22.857 22.900 22.942 22.985 23.028 23.070 23.113 23.156
|
||||
23.198 23.241 23.284 23.326 23.369 23.411 23.454 23.497 23.539 23.582
|
||||
23.624 23.667 23.710 23.752 23.795 23.837 23.880 23.923 23.965 24.008
|
||||
24.050 24.093 24.136 24.178 24.221 24.263 24.306 24.348 24.391 24.434
|
||||
24.476 24.519 24.561 24.604 24.646 24.689 24.731 24.774 24.817 24.859
|
||||
|
||||
24.902 24.944 24.987 25.029 25.072 25.114 25.157 25.199 25.242 25.284
|
||||
25.327 25.369 25.412 25.454 25.497 25.539 25.582 25.624 25.666 25.709
|
||||
25.751 25.794 25.836 25.879 25.921 25.964 26.006 26.048 26.091 26.133
|
||||
26.176 26.218 26.260 26.303 26.345 26.387 26.430 26.472 26.515 26.557
|
||||
26.599 26.642 26.684 26.726 26.769 26.811 26.853 26.896 26.938 26.980
|
||||
|
||||
27.022 27.065 27.107 27.149 27.192 27.234 27.276 27.318 27.361 27.403
|
||||
27.445 27.487 27.529 27.572 27.614 27.656 27.698 27.740 27.783 27.825
|
||||
27.867 27.909 27.951 27.993 28.035 28.078 28.120 28.162 28.204 28.246
|
||||
28.288 28.330 28.372 28.414 28.456 28.498 28.540 28.583 28.625 28.667
|
||||
28.709 28.751 28.793 28.835 28.877 28.919 28.961 29.002 29.044 29.086
|
||||
|
||||
29.128 29.170 29.212 29.254 29.296 29.338 29.380 29.422 29.464 29.505
|
||||
29.547 29.589 29.631 29.673 29.715 29.756 29.798 29.840 29.882 29.924
|
||||
29.965 30.007 30.049 30.091 30.132 30.174 30.216 30.257 30.299 30.341
|
||||
30.383 30.424 30.466 30.508 30.549 30.591 30.632 30.674 30.716 30.757
|
||||
30.799 30.840 30.882 30.924 30.965 31.007 31.048 31.090 31.131 31.173
|
||||
|
||||
31.214 31.256 31.297 31.339 31.380 31.422 31.463 31.504 31.546 31.587
|
||||
31.629 31.670 31.712 31.753 31.794 31.836 31.877 31.918 31.960 32.001
|
||||
32.042 32.084 32.125 32.166 32.207 32.249 32.290 32.331 32.372 32.414
|
||||
32.455 32.496 32.537 32.578 32.619 32.661 32.702 32.743 32.784 32.825
|
||||
32.866 32.907 32.948 32.990 33.031 33.072 33.113 33.154 33.195 33.236
|
||||
|
||||
33.277 33.318 33.359 33.400 33.441 33.482 33.523 33.564 33.604 33.645
|
||||
33.686 33.727 33.768 33.809 33.850 33.891 33.931 33.972 34.013 34.054
|
||||
34.095 34.136 34.176 34.217 34.258 34.299 34.339 34.380 34.421 34.461
|
||||
34.502 34.543 34.583 34.624 34.665 34.705 34.746 34.787 34.827 34.868
|
||||
34.909 34.949 34.990 35.030 35.071 35.111 35.152 35.192 35.233 35.273
|
||||
|
||||
35.314 35.354 35.395 35.435 35.476 35.516 35.557 35.597 35.637 35.678
|
||||
35.718 35.758 35.799 35.839 35.880 35.920 35.960 36.000 36.041 36.081
|
||||
36.121 36.162 36.202 36.242 36.282 36.323 36.363 36.403 36.443 36.483
|
||||
36.524 36.564 36.604 36.644 36.684 36.724 36.764 36.804 36.844 36.885
|
||||
36.925 36.965 37.005 37.045 37.085 37.125 37.165 37.205 37.245 37.285
|
||||
|
||||
37.325 37.365 37.405 37.445 37.484 37.524 37.564 37.604 37.644 37.684
|
||||
37.724 37.764 37.803 37.843 37.883 37.923 37.963 38.002 38.042 38.082
|
||||
38.122 38.162 38.201 38.241 38.281 38.320 38.360 38.400 38.439 38.479
|
||||
38.519 38.558 38.598 38.638 38.677 38.717 38.756 38.796 38.836 38.875
|
||||
38.915 38.954 38.994 39.033 39.073 39.112 39.152 39.191 39.231 39.270
|
||||
|
||||
39.310 39.349 39.388 39.428 39.467 39.507 39.546 39.585 39.625 39.644
|
||||
39.703 39.743 39.782 39.821 39.861 39.900 39.939 39.979 40.018 40.057
|
||||
40.096 40.136 40.175 40.214 40.253 40.292 40.332 40.371 40.410 40.449
|
||||
40.488 40.527 40.566 40.605 40.645 40.684 40.723 40.762 40.801 40.840
|
||||
40.879 40.918 40.957 40.996 41.035 41.074 41.113 41.152 41.191 41.230
|
||||
|
||||
41.269 41.308 41.347 41.385 41.424 41.463 41.502 41.541 41.580 41.619
|
||||
41.657 41.696 41.735 41.774 41.813 41.851 41.890 41.929 41.968 42.006
|
||||
42.045 42.084 42.123 42.161 42.200 42.239 42.277 42.316 42.355 42.393
|
||||
42.432 42.470 42.509 42.548 42.586 42.625 42.663 42.702 42.740 42.779
|
||||
42.817 42.856 42.894 42.933 42.971 43.010 43.048 43.087 43.125 43.164
|
||||
|
||||
43.202 43.240 43.279 43.317 43.356 43.394 43.432 43.471 43.509 43.547
|
||||
43.585 43.624 43.662 43.700 43.739 43.777 43.815 43.853 43.891 43.930
|
||||
43.968 44.006 44.044 44.082 44.121 44.159 44.197 44.235 44.273 44.311
|
||||
44.349 44.387 44.425 44.463 44.501 44.539 44.577 44.615 44.653 44.691
|
||||
44.729 44.767 44.805 44.843 44.881 44.919 44.957 44.995 45.033 45.070
|
||||
|
||||
45.108 45.146 45.184 45.222 45.260 45.297 45.335 45.373 45.411 45.448
|
||||
45.486 45.524 45.561 45.599 45.637 45.675 45.712 45.750 45.787 45.825
|
||||
45.863 45.900 45.938 45.975 46.013 46.051 46.088 46.126 46.163 46.201
|
||||
46.238 46.275 46.313 46.350 46.388 46.425 46.463 46.500 46.537 46.575
|
||||
46.612 46.649 46.687 46.724 46.761 46.799 46.836 46.873 46.910 46.948
|
||||
|
||||
46.985 47.022 47.059 47.096 47.134 47.171 47.208 47.245 47.282 47.319
|
||||
47.356 47.393 47.430 47.468 47.505 47.542 47.579 47.616 47.653 47.689
|
||||
47.726 47.763 47.800 47.837 47.874 47.911 47.948 47.985 48.021 48.058
|
||||
48.095 48.132 48.169 48.205 48.242 48.279 48.316 48.352 48.389 48.426
|
||||
48.462 48.499 48.536 48.572 48.609 48.645 48.682 48.718 48.755 48.792
|
||||
|
||||
48.828 48.865 48.901 48.937 48.974 49.010 49.047 49.083 49.120 49.156
|
||||
49.192 49.229 49.265 49.301 49.338 49.374 49.410 49.446 49.483 49.519
|
||||
49.555 49.591 49.627 49.663 49.700 49.736 49.772 49.808 49.844 49.880
|
||||
49.916 49.952 49.988 50.024 50.060 50.096 50.132 50.168 50.204 50.240
|
||||
50.276 50.311 50.347 50.383 50.419 50.455 50.491 50.526 50.562 50.598
|
||||
|
||||
50.633 50.669 50.705 50.741 50.776 50.812 50.847 50.883 50.919 50.954
|
||||
50.990 51.025 51.061 51.096 51.132 51.167 51.203 51.238 51.274 51.309
|
||||
51.344 51.380 51.415 51.450 51.486 51.521 51.556 51.592 51.627 51.662
|
||||
51.697 51.733 51.768 51.803 51.838 51.873 51.908 51.943 51.979 52.014
|
||||
52.049 52.084 52.119 52.154 52.189 52.224 52.259 52.294 52.329 52.364
|
||||
|
||||
52.398 52.433 52.468 52.503 52.538 52.573 52.608 52.642 52.677 52.712
|
||||
52.747 52.781 52.816 52.851 52.886 52.920 52.955 52.989 53.024 53.059
|
||||
53.093 53.128 53.162 53.197 53.232 53.266 53.301 53.335 53.370 53.404
|
||||
53.439 53.473 53.507 53.542 53.576 53.611 53.645 53.679 53.714 53.748
|
||||
53.782 53.817 53.851 53.885 53.920 53.954 53.988 54.022 54.057 54.091
|
||||
|
||||
54.125 54.159 54.193 54.228 54.262 54.296 54.330 54.364 54.398 54.432
|
||||
54.466 54.501 54.535 54.569 54.603 54.637 54.671 54.705 54.739 54.773
|
||||
54.807 54.841 54.875
|
||||
360
src/bpt/bptTypeKdegF.data
Normal file
360
src/bpt/bptTypeKdegF.data
Normal file
@@ -0,0 +1,360 @@
|
||||
! cvtTypeKdegF.data
|
||||
"typeKdegF" 32 0 1832 4095 1.0 -454 2500 1
|
||||
!
|
||||
-6.458 -6.457 -6.457 -6.456
|
||||
|
||||
-6.456 -6.455 -6.454 -6.454 -6.453 -6.452 -6.451 -6.450 -6.449 -6.448
|
||||
-6.447 -6.445 -6.444 -6.443 -6.441 -6.440 -6.438 -6.436 -6.435 -6.433
|
||||
-6.431 -6.429 -6.427 -6.425 -6.423 -6.421 -6.419 -6.416 -6.414 -6.411
|
||||
-6.409 -6.406 -6.404 -6.401 -6.398 -6.395 -6.392 -6.389 -6.386 -6.383
|
||||
-6.380 -6.377 -6.373 -6.370 -6.366 -6.363 -6.359 -6.355 -6.352 -6.348
|
||||
|
||||
-6.344 -6.340 -6.336 -6.332 -6.328 -6.323 -6.319 -6.315 -6.310 -6.306
|
||||
-6.301 -6.296 -6.292 -6.287 -6.282 -6.277 -6.272 -6.267 -6.262 -6.257
|
||||
-6.251 -6.246 -6.241 -6.235 -6.230 -6.224 -6.219 -6.213 -6.207 -6.201
|
||||
-6.195 -6.189 -6.183 -6.177 -6.171 -6.165 -6.158 -6.152 -6.146 -6.139
|
||||
-6.133 -6.126 -6.119 -6.113 -6.106 -6.099 -6.092 -6.085 -6.078 -6.071
|
||||
|
||||
-6.064 -6.057 -6.049 -6.042 -6.035 -6.027 -6.020 -6.012 -6.004 -5.997
|
||||
-5.989 -5.981 -5.973 -5.965 -5.957 -5.949 -5.941 -5.933 -5.925 -5.917
|
||||
-5.908 -5.900 -5.891 -5.883 -5.874 -5.866 -5.857 -5.848 -5.839 -5.831
|
||||
-5.822 -5.813 -5.804 -5.795 -5.786 -5.776 -5.767 -5.758 -5.748 -5.739
|
||||
-5.730 -5.720 -5.711 -5.701 -5.691 -5.682 -5.672 -5.662 -5.652 -5.642
|
||||
|
||||
-5.632 -5.622 -5.612 -5.602 -5.592 -5.581 -5.571 -5.561 -5.550 -5.540
|
||||
-5.529 -5.519 -5.508 -5.497 -5.487 -5.476 -5.465 -5.454 -5.443 -5.432
|
||||
-5.421 -5.410 -5.399 -5.388 -5.376 -5.365 -5.354 -5.342 -5.331 -5.319
|
||||
-5.308 -5.296 -5.285 -5.273 -5.261 -5.249 -5.238 -5.226 -5.214 -5.202
|
||||
-5.190 -5.178 -5.165 -5.153 -5.141 -5.129 -5.116 -5.104 -5.092 -5.079
|
||||
|
||||
-5.067 -5.054 -5.041 -5.029 -5.016 -5.003 -4.990 -4.978 -4.965 -4.952
|
||||
-4.939 -4.926 -4.912 -4.899 -4.886 -4.873 -4.860 -4.846 -4.833 -4.819
|
||||
-4.806 -4.792 -4.779 -4.765 -4.752 -4.738 -4.724 -4.710 -4.697 -4.683
|
||||
-4.669 -4.655 -4.641 -4.627 -4.613 -4.598 -4.584 -4.570 -4.556 -4.541
|
||||
-4.527 -4.512 -4.498 -4.484 -4.469 -4.454 -4.440 -4.425 -4.410 -4.396
|
||||
|
||||
-4.381 -4.366 -4.351 -4.336 -4.321 -4.306 -4.291 -4.276 -4.261 -4.245
|
||||
-4.230 -4.215 -4.200 -4.184 -4.169 -4.153 -4.138 -4.122 -4.107 -4.091
|
||||
-4.075 -4.060 -4.044 -4.028 -4.012 -3.997 -3.981 -3.965 -3.949 -3.933
|
||||
-3.917 -3.901 -3.884 -3.868 -3.852 -3.836 -3.819 -3.803 -3.787 -3.770
|
||||
-3.754 -3.737 -3.721 -3.704 -3.688 -3.671 -3.654 -3.637 -3.621 -3.604
|
||||
|
||||
-3.587 -3.570 -3.553 -3.536 -3.519 -3.502 -3.485 -3.468 -3.451 -3.434
|
||||
-3.417 -3.399 -3.382 -3.365 -3.347 -3.330 -3.312 -3.295 -3.277 -3.260
|
||||
-3.242 -3.225 -3.207 -3.189 -3.172 -3.154 -3.136 -3.118 -3.100 -3.082
|
||||
-3.065 -3.047 -3.029 -3.010 -2.992 -2.974 -2.956 -2.938 -2.920 -2.902
|
||||
-2.883 -2.865 -2.847 -2.828 -2.810 -2.791 -2.773 -2.754 -2.736 -2.717
|
||||
|
||||
-2.699 -2.680 -2.661 -2.643 -2.624 -2.605 -2.586 -2.567 -2.549 -2.530
|
||||
-2.511 -2.492 -2.473 -2.454 -2.435 -2.416 -2.397 -2.377 -2.358 -2.339
|
||||
-2.320 -2.300 -2.281 -2.262 -2.243 -2.223 -2.204 -2.184 -2.165 -2.145
|
||||
-2.126 -2.106 -2.087 -2.067 -2.047 -2.028 -2.008 -1.988 -1.968 -1.949
|
||||
-1.929 -1.909 -1.889 -1.869 -1.849 -1.829 -1.809 -1.789 -1.769 -1.749
|
||||
|
||||
-1.729 -1.709 -1.689 -1.669 -1.648 -1.628 -1.608 -1.588 -1.567 -1.547
|
||||
-1.527 -1.506 -1.486 -1.465 -1.445 -1.424 -1.404 -1.383 -1.363 -1.342
|
||||
-1.322 -1.301 -1.280 -1.260 -1.239 -1.218 -1.197 -1.177 -1.156 -1.135
|
||||
-1.114 -1.093 -1.072 -1.051 -1.031 -1.010 -0.989 -0.968 -0.946 -0.925
|
||||
-0.904 -0.883 -0.862 -0.841 -0.820 -0.799 -0.777 -0.756 -0.735 -0.714
|
||||
|
||||
-0.692 -0.671 -0.650 -0.628 -0.607 -0.585 -0.564 -0.543 -0.521 -0.500
|
||||
-0.478 -0.457 -0.435 -0.413 -0.392 -0.370 -0.349 -0.327 -0.305 -0.284
|
||||
-0.262 -0.240 -0.218 -0.197 -0.175 -0.153 -0.131 -0.109 -0.088 -0.066
|
||||
-0.044 -0.022 0.000 0.022 0.044 0.066 0.088 0.110 0.132 0.154
|
||||
0.176 0.198 0.220 0.242 0.264 0.286 0.308 0.331 0.353 0.375
|
||||
|
||||
0.397 0.419 0.441 0.464 0.486 0.508 0.530 0.553 0.575 0.597
|
||||
0.619 0.642 0.664 0.686 0.709 0.731 0.753 0.776 0.798 0.821
|
||||
0.843 0.865 0.888 0.910 0.933 0.955 0.978 1.000 1.023 1.045
|
||||
1.068 1.090 1.113 1.135 1.158 1.181 1.203 1.226 1.248 1.271
|
||||
1.294 1.316 1.339 1.362 1.384 1.407 1.430 1.452 1.475 1.498
|
||||
|
||||
1.520 1.543 1.566 1.589 1.611 1.634 1.657 1.680 1.703 1.725
|
||||
1.748 1.771 1.794 1.817 1.839 1.862 1.885 1.908 1.931 1.954
|
||||
1.977 2.000 2.022 2.045 2.068 2.091 2.114 2.137 2.160 2.183
|
||||
2.206 2.229 2.252 2.275 2.298 2.321 2.344 2.367 2.390 2.413
|
||||
2.436 2.459 2.482 2.505 2.528 2.551 2.574 2.597 2.620 2.643
|
||||
|
||||
2.666 2.689 2.712 2.735 2.758 2.781 2.804 2.827 2.850 2.873
|
||||
2.896 2.920 2.943 2.966 2.989 3.012 3.035 3.058 3.081 3.104
|
||||
3.127 3.150 3.173 3.196 3.220 3.243 3.266 3.289 3.312 3.335
|
||||
3.358 3.381 3.404 3.427 3.450 3.473 3.496 3.519 3.543 3.566
|
||||
3.589 3.612 3.635 3.658 3.681 3.704 3.727 3.750 3.773 3.796
|
||||
|
||||
3.819 3.842 3.865 3.888 3.911 3.934 3.957 3.980 4.003 4.026
|
||||
4.049 4.072 4.095 4.118 4.141 4.164 4.187 4.210 4.233 4.256
|
||||
4.279 4.302 4.325 4.348 4.371 4.394 4.417 4.439 4.462 4.485
|
||||
4.508 4.531 4.554 4.577 4.600 4.622 4.645 4.668 4.691 4.714
|
||||
4.737 4.759 4.782 4.805 4.828 4.851 4.873 4.896 4.919 4.942
|
||||
|
||||
4.964 4.987 5.010 5.033 5.055 5.078 5.101 5.124 5.146 5.169
|
||||
5.192 5.214 5.237 5.260 5.282 5.305 5.327 5.350 5.373 5.395
|
||||
5.418 5.440 5.463 5.486 5.508 5.531 5.553 5.576 5.598 5.621
|
||||
5.643 5.666 5.688 5.711 5.733 5.756 5.778 5.801 5.823 5.846
|
||||
5.868 5.891 5.913 5.936 5.958 5.980 6.003 6.025 6.048 6.070
|
||||
|
||||
6.092 6.115 6.137 6.160 6.182 6.204 6.227 6.249 6.271 6.294
|
||||
6.316 6.338 6.361 6.383 6.405 6.428 6.450 6.472 6.494 6.517
|
||||
6.539 6.561 6.583 6.606 6.628 6.650 6.672 6.695 6.717 6.739
|
||||
6.761 6.784 6.806 6.828 6.850 6.873 6.895 6.917 6.939 6.961
|
||||
6.984 7.006 7.028 7.050 7.072 7.094 7.117 7.139 7.161 7.183
|
||||
|
||||
7.205 7.228 7.250 7.272 7.294 7.316 7.338 7.361 7.383 7.405
|
||||
7.427 7.449 7.471 7.494 7.516 7.538 7.560 7.582 7.604 7.627
|
||||
7.649 7.671 7.693 7.715 7.737 7.760 7.782 7.804 7.826 7.848
|
||||
7.870 7.893 7.915 7.937 7.959 7.981 8.003 8.026 8.048 8.070
|
||||
8.092 8.114 8.137 8.159 8.181 8.203 8.225 8.248 8.270 8.292
|
||||
|
||||
8.314 8.336 8.359 8.381 8.403 8.425 8.448 8.470 8.492 8.514
|
||||
8.537 8.559 8.581 8.603 8.626 8.648 8.670 8.692 8.715 8.737
|
||||
8.759 8.782 8.804 8.826 8.849 8.871 8.893 8.916 8.938 8.960
|
||||
8.983 9.005 9.027 9.050 9.072 9.094 9.117 9.139 9.161 9.184
|
||||
9.206 9.229 9.251 9.273 9.296 9.318 9.341 9.363 9.385 9.408
|
||||
|
||||
9.430 9.453 9.475 9.498 9.520 9.543 9.565 9.588 9.610 9.633
|
||||
9.655 9.678 9.700 9.723 9.745 9.768 9.790 9.813 9.835 9.858
|
||||
9.880 9.903 9.926 9.948 9.971 9.993 10.016 10.038 10.061 10.084
|
||||
10.106 10.129 10.151 10.174 10.197 10.219 10.242 10.265 10.287 10.310
|
||||
10.333 10.355 10.378 10.401 10.423 10.446 10.469 10.491 10.514 10.537
|
||||
|
||||
10.560 10.582 10.605 10.628 10.650 10.673 10.696 10.719 10.741 10.764
|
||||
10.787 10.810 10.833 10.855 10.878 10.901 10.924 10.947 10.969 10.992
|
||||
11.015 11.038 11.061 11.083 11.106 11.129 11.152 11.175 11.198 11.221
|
||||
11.243 11.266 11.289 11.312 11.335 11.358 11.381 11.404 11.426 11.449
|
||||
11.472 11.495 11.518 11.541 11.564 11.587 11.610 11.633 11.656 11.679
|
||||
|
||||
11.702 11.725 11.748 11.770 11.793 11.816 11.839 11.862 11.885 11.908
|
||||
11.931 11.954 11.977 12.000 12.023 12.046 12.069 12.092 12.115 12.138
|
||||
12.161 12.184 12.207 12.230 12.254 12.277 12.300 12.323 12.346 12.369
|
||||
12.392 12.415 12.438 12.461 12.484 12.507 12.530 12.553 12.576 12.599
|
||||
12.623 12.646 12.669 12.692 12.715 12.738 12.761 12.784 12.807 12.831
|
||||
|
||||
12.854 12.877 12.900 12.923 12.946 12.969 12.992 13.016 13.039 13.062
|
||||
13.085 13.108 13.131 13.154 13.178 13.201 13.224 13.247 13.270 13.293
|
||||
13.317 13.340 13.363 13.386 13.409 13.433 13.456 13.479 13.502 13.525
|
||||
13.549 13.572 13.595 13.618 13.641 13.665 13.688 13.711 13.734 13.757
|
||||
13.781 13.804 13.827 13.850 13.874 13.897 13.920 13.943 13.967 13.990
|
||||
|
||||
14.013 14.036 14.060 14.083 14.106 14.129 14.153 14.176 14.199 14.222
|
||||
14.246 14.269 14.292 14.316 14.339 14.362 14.385 14.409 14.432 14.455
|
||||
14.479 14.502 14.525 14.548 14.572 14.595 14.618 14.642 14.665 14.688
|
||||
14.712 14.735 14.758 14.782 14.805 14.828 14.852 14.875 14.898 14.922
|
||||
14.945 14.968 14.992 15.015 15.038 15.062 15.085 15.108 15.132 15.155
|
||||
|
||||
15.178 15.202 15.225 15.248 15.272 15.295 15.318 15.342 15.365 15.389
|
||||
15.412 15.435 15.459 15.482 15.505 15.529 15.552 15.576 15.599 15.622
|
||||
15.646 15.669 15.693 15.716 15.739 15.763 15.786 15.810 15.833 15.856
|
||||
15.880 15.903 15.927 15.950 15.974 15.997 16.020 16.044 16.067 16.091
|
||||
16.114 16.138 16.161 16.184 16.208 16.231 16.255 16.278 16.302 16.325
|
||||
|
||||
16.349 16.372 16.395 16.419 16.442 16.466 16.489 16.513 16.536 16.560
|
||||
16.583 16.607 16.630 16.654 16.677 16.700 16.724 16.747 16.771 16.794
|
||||
16.818 16.841 16.865 16.888 16.912 16.935 16.959 16.982 17.006 17.029
|
||||
17.053 17.076 17.100 17.123 17.147 17.170 17.194 17.217 17.241 17.264
|
||||
17.288 17.311 17.335 17.358 17.382 17.406 17.429 17.453 17.476 17.500
|
||||
|
||||
17.523 17.547 17.570 17.594 17.617 17.641 17.664 17.688 17.711 17.735
|
||||
17.759 17.782 17.806 17.829 17.853 17.876 17.900 17.923 17.947 17.971
|
||||
17.994 18.018 18.041 18.065 18.088 18.112 18.136 18.159 18.183 18.206
|
||||
18.230 18.253 18.277 18.301 18.324 18.348 18.371 18.395 18.418 18.442
|
||||
18.466 18.489 18.513 18.536 18.560 18.584 18.607 18.631 18.654 18.678
|
||||
|
||||
18.702 18.725 18.749 18.772 18.796 18.820 18.843 18.867 18.890 18.914
|
||||
18.938 18.961 18.985 19.008 19.032 19.056 19.079 19.103 19.127 19.150
|
||||
19.174 19.197 19.221 19.245 19.268 19.292 19.316 19.339 19.363 19.386
|
||||
19.410 19.434 19.457 19.481 19.505 19.528 19.552 19.576 19.599 19.623
|
||||
19.646 19.670 19.694 19.717 19.741 19.765 19.788 19.812 19.836 19.859
|
||||
|
||||
19.883 19.907 19.930 19.954 19.978 20.001 20.025 20.049 20.072 20.096
|
||||
20.120 20.143 20.167 20.190 20.214 20.238 20.261 20.285 20.309 20.332
|
||||
20.356 20.380 20.403 20.427 20.451 20.474 20.498 20.522 20.545 20.569
|
||||
20.593 20.616 20.640 20.664 20.688 20.711 20.735 20.759 20.782 20.806
|
||||
20.830 20.853 20.877 20.901 20.924 20.948 20.972 20.995 21.019 21.043
|
||||
|
||||
21.066 21.090 21.114 21.137 21.161 21.185 21.208 21.232 21.256 21.280
|
||||
21.303 21.327 21.351 21.374 21.398 21.422 21.445 21.469 21.493 21.516
|
||||
21.540 21.564 21.587 21.611 21.635 21.659 21.682 21.706 21.730 21.753
|
||||
21.777 21.801 21.824 21.848 21.872 21.895 21.919 21.943 21.966 21.990
|
||||
22.014 22.038 22.061 22.085 22.109 22.132 22.156 22.180 22.203 22.227
|
||||
|
||||
22.251 22.274 22.298 22.322 22.346 22.369 22.393 22.417 22.440 22.464
|
||||
22.488 22.511 22.535 22.559 22.582 22.606 22.630 22.654 22.677 22.701
|
||||
22.725 22.748 22.772 22.796 22.819 22.843 22.867 22.890 22.914 22.938
|
||||
22.961 22.985 23.009 23.032 23.056 23.080 23.104 23.127 23.151 23.175
|
||||
23.198 23.222 23.246 23.269 23.293 23.317 23.340 23.364 23.388 23.411
|
||||
|
||||
23.435 23.459 23.482 23.506 23.530 23.553 23.577 23.601 23.624 23.648
|
||||
23.672 23.695 23.719 23.743 23.766 23.790 23.814 23.837 23.861 23.885
|
||||
23.908 23.932 23.956 23.979 24.003 24.027 24.050 24.074 24.098 24.121
|
||||
24.145 24.169 24.192 24.216 24.240 24.263 24.287 24.311 24.334 24.358
|
||||
24.382 24.405 24.429 24.453 24.476 24.500 24.523 24.547 24.571 24.594
|
||||
|
||||
24.618 24.642 24.665 24.689 24.713 24.736 24.760 24.783 24.807 24.831
|
||||
24.854 24.878 24.902 24.925 24.949 24.972 24.996 25.020 25.043 25.067
|
||||
25.091 25.114 25.138 25.161 25.185 25.209 25.232 25.256 25.279 25.303
|
||||
25.327 25.350 25.374 25.397 25.421 25.445 25.468 25.492 25.515 25.539
|
||||
25.563 25.586 25.610 25.633 25.657 25.681 25.704 25.728 25.751 25.775
|
||||
|
||||
25.799 25.822 25.846 25.869 25.893 25.916 25.940 25.964 25.987 26.011
|
||||
26.034 26.058 26.081 26.105 26.128 26.152 26.176 26.199 26.223 26.246
|
||||
26.270 26.293 26.317 26.340 26.364 26.387 26.411 26.435 26.458 26.482
|
||||
26.505 26.529 26.552 26.576 26.599 26.623 26.646 26.670 26.693 26.717
|
||||
26.740 26.764 26.787 26.811 26.834 26.858 26.881 26.905 26.928 26.952
|
||||
|
||||
26.975 26.999 27.022 27.046 27.069 27.093 27.116 27.140 27.163 27.187
|
||||
27.210 27.234 27.257 27.281 27.304 27.328 27.351 27.375 27.398 27.422
|
||||
27.445 27.468 27.492 27.515 27.539 27.562 27.586 27.609 27.633 27.656
|
||||
27.679 27.703 27.726 27.750 27.773 27.797 27.820 27.843 27.867 27.890
|
||||
27.914 27.937 27.961 27.984 28.007 28.031 28.054 28.078 28.101 28.124
|
||||
|
||||
28.148 28.171 28.195 28.218 28.241 28.265 28.288 28.311 28.335 28.358
|
||||
28.382 28.405 28.428 28.452 28.475 28.498 28.522 28.545 28.569 28.592
|
||||
28.615 28.639 28.662 28.685 28.709 28.732 28.755 28.779 28.802 28.825
|
||||
28.849 28.872 28.895 28.919 28.942 28.965 28.988 29.012 29.035 29.058
|
||||
29.082 29.105 29.128 29.152 29.175 29.198 29.221 29.245 29.268 29.291
|
||||
|
||||
29.315 29.338 29.361 29.384 29.408 29.431 29.454 29.477 29.501 29.524
|
||||
29.547 29.570 29.594 29.617 29.640 29.663 29.687 29.710 29.733 29.756
|
||||
29.780 29.803 29.826 29.849 29.872 29.896 29.919 29.942 29.965 29.989
|
||||
30.012 30.035 30.058 30.081 30.104 30.128 30.151 30.174 30.197 30.220
|
||||
30.244 30.267 30.290 30.313 30.336 30.359 30.383 30.406 30.429 30.452
|
||||
|
||||
30.475 30.498 30.521 30.545 30.568 30.591 30.614 30.637 30.660 30.683
|
||||
30.706 30.730 30.753 30.776 30.799 30.822 30.845 30.868 30.891 30.914
|
||||
30.937 30.961 30.984 31.007 31.030 31.053 31.076 31.099 31.122 31.145
|
||||
31.168 31.191 31.214 31.237 31.260 31.283 31.306 31.329 31.353 31.376
|
||||
31.399 31.422 31.445 31.468 31.491 31.514 31.537 31.560 31.583 31.606
|
||||
|
||||
31.629 31.652 31.675 31.698 31.721 31.744 31.767 31.790 31.813 31.836
|
||||
31.859 31.882 31.905 31.927 31.950 31.973 31.996 32.019 32.042 32.065
|
||||
32.088 32.111 32.134 32.157 32.180 32.203 32.226 32.249 32.272 32.294
|
||||
32.317 32.340 32.363 32.386 32.409 32.432 32.455 32.478 32.501 32.523
|
||||
32.546 32.569 32.592 32.615 32.638 32.661 32.683 32.706 32.729 32.752
|
||||
|
||||
32.775 32.798 32.821 32.843 32.866 32.889 32.912 32.935 32.958 32.980
|
||||
33.003 33.026 33.049 33.072 33.094 33.117 33.140 33.163 33.186 33.208
|
||||
33.231 33.254 33.277 33.300 33.322 33.345 33.368 33.391 33.413 33.436
|
||||
33.459 33.482 33.504 33.527 33.550 33.573 33.595 33.618 33.641 33.664
|
||||
33.686 33.709 33.732 33.754 33.777 33.800 33.823 33.845 33.868 33.891
|
||||
|
||||
33.913 33.936 33.959 33.981 34.004 34.027 34.049 34.072 34.095 34.117
|
||||
34.140 34.163 34.185 34.208 34.231 34.253 34.276 34.299 34.321 34.344
|
||||
34.366 34.389 34.412 34.434 34.457 34.480 34.502 34.525 34.547 34.570
|
||||
34.593 34.615 34.638 34.660 34.683 34.705 34.728 34.751 34.773 34.796
|
||||
34.818 34.841 34.863 34.886 34.909 34.931 34.954 34.976 34.999 35.021
|
||||
|
||||
35.044 35.066 35.089 35.111 35.134 35.156 35.179 35.201 35.224 35.246
|
||||
35.269 35.291 35.314 35.336 35.359 35.381 35.404 35.426 35.449 35.471
|
||||
35.494 35.516 35.539 35.561 35.583 35.606 35.628 35.651 35.673 35.696
|
||||
35.718 35.741 35.763 35.785 35.808 35.830 35.853 35.875 35.897 35.920
|
||||
35.942 35.965 35.987 36.009 36.032 36.054 36.077 36.099 36.121 36.144
|
||||
|
||||
36.166 36.188 36.211 36.233 36.256 36.278 36.300 36.323 36.345 36.367
|
||||
36.390 36.412 36.434 36.457 36.479 36.501 36.524 36.546 36.568 36.590
|
||||
36.613 36.635 36.657 36.680 36.702 36.724 36.746 36.769 36.791 36.813
|
||||
36.836 36.858 36.880 36.902 36.925 36.947 36.969 36.991 37.014 37.036
|
||||
37.058 37.080 37.103 37.125 37.147 37.169 37.191 37.214 37.236 37.258
|
||||
|
||||
37.280 37.303 37.325 37.347 37.369 37.391 37.413 37.436 37.458 37.480
|
||||
37.502 37.524 37.547 37.569 37.591 37.613 37.635 37.657 37.679 37.702
|
||||
37.724 37.746 37.768 37.790 37.812 37.834 37.857 37.879 37.901 37.923
|
||||
37.945 37.967 37.989 38.011 38.033 38.055 38.078 38.100 38.122 38.144
|
||||
38.166 38.188 38.210 38.232 38.254 38.276 38.298 38.320 38.342 38.364
|
||||
|
||||
38.387 38.409 38.431 38.453 38.475 38.497 38.519 38.541 38.563 38.585
|
||||
38.607 38.629 38.651 38.673 38.695 38.717 38.739 38.761 38.783 38.805
|
||||
38.827 38.849 38.871 38.893 38.915 38.937 38.959 38.981 39.003 39.024
|
||||
39.046 39.068 39.090 39.112 39.134 39.156 39.178 39.200 39.222 39.244
|
||||
39.266 39.288 39.310 39.331 39.353 39.375 39.397 39.419 39.441 39.463
|
||||
|
||||
39.485 39.507 39.529 39.550 39.572 39.594 39.616 39.638 39.660 39.682
|
||||
39.703 39.725 39.747 39.769 39.791 39.813 39.835 39.856 39.878 39.900
|
||||
39.922 39.944 39.965 39.987 40.009 40.031 40.053 40.075 40.096 40.118
|
||||
40.140 40.162 40.183 40.205 40.227 40.249 40.271 40.292 40.314 40.336
|
||||
40.358 40.379 40.401 40.423 40.445 40.466 40.488 40.510 40.532 40.553
|
||||
|
||||
40.575 40.597 40.619 40.640 40.662 40.684 40.705 40.727 40.749 40.770
|
||||
40.792 40.814 40.836 40.857 40.879 40.901 40.922 40.944 40.966 40.987
|
||||
41.009 41.031 41.052 41.074 41.096 41.117 41.139 41.161 41.182 41.204
|
||||
41.225 41.247 41.269 41.290 41.312 41.334 41.355 41.377 41.398 41.420
|
||||
41.442 41.463 41.485 41.506 41.528 41.550 41.571 41.593 41.614 41.636
|
||||
|
||||
41.657 41.679 41.701 41.722 41.744 41.765 41.787 41.808 41.830 41.851
|
||||
41.873 41.895 41.916 41.938 41.959 41.981 42.002 42.024 42.045 42.067
|
||||
42.088 42.110 42.131 42.153 42.174 42.196 42.217 42.239 42.260 42.282
|
||||
42.303 42.325 42.346 42.367 42.389 42.410 42.432 42.453 42.475 42.496
|
||||
42.518 42.539 42.560 42.582 42.603 42.625 42.646 42.668 42.689 42.710
|
||||
|
||||
42.732 42.753 42.775 42.796 42.817 42.839 42.860 42.882 42.903 42.924
|
||||
42.946 42.967 42.989 43.010 43.031 43.053 43.074 43.095 43.117 43.138
|
||||
43.159 43.181 43.202 43.223 43.245 43.266 43.287 43.309 43.330 43.351
|
||||
43.373 43.394 43.415 43.436 43.458 43.479 43.500 43.522 43.543 43.564
|
||||
43.585 43.607 43.628 43.649 43.671 43.692 43.713 43.734 43.756 43.777
|
||||
|
||||
43.798 43.819 43.841 43.862 43.883 43.904 43.925 43.947 43.968 43.989
|
||||
44.010 44.031 44.053 44.074 44.095 44.116 44.137 44.159 44.180 44.201
|
||||
44.222 44.243 44.265 44.286 44.307 44.328 44.349 44.370 44.391 44.413
|
||||
44.434 44.455 44.476 44.497 44.518 44.539 44.560 44.582 44.603 44.624
|
||||
44.645 44.666 44.687 44.708 44.729 44.750 44.771 44.793 44.814 44.835
|
||||
|
||||
44.856 44.877 44.898 44.919 44.940 44.961 44.982 45.003 45.024 45.045
|
||||
45.066 45.087 45.108 45.129 45.150 45.171 45.192 45.213 45.234 45.255
|
||||
45.276 45.297 45.318 45.339 45.360 45.381 45.402 45.423 45.444 45.465
|
||||
45.486 45.507 45.528 45.549 45.570 45.591 45.612 45.633 45.654 45.675
|
||||
45.695 45.716 45.737 45.758 45.779 45.800 45.821 45.842 45.863 45.884
|
||||
|
||||
45.904 45.925 45.946 45.967 45.988 46.009 46.030 46.051 46.071 46.092
|
||||
46.113 46.134 46.155 46.176 46.196 46.217 46.238 46.259 46.280 46.300
|
||||
46.321 46.342 46.363 46.384 46.404 46.425 46.446 46.467 46.488 46.508
|
||||
46.529 46.550 46.571 46.591 46.612 46.633 46.654 46.674 46.695 46.716
|
||||
46.737 46.757 46.778 46.799 46.819 46.840 46.861 46.881 46.902 46.923
|
||||
|
||||
46.944 46.964 46.985 47.006 47.026 47.047 47.068 47.088 47.109 47.130
|
||||
47.150 47.171 47.191 47.212 47.233 47.253 47.274 47.295 47.315 47.336
|
||||
47.356 47.377 47.398 47.418 47.439 47.459 47.480 47.500 47.521 47.542
|
||||
47.562 47.583 47.603 47.624 47.644 47.665 47.685 47.706 47.726 47.747
|
||||
47.767 47.788 47.808 47.829 47.849 47.870 47.890 47.911 47.931 47.952
|
||||
|
||||
47.972 47.993 48.013 48.034 48.054 48.075 48.095 48.116 48.136 48.156
|
||||
48.177 48.197 48.218 48.238 48.258 48.279 48.299 48.320 48.340 48.360
|
||||
48.381 48.401 48.422 48.442 48.462 48.483 48.503 48.523 48.544 48.564
|
||||
48.584 48.605 48.625 48.645 48.666 48.686 48.706 48.727 48.747 48.767
|
||||
48.787 48.808 48.828 48.848 48.869 48.889 48.909 48.929 48.950 48.970
|
||||
|
||||
48.990 49.010 49.031 49.051 49.071 49.091 49.111 49.132 49.152 49.172
|
||||
49.192 49.212 49.233 49.253 49.273 49.293 49.313 49.333 49.354 49.374
|
||||
49.394 49.414 49.434 49.454 49.474 49.495 49.515 49.535 49.555 49.575
|
||||
49.595 49.615 49.635 49.655 49.675 49.696 49.716 49.736 49.756 49.776
|
||||
49.796 49.816 49.836 49.856 49.876 49.896 49.916 49.936 49.956 49.976
|
||||
|
||||
49.996 50.016 50.036 50.056 50.076 50.096 50.116 50.136 50.156 50.176
|
||||
50.196 50.216 50.236 50.256 50.276 50.296 50.315 50.335 50.355 50.375
|
||||
50.395 50.415 50.435 50.455 50.475 50.494 50.514 50.534 50.554 50.574
|
||||
50.594 50.614 50.633 50.653 50.673 50.693 50.713 50.733 50.752 50.772
|
||||
50.792 50.812 50.832 50.851 50.871 50.891 50.911 50.930 50.950 50.970
|
||||
|
||||
50.990 51.009 51.029 51.049 51.069 51.088 51.108 51.128 51.148 51.167
|
||||
51.187 51.207 51.226 51.246 51.266 51.285 51.305 51.325 51.344 51.364
|
||||
51.384 51.403 51.423 51.443 51.462 51.482 51.501 51.521 51.541 51.560
|
||||
51.580 51.599 51.619 51.639 51.658 51.678 51.697 51.717 51.736 51.756
|
||||
51.776 51.795 51.815 51.834 51.854 51.873 51.893 51.912 51.932 51.951
|
||||
|
||||
51.971 51.990 52.010 52.029 52.049 52.068 52.088 52.107 52.127 52.146
|
||||
52.165 52.185 52.204 52.224 52.243 52.263 52.282 52.301 52.321 52.340
|
||||
52.360 52.379 52.398 52.418 52.437 52.457 52.476 52.495 52.515 52.534
|
||||
52.553 52.573 52.592 52.611 52.631 52.650 52.669 52.689 52.708 52.727
|
||||
52.747 52.766 52.785 52.805 52.824 52.843 52.862 52.882 52.901 52.920
|
||||
|
||||
52.939 52.959 52.978 52.997 53.016 53.036 53.055 53.074 53.093 53.113
|
||||
53.132 53.151 53.170 53.189 53.209 53.228 53.247 53.266 53.285 53.304
|
||||
53.324 53.343 53.362 53.381 53.400 53.419 53.439 53.458 53.477 53.496
|
||||
53.515 53.534 53.553 53.572 53.592 53.611 53.630 53.649 53.668 53.687
|
||||
53.706 53.725 53.744 53.763 53.782 53.801 53.821 53.840 53.859 53.878
|
||||
|
||||
53.897 53.916 53.935 53.954 53.973 53.992 54.011 54.030 54.049 54.068
|
||||
54.087 54.106 54.125 54.144 54.163 54.182 54.201 54.220 54.239 54.258
|
||||
54.277 54.296 54.315 54.334 54.353 54.372 54.391 54.410 54.429 54.447
|
||||
54.466 54.485 54.504 54.523 54.542 54.561 54.580 54.599 54.618 54.637
|
||||
54.656 54.675 54.694 54.712 54.731 54.750 54.769 54.788 54.807 54.826
|
||||
|
||||
54.845
|
||||
@@ -1,9 +1,10 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* cvtBpt.c - Convert using breakpoint table
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 9-19-91
|
||||
*
|
||||
* Author: Marty Kraimer
|
||||
* Date: 04OCT95
|
||||
* This is adaptation of old bldCvtTable
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
@@ -29,63 +30,76 @@
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* nnn mm-dd-yy nnn Comment
|
||||
* .02 05-18-92 rcz New database access
|
||||
* .03 12-11-92 mrk ANSI prototypes
|
||||
* 01 04OCT95 mrk Taken from old bldCvtTable
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cvtTable.h>
|
||||
#include <dbAccess.h>
|
||||
#include <ellLib.h>
|
||||
#include <dbBase.h>
|
||||
#include <dbStaticLib.h>
|
||||
#include <cvtTable.h>
|
||||
#include <epicsPrint.h>
|
||||
|
||||
extern struct dbBase *pdbBase;
|
||||
extern struct dbBase *pdbbase;
|
||||
|
||||
|
||||
|
||||
#ifdef __STDC__
|
||||
long cvtRawToEngBpt(double *pval,short linr,short init, void **ppbrk, short *plbrk)
|
||||
#else /* __STDC__ */
|
||||
long cvtRawToEngBpt(pval, linr, init, ppbrk, plbrk)
|
||||
double *pval;
|
||||
short linr;
|
||||
short init;
|
||||
void **ppbrk;
|
||||
short *plbrk;
|
||||
#endif /* __STDC__ */
|
||||
static brkTable *findBrkTable(short linr)
|
||||
{
|
||||
double val=*pval;
|
||||
long status=0;
|
||||
struct brkTable *pbrkTable;
|
||||
struct brkInt *pInt;
|
||||
struct brkInt *pnxtInt;
|
||||
short lbrk;
|
||||
int number;
|
||||
struct arrBrkTable *pcvtTable;
|
||||
brkTable *pbrkTable;
|
||||
dbMenu *pdbMenu;
|
||||
char name[50];
|
||||
char *pname = name;
|
||||
int len,ind;
|
||||
|
||||
if(linr < 2) return(-1);
|
||||
if(init==TRUE || *ppbrk == NULL) { /*must find breakpoint table*/
|
||||
if( !(pcvtTable=pdbBase->pcvtTable) || (pcvtTable->number < linr)
|
||||
|| (!(pcvtTable->papBrkTable[linr]))) {
|
||||
errMessage(S_db_badField,"Breakpoint Table not Found");
|
||||
return(S_db_badField);
|
||||
}
|
||||
*ppbrk = (void *)(pcvtTable->papBrkTable[linr]);
|
||||
/* Just start at the beginning */
|
||||
*plbrk=0;
|
||||
}
|
||||
|
||||
pbrkTable = (struct brkTable *)*ppbrk;
|
||||
number = pbrkTable->number;
|
||||
lbrk = *plbrk;
|
||||
/*make sure we dont go off end of table*/
|
||||
if( (lbrk+1) >= number ) lbrk--;
|
||||
pInt = pbrkTable->papBrkInt[lbrk];
|
||||
pnxtInt = pbrkTable->papBrkInt[lbrk+1];
|
||||
/* find entry for increased value */
|
||||
while( (pnxtInt->raw) <= val ) {
|
||||
pdbMenu = dbFindMenu(pdbbase,"menuConvert");
|
||||
len = strlen(pdbMenu->papChoiceValue[linr]);
|
||||
if(len>=sizeof(name)) {
|
||||
epicsPrintf("Break Tables(findBrkTable) choice name too long\n");
|
||||
return(0);
|
||||
}
|
||||
strcpy(pname,pdbMenu->papChoiceValue[linr]);
|
||||
for(ind=0; ind<strlen(pname); ind++) {
|
||||
if(!isalnum(pname[ind])) {
|
||||
pname[ind] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
pbrkTable = dbFindBrkTable(pdbbase,pname);
|
||||
return(pbrkTable);
|
||||
}
|
||||
|
||||
long cvtRawToEngBpt(double *pval,short linr,short init, void **ppbrk,
|
||||
short *plbrk)
|
||||
{
|
||||
double val=*pval;
|
||||
long status=0;
|
||||
brkTable *pbrkTable;
|
||||
brkInt *pInt;
|
||||
brkInt *pnxtInt;
|
||||
short lbrk;
|
||||
int number;
|
||||
|
||||
|
||||
if(linr < 2) return(-1);
|
||||
if(init==TRUE || *ppbrk == NULL) { /*must find breakpoint table*/
|
||||
pbrkTable = findBrkTable(linr);
|
||||
if(!pbrkTable) return(S_dbLib_badField);
|
||||
*ppbrk = (void *)pbrkTable;
|
||||
/* Just start at the beginning */
|
||||
*plbrk=0;
|
||||
}
|
||||
pbrkTable = (struct brkTable *)*ppbrk;
|
||||
number = pbrkTable->number;
|
||||
lbrk = *plbrk;
|
||||
/*make sure we dont go off end of table*/
|
||||
if( (lbrk+1) >= number ) lbrk--;
|
||||
pInt = pbrkTable->papBrkInt[lbrk];
|
||||
pnxtInt = pbrkTable->papBrkInt[lbrk+1];
|
||||
/* find entry for increased value */
|
||||
while( (pnxtInt->raw) <= val ) {
|
||||
lbrk++;
|
||||
pInt = pbrkTable->papBrkInt[lbrk];
|
||||
if( lbrk >= number-1) {
|
||||
@@ -93,54 +107,40 @@ short *plbrk;
|
||||
break;
|
||||
}
|
||||
pnxtInt = pbrkTable->papBrkInt[lbrk+1];
|
||||
}
|
||||
while( (pInt->raw) > val) {
|
||||
}
|
||||
while( (pInt->raw) > val) {
|
||||
if(lbrk==0) {
|
||||
status=1;
|
||||
break;
|
||||
}
|
||||
lbrk--;
|
||||
pInt = pbrkTable->papBrkInt[lbrk];
|
||||
}
|
||||
*plbrk = lbrk;
|
||||
*pval = pInt->eng + (val - pInt->raw) * pInt->slope;
|
||||
return(status);
|
||||
}
|
||||
*plbrk = lbrk;
|
||||
*pval = pInt->eng + (val - pInt->raw) * pInt->slope;
|
||||
return(status);
|
||||
}
|
||||
|
||||
#ifdef __STDC__
|
||||
long cvtEngToRawBpt(double *pval,short linr,short init,
|
||||
void **ppbrk,short *plbrk)
|
||||
#else /* __STDC__ */
|
||||
long cvtEngToRawBpt(pval,linr, init,ppbrk,plbrk)
|
||||
double *pval;
|
||||
short linr;
|
||||
short init;
|
||||
void **ppbrk;
|
||||
short *plbrk;
|
||||
#endif /* __STDC__ */
|
||||
{
|
||||
double val=*pval;
|
||||
long status=0;
|
||||
struct brkTable *pbrkTable;
|
||||
struct brkInt *pInt;
|
||||
struct brkInt *pnxtInt;
|
||||
short lbrk;
|
||||
int number;
|
||||
struct arrBrkTable *pcvtTable;
|
||||
double val=*pval;
|
||||
long status=0;
|
||||
brkTable *pbrkTable;
|
||||
brkInt *pInt;
|
||||
brkInt *pnxtInt;
|
||||
short lbrk;
|
||||
int number;
|
||||
|
||||
|
||||
if(linr < 2) return(-1);
|
||||
if(init==TRUE || *ppbrk == NULL) { /*must find breakpoint table*/
|
||||
if( !(pcvtTable=pdbBase->pcvtTable) || (pcvtTable->number < linr)
|
||||
|| (!(pcvtTable->papBrkTable[linr]))) {
|
||||
errMessage(S_db_badField,"Breakpoint Table not Found");
|
||||
return(S_db_badField);
|
||||
}
|
||||
*ppbrk = (void *)(pcvtTable->papBrkTable[linr]);
|
||||
pbrkTable = findBrkTable(linr);
|
||||
if(!pbrkTable) return(S_dbLib_badField);
|
||||
*ppbrk = (void *)pbrkTable;
|
||||
/* Just start at the beginning */
|
||||
*plbrk=0;
|
||||
}
|
||||
|
||||
pbrkTable = (struct brkTable *)*ppbrk;
|
||||
number = pbrkTable->number;
|
||||
lbrk = *plbrk;
|
||||
45
src/bpt/cvtTable.h
Normal file
45
src/bpt/cvtTable.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* $Id$
|
||||
* Breakpoint Tables
|
||||
*
|
||||
* Author: Marty Kraimer
|
||||
* Date: 11-7-90
|
||||
*
|
||||
* 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 05-18-92 rcz removed extern
|
||||
* .02 05-18-92 rcz new database access
|
||||
* .03 08-19-92 jba add prototypes for cvtRawToEngBpt,cvtEngToRawBpt
|
||||
*/
|
||||
|
||||
#ifndef INCcvtTableh
|
||||
#define INCcvtTableh 1
|
||||
|
||||
/* Global Routines*/
|
||||
long cvtEngToRawBpt(double *pval,short linr,short init,
|
||||
void **ppbrk,short *plbrk);
|
||||
|
||||
long cvtRawToEngBpt(double *pval,short linr,short init,
|
||||
void **ppbrk, short *plbrk);
|
||||
|
||||
#endif
|
||||
405
src/bpt/makeBpt.c
Normal file
405
src/bpt/makeBpt.c
Normal file
@@ -0,0 +1,405 @@
|
||||
/* $Id$
|
||||
* Author: Marty Kraimer
|
||||
* Date: 9/28/95
|
||||
* Replacement for old bldCvtTable
|
||||
*
|
||||
* 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 28SEP95 mrk Replace old bldCvtTable
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <dbBase.h>
|
||||
#include <ellLib.h>
|
||||
#include <cvtTable.h>
|
||||
|
||||
#define MAX_LINE_SIZE 160
|
||||
#define MAX_BREAKS 100
|
||||
struct brkCreateInfo {
|
||||
float engLow; /* Lowest value desired: engineering units */
|
||||
float engHigh; /* Highest value desired: engineering units */
|
||||
float rawLow; /* Raw value for EngLow */
|
||||
float rawHigh; /* Raw value for EngHigh */
|
||||
float accuracy; /* accuracy desired in engineering units */
|
||||
float tblEngFirst;/* First table value: engineering units */
|
||||
float tblEngLast; /* Last table value: engineering units */
|
||||
float tblEngDelta;/* Change per table entry: eng units */
|
||||
long nTable; /* number of table entries */
|
||||
/* (last-first)/delta + 1 */
|
||||
float *pTable; /* addr of data table */
|
||||
} brkCreateInfo;
|
||||
|
||||
brkInt brkint[MAX_BREAKS];
|
||||
|
||||
static int create_break(struct brkCreateInfo *pbci, brkInt *pabrkInt,
|
||||
int max_breaks, int *n_breaks);
|
||||
static char inbuf[MAX_LINE_SIZE];
|
||||
static int linenum=0;
|
||||
|
||||
typedef struct dataList{
|
||||
struct dataList *next;
|
||||
float value;
|
||||
}dataList;
|
||||
|
||||
static int getNumber(char **pbeg, float *value)
|
||||
{
|
||||
int nchars=0;
|
||||
|
||||
while(isspace(**pbeg) && **pbeg!= '\0') (*pbeg)++;
|
||||
if(**pbeg == '!' || **pbeg == '\0') return(-1);
|
||||
if(sscanf(*pbeg,"%f%n",value,&nchars)!=1) return(-1);
|
||||
*pbeg += nchars;
|
||||
return(0);
|
||||
}
|
||||
|
||||
static void errExit(char *pmessage)
|
||||
{
|
||||
fprintf(stderr,pmessage);
|
||||
fprintf(stderr,"\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
char *pbeg;
|
||||
char *pend;
|
||||
float value;
|
||||
char *pname;
|
||||
dataList *phead;
|
||||
dataList *pdataList;
|
||||
dataList *pnext;
|
||||
float *pdata;
|
||||
long ndata;
|
||||
int nBreak,len,n;
|
||||
char *outFilename;
|
||||
char *pext;
|
||||
FILE *outFile;
|
||||
FILE *inFile;
|
||||
char *plastSlash;
|
||||
|
||||
|
||||
if(argc!=2) {
|
||||
fprintf(stderr,"usage: makeBpt file.data\n");
|
||||
exit(-1);
|
||||
}
|
||||
plastSlash = strrchr(argv[1],'/');
|
||||
plastSlash = (plastSlash ? plastSlash+1 : argv[1]);
|
||||
outFilename = calloc(1,strlen(plastSlash)+2);
|
||||
strcpy(outFilename,plastSlash);
|
||||
pext = strstr(outFilename,".data");
|
||||
if(!pext) {
|
||||
fprintf(stderr,"Input file MUST have .data extension\n");
|
||||
exit(-1);
|
||||
}
|
||||
strcpy(pext,".dbd");
|
||||
inFile = fopen(argv[1],"r");
|
||||
if(!inFile) {
|
||||
fprintf(stderr,"Error opening %s\n",argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
outFile = fopen(outFilename,"w");
|
||||
if(!outFile) {
|
||||
fprintf(stderr,"Error opening %s\n",outFilename);
|
||||
exit(-1);
|
||||
}
|
||||
while(fgets(inbuf,MAX_LINE_SIZE,inFile)) {
|
||||
linenum++;
|
||||
inbuf[strlen(inbuf)] = '\0'; /* remove newline*/
|
||||
pbeg = inbuf;
|
||||
while(isspace(*pbeg) && *pbeg!= '\0') pbeg++;
|
||||
if(*pbeg == '!' || *pbeg == '\0') continue;
|
||||
while(*pbeg!='"' && *pbeg!= '\0') pbeg++;
|
||||
if(*pbeg!='"' ) errExit("Illegal Header");
|
||||
pbeg++; pend = pbeg;
|
||||
while(*pend!='"' && *pend!= '\0') pend++;
|
||||
if(*pend!='"') errExit("Illegal Header");
|
||||
len = pend - pbeg;
|
||||
if(len<=1) errExit("Illegal Header");
|
||||
pname = calloc(len,sizeof(char));
|
||||
strncpy(pname,pbeg,len);
|
||||
pbeg = pend + 1;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.engLow = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.rawLow = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.engHigh = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.rawHigh = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.accuracy = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.tblEngFirst = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.tblEngLast = value;
|
||||
if(getNumber(&pbeg,&value)) errExit("Illegal Header");
|
||||
brkCreateInfo.tblEngDelta = value;
|
||||
goto got_header;
|
||||
}
|
||||
errExit("Illegal Header");
|
||||
got_header:
|
||||
phead = pnext = 0;
|
||||
ndata = 0;
|
||||
errno = 0;
|
||||
while(fgets(inbuf,MAX_LINE_SIZE,inFile)) {
|
||||
float value;
|
||||
|
||||
inbuf[strlen(inbuf)] = '\0'; /* remove newline*/
|
||||
pbeg = inbuf;
|
||||
while(!getNumber(&pbeg,&value)) {
|
||||
ndata++;
|
||||
pdataList = (dataList *)calloc(1,sizeof(dataList));
|
||||
if(!phead)
|
||||
phead = pdataList;
|
||||
else
|
||||
pnext->next = pdataList;
|
||||
pdataList->value = value;
|
||||
pnext = pdataList;
|
||||
}
|
||||
}
|
||||
brkCreateInfo.nTable = ndata;
|
||||
pdata = (float *)calloc(brkCreateInfo.nTable,sizeof(float));
|
||||
pnext = phead;
|
||||
for(n=0; n<brkCreateInfo.nTable; n++) {
|
||||
pdata[n] = pnext->value;
|
||||
pdataList = pnext;
|
||||
pnext = pnext->next;
|
||||
free((void *)pdataList);
|
||||
}
|
||||
brkCreateInfo.pTable = pdata;
|
||||
if(create_break(&brkCreateInfo,&brkint[0],MAX_BREAKS,&nBreak))
|
||||
errExit("create_break failed\n");
|
||||
fprintf(outFile,"breaktable(%s) {\n",pname);
|
||||
for(n=0; n<nBreak; n++) {
|
||||
fprintf(outFile,"\t%f %f\n",brkint[n].raw,brkint[n].eng);
|
||||
}
|
||||
fprintf(outFile,"}\n");
|
||||
fclose(inFile);
|
||||
fclose(outFile);
|
||||
return(0);
|
||||
}
|
||||
|
||||
static int create_break( struct brkCreateInfo *pbci, brkInt *pabrkInt,
|
||||
int max_breaks, int *n_breaks)
|
||||
{
|
||||
brkInt *pbrkInt;
|
||||
float *table = pbci->pTable;
|
||||
long ntable = pbci->nTable;
|
||||
double ilow,
|
||||
ihigh,
|
||||
tbllow,
|
||||
tblhigh,
|
||||
slope,
|
||||
offset;
|
||||
int ibeg,
|
||||
iend,
|
||||
i,
|
||||
inc,
|
||||
imax,
|
||||
n;
|
||||
double rawBeg,
|
||||
engBeg,
|
||||
rawEnd,
|
||||
engEnd,
|
||||
engCalc,
|
||||
engActual,
|
||||
error;
|
||||
int valid,
|
||||
all_ok,
|
||||
expanding;
|
||||
/* make checks to ensure that brkCreateInfo makes sense */
|
||||
if (pbci->engLow >= pbci->engHigh) {
|
||||
errExit("create_break: engLow >= engHigh");
|
||||
return (-1);
|
||||
}
|
||||
if ((pbci->engLow < pbci->tblEngFirst)
|
||||
|| (pbci->engHigh > pbci->tblEngLast)) {
|
||||
errExit("create_break: engLow > engHigh");
|
||||
return (-1);
|
||||
}
|
||||
if (pbci->tblEngDelta <= 0.0) {
|
||||
errExit("create_break: tblEngDelta <= 0.0");
|
||||
return (-1);
|
||||
}
|
||||
if (ntable < 3) {
|
||||
errExit("raw data must have at least 3 elements");
|
||||
return (-1);
|
||||
}
|
||||
/***************************************************************************
|
||||
Convert Table to raw values
|
||||
*
|
||||
* raw and table values are assumed to be related by an equation of the form:
|
||||
*
|
||||
* raw = slope*table + offset
|
||||
*
|
||||
* The following algorithm converts each table value to raw units
|
||||
*
|
||||
* 1) Finds the locations in Table corresponding to engLow and engHigh
|
||||
* Note that these locations need not be exact integers
|
||||
* 2) Interpolates to obtain table values corresponding to engLow and enghigh
|
||||
* we now have the equations:
|
||||
* rawLow = slope*tblLow + offset
|
||||
* rawHigh = slope*tblHigh + offset
|
||||
* 4) Solving these equations for slope and offset gives:
|
||||
* slope=(rawHigh-rawLow)/(tblHigh-tblLow)
|
||||
* offset=rawHigh-slope*tblHigh
|
||||
* 5) for each table value set table[i]=table[i]*slope+offset
|
||||
*************************************************************************/
|
||||
/* Find engLow in Table and then compute tblLow */
|
||||
ilow = (pbci->engLow - pbci->tblEngFirst) / (pbci->tblEngDelta);
|
||||
i = (int) ilow;
|
||||
if (i >= ntable - 1)
|
||||
i = ntable - 2;
|
||||
tbllow = table[i] + (table[i + 1] - table[i]) * (ilow - (float) i);
|
||||
/* Find engHigh in Table and then compute tblHigh */
|
||||
ihigh = (pbci->engHigh - pbci->tblEngFirst) / (pbci->tblEngDelta);
|
||||
i = (int) ihigh;
|
||||
if (i >= ntable - 1)
|
||||
i = ntable - 2;
|
||||
tblhigh = table[i] + (table[i + 1] - table[i]) * (ihigh - (float) i);
|
||||
/* compute slope and offset */
|
||||
slope = (pbci->rawHigh - pbci->rawLow) / (tblhigh - tbllow);
|
||||
offset = pbci->rawHigh - slope * tblhigh;
|
||||
/* convert table to raw units */
|
||||
for (i = 0; i < ntable; i++)
|
||||
table[i] = table[i] * slope + offset;
|
||||
|
||||
/*****************************************************************************
|
||||
* Now create break point table
|
||||
*
|
||||
* The algorithm does the following:
|
||||
*
|
||||
* It finds one breakpoint interval at a time. For each it does the following:
|
||||
*
|
||||
* 1) Use a relatively large portion of the remaining table as an interval
|
||||
* 2) It attempts to use the entire interval as a breakpoint interval
|
||||
* Success is determined by the following algorithm:
|
||||
* a) compute the slope using the entire interval
|
||||
* b) for each table entry in the interval determine the eng value
|
||||
* using the slope just determined.
|
||||
* c) compare the computed value with eng value associated with table
|
||||
* d) if all table entries are within the accuracy desired then success.
|
||||
* 3) If successful then attempt to expand the interval and try again.
|
||||
* Note that it is expanded by up to 1/10 of the table size.
|
||||
* 4) If not successful reduce the interval by 1 and try again.
|
||||
* Once the interval is being decreased it will never be increased again.
|
||||
* 5) The algorithm will ultimately fail or will have determined the optimum
|
||||
* breakpoint interval
|
||||
*************************************************************************/
|
||||
|
||||
/* Must start with table entry corresponding to engLow; */
|
||||
i = ilow;
|
||||
if (i >= ntable - 1)
|
||||
i = ntable - 2;
|
||||
rawBeg = table[i] + (table[i + 1] - table[i]) * (ilow - (float) i);
|
||||
engBeg = pbci->engLow;
|
||||
ibeg = (int) (ilow); /* Make sure that ibeg > ilow */
|
||||
if( ibeg < ilow ) ibeg = ibeg + 1;
|
||||
/* start first breakpoint interval */
|
||||
n = 1;
|
||||
pbrkInt = pabrkInt;
|
||||
pbrkInt->raw = rawBeg;
|
||||
pbrkInt->eng = engBeg;
|
||||
/* determine next breakpoint interval */
|
||||
while ((engBeg <= pbci->engHigh) && (ibeg < ntable - 1)) {
|
||||
/* determine next interval to try. Up to 1/10 full range */
|
||||
iend = ibeg;
|
||||
inc = (int) ((ihigh - ilow) / 10.0);
|
||||
if (inc < 1)
|
||||
inc = 1;
|
||||
valid = TRUE;
|
||||
/* keep trying intervals until cant do better */
|
||||
expanding = TRUE; /* originally we are trying larger and larger
|
||||
* intervals */
|
||||
while (valid) {
|
||||
imax = iend + inc;
|
||||
if (imax >= ntable) {
|
||||
/* don't go past end of table */
|
||||
imax = ntable - 1;
|
||||
inc = ntable - iend - 1;
|
||||
expanding = FALSE;
|
||||
}
|
||||
if (imax > (int) (ihigh + 1.0)) { /* Don't go to far past
|
||||
* engHigh */
|
||||
imax = (int) (ihigh + 1.0);
|
||||
inc = (int) (ihigh + 1.0) - iend;
|
||||
expanding = FALSE;
|
||||
}
|
||||
if (imax <= ibeg)
|
||||
break; /* failure */
|
||||
rawEnd = table[imax];
|
||||
engEnd = pbci->tblEngFirst + (float) imax *(pbci->tblEngDelta);
|
||||
slope = (engEnd - engBeg) / (rawEnd - rawBeg);
|
||||
all_ok = TRUE;
|
||||
for (i = ibeg + 1; i <= imax; i++) {
|
||||
engCalc = engBeg + slope * (table[i] - rawBeg);
|
||||
engActual = pbci->tblEngFirst + ((float) i) * (pbci->tblEngDelta);
|
||||
error = engCalc - engActual;
|
||||
if (error < 0.0)
|
||||
error = -error;
|
||||
if (error >= pbci->accuracy) {
|
||||
/* we will be trying smaller intervals */
|
||||
expanding = FALSE;
|
||||
/* just decrease inc and let while(valid) try again */
|
||||
inc--;
|
||||
all_ok = FALSE;
|
||||
break;
|
||||
}
|
||||
} /* end for */
|
||||
if (all_ok) {
|
||||
iend = imax;
|
||||
/* if not expanding we found interval */
|
||||
if (!expanding)
|
||||
break;
|
||||
/* will automatically try larger interval */
|
||||
}
|
||||
} /* end while(valid) */
|
||||
/* either we failed or optimal interval has been found */
|
||||
if ((iend <= ibeg) && (iend < (int) ihigh)) {
|
||||
errExit("Could not meet accuracy criteria");
|
||||
return (-1);
|
||||
}
|
||||
pbrkInt->slope = slope;
|
||||
/* get ready for next breakpoint interval */
|
||||
if (n++ >= max_breaks) {
|
||||
errExit("Break point table too large");
|
||||
return (-1);
|
||||
}
|
||||
ibeg = iend;
|
||||
pbrkInt++;
|
||||
rawBeg = rawEnd;
|
||||
engBeg = engEnd;
|
||||
pbrkInt->raw = rawBeg;
|
||||
pbrkInt->eng = engBeg + (pbrkInt->raw - rawBeg) * slope;
|
||||
}
|
||||
pbrkInt->slope = 0.0;
|
||||
*n_breaks = n;
|
||||
return (0);
|
||||
}
|
||||
16
src/bpt/menuConvert.dbd
Normal file
16
src/bpt/menuConvert.dbd
Normal file
@@ -0,0 +1,16 @@
|
||||
menu(menuConvert) {
|
||||
choice(menuConvertNO_CONVERSION,"NO CONVERSION")
|
||||
choice(menuConvertLINEAR,"LINEAR")
|
||||
choice(menuConverttypeKdegF,"typeKdegF")
|
||||
choice(menuConverttypeKdegC,"typeKdegC")
|
||||
choice(menuConverttypeJdegF,"typeJdegF")
|
||||
choice(menuConverttypeJdegC,"typeJdegC")
|
||||
choice(menuConverttypeEdegF,"typeEdegF(ixe only)")
|
||||
choice(menuConverttypeEdegC,"typeEdegC(ixe only)")
|
||||
choice(menuConverttypeTdegF,"typeTdegF")
|
||||
choice(menuConverttypeTdegC,"typeTdegC")
|
||||
choice(menuConverttypeRdegF,"typeRdegF")
|
||||
choice(menuConverttypeRdegC,"typeRdegC")
|
||||
choice(menuConverttypeSdegF,"typeSdegF")
|
||||
choice(menuConverttypeSdegC,"typeSdegC")
|
||||
}
|
||||
@@ -5,11 +5,10 @@ $!
|
||||
$! Purpose : To build the CHANNEL_ACCESS library and test programs for
|
||||
$! VAX/VMS. This procedure assumes the following:
|
||||
$! - You have copied *.c and *.h from the Epics channel access
|
||||
$! source directory (.../src/ca) into this VMS directory
|
||||
$! - You have copied envSubr.c, ellLib.c, and bucketLib.c
|
||||
$! from the Epics
|
||||
$! source directory (base/src/ca) into this VMS directory
|
||||
$! - You have copied *.c and *.h from the Epics
|
||||
$! libCom directory into this VMS directory
|
||||
$! - You have copied *.h from the /src/epicsH directory into this
|
||||
$! - You have copied *.h from the base/include directory into this
|
||||
$! VMS directory
|
||||
$! - You are using Multinet for TCP/IP access. If not, the logical
|
||||
$! name definitions below will need to be changed
|
||||
@@ -19,9 +18,29 @@ $! Arguments : optional source file name
|
||||
$!
|
||||
$! Created 16-NOV-1993 Mark L. Rivers
|
||||
$! 05-MAY-1994 Jeff O. Hill Updated for EPICS 3.12
|
||||
$! 07-MAR-1995 Jeff O. Hill Added FTP script
|
||||
$!
|
||||
$!========================================================================
|
||||
$!
|
||||
$! Example FTP script moves sources from UNIX to VMS
|
||||
$! (remove "$!" comment delimiters)
|
||||
$!
|
||||
$! user XXXXXXX
|
||||
$! cd [.ca]
|
||||
$! prompt
|
||||
$! lcd ~/epics/base/src/ca
|
||||
$! mput *.c
|
||||
$! mput *.h
|
||||
$! put BUILD_VMS.COM
|
||||
$! lcd ../libCom
|
||||
$! mput *.c
|
||||
$! mput *.h
|
||||
$! lcd O.sun4
|
||||
$! mput envData.c
|
||||
$! lcd ../../../include
|
||||
$! mput *.h
|
||||
$!========================================================================
|
||||
$!
|
||||
$ define /nolog sys multinet_root:[multinet.include.sys]
|
||||
$ define /nolog vms multinet_root:[multinet.include.vms]
|
||||
$ define /nolog net multinet_root:[multinet.include.net]
|
||||
@@ -55,6 +74,8 @@ BUCKETLIB, -
|
||||
ENVSUBR, -
|
||||
TSSUBR, -
|
||||
NEXTFIELDSUBR, -
|
||||
ASSERTUNIX, -
|
||||
ENVDATA, -
|
||||
CATIME, -
|
||||
ACCTST
|
||||
$ endif
|
||||
@@ -78,6 +99,8 @@ BUCKETLIB, -
|
||||
TSSUBR, -
|
||||
ENVSUBR, -
|
||||
NEXTFIELDSUBR, -
|
||||
ENVDATA, -
|
||||
ASSERTUNIX, -
|
||||
ELLLIB
|
||||
$! Link the test programs
|
||||
$ call link acctst
|
||||
|
||||
@@ -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,15 +1,18 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
CMPLR = STRICT
|
||||
|
||||
USR_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
USR_LDLIBS = -lca -lCom -lm
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libca.a\
|
||||
$(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += cadef.h
|
||||
INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += caProto.h
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
@@ -30,16 +33,14 @@ LIBNAME = libca.a
|
||||
PROD = caRepeater
|
||||
|
||||
|
||||
include $(EPICS)/config/RULES.Unix
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
acctst: acctst.o $(DEPLIBS_BASE)/libCom.a libca.a
|
||||
acctst: acctst.o $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
$(LINK.c) -o $@ $< $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a \
|
||||
$(ARCH_DEP_LDLIBS) -lm
|
||||
|
||||
acctst.o: ../acctst.c
|
||||
$(COMPILE.c) $<
|
||||
|
||||
catime: catime.o $(DEPLIBS_BASE)/libCom.a libca.a
|
||||
|
||||
catime.o: ../catime.c
|
||||
$(COMPILE.c) $<
|
||||
catime: catime.o $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a
|
||||
$(LINK.c) -o $@ $< $(LIBOBJS) $(DEPLIBS_BASE)/libCom.a \
|
||||
$(ARCH_DEP_LDLIBS) -lm
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
EPICS = ../../../..
|
||||
include Target.include
|
||||
include $(EPICS)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -DACCESS_SECURITY -D_NO_PROTO
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
../flow_control.c ../repeater.c ../conn.c ../syncgrp.c \
|
||||
../if_depen.c ../bsd_depen.c ../vxWorks_depen.c ../acctst.c
|
||||
../if_depen.c ../bsd_depen.c ../vxWorks_depen.c ../acctst.c \
|
||||
../catime.c
|
||||
|
||||
OBJS = \
|
||||
LIBOBJS = \
|
||||
iocinf.o access.o test_event.o service.o flow_control.o \
|
||||
repeater.o conn.o syncgrp.o if_depen.o bsd_depen.o vxWorks_depen.o
|
||||
|
||||
PROD = caLib
|
||||
LIBNAME = caLib
|
||||
|
||||
include $(EPICS)/config/RULES.Vx
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
caLib: $(OBJS)
|
||||
$(RM) $@
|
||||
$(LINK.c) $@ $(OBJS) $(LDLIBS)
|
||||
|
||||
717
src/ca/access.c
717
src/ca/access.c
File diff suppressed because it is too large
Load Diff
406
src/ca/acctst.c
406
src/ca/acctst.c
@@ -5,6 +5,28 @@
|
||||
|
||||
static char *sccsId = "@(#) $Id$";
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* 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
|
||||
*
|
||||
* Revision 1.31 1995/10/12 01:30:28 jhill
|
||||
* improved the test
|
||||
*
|
||||
* Revision 1.30 1995/09/29 21:47:58 jhill
|
||||
* MS windows changes
|
||||
*
|
||||
* Revision 1.29 1995/08/22 00:16:34 jhill
|
||||
* Added test of the duration of ca_pend_event()
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef VMS
|
||||
#include <LIB$ROUTINES.H>
|
||||
#endif
|
||||
@@ -14,12 +36,12 @@ static char *sccsId = "@(#) $Id$";
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "os_depen.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cadef.h>
|
||||
|
||||
#define EVENT_ROUTINE null_event
|
||||
@@ -27,7 +49,11 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
#define NUM 1
|
||||
|
||||
int conn_get_cb_count;
|
||||
int conn_cb_count;
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
int doacctst(char *pname);
|
||||
void test_sync_groups(chid chix);
|
||||
@@ -35,9 +61,22 @@ void multiple_sg_requests(chid chix, CA_SYNC_GID gid);
|
||||
void null_event(struct event_handler_args args);
|
||||
void write_event(struct event_handler_args args);
|
||||
void conn(struct connection_handler_args args);
|
||||
void conn_cb(struct event_handler_args args);
|
||||
void get_cb(struct event_handler_args args);
|
||||
void accessSecurity_cb(struct access_rights_handler_args args);
|
||||
|
||||
void doubleTest(
|
||||
chid chan,
|
||||
dbr_double_t beginValue,
|
||||
dbr_double_t increment,
|
||||
dbr_double_t epsilon,
|
||||
unsigned iterations);
|
||||
|
||||
void floatTest(
|
||||
chid chan,
|
||||
dbr_float_t beginValue,
|
||||
dbr_float_t increment,
|
||||
dbr_float_t epsilon,
|
||||
unsigned iterations);
|
||||
|
||||
#ifdef vxWorks
|
||||
int acctst(char *pname)
|
||||
@@ -82,26 +121,48 @@ int doacctst(char *pname)
|
||||
chid chix4;
|
||||
struct dbr_gr_float *ptr = NULL;
|
||||
struct dbr_gr_float *pgrfloat = NULL;
|
||||
float *pfloat = NULL;
|
||||
double *pdouble = NULL;
|
||||
dbr_float_t *pfloat = NULL;
|
||||
dbr_double_t *pdouble = NULL;
|
||||
long status;
|
||||
long i, j;
|
||||
evid monix;
|
||||
char pstring[NUM][MAX_STRING_SIZE];
|
||||
|
||||
unsigned size;
|
||||
|
||||
SEVCHK(ca_task_initialize(), "Unable to initialize");
|
||||
|
||||
conn_get_cb_count = 0;
|
||||
conn_cb_count = 0;
|
||||
|
||||
printf("begin\n");
|
||||
#ifdef VMS
|
||||
lib$init_timer();
|
||||
#endif /*VMS*/
|
||||
|
||||
ptr = (struct dbr_gr_float *)
|
||||
malloc(dbr_size_n(DBR_GR_FLOAT, NUM));
|
||||
{
|
||||
TS_STAMP end_time;
|
||||
TS_STAMP start_time;
|
||||
dbr_double_t delay;
|
||||
dbr_double_t request = 0.5;
|
||||
dbr_double_t accuracy;
|
||||
|
||||
tsLocalTime(&start_time);
|
||||
status = ca_pend_event(request);
|
||||
if (status != ECA_TIMEOUT) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
tsLocalTime(&end_time);
|
||||
TsDiffAsDouble(&delay,&end_time,&start_time);
|
||||
accuracy = 100.0*(delay-request)/request;
|
||||
printf("CA pend event delay accuracy = %f %%\n",
|
||||
accuracy);
|
||||
assert (abs(accuracy) < 10.0);
|
||||
}
|
||||
|
||||
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(
|
||||
@@ -144,6 +205,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);
|
||||
@@ -156,6 +220,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);
|
||||
@@ -215,31 +280,110 @@ int doacctst(char *pname)
|
||||
|
||||
/*
|
||||
* Verify that we can write and then read back
|
||||
* the same 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)){
|
||||
|
||||
double dval = 3.3;
|
||||
float fval = -8893.3;
|
||||
double dret = DBL_MAX;
|
||||
float fret = FLT_MAX;
|
||||
dbr_double_t incr;
|
||||
dbr_double_t epsil;
|
||||
dbr_double_t base;
|
||||
unsigned long iter;
|
||||
|
||||
status = ca_put(DBR_DOUBLE, chix1, &dval);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_get(DBR_DOUBLE, chix1, &dret);
|
||||
SEVCHK(status, NULL);
|
||||
ca_pend_io(30.0);
|
||||
assert( fabs(dval-dret) < DBL_EPSILON*4);
|
||||
printf ("float test ...");
|
||||
fflush(stdout);
|
||||
epsil = FLT_EPSILON*4;
|
||||
base = FLT_MIN;
|
||||
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+=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+=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");
|
||||
}
|
||||
|
||||
status = ca_put(DBR_FLOAT, chix1, &fval);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_get(DBR_FLOAT, chix1, &fret);
|
||||
SEVCHK(status, NULL);
|
||||
ca_pend_io(30.0);
|
||||
assert( fabs(fval-fret) < FLT_EPSILON*4);
|
||||
/*
|
||||
* 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+=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+=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+=DBL_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* 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");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -247,7 +391,7 @@ int doacctst(char *pname)
|
||||
* solicitations
|
||||
*/
|
||||
if(ca_read_access(chix4)){
|
||||
float temp;
|
||||
dbr_float_t temp;
|
||||
|
||||
printf("Performing multiple get test...");
|
||||
fflush(stdout);
|
||||
@@ -268,7 +412,7 @@ int doacctst(char *pname)
|
||||
printf("Performing multiple put test...");
|
||||
fflush(stdout);
|
||||
for(i=0; i<10000; i++){
|
||||
double fval = 3.3;
|
||||
dbr_double_t fval = 3.3;
|
||||
status = ca_put(DBR_DOUBLE, chix4, &fval);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -284,6 +428,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++){
|
||||
@@ -292,59 +437,70 @@ 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++){
|
||||
float fval = 3.3;
|
||||
dbr_float_t fval = 3.3F;
|
||||
status = ca_array_put_callback(
|
||||
DBR_FLOAT,
|
||||
1,
|
||||
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
|
||||
*/
|
||||
printf("Performing multiple monitor test...");
|
||||
fflush(stdout);
|
||||
{
|
||||
evid mid[1000];
|
||||
float temp;
|
||||
evid mid[1000];
|
||||
dbr_float_t temp;
|
||||
|
||||
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
|
||||
@@ -379,7 +535,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -387,7 +543,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -396,7 +552,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
(void *)0xaaaaaaaa,
|
||||
NULL,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -406,20 +562,20 @@ 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);
|
||||
}
|
||||
|
||||
pfloat = (float *) calloc(sizeof(float),NUM);
|
||||
pdouble = (double *) calloc(sizeof(double),NUM);
|
||||
pfloat = (dbr_float_t *) calloc(sizeof(*pfloat),NUM);
|
||||
pdouble = (dbr_double_t *) calloc(sizeof(*pdouble),NUM);
|
||||
pgrfloat = (struct dbr_gr_float *) calloc(sizeof(*pgrfloat),NUM);
|
||||
|
||||
if (VALID_DB_REQ(chix1->type))
|
||||
@@ -475,15 +631,44 @@ int doacctst(char *pname)
|
||||
SEVCHK(ca_modify_user_name("Willma"), NULL);
|
||||
SEVCHK(ca_modify_host_name("Bed Rock"), NULL);
|
||||
|
||||
if (conn_get_cb_count != 3){
|
||||
if (conn_cb_count != 3){
|
||||
printf ("!!!! Connect cb count = %d expected = 3 !!!!\n",
|
||||
conn_get_cb_count);
|
||||
conn_cb_count);
|
||||
}
|
||||
|
||||
printf("-- Put/Gets done- waiting for Events --\n");
|
||||
status = ca_pend_event(10.0);
|
||||
if (status != ECA_TIMEOUT) {
|
||||
SEVCHK(status, NULL);
|
||||
{
|
||||
TS_STAMP end_time;
|
||||
TS_STAMP start_time;
|
||||
dbr_double_t delay;
|
||||
dbr_double_t request = 15.0;
|
||||
dbr_double_t accuracy;
|
||||
|
||||
tsLocalTime(&start_time);
|
||||
printf("waiting for events for %f sec\n", request);
|
||||
status = ca_pend_event(request);
|
||||
if (status != ECA_TIMEOUT) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
tsLocalTime(&end_time);
|
||||
TsDiffAsDouble(&delay,&end_time,&start_time);
|
||||
accuracy = 100.0*(delay-request)/request;
|
||||
printf("CA pend event delay accuracy = %f %%\n",
|
||||
accuracy);
|
||||
assert (abs(accuracy) < 10.0);
|
||||
}
|
||||
|
||||
{
|
||||
TS_STAMP end_time;
|
||||
TS_STAMP start_time;
|
||||
dbr_double_t delay;
|
||||
|
||||
tsLocalTime(&start_time);
|
||||
printf("entering ca_task_exit()\n");
|
||||
status = ca_task_exit();
|
||||
SEVCHK(status,NULL);
|
||||
tsLocalTime(&end_time);
|
||||
TsDiffAsDouble(&delay,&end_time,&start_time);
|
||||
printf("in ca_task_exit() for %f sec\n", delay);
|
||||
}
|
||||
|
||||
if (ptr){
|
||||
@@ -499,17 +684,91 @@ int doacctst(char *pname)
|
||||
free(pgrfloat);
|
||||
}
|
||||
|
||||
status = ca_task_exit();
|
||||
SEVCHK(status,NULL);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void floatTest(
|
||||
chid chan,
|
||||
dbr_float_t beginValue,
|
||||
dbr_float_t increment,
|
||||
dbr_float_t epsilon,
|
||||
unsigned iterations)
|
||||
{
|
||||
unsigned i;
|
||||
dbr_float_t fval;
|
||||
dbr_float_t fretval;
|
||||
int status;
|
||||
|
||||
fval = beginValue;
|
||||
for (i=0; i<iterations; i++) {
|
||||
fretval = FLT_MAX;
|
||||
status = ca_put (DBR_FLOAT, chan, &fval);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_get (DBR_FLOAT, chan, &fretval);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io (100.0);
|
||||
SEVCHK (status, NULL);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
void doubleTest(
|
||||
chid chan,
|
||||
dbr_double_t beginValue,
|
||||
dbr_double_t increment,
|
||||
dbr_double_t epsilon,
|
||||
unsigned iterations)
|
||||
{
|
||||
unsigned i;
|
||||
dbr_double_t fval;
|
||||
dbr_double_t fretval;
|
||||
int status;
|
||||
|
||||
fval = beginValue;
|
||||
for (i=0; i<iterations; i++) {
|
||||
fretval = DBL_MAX;
|
||||
status = ca_put (DBR_DOUBLE, chan, &fval);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_get (DBR_DOUBLE, chan, &fretval);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io (100.0);
|
||||
SEVCHK (status, NULL);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
SEVCHK(status, "put failed in null_event()");
|
||||
}
|
||||
else {
|
||||
printf("null_event() called for disconnected %s\n",
|
||||
ca_name(args.chid));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (i++ > 1000) {
|
||||
printf("1000 occurred\n");
|
||||
@@ -521,9 +780,15 @@ void null_event(struct event_handler_args args)
|
||||
void write_event(struct event_handler_args args)
|
||||
{
|
||||
int status;
|
||||
float a = *(float *) args.dbr;
|
||||
dbr_float_t *pFloat = (dbr_float_t *) args.dbr;
|
||||
dbr_float_t a;
|
||||
|
||||
a += 10.1;
|
||||
if (!args.dbr) {
|
||||
return;
|
||||
}
|
||||
|
||||
a = *pFloat;
|
||||
a += 10.1F;
|
||||
|
||||
status = ca_array_put(
|
||||
DBR_FLOAT,
|
||||
@@ -544,15 +809,16 @@ void conn(struct connection_handler_args args)
|
||||
else
|
||||
printf("Ukn conn ev\n");
|
||||
|
||||
ca_get_callback(DBR_GR_FLOAT, args.chid, conn_cb, NULL);
|
||||
ca_get_callback(DBR_GR_FLOAT, args.chid, get_cb, NULL);
|
||||
}
|
||||
|
||||
void conn_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_get_cb_count++;
|
||||
conn_cb_count++;
|
||||
}
|
||||
|
||||
|
||||
@@ -562,8 +828,8 @@ void conn_cb(struct event_handler_args args)
|
||||
void test_sync_groups(chid chix)
|
||||
{
|
||||
int status;
|
||||
CA_SYNC_GID gid1;
|
||||
CA_SYNC_GID gid2;
|
||||
CA_SYNC_GID gid1=0;
|
||||
CA_SYNC_GID gid2=0;
|
||||
|
||||
printf("Performing sync group test...");
|
||||
fflush(stdout);
|
||||
@@ -583,9 +849,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);
|
||||
@@ -612,10 +878,10 @@ void test_sync_groups(chid chix)
|
||||
*/
|
||||
void multiple_sg_requests(chid chix, CA_SYNC_GID gid)
|
||||
{
|
||||
int status;
|
||||
unsigned i;
|
||||
static float fvalput = 3.3;
|
||||
static float fvalget;
|
||||
int status;
|
||||
unsigned i;
|
||||
static dbr_float_t fvalput = 3.3F;
|
||||
static dbr_float_t fvalget;
|
||||
|
||||
for(i=0; i<1000; i++){
|
||||
if(ca_write_access(chix)){
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <envDefs.h>
|
||||
|
||||
void caSetupAddrList(
|
||||
ELLLIST *pList,
|
||||
SOCKET socket);
|
||||
|
||||
void caPrintAddrList();
|
||||
void caPrintAddrList(ELLLIST *pList);
|
||||
|
||||
void caDiscoverInterfaces(
|
||||
ELLLIST *pList,
|
||||
@@ -19,17 +24,20 @@ void caAddConfiguredAddr(
|
||||
int port);
|
||||
|
||||
int local_addr(SOCKET socket, struct sockaddr_in *plcladdr);
|
||||
int caFetchPortConfig(ENV_PARAM *pEnv, int defaultPort);
|
||||
unsigned short caFetchPortConfig(ENV_PARAM *pEnv, unsigned short defaultPort);
|
||||
|
||||
union caAddr{
|
||||
struct sockaddr_in inetAddr;
|
||||
struct sockaddr sockAddr;
|
||||
};
|
||||
typedef union ca_addr {
|
||||
struct sockaddr_in in;
|
||||
struct sockaddr sa;
|
||||
}caAddr;
|
||||
|
||||
typedef struct {
|
||||
ELLNODE node;
|
||||
union caAddr srcAddr;
|
||||
union caAddr destAddr;
|
||||
ELLNODE node;
|
||||
caAddr srcAddr;
|
||||
caAddr destAddr;
|
||||
}caAddrNode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
*/
|
||||
int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
{
|
||||
/*
|
||||
* Use auto timeout so there is no chance of
|
||||
* recursive reuse of ptimeout
|
||||
*/
|
||||
struct timeval autoTimeOut = *ptimeout;
|
||||
long status;
|
||||
IIU *piiu;
|
||||
unsigned long freespace;
|
||||
@@ -73,6 +78,13 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (piiu->sock_chan>=FD_SETSIZE) {
|
||||
ca_printf(
|
||||
"%s.%d: file number > FD_SETSIZE=%d ignored\n",
|
||||
__FILE__, __LINE__, FD_SETSIZE);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dont bother receiving if we have insufficient
|
||||
* space for the maximum UDP message
|
||||
@@ -86,39 +98,38 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
}
|
||||
|
||||
if (flags&CA_DO_SENDS) {
|
||||
if (cacRingBufferReadSize(&piiu->send, FALSE)>0) {
|
||||
if (cacRingBufferReadSize(&piiu->send, FALSE)>0) {
|
||||
maxfd = max (maxfd,piiu->sock_chan);
|
||||
FD_SET (piiu->sock_chan, &pfdi->writeMask);
|
||||
}
|
||||
FD_SET (piiu->sock_chan, &pfdi->writeMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
UNLOCK;
|
||||
|
||||
#if 0
|
||||
printf( "max fd=%d tv_usec=%d tv_sec=%d\n",
|
||||
maxfd,
|
||||
ptimeout->tv_usec,
|
||||
ptimeout->tv_sec);
|
||||
#endif
|
||||
# if defined(__hpux)
|
||||
status = select(
|
||||
maxfd+1,
|
||||
(int *)&pfdi->readMask,
|
||||
(int *)&pfdi->writeMask,
|
||||
(int *)NULL,
|
||||
&autoTimeOut);
|
||||
# else
|
||||
status = select(
|
||||
maxfd+1,
|
||||
&pfdi->readMask,
|
||||
&pfdi->writeMask,
|
||||
NULL,
|
||||
&autoTimeOut);
|
||||
# endif
|
||||
|
||||
#if defined(vxWorks) && 0
|
||||
if(client_lock->recurse>0){
|
||||
ca_printf("lock is on and we are going to sleep %d!",
|
||||
client_lock->recurse);
|
||||
taskSuspend(0);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* get a new time stamp if we have been waiting
|
||||
* for any significant length of time
|
||||
*/
|
||||
if (ptimeout->tv_sec || ptimeout->tv_usec) {
|
||||
cac_gettimeval (&ca_static->currentTime);
|
||||
}
|
||||
|
||||
status = select(
|
||||
maxfd+1,
|
||||
&pfdi->readMask,
|
||||
&pfdi->writeMask,
|
||||
NULL,
|
||||
ptimeout);
|
||||
|
||||
#if 0
|
||||
printf("leaving select stat=%d errno=%d \n", status, MYERRNO);
|
||||
#endif
|
||||
if (status<0) {
|
||||
if (MYERRNO == EINTR) {
|
||||
}
|
||||
@@ -144,13 +155,13 @@ printf("leaving select stat=%d errno=%d \n", status, MYERRNO);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (FD_ISSET(piiu->sock_chan,&pfdi->writeMask)) {
|
||||
(*piiu->sendBytes)(piiu);
|
||||
}
|
||||
|
||||
if (FD_ISSET(piiu->sock_chan,&pfdi->readMask)) {
|
||||
(*piiu->recvBytes)(piiu);
|
||||
}
|
||||
|
||||
if (FD_ISSET(piiu->sock_chan,&pfdi->writeMask)) {
|
||||
(*piiu->sendBytes)(piiu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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__ */
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <iocinf.h>
|
||||
|
||||
main()
|
||||
{
|
||||
ca_repeater();
|
||||
assert(0);
|
||||
ca_repeater ();
|
||||
assert (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
1008
src/ca/cadef.h
Normal file
1008
src/ca/cadef.h
Normal file
File diff suppressed because it is too large
Load Diff
222
src/ca/caerr.h
Normal file
222
src/ca/caerr.h
Normal file
@@ -0,0 +1,222 @@
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* L O S A L A M O S */
|
||||
/* Los Alamos National Laboratory */
|
||||
/* Los Alamos, New Mexico 87545 */
|
||||
/* */
|
||||
/* Copyright, 1986, The Regents of the University of California. */
|
||||
/* */
|
||||
/* Author: Jeffrey O. Hill */
|
||||
/* */
|
||||
/* History */
|
||||
/* ------- */
|
||||
/* */
|
||||
/* Date Programmer Comments */
|
||||
/* ---- ---------- -------- */
|
||||
/* 08--87 joh Init Release */
|
||||
/* 031290 joh Changed __CAERR__ to INCLcaerrh */
|
||||
/* 102990 joh added readonly for VAXC share image */
|
||||
/* 032092 joh added ECA_BADMASK */
|
||||
/* 072792 joh added ECA_IODONE & ECA_IOINPROGESS */
|
||||
/* 102992 joh changed wording on the no vx fp message */
|
||||
/* 011494 joh Added ECA_BADSYNCGRP */
|
||||
/* 021194 joh Added ECA_PUTCBINPROG */
|
||||
/* */
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* Name: */
|
||||
/* Title: */
|
||||
/* File: */
|
||||
/* Environment: VMS, UNIX, VRTX */
|
||||
/* Equipment: VAX, SUN, VME */
|
||||
/* */
|
||||
/* */
|
||||
/* Purpose */
|
||||
/* ------- */
|
||||
/* */
|
||||
/* CA error message declaration include file */
|
||||
/* */
|
||||
/* */
|
||||
/* Special comments */
|
||||
/* ------- -------- */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
/*_end */
|
||||
|
||||
#ifndef INCLcaerrh
|
||||
#define INCLcaerrh
|
||||
|
||||
#include <shareLib.h>
|
||||
#include <epicsTypes.h>
|
||||
|
||||
#ifndef HDRVERSIONID
|
||||
# define HDRVERSIONID(NAME,VERS)
|
||||
#endif /*HDRVERSIONID*/
|
||||
|
||||
HDRVERSIONID(caerrh, "@(#) $Id$")
|
||||
|
||||
/* CA Status Code Definitions */
|
||||
|
||||
#define CA_K_INFO 3 /* successful */
|
||||
#define CA_K_ERROR 2 /* failed- continue */
|
||||
#define CA_K_SUCCESS 1 /* successful */
|
||||
#define CA_K_WARNING 0 /* unsuccessful */
|
||||
#define CA_K_SEVERE 4 /* failed- quit */
|
||||
#define CA_K_FATAL CA_K_ERROR | CA_K_SEVERE
|
||||
|
||||
#define CA_M_MSG_NO 0x0000FFF8
|
||||
#define CA_M_SEVERITY 0x00000007
|
||||
#define CA_M_LEVEL 0x00000003
|
||||
#define CA_M_SUCCESS 0x00000001
|
||||
#define CA_M_ERROR 0x00000002
|
||||
#define CA_M_SEVERE 0x00000004
|
||||
|
||||
#define CA_S_MSG_NO 0x0D
|
||||
#define CA_S_SEVERITY 0x03
|
||||
|
||||
#define CA_V_MSG_NO 0x03
|
||||
#define CA_V_SEVERITY 0x00
|
||||
#define CA_V_SUCCESS 0x00
|
||||
|
||||
/* Define MACROS to extract/insert individual fields from a status value */
|
||||
|
||||
#define CA_EXTRACT_MSG_NO(code)\
|
||||
( ( (code) & CA_M_MSG_NO ) >> CA_V_MSG_NO )
|
||||
#define CA_EXTRACT_SEVERITY(code)\
|
||||
( ( (code) & CA_M_SEVERITY ) >> CA_V_SEVERITY )
|
||||
#define CA_EXTRACT_SUCCESS(code)\
|
||||
( ( (code) & CA_M_SUCCESS ) >> CA_V_SUCCESS )
|
||||
|
||||
#define CA_INSERT_MSG_NO(code)\
|
||||
( ((code)<< CA_V_MSG_NO) & CA_M_MSG_NO )
|
||||
#define CA_INSERT_SEVERITY(code)\
|
||||
( ((code)<< CA_V_SEVERITY)& CA_M_SEVERITY )
|
||||
#define CA_INSERT_SUCCESS(code)\
|
||||
( ((code)<< CA_V_SUCCESS) & CA_M_SUCCESS )
|
||||
|
||||
|
||||
#define DEFMSG(SEVERITY,NUMBER)\
|
||||
(CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY))
|
||||
|
||||
|
||||
#define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0)
|
||||
#define ECA_MAXIOC DEFMSG(CA_K_ERROR, 1)
|
||||
#define ECA_UKNHOST DEFMSG(CA_K_ERROR, 2)
|
||||
#define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3)
|
||||
#define ECA_SOCK DEFMSG(CA_K_ERROR, 4)
|
||||
#define ECA_CONN DEFMSG(CA_K_WARNING, 5)
|
||||
#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6)
|
||||
#define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7)
|
||||
#define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8)
|
||||
#define ECA_TOLARGE DEFMSG(CA_K_ERROR, 9)
|
||||
#define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10)
|
||||
#define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11)
|
||||
#define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12)
|
||||
#define ECA_BADCHID DEFMSG(CA_K_ERROR, 13)
|
||||
#define ECA_BADTYPE DEFMSG(CA_K_ERROR, 14)
|
||||
#define ECA_CHIDNOTFND DEFMSG(CA_K_INFO, 15)
|
||||
#define ECA_CHIDRETRY DEFMSG(CA_K_INFO, 16)
|
||||
#define ECA_INTERNAL DEFMSG(CA_K_FATAL, 17)
|
||||
#define ECA_DBLCLFAIL DEFMSG(CA_K_WARNING, 18)
|
||||
#define ECA_GETFAIL DEFMSG(CA_K_WARNING, 19)
|
||||
#define ECA_PUTFAIL DEFMSG(CA_K_WARNING, 20)
|
||||
#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_EVDISALLOW DEFMSG(CA_K_ERROR, 26)
|
||||
#define ECA_BUILDGET DEFMSG(CA_K_WARNING, 27)
|
||||
#define ECA_NEEDSFP DEFMSG(CA_K_INFO, 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_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_NOCAST DEFMSG(CA_K_WARNING, 40)
|
||||
#define ECA_BADMASK DEFMSG(CA_K_ERROR, 41)
|
||||
#define ECA_IODONE DEFMSG(CA_K_INFO, 42)
|
||||
#define ECA_IOINPROGRESS DEFMSG(CA_K_INFO, 43)
|
||||
#define ECA_BADSYNCGRP DEFMSG(CA_K_ERROR, 44)
|
||||
#define ECA_PUTCBINPROG DEFMSG(CA_K_ERROR, 45)
|
||||
#define ECA_NORDACCESS DEFMSG(CA_K_WARNING, 46)
|
||||
#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 READONLY char *ca_message_text[];
|
||||
#else
|
||||
READONLY char *ca_message_text[]
|
||||
=
|
||||
{
|
||||
"Normal successful completion",
|
||||
"Maximum simultaneous IOC connections exceeded",
|
||||
"Unknown internet host",
|
||||
"Unknown internet service",
|
||||
"Unable to allocate a new socket",
|
||||
"Unable to connect to internet host or service",
|
||||
"Unable to allocate additional dynamic memory",
|
||||
"Unknown IO channel",
|
||||
"Record field specified inappropriate for channel specified",
|
||||
"The array or data structure specified will not fit in CA message buffer",
|
||||
"User specified timeout on IO operation expired",
|
||||
"Sorry, that feature is planned but not supported at this time",
|
||||
"The supplied string is unusually large",
|
||||
"The request was ignored because the specified channel is disconnected",
|
||||
"The type you have requested from this channel is unknown",
|
||||
"Remote Channel not found",
|
||||
"Unable to locate all user specified channels",
|
||||
"Channel Access Internal Failure",
|
||||
"The requested local DB operation failed",
|
||||
"Could not perform a database value get for that channel",
|
||||
"Could not perform a database value put for that channel",
|
||||
"Could not perform a database event add for that channel",
|
||||
"Count requested inappropriate for that channel",
|
||||
"The supplied string has improper format",
|
||||
"Network connection lost",
|
||||
"Ambiguous channel host (multiple IOC's have a channel by that name)",
|
||||
"The CA routine called is inappropriate for use within an event handler",
|
||||
"Database value get for that channel failed during channel search",
|
||||
"Unable to initialize without the vxWorks VX_FP_TASK task option set",
|
||||
"Event queue overflow has prevented first pass event after event add",
|
||||
"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",
|
||||
"Attempt to use defunct CA feature failed",
|
||||
"The supplied string is empty",
|
||||
"Unable to spawn the CA repeater thread- auto reconnect will fail",
|
||||
"No channel id match for search reply- search reply ignored",
|
||||
"Reseting dead connection- will try to reconnect",
|
||||
"Server (IOC) has fallen behind or is not responding- still waiting",
|
||||
"No internet interface with broadcast available",
|
||||
"The event selection mask supplied is empty or inappropriate",
|
||||
"IO operations have completed",
|
||||
"IO operations are in progress",
|
||||
"Invalid synchronous group identifier",
|
||||
"Put call back operation collision with put call back operation in progress",
|
||||
"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",
|
||||
"Data conversion between client's type and the server's type failed"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
READONLY char *ca_message(long ca_status);
|
||||
#else /* __STDC__ */
|
||||
READONLY char *ca_message();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
36
src/ca/caeventmask.h
Normal file
36
src/ca/caeventmask.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
$Id$
|
||||
caeventmask.h
|
||||
|
||||
Modification History
|
||||
joh 04-16-90 Created
|
||||
|
||||
*/
|
||||
|
||||
#ifndef INCLcaeventmaskh
|
||||
#define INCLcaeventmaskh
|
||||
|
||||
/*
|
||||
event selections
|
||||
(If any more than 8 of these are needed then update the
|
||||
select field in the event_block struct in db_event.c from
|
||||
unsigned char to unsigned short)
|
||||
|
||||
|
||||
DBE_VALUE
|
||||
Trigger an event when a significant change in the channel's value
|
||||
occurs. Relies on the monitor deadband field under DCT.
|
||||
|
||||
DBE_LOG
|
||||
Trigger an event when an archive significant change in the channel's
|
||||
valuue occurs. Relies on the archiver monitor deadband field under DCT.
|
||||
|
||||
DBE_ALARM
|
||||
Trigger an event when the alarm state changes
|
||||
|
||||
*/
|
||||
#define DBE_VALUE (1<<0)
|
||||
#define DBE_LOG (1<<1)
|
||||
#define DBE_ALARM (1<<2)
|
||||
|
||||
#endif
|
||||
285
src/ca/catime.c
285
src/ca/catime.c
@@ -11,10 +11,10 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cadef.h>
|
||||
#include <epicsAssert.h>
|
||||
#include <cadef.h>
|
||||
|
||||
#ifndef LOCAL
|
||||
#define LOCAL static
|
||||
@@ -36,7 +36,7 @@
|
||||
#define NELEMENTS(A) (sizeof (A) / sizeof ((A) [0]))
|
||||
#endif
|
||||
|
||||
#define ITERATION_COUNT 10000
|
||||
#define ITERATION_COUNT 1000
|
||||
|
||||
#define WAIT_FOR_ACK
|
||||
|
||||
@@ -50,15 +50,16 @@ typedef struct testItem {
|
||||
|
||||
ti itemList[ITERATION_COUNT];
|
||||
|
||||
int catime(char *channelName);
|
||||
int catime (char *channelName);
|
||||
|
||||
typedef void tf (ti *pItems, unsigned iterations);
|
||||
typedef void tf (ti *pItems, unsigned iterations, unsigned *pInlineIter);
|
||||
|
||||
LOCAL void test (
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
);
|
||||
|
||||
LOCAL tf test_pend;
|
||||
LOCAL tf test_search;
|
||||
LOCAL tf test_free;
|
||||
LOCAL tf test_wait;
|
||||
@@ -82,7 +83,7 @@ int main(int argc, char **argv)
|
||||
catime(pname);
|
||||
}
|
||||
else{
|
||||
printf("usage: %s <channel name>", argv[0]);
|
||||
printf("usage: %s <channel name>\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@@ -95,8 +96,7 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
int catime (char *channelName)
|
||||
{
|
||||
long status;
|
||||
long i,j;
|
||||
long i;
|
||||
unsigned strsize;
|
||||
|
||||
SEVCHK (ca_task_initialize(),"Unable to initialize");
|
||||
@@ -120,6 +120,9 @@ int catime (char *channelName)
|
||||
ca_field_type(itemList[0].chix),
|
||||
ca_element_count(itemList[0].chix));
|
||||
|
||||
printf ("\tpend event test\n");
|
||||
timeIt (test_pend, NULL, 100);
|
||||
|
||||
for (i=0; i<NELEMENTS(itemList); i++) {
|
||||
itemList[i].val.fltval = 0.0;
|
||||
itemList[i].type = DBR_FLOAT;
|
||||
@@ -138,12 +141,14 @@ int catime (char *channelName)
|
||||
itemList[i].val.intval = 0;
|
||||
itemList[i].type = DBR_INT;
|
||||
}
|
||||
printf ("interger test\n");
|
||||
printf ("integer test\n");
|
||||
test (itemList, NELEMENTS(itemList));
|
||||
|
||||
printf ("free test\n");
|
||||
timeIt (test_free, itemList, NELEMENTS(itemList));
|
||||
|
||||
SEVCHK (ca_task_exit (), "Unable to free resources at exit");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -158,11 +163,11 @@ LOCAL void test (
|
||||
)
|
||||
{
|
||||
printf ("\tasync put test\n");
|
||||
timeIt(test_put, pItems, iterations);
|
||||
timeIt (test_put, pItems, iterations);
|
||||
printf ("\tasync get test\n");
|
||||
timeIt(test_get, pItems, iterations);
|
||||
timeIt (test_get, pItems, iterations);
|
||||
printf ("\tsynch get test\n");
|
||||
timeIt(test_wait, pItems, iterations);
|
||||
timeIt (test_wait, pItems, iterations);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,14 +184,57 @@ void timeIt(
|
||||
TS_STAMP start_time;
|
||||
double delay;
|
||||
int status;
|
||||
unsigned inlineIter;
|
||||
|
||||
status = tsLocalTime(&start_time);
|
||||
#if 0
|
||||
assert (status == S_ts_OK);
|
||||
(*pfunc) (pItems, iterations);
|
||||
#endif
|
||||
(*pfunc) (pItems, iterations, &inlineIter);
|
||||
status = tsLocalTime(&end_time);
|
||||
#if 0
|
||||
assert (status == S_ts_OK);
|
||||
#endif
|
||||
TsDiffAsDouble(&delay,&end_time,&start_time);
|
||||
printf ("Elapsed Per Item = %f\n", delay/iterations);
|
||||
printf ("Elapsed Per Item = %f\n", delay/(iterations*inlineIter));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* test_search ()
|
||||
*/
|
||||
LOCAL void test_pend(
|
||||
ti *pItems,
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
unsigned i;
|
||||
int status;
|
||||
|
||||
for (i=0; i<iterations; i++) {
|
||||
status = ca_pend_event(1e-9);
|
||||
if (status != ECA_TIMEOUT && status != ECA_NORMAL) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
status = ca_pend_event(1e-9);
|
||||
if (status != ECA_TIMEOUT && status != ECA_NORMAL) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
status = ca_pend_event(1e-9);
|
||||
if (status != ECA_TIMEOUT && status != ECA_NORMAL) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
status = ca_pend_event(1e-9);
|
||||
if (status != ECA_TIMEOUT && status != ECA_NORMAL) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
status = ca_pend_event(1e-9);
|
||||
if (status != ECA_TIMEOUT && status != ECA_NORMAL) {
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
}
|
||||
*pInlineIter = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,24 +243,23 @@ void timeIt(
|
||||
*/
|
||||
LOCAL void test_search(
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
int i;
|
||||
ti *pi;
|
||||
int status;
|
||||
chid chan;
|
||||
|
||||
status = ca_search (
|
||||
pItems[0].name,
|
||||
&chan);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io(0.0);
|
||||
|
||||
for (i=0; i< iterations;i++) {
|
||||
pItems[i].chix = chan;
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_search (
|
||||
pi->name,
|
||||
&pi->chix);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
|
||||
status = ca_pend_io(0.0);
|
||||
SEVCHK (status, NULL);
|
||||
|
||||
*pInlineIter = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -221,29 +268,18 @@ unsigned iterations
|
||||
*/
|
||||
LOCAL void test_free(
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
int i;
|
||||
ti *pi;
|
||||
int status;
|
||||
dbr_int_t val;
|
||||
|
||||
status = ca_clear_channel (pItems[0].chix);
|
||||
SEVCHK (status, NULL);
|
||||
|
||||
#if 0
|
||||
#ifdef WAIT_FOR_ACK
|
||||
status = ca_array_get (DBR_INT, 1, pItems[0].chix, &val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io(100.0);
|
||||
SEVCHK (status, NULL);
|
||||
#endif
|
||||
|
||||
status = ca_clear_channel (pItems[0].chix);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_flush_io();
|
||||
SEVCHK (status, NULL);
|
||||
#endif
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_clear_channel (pi->chix);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
*pInlineIter = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -252,19 +288,74 @@ unsigned iterations
|
||||
*/
|
||||
LOCAL void test_put(
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
int i;
|
||||
ti *pi;
|
||||
int status;
|
||||
dbr_int_t val;
|
||||
|
||||
for (i=1; i<iterations; i++) {
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_array_put(
|
||||
pItems[i].type,
|
||||
pItems[i].count,
|
||||
pItems[i].chix,
|
||||
&pItems[i].val);
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_put(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
#ifdef WAIT_FOR_ACK
|
||||
@@ -280,6 +371,8 @@ unsigned iterations
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_flush_io();
|
||||
SEVCHK (status, NULL);
|
||||
|
||||
*pInlineIter = 10;
|
||||
}
|
||||
|
||||
|
||||
@@ -288,22 +381,79 @@ unsigned iterations
|
||||
*/
|
||||
LOCAL void test_get(
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
int i;
|
||||
ti *pi;
|
||||
int status;
|
||||
|
||||
for (i=0; i<iterations; i++) {
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_array_get(
|
||||
pItems[i].type,
|
||||
pItems[i].count,
|
||||
pItems[i].chix,
|
||||
&pItems[i].val);
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_array_get(
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
status = ca_pend_io(100.0);
|
||||
SEVCHK (status, NULL);
|
||||
|
||||
*pInlineIter = 10;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,21 +463,24 @@ unsigned iterations
|
||||
*/
|
||||
LOCAL void test_wait (
|
||||
ti *pItems,
|
||||
unsigned iterations
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
int i;
|
||||
ti *pi;
|
||||
int status;
|
||||
|
||||
for (i=1; i<iterations; i++) {
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_array_get(
|
||||
pItems[i].type,
|
||||
pItems[i].count,
|
||||
pItems[i].chix,
|
||||
&pItems[i].val);
|
||||
pi->type,
|
||||
pi->count,
|
||||
pi->chix,
|
||||
&pi->val);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io(100.0);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
|
||||
*pInlineIter = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* $Id$ */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* */
|
||||
/* L O S A L A M O S */
|
||||
/* Los Alamos National Laboratory */
|
||||
/* Los Alamos, New Mexico 87545 */
|
||||
@@ -28,6 +29,10 @@
|
||||
/* .12 110194 joh improved search scheduling */
|
||||
/* (dont send all chans in a block) */
|
||||
/* */
|
||||
/* $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 */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
@@ -47,11 +52,11 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
#ifdef DEBUG
|
||||
#define LOGRETRYINTERVAL logRetryInterval(__FILE__, __LINE__);
|
||||
LOCAL void logRetryInterval(char *pFN, unsigned lineno);
|
||||
#else
|
||||
#define LOGRETRYINTERVAL
|
||||
#endif
|
||||
|
||||
LOCAL void logRetryInterval(char *pFN, unsigned lineno);
|
||||
LOCAL void retrySearchRequest(int silent);
|
||||
|
||||
|
||||
@@ -66,7 +71,6 @@ LOCAL void retrySearchRequest(int silent);
|
||||
void manage_conn(int silent)
|
||||
{
|
||||
IIU *piiu;
|
||||
ca_time current;
|
||||
ca_real delay;
|
||||
long idelay;
|
||||
|
||||
@@ -79,8 +83,6 @@ void manage_conn(int silent)
|
||||
|
||||
ca_static->ca_manage_conn_active = TRUE;
|
||||
|
||||
cac_gettimeval(¤t);
|
||||
|
||||
/*
|
||||
* issue connection heartbeat
|
||||
* (if we dont see a beacon)
|
||||
@@ -100,7 +102,7 @@ void manage_conn(int silent)
|
||||
*/
|
||||
if (piiu->sendPending) {
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&piiu->timeAtSendBlock);
|
||||
if (delay>ca_static->ca_connectTMO) {
|
||||
TAG_CONN_DOWN(piiu);
|
||||
@@ -117,15 +119,15 @@ void manage_conn(int silent)
|
||||
int rtmo;
|
||||
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&piiu->timeAtEchoRequest);
|
||||
stmo = delay > CA_RETRY_PERIOD;
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&piiu->timeAtLastRecv);
|
||||
rtmo = delay > CA_RETRY_PERIOD;
|
||||
if(stmo && rtmo && !piiu->sendPending){
|
||||
piiu->timeAtEchoRequest = current;
|
||||
piiu->timeAtEchoRequest = ca_static->currentTime;
|
||||
noop_msg(piiu);
|
||||
}
|
||||
continue;
|
||||
@@ -133,7 +135,7 @@ void manage_conn(int silent)
|
||||
|
||||
if(piiu->echoPending){
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&piiu->timeAtEchoRequest);
|
||||
if (delay > CA_ECHO_TIMEOUT) {
|
||||
/*
|
||||
@@ -144,10 +146,10 @@ void manage_conn(int silent)
|
||||
}
|
||||
else{
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&piiu->timeAtLastRecv);
|
||||
if (delay>ca_static->ca_connectTMO) {
|
||||
echo_request(piiu, ¤t);
|
||||
echo_request(piiu, &ca_static->currentTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,10 +161,10 @@ void manage_conn(int silent)
|
||||
*/
|
||||
if (!ca_static->ca_repeater_contacted) {
|
||||
delay = cac_time_diff (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&ca_static->ca_last_repeater_try);
|
||||
if (delay > REPEATER_TRY_PERIOD) {
|
||||
ca_static->ca_last_repeater_try = current;
|
||||
ca_static->ca_last_repeater_try = ca_static->currentTime;
|
||||
notify_ca_repeater();
|
||||
}
|
||||
}
|
||||
@@ -181,13 +183,13 @@ void manage_conn(int silent)
|
||||
|
||||
if(ca_static->ca_conn_next_retry.tv_sec == CA_CURRENT_TIME.tv_sec &&
|
||||
ca_static->ca_conn_next_retry.tv_usec == CA_CURRENT_TIME.tv_usec){
|
||||
ca_static->ca_conn_next_retry = current;
|
||||
ca_static->ca_conn_next_retry = ca_static->currentTime;
|
||||
LOGRETRYINTERVAL
|
||||
}
|
||||
|
||||
delay = cac_time_diff (
|
||||
&ca_static->ca_conn_next_retry,
|
||||
¤t);
|
||||
&ca_static->currentTime);
|
||||
|
||||
if (delay > 0.0) {
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
@@ -209,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 */
|
||||
@@ -220,7 +222,7 @@ void manage_conn(int silent)
|
||||
(long) ((delay-idelay)*USEC_PER_SEC);
|
||||
ca_static->ca_conn_next_retry =
|
||||
cac_time_sum (
|
||||
¤t,
|
||||
&ca_static->currentTime,
|
||||
&ca_static->ca_conn_retry_delay);
|
||||
LOGRETRYINTERVAL
|
||||
|
||||
@@ -278,8 +280,10 @@ LOCAL void retrySearchRequest (int silent)
|
||||
if (chix==NULL) {
|
||||
/*
|
||||
* increment the retry sequence number
|
||||
* (only if we get no responses during a sequence)
|
||||
*/
|
||||
if (ca_static->ca_search_retry<MAXCONNTRIES) {
|
||||
if (ca_static->ca_search_retry<MAXCONNTRIES
|
||||
&& ca_static->ca_search_responses==0) {
|
||||
ca_static->ca_search_retry++;
|
||||
}
|
||||
|
||||
@@ -288,6 +292,7 @@ LOCAL void retrySearchRequest (int silent)
|
||||
*/
|
||||
if (ca_static->ca_search_retry<min_retry_num) {
|
||||
ca_static->ca_search_retry = min_retry_num;
|
||||
ca_static->ca_search_responses = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,11 +354,10 @@ LOCAL void logRetryInterval(char *pFN, unsigned lineno)
|
||||
/*
|
||||
* MARK_SERVER_AVAILABLE
|
||||
*/
|
||||
void mark_server_available(struct in_addr *pnet_addr)
|
||||
void mark_server_available(const struct in_addr *pnet_addr)
|
||||
{
|
||||
chid chan;
|
||||
ca_real currentPeriod;
|
||||
ca_time currentTime;
|
||||
bhe *pBHE;
|
||||
unsigned port;
|
||||
int netChange = FALSE;
|
||||
@@ -368,8 +372,6 @@ void mark_server_available(struct in_addr *pnet_addr)
|
||||
return;
|
||||
}
|
||||
|
||||
cac_gettimeval(¤tTime);
|
||||
|
||||
LOCK;
|
||||
/*
|
||||
* look for it in the hash table
|
||||
@@ -386,14 +388,14 @@ void mark_server_available(struct in_addr *pnet_addr)
|
||||
* update time stamp and average period
|
||||
*/
|
||||
currentPeriod = cac_time_diff (
|
||||
¤tTime,
|
||||
&ca_static->currentTime,
|
||||
&pBHE->timeStamp);
|
||||
/*
|
||||
* update the average
|
||||
*/
|
||||
pBHE->averagePeriod += currentPeriod;
|
||||
pBHE->averagePeriod /= 2.0;
|
||||
pBHE->timeStamp = currentTime;
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
|
||||
if ((currentPeriod/4.0)>=pBHE->averagePeriod) {
|
||||
#ifdef DEBUG
|
||||
@@ -417,7 +419,7 @@ void mark_server_available(struct in_addr *pnet_addr)
|
||||
netChange = TRUE;
|
||||
}
|
||||
if(pBHE->piiu){
|
||||
pBHE->piiu->timeAtLastRecv = currentTime;
|
||||
pBHE->piiu->timeAtLastRecv = ca_static->currentTime;
|
||||
}
|
||||
if(!netChange){
|
||||
UNLOCK;
|
||||
@@ -470,7 +472,7 @@ void mark_server_available(struct in_addr *pnet_addr)
|
||||
idelay = (long) delay;
|
||||
ca_delay.tv_sec = idelay;
|
||||
ca_delay.tv_usec = (long) ((delay-idelay) * USEC_PER_SEC);
|
||||
next = cac_time_sum(¤tTime, &ca_delay);
|
||||
next = cac_time_sum(&ca_static->currentTime, &ca_delay);
|
||||
|
||||
diff = cac_time_diff(
|
||||
&ca_static->ca_conn_next_retry,
|
||||
@@ -505,7 +507,7 @@ void mark_server_available(struct in_addr *pnet_addr)
|
||||
*
|
||||
* LOCK must be applied
|
||||
*/
|
||||
bhe *createBeaconHashEntry(struct in_addr *pnet_addr)
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr)
|
||||
{
|
||||
bhe *pBHE;
|
||||
unsigned index;
|
||||
@@ -538,7 +540,7 @@ bhe *createBeaconHashEntry(struct in_addr *pnet_addr)
|
||||
* start the average at zero
|
||||
*/
|
||||
pBHE->averagePeriod = 0.0;
|
||||
cac_gettimeval(&pBHE->timeStamp);
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
|
||||
/*
|
||||
* install in the hash table
|
||||
@@ -555,7 +557,7 @@ bhe *createBeaconHashEntry(struct in_addr *pnet_addr)
|
||||
*
|
||||
* LOCK must be applied
|
||||
*/
|
||||
bhe *lookupBeaconInetAddr(struct in_addr *pnet_addr)
|
||||
bhe *lookupBeaconInetAddr (const struct in_addr *pnet_addr)
|
||||
{
|
||||
bhe *pBHE;
|
||||
unsigned index;
|
||||
@@ -582,7 +584,7 @@ bhe *lookupBeaconInetAddr(struct in_addr *pnet_addr)
|
||||
*
|
||||
* LOCK must be applied
|
||||
*/
|
||||
void removeBeaconInetAddr (struct in_addr *pnet_addr)
|
||||
void removeBeaconInetAddr (const struct in_addr *pnet_addr)
|
||||
{
|
||||
bhe *pBHE;
|
||||
bhe **ppBHE;
|
||||
|
||||
271
src/ca/convert.c
271
src/ca/convert.c
@@ -131,20 +131,11 @@ CACVRTFUNC *cac_dbr_cvrt[]
|
||||
cvrt_ctrl_double
|
||||
};
|
||||
|
||||
/*
|
||||
* Native types may not match EPICS types
|
||||
*/
|
||||
typedef short ca_short_tt;
|
||||
typedef float ca_float_tt;
|
||||
typedef short ca_enum_tt;
|
||||
typedef char ca_char_tt;
|
||||
typedef int ca_long_tt;
|
||||
typedef double ca_double_tt;
|
||||
|
||||
#define dbr_ntohs(A) ntohs(A)
|
||||
#define dbr_ntohl(A) ntohl(A)
|
||||
#define dbr_htons(A) htons(A)
|
||||
#define dbr_htonl(A) htonl(A)
|
||||
#define dbr_ntohs(A) (ntohs(A))
|
||||
#define dbr_ntohl(A) (ntohl(A))
|
||||
#define dbr_htons(A) (htons(A))
|
||||
#define dbr_htonl(A) (htonl(A))
|
||||
|
||||
|
||||
|
||||
@@ -162,8 +153,8 @@ int encode, /* cvrt HOST to NET if T */
|
||||
unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
ca_char_tt *pSrc = s;
|
||||
ca_char_tt *pDest = d;
|
||||
char *pSrc = s;
|
||||
char *pDest = d;
|
||||
|
||||
if(num == 1){
|
||||
strcpy(pDest, pSrc);
|
||||
@@ -188,8 +179,8 @@ int encode, /* cvrt HOST to NET if T */
|
||||
unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
ca_short_tt *pSrc = s;
|
||||
ca_short_tt *pDest = d;
|
||||
dbr_short_t *pSrc = s;
|
||||
dbr_short_t *pDest = d;
|
||||
unsigned long i;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
@@ -218,8 +209,8 @@ unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
unsigned long i;
|
||||
ca_char_tt *pSrc = s;
|
||||
ca_char_tt *pDest = d;
|
||||
dbr_char_t *pSrc = s;
|
||||
dbr_char_t *pDest = d;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
*pDest++ = *pSrc++;
|
||||
@@ -242,8 +233,8 @@ unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
unsigned long i;
|
||||
ca_long_tt *pSrc = s;
|
||||
ca_long_tt *pDest = d;
|
||||
dbr_long_t *pSrc = s;
|
||||
dbr_long_t *pDest = d;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
*pDest = dbr_ntohl( *pSrc );
|
||||
@@ -271,8 +262,8 @@ unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
unsigned long i;
|
||||
ca_enum_tt *pSrc;
|
||||
ca_enum_tt *pDest;
|
||||
dbr_enum_t *pSrc;
|
||||
dbr_enum_t *pDest;
|
||||
|
||||
pSrc = s;
|
||||
pDest = d;
|
||||
@@ -304,15 +295,15 @@ unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
unsigned long i;
|
||||
ca_float_tt *pSrc = s;
|
||||
ca_float_tt *pDest = d;
|
||||
dbr_float_t *pSrc = s;
|
||||
dbr_float_t *pDest = d;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
if(encode){
|
||||
htonf(pSrc, pDest);
|
||||
dbr_htonf(pSrc, pDest);
|
||||
}
|
||||
else{
|
||||
ntohf(pSrc, pDest);
|
||||
dbr_ntohf(pSrc, pDest);
|
||||
}
|
||||
/*
|
||||
* dont increment these inside the MACRO
|
||||
@@ -338,15 +329,15 @@ unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
unsigned long i;
|
||||
ca_double_tt *pSrc = s;
|
||||
ca_double_tt *pDest = d;
|
||||
dbr_double_t *pSrc = s;
|
||||
dbr_double_t *pDest = d;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
if(encode){
|
||||
htond(pSrc,pDest);
|
||||
dbr_htond(pSrc,pDest);
|
||||
}
|
||||
else{
|
||||
ntohd(pSrc,pDest);
|
||||
dbr_ntohd(pSrc,pDest);
|
||||
}
|
||||
/*
|
||||
* dont increment these inside the MACRO
|
||||
@@ -697,32 +688,32 @@ unsigned long num /* number of values */
|
||||
if (encode) /* vax to ieee convert */
|
||||
{
|
||||
if (num == 1){
|
||||
htond(&pSrc->value, &pDest->value);
|
||||
dbr_htond(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_double(&pSrc->value, &pDest->value, encode,num);
|
||||
}
|
||||
htond(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
htond(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
htond(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
htond(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
htond(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
htond(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_htond(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_htond(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_htond(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_htond(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_htond(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_htond(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
}
|
||||
else /* ieee to vax convert */
|
||||
{
|
||||
if (num == 1){
|
||||
ntohd(&pSrc->value, &pDest->value);
|
||||
dbr_ntohd(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_double(&pSrc->value, &pDest->value, encode,num);
|
||||
}
|
||||
ntohd(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
ntohd(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
ntohd(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
ntohd(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
ntohd(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
ntohd(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_ntohd(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_ntohd(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_ntohd(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_ntohd(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_ntohd(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_ntohd(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -760,32 +751,32 @@ unsigned long num /* number of values */
|
||||
if (encode) /* vax to ieee convert */
|
||||
{
|
||||
if (num == 1){
|
||||
htonf(&pSrc->value, &pDest->value);
|
||||
dbr_htonf(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_float(&pSrc->value, &pDest->value, encode,num);
|
||||
}
|
||||
htonf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
htonf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
htonf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
htonf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
htonf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
htonf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_htonf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_htonf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_htonf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_htonf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_htonf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_htonf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
}
|
||||
else /* ieee to vax convert */
|
||||
{
|
||||
if (num == 1){
|
||||
ntohf(&pSrc->value, &pDest->value);
|
||||
dbr_ntohf(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_float(&pSrc->value, &pDest->value, encode,num);
|
||||
}
|
||||
ntohf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
ntohf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
ntohf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
ntohf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
ntohf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
ntohf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_ntohf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_ntohf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_ntohf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_ntohf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_ntohf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_ntohf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,7 +925,7 @@ unsigned long num /* number of values */
|
||||
struct dbr_ctrl_double *pSrc = s;
|
||||
struct dbr_ctrl_double *pDest = d;
|
||||
|
||||
/* these are the same for ieee to vaax or vax to ieee */
|
||||
/* these are the same for ieee to vax or vax to ieee */
|
||||
pDest->status = dbr_ntohs(pSrc->status);
|
||||
pDest->severity = dbr_ntohs(pSrc->severity);
|
||||
pDest->precision = dbr_ntohs(pSrc->precision);
|
||||
@@ -942,35 +933,36 @@ unsigned long num /* number of values */
|
||||
if (encode) /* vax to ieee convert */
|
||||
{
|
||||
if (num == 1){
|
||||
htond(&pSrc->value, &pDest->value);
|
||||
dbr_htond(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_double(&pSrc->value, &pDest->value, encode, num);
|
||||
}
|
||||
htond(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
htond(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
htond(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
htond(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
htond(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
htond(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
htond(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
htond(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
dbr_htond(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_htond(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_htond(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_htond(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_htond(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_htond(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_htond(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
dbr_htond(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
}
|
||||
else /* ieee to vax convert */
|
||||
{
|
||||
if (num == 1){
|
||||
ntohd(&pSrc->value, &pDest->value);
|
||||
dbr_ntohd(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_double(&pSrc->value, &pDest->value, encode, num);
|
||||
}
|
||||
ntohd(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
ntohd(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
ntohd(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
ntohd(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
ntohd(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
ntohd(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
ntohd(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
dbr_ntohd(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_ntohd(&pSrc->upper_disp_limit, &pDest->upper_disp_limit);
|
||||
dbr_ntohd(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_ntohd(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_ntohd(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_ntohd(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_ntohd(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
dbr_ntohd(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1006,35 +998,36 @@ unsigned long num /* number of values */
|
||||
if (encode) /* vax to ieee convert */
|
||||
{
|
||||
if (num == 1){
|
||||
htonf(&pSrc->value, &pDest->value);
|
||||
dbr_htonf(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_float(&pSrc->value, &pDest->value, encode, num);
|
||||
}
|
||||
htonf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
htonf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
htonf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
htonf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
htonf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
htonf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
htonf(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
htonf(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
dbr_htonf(&pSrc->upper_disp_limit,&pDest->upper_disp_limit);
|
||||
dbr_htonf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_htonf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_htonf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_htonf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_htonf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_htonf(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
dbr_htonf(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
}
|
||||
else /* ieee to vax convert */
|
||||
{
|
||||
if (num == 1){
|
||||
ntohf(&pSrc->value, &pDest->value);
|
||||
dbr_ntohf(&pSrc->value, &pDest->value);
|
||||
}
|
||||
else {
|
||||
cvrt_float(&pSrc->value, &pDest->value, encode, num);
|
||||
}
|
||||
ntohf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
ntohf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
ntohf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
ntohf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
ntohf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
ntohf(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
ntohf(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
dbr_ntohf(&pSrc->lower_disp_limit, &pDest->lower_disp_limit);
|
||||
dbr_ntohf(&pSrc->upper_disp_limit, &pDest->upper_disp_limit);
|
||||
dbr_ntohf(&pSrc->upper_alarm_limit, &pDest->upper_alarm_limit);
|
||||
dbr_ntohf(&pSrc->upper_warning_limit, &pDest->upper_warning_limit);
|
||||
dbr_ntohf(&pSrc->lower_alarm_limit, &pDest->lower_alarm_limit);
|
||||
dbr_ntohf(&pSrc->lower_warning_limit, &pDest->lower_warning_limit);
|
||||
dbr_ntohf(&pSrc->lower_ctrl_limit, &pDest->lower_ctrl_limit);
|
||||
dbr_ntohf(&pSrc->upper_ctrl_limit, &pDest->upper_ctrl_limit);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1408,17 +1401,25 @@ struct mitdbl {
|
||||
#define DBLEXPMAXMIT 126 /* max MIT exponent */
|
||||
#define DBLEXPMINMIT -128 /* min MIT exponent */
|
||||
|
||||
void htond(double *pHost, double *pNet)
|
||||
/*
|
||||
* Converts VAX D floating point to IEEE double precision
|
||||
* (D floating is the VAX C default)
|
||||
*/
|
||||
void dbr_htond(dbr_double_t *pHost, dbr_double_t *pNet)
|
||||
{
|
||||
double copyin;
|
||||
dbr_double_t copyin;
|
||||
struct mitdbl *pMIT;
|
||||
struct ieeedbl *pIEEE;
|
||||
ca_uint32_t *ptmp;
|
||||
ca_uint32_t tmp;
|
||||
|
||||
/*
|
||||
* Use internal buffer so the src and dest ptr
|
||||
* can be identical
|
||||
*/
|
||||
copyin = *pHost;
|
||||
pMIT = (struct mitdbl *)©in;
|
||||
pIEEE = (struct ieeedbl *)pNet;
|
||||
pMIT = (struct mitdbl *) ©in;
|
||||
pIEEE = (struct ieeedbl *) pNet;
|
||||
|
||||
if( ((int)pMIT->exp) < (DBLEXPMINMIT+MIT_DBL_SB) ){
|
||||
pIEEE->mant1 = 0;
|
||||
@@ -1438,34 +1439,43 @@ void htond(double *pHost, double *pNet)
|
||||
* byte swap to net order
|
||||
*/
|
||||
ptmp = (ca_uint32_t *) pNet;
|
||||
tmp = htonl(ptmp[0]);
|
||||
ptmp[0] = htonl(ptmp[1]);
|
||||
tmp = dbr_htonl(ptmp[0]);
|
||||
ptmp[0] = dbr_htonl(ptmp[1]);
|
||||
ptmp[1] = tmp;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Converts IEEE double precision to VAX D floating point
|
||||
* (D floating is the VAX default)
|
||||
*
|
||||
* sign must be forced to zero if the exponent is zero to prevent a reserved
|
||||
* operand fault- joh 9-13-90
|
||||
*/
|
||||
void ntohd(double *pNet, double *pHost)
|
||||
void dbr_ntohd(dbr_double_t *pNet, dbr_double_t *pHost)
|
||||
{
|
||||
double copyin;
|
||||
struct ieeedbl copyin;
|
||||
struct mitdbl *pMIT;
|
||||
struct ieeedbl *pIEEE;
|
||||
ca_uint32_t *ptmp;
|
||||
ca_uint32_t tmp;
|
||||
|
||||
copyin = *pNet;
|
||||
pIEEE = (struct ieeedbl *)pNet;
|
||||
pMIT = (struct mitdbl *)pHost;
|
||||
pIEEE = (struct ieeedbl *)©in;
|
||||
|
||||
/*
|
||||
* Use internal buffer so the src and dest ptr
|
||||
* can be identical
|
||||
*/
|
||||
copyin = *pIEEE;
|
||||
pIEEE = ©in;
|
||||
|
||||
/*
|
||||
* Byte swap from net order to host order
|
||||
*/
|
||||
ptmp = (ca_uint32_t *) pIEEE;
|
||||
tmp = htonl(ptmp[0]);
|
||||
ptmp[0] = htonl(ptmp[1]);
|
||||
tmp = dbr_htonl(ptmp[0]);
|
||||
ptmp[0] = dbr_htonl(ptmp[1]);
|
||||
ptmp[1] = tmp;
|
||||
|
||||
if( ((int)pIEEE->exp) > (DBLEXPMAXMIT + IEEE_DBL_SB) ){
|
||||
@@ -1527,10 +1537,14 @@ struct mitflt{
|
||||
# define EXPMAXMIT 126 /* max MIT exponent */
|
||||
# define EXPMINMIT -128 /* min MIT exponent */
|
||||
|
||||
/* (this includes mapping of fringe reals to zero or infinity) */
|
||||
/* (byte swaps included in conversion */
|
||||
|
||||
void htonf(float *pHost, float *pNet)
|
||||
/*
|
||||
* (this includes mapping of fringe reals to zero or infinity)
|
||||
* (byte swaps included in conversion
|
||||
*
|
||||
* Uses internal buffer so the src and dest ptr
|
||||
* can be identical
|
||||
*/
|
||||
void dbr_htonf(dbr_float_t *pHost, dbr_float_t *pNet)
|
||||
{
|
||||
struct mitflt *pMIT = (struct mitflt *) pHost;
|
||||
struct ieeeflt *pIEEE = (struct ieeeflt *) pNet;
|
||||
@@ -1550,21 +1564,24 @@ void htonf(float *pHost, float *pNet)
|
||||
pIEEE->mant = mant;
|
||||
pIEEE->exp = exp;
|
||||
pIEEE->sign = sign;
|
||||
*(ca_uint32_t *)pIEEE = htonl(*(ca_uint32_t *)pIEEE);
|
||||
*(ca_uint32_t *)pIEEE = dbr_htonl(*(ca_uint32_t *)pIEEE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* sign must be forced to zero if the exponent is zero to prevent a reserved
|
||||
* operand fault- joh 9-13-90
|
||||
*
|
||||
* Uses internal buffer so the src and dest ptr
|
||||
* can be identical
|
||||
*/
|
||||
void ntohf(float *pNet, float *pHost)
|
||||
void dbr_ntohf(dbr_float_t *pNet, dbr_float_t *pHost)
|
||||
{
|
||||
struct mitflt *pMIT = (struct mitflt *) pHost;
|
||||
struct ieeeflt *pIEEE = (struct ieeeflt *) pNet;
|
||||
long exp,mant2,mant1,sign;
|
||||
|
||||
*(ca_uint32_t *)pIEEE = ntohl(*(ca_uint32_t *)pIEEE);
|
||||
*(ca_uint32_t *)pIEEE = dbr_ntohl(*(ca_uint32_t *)pIEEE);
|
||||
if( ((int)pIEEE->exp) > EXPMAXMIT + IEEE_SB){
|
||||
sign = pIEEE->sign;
|
||||
exp = EXPMAXMIT + MIT_SB;
|
||||
@@ -1595,10 +1612,10 @@ void ntohf(float *pNet, float *pHost)
|
||||
#if defined(CA_FLOAT_IEEE) && 0
|
||||
|
||||
/*
|
||||
* htond ()
|
||||
* dbr_htond ()
|
||||
* performs only byte swapping
|
||||
*/
|
||||
void htond (double *IEEEhost, double *IEEEnet)
|
||||
void dbr_htond (dbr_double_t *IEEEhost, dbr_double_t *IEEEnet)
|
||||
{
|
||||
#ifdef CA_LITTLE_ENDIAN
|
||||
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
|
||||
@@ -1611,18 +1628,18 @@ void htond (double *IEEEhost, double *IEEEnet)
|
||||
* may be identical)
|
||||
*/
|
||||
tmp = pHost[0];
|
||||
pNet[0] = htonl (pHost[1]);
|
||||
pNet[1] = htonl (tmp);
|
||||
pNet[0] = dbr_htonl (pHost[1]);
|
||||
pNet[1] = dbr_htonl (tmp);
|
||||
#else
|
||||
*IEEEnet = *IEEEhost;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* ntohd ()
|
||||
* dbr_ntohd ()
|
||||
* performs only byte swapping
|
||||
*/
|
||||
void ntohd (double *IEEEnet, double *IEEEhost)
|
||||
void dbr_ntohd (dbr_double_t *IEEEnet, dbr_double_t *IEEEhost)
|
||||
{
|
||||
#ifdef CA_LITTLE_ENDIAN
|
||||
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
|
||||
@@ -1635,35 +1652,35 @@ void ntohd (double *IEEEnet, double *IEEEhost)
|
||||
* may be identical)
|
||||
*/
|
||||
tmp = pNet[0];
|
||||
pHost[0] = ntohl (pNet[1]);
|
||||
pHost[1] = htonl (tmp);
|
||||
pHost[0] = dbr_ntohl (pNet[1]);
|
||||
pHost[1] = dbr_htonl (tmp);
|
||||
#else
|
||||
*IEEEhost = *IEEEnet;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* ntohf ()
|
||||
* dbr_ntohf ()
|
||||
* performs only byte swapping
|
||||
*/
|
||||
void ntohf (float *IEEEnet, float *IEEEhost)
|
||||
void dbr_ntohf (dbr_float_t *IEEEnet, dbr_float_t *IEEEhost)
|
||||
{
|
||||
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
|
||||
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
|
||||
|
||||
*pHost = ntohl (*pNet);
|
||||
*pHost = dbr_ntohl (*pNet);
|
||||
}
|
||||
|
||||
/*
|
||||
* htonf ()
|
||||
* dbr_htonf ()
|
||||
* performs only byte swapping
|
||||
*/
|
||||
void htonf (float *IEEEhost, float *IEEEnet)
|
||||
void dbr_htonf (dbr_float_t *IEEEhost, dbr_float_t *IEEEnet)
|
||||
{
|
||||
ca_uint32_t *pHost = (ca_uint32_t *) IEEEhost;
|
||||
ca_uint32_t *pNet = (ca_uint32_t *) IEEEnet;
|
||||
|
||||
*pNet = htonl (*pHost);
|
||||
*pNet = dbr_htonl (*pHost);
|
||||
}
|
||||
|
||||
#endif /* IEEE float and little endian */
|
||||
|
||||
@@ -51,7 +51,6 @@ void flow_control(struct ioc_in_use *piiu)
|
||||
{
|
||||
unsigned nbytes;
|
||||
int status;
|
||||
int busy = piiu->client_busy;
|
||||
|
||||
LOCK;
|
||||
|
||||
@@ -74,19 +73,19 @@ void flow_control(struct ioc_in_use *piiu)
|
||||
*/
|
||||
if (nbytes) {
|
||||
piiu->contiguous_msg_count++;
|
||||
if (!busy)
|
||||
if (!piiu->client_busy)
|
||||
if (piiu->contiguous_msg_count >
|
||||
MAX_CONTIGUOUS_MSG_COUNT) {
|
||||
piiu->client_busy = TRUE;
|
||||
ca_busy_message(piiu);
|
||||
# ifdef DEBUG
|
||||
# if defined(DEBUG)
|
||||
printf("fc on\n");
|
||||
# endif
|
||||
}
|
||||
} else {
|
||||
piiu->contiguous_msg_count = 0;
|
||||
if (busy) {
|
||||
# ifdef DEBUG
|
||||
if (piiu->client_busy) {
|
||||
# if defined(DEBUG)
|
||||
printf("fc off\n");
|
||||
# endif
|
||||
ca_ready_message(piiu);
|
||||
@@ -95,6 +94,5 @@ void flow_control(struct ioc_in_use *piiu)
|
||||
}
|
||||
|
||||
UNLOCK;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ static char *sccsId = "@(#) $Id$";
|
||||
* also called by the server. All locks required are applied at
|
||||
* a higher level.
|
||||
*/
|
||||
#undef LOCK
|
||||
#undef UNLOCK
|
||||
|
||||
|
||||
/*
|
||||
@@ -295,9 +293,9 @@ void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
continue;
|
||||
}
|
||||
|
||||
pNode->destAddr.inetAddr = *pInetAddr;
|
||||
pNode->destAddr.inetAddr.sin_port = htons(port);
|
||||
pNode->srcAddr.inetAddr = localAddr;
|
||||
pNode->destAddr.in = *pInetAddr;
|
||||
pNode->destAddr.in.sin_port = htons(port);
|
||||
pNode->srcAddr.in = localAddr;
|
||||
|
||||
/*
|
||||
* LOCK applied externally
|
||||
|
||||
663
src/ca/iocinf.c
663
src/ca/iocinf.c
File diff suppressed because it is too large
Load Diff
114
src/ca/iocinf.h
114
src/ca/iocinf.h
@@ -1,3 +1,4 @@
|
||||
/* $Id */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* L O S A L A M O S */
|
||||
@@ -28,7 +29,32 @@
|
||||
/* .17 121892 joh added TCP send buf size var */
|
||||
/* .18 122192 joh added outstanding ack var */
|
||||
/* .19 012094 joh added minor version (for each server) */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/* $Log$
|
||||
* 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
|
||||
*
|
||||
* Revision 1.49 1995/10/12 01:33:12 jhill
|
||||
* Initial delay between search frames went from .1 to .01 sec,
|
||||
* Added flush pending flag, Make all usage of port be unsigned short.
|
||||
*
|
||||
* Revision 1.48 1995/09/29 21:55:38 jhill
|
||||
* added func proto for cacDisconnectChannel()
|
||||
*
|
||||
* Revision 1.47 1995/08/22 00:20:27 jhill
|
||||
* added KLUDGE def of S_db_Pending
|
||||
*/
|
||||
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
@@ -80,13 +106,13 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
*/
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <shareLib.h>
|
||||
|
||||
/*
|
||||
* OS dependent includes
|
||||
@@ -96,6 +122,7 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
/*
|
||||
* EPICS includes
|
||||
*/
|
||||
#include <epicsAssert.h>
|
||||
#include <cadef.h>
|
||||
#include <bucketLib.h>
|
||||
#include <ellLib.h>
|
||||
@@ -106,7 +133,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))
|
||||
@@ -116,12 +143,8 @@ 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 1000
|
||||
#define USEC_PER_SEC 1000000
|
||||
#define MSEC_PER_SEC 1000L
|
||||
#define USEC_PER_SEC 1000000L
|
||||
|
||||
/*
|
||||
* catch when they use really large strings
|
||||
@@ -141,7 +164,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;
|
||||
@@ -158,20 +181,14 @@ struct putCvrtBuf{
|
||||
/*
|
||||
* for use with cac_select_io()
|
||||
*/
|
||||
#define CA_DO_SENDS 1
|
||||
#define CA_DO_RECVS 2
|
||||
|
||||
struct pending_io_event{
|
||||
ELLNODE node;
|
||||
void (*io_done_sub)();
|
||||
void *io_done_arg;
|
||||
};
|
||||
#define CA_DO_SENDS (1<<0)
|
||||
#define CA_DO_RECVS (1<<1)
|
||||
|
||||
typedef struct timeval ca_time;
|
||||
|
||||
#define LD_CA_TIME(FLOAT_TIME,PCATIME) \
|
||||
((PCATIME)->tv_sec = (long) (FLOAT_TIME), \
|
||||
(PCATIME)->tv_usec = (long) ((FLOAT_TIME)-(PCATIME)->tv_sec)*USEC_PER_SEC)
|
||||
(PCATIME)->tv_usec = (long) ( ((FLOAT_TIME)-(PCATIME)->tv_sec)*USEC_PER_SEC ))
|
||||
|
||||
/*
|
||||
* dont adjust
|
||||
@@ -190,8 +207,12 @@ extern const ca_time CA_CURRENT_TIME;
|
||||
*/
|
||||
#define MAXCONNTRIES 30 /* N conn retries on unchanged net */
|
||||
|
||||
#define SELECT_POLL (0.1) /* units sec - polls into recast */
|
||||
#define CA_RECAST_DELAY (0.1) /* initial delay to next recast (sec) */
|
||||
/*
|
||||
* NOTE: These must be larger than one vxWorks tick or we will end up
|
||||
* using the CPU. A vxWorks tick is usually 1/60th of a sec.
|
||||
*/
|
||||
#define SELECT_POLL (0.025) /* units sec - polls into recast */
|
||||
#define CA_RECAST_DELAY (0.025) /* initial delay to next recast (sec) */
|
||||
#define CA_RECAST_PORT_MASK 0xff /* random retry interval off port */
|
||||
#define CA_RECAST_PERIOD (5.0) /* ul on retry period long term (sec) */
|
||||
|
||||
@@ -214,7 +235,7 @@ extern const ca_time CA_CURRENT_TIME;
|
||||
#define CA_RETRY_PERIOD 5 /* int sec to next keepalive */
|
||||
|
||||
#define N_REPEATER_TRIES_PRIOR_TO_MSG 50
|
||||
#define REPEATER_TRY_PERIOD (0.1)
|
||||
#define REPEATER_TRY_PERIOD (1.0)
|
||||
|
||||
#ifdef vxWorks
|
||||
typedef struct caclient_put_notify{
|
||||
@@ -265,7 +286,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)
|
||||
@@ -318,7 +339,7 @@ struct ca_buffer{
|
||||
|
||||
#define TAG_CONN_DOWN(PIIU) \
|
||||
( \
|
||||
/*ca_printf("Tagging connection down at %d in %s\n", __LINE__, __FILE__),*/ \
|
||||
/* ca_printf("Tagging connection down at %d in %s\n", __LINE__, __FILE__), */ \
|
||||
(PIIU)->conn_up = FALSE \
|
||||
)
|
||||
|
||||
@@ -336,7 +357,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 *);
|
||||
@@ -397,6 +418,7 @@ struct ca_static{
|
||||
ELLLIST putCvrtBuf;
|
||||
ELLLIST fdInfoFreeList;
|
||||
ELLLIST fdInfoList;
|
||||
ca_time currentTime;
|
||||
ca_time ca_conn_next_retry;
|
||||
ca_time ca_conn_retry_delay;
|
||||
ca_time ca_last_repeater_try;
|
||||
@@ -408,9 +430,11 @@ struct ca_static{
|
||||
void (*ca_exception_func)
|
||||
(struct exception_handler_args);
|
||||
void *ca_exception_arg;
|
||||
#if 0
|
||||
void (*ca_connection_func)
|
||||
(struct connection_handler_args);
|
||||
void *ca_connection_arg;
|
||||
#endif
|
||||
int (*ca_printf_func)(const char *pformat, va_list args);
|
||||
void (*ca_fd_register_func)
|
||||
(void *, SOCKET, int);
|
||||
@@ -422,12 +446,15 @@ struct ca_static{
|
||||
bhe *ca_beaconHash[BHT_INET_ADDR_MASK+1];
|
||||
unsigned ca_repeater_tries;
|
||||
unsigned ca_search_retry; /* search retry seq number */
|
||||
unsigned ca_search_responses; /* num search resp within seq # */
|
||||
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;
|
||||
unsigned ca_flush_pending:1;
|
||||
#if defined(vxWorks)
|
||||
SEM_ID ca_io_done_sem;
|
||||
SEM_ID ca_blockSem;
|
||||
@@ -509,28 +536,28 @@ void issue_client_host_name(struct ioc_in_use *piiu);
|
||||
int ca_defunct(void);
|
||||
int ca_printf(char *pformat, ...);
|
||||
void manage_conn(int silent);
|
||||
void mark_server_available(struct in_addr *pnet_addr);
|
||||
void mark_server_available(const struct in_addr *pnet_addr);
|
||||
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);
|
||||
void caHostFromInetAddr(
|
||||
struct in_addr *pnet_addr,
|
||||
char *pBuf,
|
||||
unsigned size
|
||||
const struct in_addr *pnet_addr,
|
||||
char *pBuf,
|
||||
unsigned size
|
||||
);
|
||||
int post_msg(
|
||||
struct ioc_in_use *piiu,
|
||||
struct in_addr *pnet_addr,
|
||||
const struct in_addr *pnet_addr,
|
||||
char *pInBuf,
|
||||
unsigned long blockSize
|
||||
);
|
||||
int alloc_ioc(
|
||||
struct in_addr *pnet_addr,
|
||||
const struct in_addr *pnet_addr,
|
||||
unsigned short port,
|
||||
struct ioc_in_use **ppiiu
|
||||
);
|
||||
unsigned long cacRingBufferWrite(
|
||||
@@ -551,13 +578,20 @@ unsigned long cacRingBufferReadSize(
|
||||
struct ca_buffer *pBuf,
|
||||
int contiguous);
|
||||
|
||||
void caIOBlockListFree(
|
||||
ELLLIST *pList,
|
||||
chid chan,
|
||||
int cbRequired,
|
||||
int status);
|
||||
|
||||
char *localUserName(void);
|
||||
|
||||
char *localHostName(void);
|
||||
|
||||
int create_net_chan(
|
||||
struct ioc_in_use **ppiiu,
|
||||
struct in_addr *pnet_addr, /* only used by TCP connections */
|
||||
const struct in_addr *pnet_addr, /* only used by TCP connections */
|
||||
unsigned short port,
|
||||
int net_proto
|
||||
);
|
||||
|
||||
@@ -568,10 +602,9 @@ void caSetupBCastAddrList (ELLLIST *pList, SOCKET sock, unsigned port);
|
||||
int ca_os_independent_init (void);
|
||||
|
||||
void freeBeaconHash(struct ca_static *ca_temp);
|
||||
void removeBeaconInetAddr(struct in_addr *pnet_addr);
|
||||
bhe *lookupBeaconInetAddr(struct in_addr *pnet_addr);
|
||||
bhe *createBeaconHashEntry(struct in_addr *pnet_addr);
|
||||
void close_ioc(IIU *piiu);
|
||||
void removeBeaconInetAddr(const struct in_addr *pnet_addr);
|
||||
bhe *lookupBeaconInetAddr(const struct in_addr *pnet_addr);
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr);
|
||||
void notify_ca_repeater(void);
|
||||
void cac_clean_iiu_list(void);
|
||||
|
||||
@@ -594,7 +627,9 @@ ca_real cac_time_diff(ca_time *pTVA, ca_time *pTVB);
|
||||
ca_time cac_time_sum(ca_time *pTVA, ca_time *pTVB);
|
||||
void caIOBlockFree(evid pIOBlock);
|
||||
void clearChannelResources(unsigned id);
|
||||
void caSetDefaultPrintfHandler ();
|
||||
void caSetDefaultPrintfHandler (void);
|
||||
void cacDisconnectChannel(chid chix, enum channel_state state);
|
||||
int caSendMsgPending(void);
|
||||
|
||||
/*
|
||||
* !!KLUDGE!!
|
||||
@@ -605,5 +640,6 @@ void caSetDefaultPrintfHandler ();
|
||||
*/
|
||||
#define M_dbAccess (501 <<16) /*Database Access Routines */
|
||||
#define S_db_Blocked (M_dbAccess|39) /*Request is Blocked*/
|
||||
#define S_db_Pending (M_dbAccess|37) /*Request is pending*/
|
||||
|
||||
#endif /* this must be the last line in this file */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#ifndef __IOCMSG__
|
||||
/* $Id$ */
|
||||
/*
|
||||
* History
|
||||
* .01 01xx90 joh removed status field in favor of a independent m_cmmd-
|
||||
@@ -23,6 +24,10 @@
|
||||
* .09 050594 joh New command added for CA V4.3 - repeater fanout register
|
||||
*
|
||||
* .10 050594 joh New command added for CA V4.3 - wakeup the server
|
||||
* $Log$
|
||||
* Revision 1.23 1995/08/23 00:35:17 jhill
|
||||
* added log entries
|
||||
*
|
||||
*/
|
||||
|
||||
#define __IOCMSG__
|
||||
@@ -31,23 +36,29 @@ HDRVERSIONID(iocmsgh, "@(#) $Id$ CA version 4.4")
|
||||
|
||||
/* TCP/UDP port number (bumped each protocol change) */
|
||||
#define CA_PROTOCOL_VERSION 4
|
||||
#define CA_MINOR_VERSION 4
|
||||
#define CA_MINOR_VERSION 6
|
||||
#define CA_UKN_MINOR_VERSION 0 /* unknown minor version */
|
||||
#if CA_PROTOCOL_VERSION == 4
|
||||
#define CA_V41(MAJOR,MINOR) ((MINOR)>=1)
|
||||
#define CA_V42(MAJOR,MINOR) ((MINOR)>=2)
|
||||
#define CA_V43(MAJOR,MINOR) ((MINOR)>=3)
|
||||
#define CA_V44(MAJOR,MINOR) ((MINOR)>=4)
|
||||
#define CA_V45(MAJOR,MINOR) ((MINOR)>=5)
|
||||
#define CA_V46(MAJOR,MINOR) ((MINOR)>=6)
|
||||
#elif CA_PROTOCOL_VERSION > 4
|
||||
#define CA_V41(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V42(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V43(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V44(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V45(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V46(MAJOR,MINOR) ( 1 )
|
||||
#else
|
||||
#define CA_V41(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V42(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V43(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V44(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V45(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V46(MAJOR,MINOR) ( 0 )
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -56,7 +67,7 @@ HDRVERSIONID(iocmsgh, "@(#) $Id$ CA version 4.4")
|
||||
* environment variables "EPICS_CA_REPEATER_PORT" and
|
||||
* "EPICS_CA_SERVER_PORT"
|
||||
*/
|
||||
#define CA_PORT_BASE IPPORT_USERRESERVED + 56
|
||||
#define CA_PORT_BASE IPPORT_USERRESERVED + 56U
|
||||
#define CA_SERVER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2)
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2+1)
|
||||
|
||||
@@ -72,7 +83,7 @@ HDRVERSIONID(iocmsgh, "@(#) $Id$ CA version 4.4")
|
||||
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 IOC_NOOP 0 /* do nothing, but verify TCP */
|
||||
@@ -101,6 +112,7 @@ typedef float ca_float32_t;
|
||||
#define IOC_ECHO 23 /* CA V4.3 connection verify */
|
||||
#define REPEATER_REGISTER 24 /* registr for repeater fan out */
|
||||
#define IOC_SIGNAL 25 /* knock the server out of select */
|
||||
#define IOC_CLAIM_CIU_FAILED 26 /* unable to create chan resource in server */
|
||||
|
||||
/*
|
||||
* for use with search and not_found (if search fails and
|
||||
@@ -110,15 +122,15 @@ typedef float ca_float32_t;
|
||||
#define DONTREPLY 5
|
||||
|
||||
/* size of object in bytes rounded up to nearest oct word */
|
||||
#define OCT_ROUND(A) ((((unsigned long)A)+7)>>3)
|
||||
#define OCT_ROUND(A) ((((unsigned long)(A))+7)>>3)
|
||||
#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)+3)>>2)
|
||||
#define QUAD_ROUND(A) (((unsigned long)(A))+3)>>2)
|
||||
#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)+1)>>1)
|
||||
#define BI_ROUND(A) ((((unsigned long)(A))+1)>>1)
|
||||
#define BI_SIZEOF(A) (BI_ROUND(sizeof(A)))
|
||||
|
||||
/*
|
||||
@@ -134,7 +146,8 @@ typedef float ca_float32_t;
|
||||
* fields aligned on natural boundaries.
|
||||
*
|
||||
* NOTE: all structures declared in this file must have a
|
||||
* byte count which is evenly divisible by 8 for the SPARC.
|
||||
* 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)<<3)
|
||||
|
||||
@@ -168,4 +181,5 @@ struct monops { /* monitor req opi to ioc */
|
||||
struct mon_info m_info;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __IOCMSG__ */
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <db_access.h>
|
||||
|
||||
#ifdef CA_LITTLE_ENDIAN
|
||||
# ifndef ntohs
|
||||
# define ntohs(SHORT)\
|
||||
@@ -64,29 +66,29 @@
|
||||
#endif
|
||||
|
||||
#if defined(CA_FLOAT_IEEE) && !defined(CA_LITTLE_ENDIAN)
|
||||
# define htond(IEEEhost, IEEEnet) \
|
||||
(*(double *)(IEEEnet) = *(double *)(IEEEhost))
|
||||
# define ntohd(IEEEnet, IEEEhost) \
|
||||
(*(double *)(IEEEhost) = *(double *)(IEEEnet))
|
||||
# define htonf(IEEEhost, IEEEnet) \
|
||||
(*(float *)(IEEEnet) = *(float *)(IEEEhost))
|
||||
# define ntohf(IEEEnet, IEEEhost) \
|
||||
(*(float *)(IEEEhost) = *(float *)(IEEEnet))
|
||||
# define dbr_htond(IEEEhost, IEEEnet) \
|
||||
(*(dbr_double_t *)(IEEEnet) = *(dbr_double_t *)(IEEEhost))
|
||||
# define dbr_ntohd(IEEEnet, IEEEhost) \
|
||||
(*(dbr_double_t *)(IEEEhost) = *(dbr_double_t *)(IEEEnet))
|
||||
# define dbr_htonf(IEEEhost, IEEEnet) \
|
||||
(*(dbr_float_t *)(IEEEnet) = *(dbr_float_t *)(IEEEhost))
|
||||
# define dbr_ntohf(IEEEnet, IEEEhost) \
|
||||
(*(dbr_float_t *)(IEEEhost) = *(dbr_float_t *)(IEEEnet))
|
||||
#elif defined(CA_FLOAT_IEEE) && defined(CA_LITTLE_ENDIAN)
|
||||
# define ntohf(NET,HOST) \
|
||||
{*((u_long *)(HOST)) = ntohl(*((u_long *)(NET )));}
|
||||
# define htonf(HOST,NET) \
|
||||
{*((u_long *)(NET) ) = htonl(*((u_long *)(HOST)));}
|
||||
# define ntohd(NET,HOST) \
|
||||
{ ((u_long *)(HOST))[1] = ntohl(((u_long *)(NET))[0]) ; \
|
||||
((u_long *)(HOST))[0] = ntohl(((u_long *)(NET))[1]) ;}
|
||||
# define htond(HOST,NET) \
|
||||
{ ((u_long *)(NET))[1] = htonl(((u_long *)(HOST))[0]) ; \
|
||||
((u_long *)(NET))[0] = htonl(((u_long *)(HOST))[1]) ;}
|
||||
# define dbr_ntohf(NET,HOST) \
|
||||
{*((dbr_long_t *)(HOST)) = ntohl(*((dbr_long_t *)(NET )));}
|
||||
# define dbr_htonf(HOST,NET) \
|
||||
{*((dbr_long_t *)(NET) ) = htonl(*((dbr_long_t *)(HOST)));}
|
||||
# define dbr_ntohd(NET,HOST) \
|
||||
{ ((dbr_long_t *)(HOST))[1] = ntohl(((dbr_long_t *)(NET))[0]) ; \
|
||||
((dbr_long_t *)(HOST))[0] = ntohl(((dbr_long_t *)(NET))[1]) ;}
|
||||
# define dbr_htond(HOST,NET) \
|
||||
{ ((dbr_long_t *)(NET))[1] = htonl(((dbr_long_t *)(HOST))[0]) ; \
|
||||
((dbr_long_t *)(NET))[0] = htonl(((dbr_long_t *)(HOST))[1]) ;}
|
||||
#else
|
||||
void htond(double *pHost, double *pNet);
|
||||
void ntohd(double *pNet, double *pHost);
|
||||
void htonf(float *pHost, float *pNet);
|
||||
void ntohf(float *pNet, float *pHost);
|
||||
void dbr_htond(dbr_double_t *pHost, dbr_double_t *pNet);
|
||||
void dbr_ntohd(dbr_double_t *pNet, dbr_double_t *pHost);
|
||||
void dbr_htonf(dbr_float_t *pHost, dbr_float_t *pNet);
|
||||
void dbr_ntohf(dbr_float_t *pNet, dbr_float_t *pHost);
|
||||
#endif
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user