Merge lp:~johill-lanl/epics-base/ca-ref-man-maint into lp:~epics-core/epics-base/3.15
- ca-ref-man-maint
- Merge into 3.15
Status: | Merged |
---|---|
Merge reported by: | Andrew Johnson |
Merged at revision: | not available |
Proposed branch: | lp:~johill-lanl/epics-base/ca-ref-man-maint |
Merge into: | lp:~epics-core/epics-base/3.15 |
Diff against target: |
1757 lines (+413/-277) (has conflicts) 1 file modified
src/ca/client/CAref.html (+413/-277) Text conflict in src/ca/client/CAref.html |
To merge this branch: | bzr merge lp:~johill-lanl/epics-base/ca-ref-man-maint |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Johnson | Approve | ||
Ralph Lange | Needs Fixing | ||
Review via email: mp+53647@code.launchpad.net |
Commit message
Description of the change
This syncs the changes in the ca reference manual on the cvs main trunk with the main trunk at launchpad
Andrew Johnson (anj) wrote : | # |
Actually Ralph's en dash (the HTML entity name is actually – BTW) should IMHO be an — — here it "demarcates a break of thought or some similar interpolation (stronger than the interpolation demarcated by parentheses)" to quote Wikipedia again, from http://
There are other <span style="font-style: italic;"></span> sections in addition to the one Ralph pointed out that similarly should be marked up using <em></em>.
Other than that, I agree with all Ralph's points.
Ralph Lange (ralph-lange) wrote : | # |
But, the same Wikipedia article says further down (http://
The traditional US way is the unspaced em dash (that I personally always consider very strange when reading books printed in the US), while the British style guides and publishers favour the spaced en dash.
Boils down to: how British are you? ;-)
As always in these fuzzy questions: pick a style, and use it consistently.
Jeff Hill (johill-lanl) wrote : | # |
Ok, I believe that I have fixed all of it; now you have bigger changes to review ;-)
Andrew Johnson (anj) wrote : | # |
Now the original apostrophes (' = 0x27) have been replaced by a back-quote character (` = 0x60) which is just as wrong as the right-single-quote HTML entity was.
Many HTML entities such as © and ü in the original have also been replaced by single character equivalents, which are correct for the iso-8859-1 charset that the HTML head block says that the file uses, but I much prefer that we use entities for all non-ASCII characters so there is no danger of problems if someone edits the file in a UTF-8 editor or using some other code-page. I'm not sure what editor you're using for this, but please try to configure it to use HTML entities in preference to all characters outside of the common 7-bit range.
However I have extracted your changes by hand, undone the apostrope and entity stuff and merged the rest into the 3.14 version of CAref.html. They will appear in the 3.15 version in due course (Bazaar is currently having a little difficulty with merging the 3.14 branch into 3.15). The result also contains a few other changes that we have made to the file since you last worked on it.
Preview Diff
1 | === modified file 'src/ca/client/CAref.html' | |||
2 | --- src/ca/client/CAref.html 2013-07-05 18:26:26 +0000 | |||
3 | +++ src/ca/client/CAref.html 2013-11-07 19:43:28 +0000 | |||
4 | @@ -7,8 +7,8 @@ | |||
5 | 7 | <style type="text/css"> | 7 | <style type="text/css"> |
6 | 8 | <!-- | 8 | <!-- |
7 | 9 | h3 code { | 9 | h3 code { |
10 | 10 | background-color: #ddf; | 10 | background-color: #ddf; |
11 | 11 | font-size: larger; | 11 | font-size: larger; |
12 | 12 | } | 12 | } |
13 | 13 | --> | 13 | --> |
14 | 14 | 14 | ||
15 | @@ -20,30 +20,30 @@ | |||
16 | 20 | 20 | ||
17 | 21 | <h1>EPICS R3.14 Channel Access Reference Manual</h1> | 21 | <h1>EPICS R3.14 Channel Access Reference Manual</h1> |
18 | 22 | <address> | 22 | <address> |
20 | 23 | Jeffrey O. Hill | 23 | Jeffrey O. Hill |
21 | 24 | </address> | 24 | </address> |
22 | 25 | 25 | ||
23 | 26 | <p><span style="font-size: x-small; font-weight:lighter;">Los Alamos National | 26 | <p><span style="font-size: x-small; font-weight:lighter;">Los Alamos National |
24 | 27 | Laboratory, SNS Division</span></p> | 27 | Laboratory, SNS Division</span></p> |
25 | 28 | <address> | 28 | <address> |
27 | 29 | Ralph Lange | 29 | Ralph Lange |
28 | 30 | </address> | 30 | </address> |
29 | 31 | 31 | ||
30 | 32 | <p><span style="font-size: x-small; font-weight:lighter;">Helmholtz-Zentrum | 32 | <p><span style="font-size: x-small; font-weight:lighter;">Helmholtz-Zentrum |
31 | 33 | Berlin (BESSY II)</span></p> | 33 | Berlin (BESSY II)</span></p> |
32 | 34 | 34 | ||
36 | 35 | <p><span style="font-size: xx-small; font-weight:lighter;">Copyright © 2009 | 35 | <p><span style="font-size: xx-small; font-weight:lighter;">Copyright © 2009 |
37 | 36 | Helmholtz-Zentrum Berlin für Materialien und Energie GmbH.<br> | 36 | Helmholtz-Zentrum Berlin für Materialien und Energie GmbH.<br> |
38 | 37 | Copyright © 2002 The University of Chicago, as Operator of Argonne National | 37 | Copyright © 2002 The University of Chicago, as Operator of Argonne National |
39 | 38 | Laboratory.<br> | 38 | Laboratory.<br> |
41 | 39 | Copyright © 2002 The Regents of the University of California, as Operator of | 39 | Copyright © 2002 The Regents of the University of California, as Operator of |
42 | 40 | Los Alamos National Laboratory.<br> | 40 | Los Alamos National Laboratory.<br> |
44 | 41 | Copyright © 2002 Berliner Speicherringgesellschaft für Synchrotronstrahlung | 41 | Copyright © 2002 Berliner Speicherringgesellschaft für Synchrotronstrahlung |
45 | 42 | GmbH.</span></p> | 42 | GmbH.</span></p> |
46 | 43 | 43 | ||
47 | 44 | <p><span style="font-size: xx-small; font-weight:lighter;">EPICS BASE is | 44 | <p><span style="font-size: xx-small; font-weight:lighter;">EPICS BASE is |
50 | 45 | distributed subject to a Software License Agreement found | 45 | distributed subject to a Software License Agreement found in the file LICENSE |
51 | 46 | in the file LICENSE that is included with this distribution.</span></p> | 46 | that is included with this distribution.</span></p> |
52 | 47 | 47 | ||
53 | 48 | <p><a href="http://www.w3.org/Amaya/"><img | 48 | <p><a href="http://www.w3.org/Amaya/"><img |
54 | 49 | src="http://www.w3.org/Amaya/Icons/w3c-amaya.gif" alt="W3C-Amaya" height="31" | 49 | src="http://www.w3.org/Amaya/Icons/w3c-amaya.gif" alt="W3C-Amaya" height="31" |
55 | @@ -107,17 +107,17 @@ | |||
56 | 107 | 107 | ||
57 | 108 | <h3><a href="#Troubleshooting">Troubleshooting</a></h3> | 108 | <h3><a href="#Troubleshooting">Troubleshooting</a></h3> |
58 | 109 | <ul> | 109 | <ul> |
60 | 110 | <li><a href="#When">When Clients Do Not Connect to Their Server</a> | 110 | <li><a href="#When">When Clients Do Not Connect to Their Server</a> |
61 | 111 | <ul> | 111 | <ul> |
62 | 112 | <li><a href="#Broadcast">Client and Server Broadcast Addresses Dont | 112 | <li><a href="#Broadcast">Client and Server Broadcast Addresses Dont |
63 | 113 | Match</a></li> | 113 | Match</a></li> |
65 | 114 | <li><a href="#Client">Client Isnt Configured to Use the Server's | 114 | <li><a href="#Client">Client Isnt Configured to Use the Server`s |
66 | 115 | Port</a></li> | 115 | Port</a></li> |
67 | 116 | <li><a href="#Unicast">Unicast Addresses in the EPICS_CA_ADDR_LIST Does | 116 | <li><a href="#Unicast">Unicast Addresses in the EPICS_CA_ADDR_LIST Does |
68 | 117 | not Reliably Contact Servers Sharing the Same UDP Port on the Same | 117 | not Reliably Contact Servers Sharing the Same UDP Port on the Same |
69 | 118 | Host</a></li> | 118 | Host</a></li> |
72 | 119 | <li><a href="#Client1">Client Does not See Server's Beacons</a></li> | 119 | <li><a href="#Client1">Client Does not See Server`s Beacons</a></li> |
73 | 120 | <li><a href="#Server1">A server's IP address was changed</a></li> | 120 | <li><a href="#Server1">A server`s IP address was changed</a></li> |
74 | 121 | </ul> | 121 | </ul> |
75 | 122 | </li> | 122 | </li> |
76 | 123 | <li><a href="#Requests">Put Requests Just Prior to Process Termination Appear | 123 | <li><a href="#Requests">Put Requests Just Prior to Process Termination Appear |
77 | @@ -165,7 +165,8 @@ | |||
78 | 165 | <li><a href="#ca_pend_io">block for certain requests to complete</a></li> | 165 | <li><a href="#ca_pend_io">block for certain requests to complete</a></li> |
79 | 166 | <li><a href="#ca_test_io">test to see if certain requests have | 166 | <li><a href="#ca_test_io">test to see if certain requests have |
80 | 167 | completed</a></li> | 167 | completed</a></li> |
82 | 168 | <li><a href="#ca_pend_event">process CA client library background activities</a></li> | 168 | <li><a href="#ca_pend_event">process CA client library background |
83 | 169 | activities</a></li> | ||
84 | 169 | <li><a href="#ca_flush_io">flush outstanding requests to the server</a></li> | 170 | <li><a href="#ca_flush_io">flush outstanding requests to the server</a></li> |
85 | 170 | <li><a href="#ca_add_exception_event">replace the default exception | 171 | <li><a href="#ca_add_exception_event">replace the default exception |
86 | 171 | handler</a></li> | 172 | handler</a></li> |
87 | @@ -246,7 +247,11 @@ | |||
88 | 246 | 247 | ||
89 | 247 | <h3>Why Reconfigure Channel Access</h3> | 248 | <h3>Why Reconfigure Channel Access</h3> |
90 | 248 | 249 | ||
91 | 250 | <<<<<<< TREE | ||
92 | 249 | <p>Typical reasons to reconfigure EPICS Channel Access:</p> | 251 | <p>Typical reasons to reconfigure EPICS Channel Access:</p> |
93 | 252 | ======= | ||
94 | 253 | <p>Typicall reasons to reconfigure EPICS Channel Access:</p> | ||
95 | 254 | >>>>>>> MERGE-SOURCE | ||
96 | 250 | <ul> | 255 | <ul> |
97 | 251 | <li>Two independent control systems must share a network without fear of | 256 | <li>Two independent control systems must share a network without fear of |
98 | 252 | interaction</li> | 257 | interaction</li> |
99 | @@ -363,9 +368,8 @@ | |||
100 | 363 | servers that host the channels identified. Likewise CA clients efficiently | 368 | servers that host the channels identified. Likewise CA clients efficiently |
101 | 364 | discover that CA servers have recently joined the LAN or disconnected from the | 369 | discover that CA servers have recently joined the LAN or disconnected from the |
102 | 365 | LAN by monitoring periodically broadcasted beacons sent out by the servers. | 370 | LAN by monitoring periodically broadcasted beacons sent out by the servers. |
106 | 366 | Since hardware broadcasting requires special hardware capabilities, we are | 371 | However, additional configuration is required when EPICS is extended to operate |
107 | 367 | required to provide additional configuration information when EPICS is extended | 372 | over a wide area network (WAN).</p> |
105 | 368 | to operate over a wide area network (WAN).</p> | ||
108 | 369 | 373 | ||
109 | 370 | <h3><a name="Network">IP Network Administration Background Information</a></h3> | 374 | <h3><a name="Network">IP Network Administration Background Information</a></h3> |
110 | 371 | 375 | ||
111 | @@ -374,7 +378,7 @@ | |||
112 | 374 | is determined by the IP netmask. Portions of the IP address corresponding to | 378 | is determined by the IP netmask. Portions of the IP address corresponding to |
113 | 375 | zeros in the netmask specify the hosts address within an IP subnet. Portions of | 379 | zeros in the netmask specify the hosts address within an IP subnet. Portions of |
114 | 376 | the IP address corresponding to binary ones in the netmask specify the address | 380 | the IP address corresponding to binary ones in the netmask specify the address |
116 | 377 | of a host's IP subnet. Normally the scope of a broadcasted frame will be | 381 | of a host`s IP subnet. Normally the scope of a broadcasted frame will be |
117 | 378 | limited to one IP subnet. Addresses with the host address portion set to all | 382 | limited to one IP subnet. Addresses with the host address portion set to all |
118 | 379 | zeros or all ones are special. Modern IP kernel implementations reserve | 383 | zeros or all ones are special. Modern IP kernel implementations reserve |
119 | 380 | destination addresses with the host portion set to all ones for the purpose of | 384 | destination addresses with the host portion set to all ones for the purpose of |
120 | @@ -454,6 +458,7 @@ | |||
121 | 454 | 458 | ||
122 | 455 | <h3><a name="firewall">Firewalls</a></h3> | 459 | <h3><a name="firewall">Firewalls</a></h3> |
123 | 456 | 460 | ||
124 | 461 | <<<<<<< TREE | ||
125 | 457 | <p>If you want channel access clients on a machine to be able to see | 462 | <p>If you want channel access clients on a machine to be able to see |
126 | 458 | beacons and replies to broadcast PV search requests, you need to permit | 463 | beacons and replies to broadcast PV search requests, you need to permit |
127 | 459 | inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064) | 464 | inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064) |
128 | @@ -464,8 +469,18 @@ | |||
129 | 464 | -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT | 469 | -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT |
130 | 465 | -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT | 470 | -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT |
131 | 466 | </pre> | 471 | </pre> |
132 | 472 | ======= | ||
133 | 473 | <p>If you want channel access clients on a machine to be able to see beacons | ||
134 | 474 | and replies to broadcast PV search requests you need to permit inbound UDP | ||
135 | 475 | packets with source port EPICS_CA_SERVER_PORT (default is 5064) or destination | ||
136 | 476 | port EPICS_CA_REPEATER_PORT (default is 5065). On systems using iptables this | ||
137 | 477 | can be accomplished by rules like</p> | ||
138 | 478 | <pre> -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT | ||
139 | 479 | -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT</pre> | ||
140 | 480 | >>>>>>> MERGE-SOURCE | ||
141 | 467 | 481 | ||
142 | 468 | <p>If you want channel access servers (e.g. "soft IOCs") on a machine to be | 482 | <p>If you want channel access servers (e.g. "soft IOCs") on a machine to be |
143 | 483 | <<<<<<< TREE | ||
144 | 469 | able to be seen by clients, you need to permit inbound TCP or UDP packets with | 484 | able to be seen by clients, you need to permit inbound TCP or UDP packets with |
145 | 470 | destination port EPICS_CA_SERVER_PORT (default is 5064). | 485 | destination port EPICS_CA_SERVER_PORT (default is 5064). |
146 | 471 | On systems using iptables this can be accomplished by rules like</p> | 486 | On systems using iptables this can be accomplished by rules like</p> |
147 | @@ -474,6 +489,13 @@ | |||
148 | 474 | -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT | 489 | -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT |
149 | 475 | -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT | 490 | -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT |
150 | 476 | </pre> | 491 | </pre> |
151 | 492 | ======= | ||
152 | 493 | able to see clients you need to permit inbound TCP or UDP packets with source | ||
153 | 494 | port EPICS_CA_SERVER_PORT (default is 5064). On systems using iptables this can | ||
154 | 495 | be accomplished by rules like</p> | ||
155 | 496 | <pre> -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT | ||
156 | 497 | -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT</pre> | ||
157 | 498 | >>>>>>> MERGE-SOURCE | ||
158 | 477 | 499 | ||
159 | 478 | <p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from | 500 | <p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from |
160 | 479 | which you wish to accept packets.</p> | 501 | which you wish to accept packets.</p> |
161 | @@ -488,7 +510,7 @@ | |||
162 | 488 | resolution (search) request contains a list of Process Variable names.If one of | 510 | resolution (search) request contains a list of Process Variable names.If one of |
163 | 489 | the servers reachable by this address list knows the IP address of a CA server | 511 | the servers reachable by this address list knows the IP address of a CA server |
164 | 490 | that can service one or more of the specified Process Variables, then it sends | 512 | that can service one or more of the specified Process Variables, then it sends |
166 | 491 | back a response containing the server's IP address and port number.</p> | 513 | back a response containing the server`s IP address and port number.</p> |
167 | 492 | 514 | ||
168 | 493 | <p>During initialization CA builds the list of server destination addresses | 515 | <p>During initialization CA builds the list of server destination addresses |
169 | 494 | used when sending CA client name resolution (search) requests. This table is | 516 | used when sending CA client name resolution (search) requests. This table is |
170 | @@ -497,10 +519,9 @@ | |||
171 | 497 | broadcast address of that subnet is added to the list. For each point to point | 519 | broadcast address of that subnet is added to the list. For each point to point |
172 | 498 | interface found, the destination address of that link is added to the list. | 520 | interface found, the destination address of that link is added to the list. |
173 | 499 | This automatic server address list initialization can be disabled if the EPICS | 521 | This automatic server address list initialization can be disabled if the EPICS |
178 | 500 | environment variable EPICS_CA_AUTO_ADDR_LIST exists and its value is either | 522 | environment variable EPICS_CA_AUTO_ADDR_LIST exists and its value is either of |
179 | 501 | of "no" or "NO". The typical default is to enable network interface | 523 | "no" or "NO". The typical default is to enable network interface introspection |
180 | 502 | introspection driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES" | 524 | driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES" or "yes".</p> |
177 | 503 | or "yes".</p> | ||
181 | 504 | 525 | ||
182 | 505 | <p>Following network interface introspection, any IP addresses specified in the | 526 | <p>Following network interface introspection, any IP addresses specified in the |
183 | 506 | EPICS environment variable EPICS_CA_ADDR_LIST are added to the list of | 527 | EPICS environment variable EPICS_CA_ADDR_LIST are added to the list of |
184 | @@ -511,8 +532,8 @@ | |||
185 | 511 | EPICS_CA_ADDR_LIST may be dotted IP addresses or host names if the local OS has | 532 | EPICS_CA_ADDR_LIST may be dotted IP addresses or host names if the local OS has |
186 | 512 | support for host name to IP address translation. When multiple names are added | 533 | support for host name to IP address translation. When multiple names are added |
187 | 513 | to EPICS_CA_ADDR_LIST they must be separated by white space. There is no | 534 | to EPICS_CA_ADDR_LIST they must be separated by white space. There is no |
190 | 514 | requirement that the addresses specified in the EPICS_CA_ADDR_LIST be | 535 | requirement that the addresses specified in the EPICS_CA_ADDR_LIST be broadcast |
191 | 515 | broadcast addresses, but this will often be the most convenient choice.</p> | 536 | addresses, but this will often be the most convenient choice.</p> |
192 | 516 | 537 | ||
193 | 517 | <p>For any IP addresses specified in the EPICS environment variable | 538 | <p>For any IP addresses specified in the EPICS environment variable |
194 | 518 | EPICS_CA_NAME_SERVERS, TCP connections are opened and used for CA client name | 539 | EPICS_CA_NAME_SERVERS, TCP connections are opened and used for CA client name |
195 | @@ -560,7 +581,7 @@ | |||
196 | 560 | <p>Frequently vxWorks systems boot by default with routes limiting access only | 581 | <p>Frequently vxWorks systems boot by default with routes limiting access only |
197 | 561 | to the local subnet. If a EPICS system is operating in a WAN environment it may | 582 | to the local subnet. If a EPICS system is operating in a WAN environment it may |
198 | 562 | be necessary to configure routes into the vxWorks system which enable a vxWorks | 583 | be necessary to configure routes into the vxWorks system which enable a vxWorks |
200 | 563 | based CA server to respond to requests originating outside it's subnet. These | 584 | based CA server to respond to requests originating outside its subnet. These |
201 | 564 | routing restrictions can also apply to vxWorks base CA clients communicating | 585 | routing restrictions can also apply to vxWorks base CA clients communicating |
202 | 565 | with off subnet servers. An EPICS system manager can implement an rudimentary, | 586 | with off subnet servers. An EPICS system manager can implement an rudimentary, |
203 | 566 | but robust, form of access control for a particular host by not providing | 587 | but robust, form of access control for a particular host by not providing |
204 | @@ -571,7 +592,7 @@ | |||
205 | 571 | 592 | ||
206 | 572 | <p>If the CA client library does not see a beacon from a server that it is | 593 | <p>If the CA client library does not see a beacon from a server that it is |
207 | 573 | connected to for EPICS_CA_CONN_TMO seconds then an state-of-health message is | 594 | connected to for EPICS_CA_CONN_TMO seconds then an state-of-health message is |
209 | 574 | sent to the server over TCP/IP. If this state-of-health message isn't promptly | 595 | sent to the server over TCP/IP. If this state-of-health message isn`t promptly |
210 | 575 | replied to then the client library will conclude that channels communicating | 596 | replied to then the client library will conclude that channels communicating |
211 | 576 | with the server are no longer responsive and inform the CA client side | 597 | with the server are no longer responsive and inform the CA client side |
212 | 577 | application via function callbacks. The parameter EPICS_CA_CONN_TMO is | 598 | application via function callbacks. The parameter EPICS_CA_CONN_TMO is |
213 | @@ -588,7 +609,7 @@ | |||
214 | 588 | but does not immediately disconnect the TCP circuit. Instead the CA client | 609 | but does not immediately disconnect the TCP circuit. Instead the CA client |
215 | 589 | library postpones circuit shutdown until receiving indication of circuit | 610 | library postpones circuit shutdown until receiving indication of circuit |
216 | 590 | disconnect from the IP kernel. This can occur either because a server is | 611 | disconnect from the IP kernel. This can occur either because a server is |
218 | 591 | restarted or because the IP kernel's internal TCP circuit inactivity keep alive | 612 | restarted or because the IP kernel`s internal TCP circuit inactivity keep alive |
219 | 592 | timer has expired after a typically long duration (as is appropriate for IP | 613 | timer has expired after a typically long duration (as is appropriate for IP |
220 | 593 | based systems that need to avoid thrashing during periods of excessive load). | 614 | based systems that need to avoid thrashing during periods of excessive load). |
221 | 594 | The net result is less search and TCP circuit setup and shutdown activity | 615 | The net result is less search and TCP circuit setup and shutdown activity |
222 | @@ -624,7 +645,7 @@ | |||
223 | 624 | below).</p> | 645 | below).</p> |
224 | 625 | 646 | ||
225 | 626 | <p>The CA client library continually estimates the beacon period of all server | 647 | <p>The CA client library continually estimates the beacon period of all server |
227 | 627 | beacons received. If a particular server's beacon period becomes significantly | 648 | beacons received. If a particular server`s beacon period becomes significantly |
228 | 628 | shorter or longer then the client is said to detect a beacon anomaly. The | 649 | shorter or longer then the client is said to detect a beacon anomaly. The |
229 | 629 | library boosts the search interval for unresolved channels when a beacon | 650 | library boosts the search interval for unresolved channels when a beacon |
230 | 630 | anomaly is seen or when <em>any</em> successful search response is received, | 651 | anomaly is seen or when <em>any</em> successful search response is received, |
231 | @@ -634,7 +655,7 @@ | |||
232 | 634 | preexisting unresolved channels. The program "casw" prints a message on | 655 | preexisting unresolved channels. The program "casw" prints a message on |
233 | 635 | standard out for each CA client beacon anomaly detect event.</p> | 656 | standard out for each CA client beacon anomaly detect event.</p> |
234 | 636 | 657 | ||
236 | 637 | <p>See also <a href="#Client1">When a Client Does not See the Server's | 658 | <p>See also <a href="#Client1">When a Client Does not See the Server`s |
237 | 638 | Beacon</a>.</p> | 659 | Beacon</a>.</p> |
238 | 639 | 660 | ||
239 | 640 | <h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search | 661 | <h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search |
240 | @@ -643,7 +664,7 @@ | |||
241 | 643 | <p>The rate at which name resolution (search) requests are sent exponentially | 664 | <p>The rate at which name resolution (search) requests are sent exponentially |
242 | 644 | backs off to a plateau rate. The value of this plateau has an impact on network | 665 | backs off to a plateau rate. The value of this plateau has an impact on network |
243 | 645 | traffic because it determines the rate that clients search for channel names | 666 | traffic because it determines the rate that clients search for channel names |
245 | 646 | that are miss-spelled or otherwise don't exist in a server. Furthermore, for | 667 | that are miss-spelled or otherwise don`t exist in a server. Furthermore, for |
246 | 647 | clients that are unable to see the beacon from a new server, the plateau rate | 668 | clients that are unable to see the beacon from a new server, the plateau rate |
247 | 648 | may also determine the maximum interval that the client will wait until | 669 | may also determine the maximum interval that the client will wait until |
248 | 649 | discovering a new server.</p> | 670 | discovering a new server.</p> |
249 | @@ -652,7 +673,7 @@ | |||
250 | 652 | seconds is determined by the EPICS_CA_MAX_SEARCH_PERIOD environment | 673 | seconds is determined by the EPICS_CA_MAX_SEARCH_PERIOD environment |
251 | 653 | variable.</p> | 674 | variable.</p> |
252 | 654 | 675 | ||
254 | 655 | <p>See also <a href="#Client1">When a Client Does not See the Server's | 676 | <p>See also <a href="#Client1">When a Client Does not See the Server`s |
255 | 656 | Beacon</a>.</p> | 677 | Beacon</a>.</p> |
256 | 657 | 678 | ||
257 | 658 | <h3><a name="Repeater">The CA Repeater</a></h3> | 679 | <h3><a name="Repeater">The CA Repeater</a></h3> |
258 | @@ -764,7 +785,7 @@ | |||
259 | 764 | <p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the | 785 | <p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the |
260 | 765 | maximum array that it will send or receive. Likewise, the CA server uses | 786 | maximum array that it will send or receive. Likewise, the CA server uses |
261 | 766 | EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or | 787 | EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or |
263 | 767 | receive. The client does not influence the server's message size quotas and | 788 | receive. The client does not influence the server`s message size quotas and |
264 | 768 | visa versa. In fact the value of EPICS_CA_MAX_ARRAY_BYTES need not be the same | 789 | visa versa. In fact the value of EPICS_CA_MAX_ARRAY_BYTES need not be the same |
265 | 769 | in the client and the server. If the server receives a request which is too | 790 | in the client and the server. If the server receives a request which is too |
266 | 770 | large to read or respond to in entirety then it sends an exception message to | 791 | large to read or respond to in entirety then it sends an exception message to |
267 | @@ -832,14 +853,14 @@ | |||
268 | 832 | 853 | ||
269 | 833 | <p>The server configures its port number from the EPICS_CAS_SERVER_PORT | 854 | <p>The server configures its port number from the EPICS_CAS_SERVER_PORT |
270 | 834 | environment variable if it is specified. Otherwise the EPICS_CA_SERVER_PORT | 855 | environment variable if it is specified. Otherwise the EPICS_CA_SERVER_PORT |
272 | 835 | environment variable determines the server's port number. Two servers can share | 856 | environment variable determines the server`s port number. Two servers can share |
273 | 836 | the same UDP port number on the same machine, but there are restrictions - see | 857 | the same UDP port number on the same machine, but there are restrictions - see |
274 | 837 | a <a href="#Unicast">discussion of unicast addresses and two servers sharing | 858 | a <a href="#Unicast">discussion of unicast addresses and two servers sharing |
275 | 838 | the same UDP port on the same host</a>.</p> | 859 | the same UDP port on the same host</a>.</p> |
276 | 839 | 860 | ||
277 | 840 | <h4>Server Beacons</h4> | 861 | <h4>Server Beacons</h4> |
278 | 841 | 862 | ||
280 | 842 | <p>The EPICS_CAS_BEACON_PERIOD parameter determines the server's beacon period | 863 | <p>The EPICS_CAS_BEACON_PERIOD parameter determines the server`s beacon period |
281 | 843 | and is specified in floating point seconds. The default is typically 15 | 864 | and is specified in floating point seconds. The default is typically 15 |
282 | 844 | seconds. See also <a href="#Disconnect">EPICS_CA_CONN_TMO</a> and <a | 865 | seconds. See also <a href="#Disconnect">EPICS_CA_CONN_TMO</a> and <a |
283 | 845 | href="#Dynamic">Dynamic Changes in the CA Client Library Search | 866 | href="#Dynamic">Dynamic Changes in the CA Client Library Search |
284 | @@ -865,17 +886,17 @@ | |||
285 | 865 | list is not augmented.</p> | 886 | list is not augmented.</p> |
286 | 866 | 887 | ||
287 | 867 | <p>The EPICS_CAS_BEACON_PORT parameter specifies the destination port for | 888 | <p>The EPICS_CAS_BEACON_PORT parameter specifies the destination port for |
290 | 868 | server beacons. The only exception to this occurs when ports are specified | 889 | server beacons. The only exception to this occurs when ports are specified in |
291 | 869 | in EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If | 890 | EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If |
292 | 870 | EPICS_CAS_BEACON_PORT is not specified then beacons are sent to the port | 891 | EPICS_CAS_BEACON_PORT is not specified then beacons are sent to the port |
293 | 871 | specified in EPICS_CA_REPEATER_PORT.</p> | 892 | specified in EPICS_CA_REPEATER_PORT.</p> |
294 | 872 | 893 | ||
295 | 873 | <h4>Binding a Server to a Limited Set of Network Interfaces</h4> | 894 | <h4>Binding a Server to a Limited Set of Network Interfaces</h4> |
296 | 874 | 895 | ||
297 | 875 | <p>The parameter EPICS_CAS_INTF_ADDR_LIST allows a ca server to bind itself to, | 896 | <p>The parameter EPICS_CAS_INTF_ADDR_LIST allows a ca server to bind itself to, |
301 | 876 | and therefore accept messages only over, a limited set of the local host's | 897 | and therefore accept messages only over, a limited set of the local host`s |
302 | 877 | network interfaces (each specified by it's IP address). On UNIX systems type | 898 | network interfaces (each specified by its IP address). On UNIX systems type |
303 | 878 | "netstat -i" (type "ipconfig" on windows) to see a list of the local host's | 899 | "netstat -i" (type "ipconfig" on windows) to see a list of the local host`s |
304 | 879 | network interfaces. Specifically, UDP search messages addressed to both the IP | 900 | network interfaces. Specifically, UDP search messages addressed to both the IP |
305 | 880 | addresses in EPICS_CAS_INTF_ADDR_LIST and also to the broadcast addresses of | 901 | addresses in EPICS_CAS_INTF_ADDR_LIST and also to the broadcast addresses of |
306 | 881 | the corresponding LAN interfaces will be accepted by the server. By default, | 902 | the corresponding LAN interfaces will be accepted by the server. By default, |
307 | @@ -1054,7 +1075,7 @@ | |||
308 | 1054 | 1075 | ||
309 | 1055 | <p>CA server beacon anomalies occur when a new server joins the network, a | 1076 | <p>CA server beacon anomalies occur when a new server joins the network, a |
310 | 1056 | server is rebooted, network connectivity to a server is reestablished, or if a | 1077 | server is rebooted, network connectivity to a server is reestablished, or if a |
312 | 1057 | server's CPU exits a CPU load saturated state.</p> | 1078 | server`s CPU exits a CPU load saturated state.</p> |
313 | 1058 | 1079 | ||
314 | 1059 | <p>CA clients with unresolved channels reset their search request scheduling | 1080 | <p>CA clients with unresolved channels reset their search request scheduling |
315 | 1060 | timers whenever they see a beacon anomaly.</p> | 1081 | timers whenever they see a beacon anomaly.</p> |
316 | @@ -1159,7 +1180,7 @@ | |||
317 | 1159 | </tr> | 1180 | </tr> |
318 | 1160 | <tr> | 1181 | <tr> |
319 | 1161 | <td>-d <type></td> | 1182 | <td>-d <type></td> |
321 | 1162 | <td>Request specific dbr type; use string (DBR_ prefix may be omitted) | 1183 | <td>Request specific dbr type; use string (DBR_ prefix may be omitted) |
322 | 1163 | 1184 | ||
323 | 1164 | <p>or number of one of the following types:</p> | 1185 | <p>or number of one of the following types:</p> |
324 | 1165 | 1186 | ||
325 | @@ -1604,7 +1625,7 @@ | |||
326 | 1604 | stdout.</p> | 1625 | stdout.</p> |
327 | 1605 | 1626 | ||
328 | 1606 | <p>The -s option allows to specify an interest level for calling Channel | 1627 | <p>The -s option allows to specify an interest level for calling Channel |
330 | 1607 | Access' internal report function ca_client_status(), that prints lots of | 1628 | Access` internal report function ca_client_status(), that prints lots of |
331 | 1608 | internal informations on stdout, including environment settings, used CA ports | 1629 | internal informations on stdout, including environment settings, used CA ports |
332 | 1609 | etc.</p> | 1630 | etc.</p> |
333 | 1610 | 1631 | ||
334 | @@ -1646,7 +1667,7 @@ | |||
335 | 1646 | 1667 | ||
336 | 1647 | <p>This is an example CA server that is sometimes used for testing purposes. An | 1668 | <p>This is an example CA server that is sometimes used for testing purposes. An |
337 | 1648 | example server can be created with the makeBaseApp perl script, as descibed in | 1669 | example server can be created with the makeBaseApp perl script, as descibed in |
339 | 1649 | the application Developer's Guide.</p> | 1670 | the application Developer`s Guide.</p> |
340 | 1650 | 1671 | ||
341 | 1651 | <table border="1"> | 1672 | <table border="1"> |
342 | 1652 | <col> | 1673 | <col> |
343 | @@ -1832,21 +1853,21 @@ | |||
344 | 1832 | <h4><a name="Broadcast">Client and Server Broadcast Addresses Dont | 1853 | <h4><a name="Broadcast">Client and Server Broadcast Addresses Dont |
345 | 1833 | Match</a></h4> | 1854 | Match</a></h4> |
346 | 1834 | 1855 | ||
349 | 1835 | <p>Verify that the broadcast addresses are identical on the server's host and | 1856 | <p>Verify that the broadcast addresses are identical on the server`s host and |
350 | 1836 | on the client's host. This can be checked on UNIX with "netstat -i" or | 1857 | on the client`s host. This can be checked on UNIX with "netstat -i" or |
351 | 1837 | "ifconfig -a"; on vxWorks with ifShow; and on windows with ipconfig. It is | 1858 | "ifconfig -a"; on vxWorks with ifShow; and on windows with ipconfig. It is |
352 | 1838 | normal for the broadcast addresses to not be identical if the client and server | 1859 | normal for the broadcast addresses to not be identical if the client and server |
353 | 1839 | are not directly attached to the same IP subnet, and in this situation the | 1860 | are not directly attached to the same IP subnet, and in this situation the |
354 | 1840 | EPICS_CA_ADDR_LIST must be set. Otherwise, if the client and server are | 1861 | EPICS_CA_ADDR_LIST must be set. Otherwise, if the client and server are |
355 | 1841 | intended to be on the same IP subnet, then the problem may be that the IP | 1862 | intended to be on the same IP subnet, then the problem may be that the IP |
356 | 1842 | netmask is incorrectly set in the network interface configuration. On most | 1863 | netmask is incorrectly set in the network interface configuration. On most |
358 | 1843 | operating systems, when the host's IP address is configured, the host's IP | 1864 | operating systems, when the host`s IP address is configured, the host`s IP |
359 | 1844 | subnet mask is also configured.</p> | 1865 | subnet mask is also configured.</p> |
360 | 1845 | 1866 | ||
362 | 1846 | <h4><a name="Client">Client Isn't Configured to Use the Server's Port</a></h4> | 1867 | <h4><a name="Client">Client Isn`t Configured to Use the Server`s Port</a></h4> |
363 | 1847 | 1868 | ||
364 | 1848 | <p>Verify that the client and server are using the same UDP port. Check the | 1869 | <p>Verify that the client and server are using the same UDP port. Check the |
366 | 1849 | server's port by running "netstat -a | grep nnn" where nnn is the port number | 1870 | server`s port by running "netstat -a | grep nnn" where nnn is the port number |
367 | 1850 | configured in the client. If you do not set EPICS_CA_SERVER_PORT or | 1871 | configured in the client. If you do not set EPICS_CA_SERVER_PORT or |
368 | 1851 | EPICS_CAS_SERVER_PORT then the default port will be 5064.</p> | 1872 | EPICS_CAS_SERVER_PORT then the default port will be 5064.</p> |
369 | 1852 | 1873 | ||
370 | @@ -1861,20 +1882,20 @@ | |||
371 | 1861 | existing CA server then both servers will use the same UDP port, and the 2nd | 1882 | existing CA server then both servers will use the same UDP port, and the 2nd |
372 | 1862 | server will be allocated an ephemeral TCP port. Clients can be configured to | 1883 | server will be allocated an ephemeral TCP port. Clients can be configured to |
373 | 1863 | use the same port number for both servers. They will locate the 2nd server via | 1884 | use the same port number for both servers. They will locate the 2nd server via |
376 | 1864 | the shared UDP port, and transparently connect to the 2nd server's ephemeral | 1885 | the shared UDP port, and transparently connect to the 2nd server`s ephemeral |
377 | 1865 | TCP port. Be aware however that If there are two server's running on the same | 1886 | TCP port. Be aware however that If there are two server`s running on the same |
378 | 1866 | host sharing the same UDP port then they will both receive UDP search requests | 1887 | host sharing the same UDP port then they will both receive UDP search requests |
379 | 1867 | sent as broadcasts, but unfortunately (due to a weakness of most IP kernel | 1888 | sent as broadcasts, but unfortunately (due to a weakness of most IP kernel |
380 | 1868 | implementations) only one of the servers will typically receive UDP search | 1889 | implementations) only one of the servers will typically receive UDP search |
382 | 1869 | requests sent to unicast addresses (i.e. a single specific host's ip | 1890 | requests sent to unicast addresses (i.e. a single specific host`s ip |
383 | 1870 | address).</p> | 1891 | address).</p> |
384 | 1871 | 1892 | ||
386 | 1872 | <h4><a name="Client1">Client Does not See Server's Beacons</a></h4> | 1893 | <h4><a name="Client1">Client Does not See Server`s Beacons</a></h4> |
387 | 1873 | 1894 | ||
388 | 1874 | <p>Two conclusions deserve special emphasis. <em>First, if a client does not | 1895 | <p>Two conclusions deserve special emphasis. <em>First, if a client does not |
390 | 1875 | see the server's beacons, then it will use additional network and server | 1896 | see the server`s beacons, then it will use additional network and server |
391 | 1876 | resources sending periodic state-of-health messages.</em> <em>Second, if a | 1897 | resources sending periodic state-of-health messages.</em> <em>Second, if a |
393 | 1877 | client does not see a newly introduced server's beacon, then it will take up to | 1898 | client does not see a newly introduced server`s beacon, then it will take up to |
394 | 1878 | EPICS_CA_MAX_SEARCH_PERIOD to find that newly introduced server.</em> Also, | 1899 | EPICS_CA_MAX_SEARCH_PERIOD to find that newly introduced server.</em> Also, |
395 | 1879 | starting with EPICS R3.14.7 the client library does <em>not</em> suspend | 1900 | starting with EPICS R3.14.7 the client library does <em>not</em> suspend |
396 | 1880 | searching for a channel after 100 unsuccessful attempts until a beacon anomaly | 1901 | searching for a channel after 100 unsuccessful attempts until a beacon anomaly |
397 | @@ -1882,18 +1903,18 @@ | |||
398 | 1882 | EPICS and it timed out attempting to find a server whoose beacon cant be seen | 1903 | EPICS and it timed out attempting to find a server whoose beacon cant be seen |
399 | 1883 | by the client library then the client application might need to be restarted in | 1904 | by the client library then the client application might need to be restarted in |
400 | 1884 | order to connect to this new beacon-out-of-range server. The typical situation | 1905 | order to connect to this new beacon-out-of-range server. The typical situation |
405 | 1885 | where a client would not see the server's beacon might be when the client isnt | 1906 | where a client would not see the server`s beacon might be when the client isnt |
406 | 1886 | on the same IP subnet as the server, and the client's EPICS_CA_ADDR_LIST was | 1907 | on the same IP subnet as the server, and the client`s EPICS_CA_ADDR_LIST was |
407 | 1887 | modified to include a destination address for the server, but the server's | 1908 | modified to include a destination address for the server, but the server`s |
408 | 1888 | beacon address list was not modified so that it's beacons are received by the | 1909 | beacon address list was not modified so that its beacons are received by the |
409 | 1889 | client.</p> | 1910 | client.</p> |
410 | 1890 | 1911 | ||
412 | 1891 | <h4><a name="Server1">A Server's IP Address Was Changed</a></h4> | 1912 | <h4><a name="Server1">A Server`s IP Address Was Changed</a></h4> |
413 | 1892 | 1913 | ||
414 | 1893 | <p>When communication over a virtual circuit times out, then each channel | 1914 | <p>When communication over a virtual circuit times out, then each channel |
415 | 1894 | attached to the circuit enters a disconnected state and the disconnect callback | 1915 | attached to the circuit enters a disconnected state and the disconnect callback |
416 | 1895 | handler specified for the channel is called. However, the circuit is not | 1916 | handler specified for the channel is called. However, the circuit is not |
418 | 1896 | disconnected until TCP/IP's internal, typically long duration, keep alive timer | 1917 | disconnected until TCP/IP`s internal, typically long duration, keep alive timer |
419 | 1897 | expires. The disconnected channels remain attached to the beleaguered circuit | 1918 | expires. The disconnected channels remain attached to the beleaguered circuit |
420 | 1898 | and no attempt is made to search for, or to reestablish, a new circuit. If, at | 1919 | and no attempt is made to search for, or to reestablish, a new circuit. If, at |
421 | 1899 | some time in the future, the circuit becomes responsive again, then the | 1920 | some time in the future, the circuit becomes responsive again, then the |
422 | @@ -1905,11 +1926,11 @@ | |||
423 | 1905 | reattempt to find servers for each channel and connect circuits to them.</p> | 1926 | reattempt to find servers for each channel and connect circuits to them.</p> |
424 | 1906 | 1927 | ||
425 | 1907 | <p>A well known negative side effect of the above behavior is that CA clients | 1928 | <p>A well known negative side effect of the above behavior is that CA clients |
427 | 1908 | will wait the full (typically long) duration of TCP/IP's internal keep alive | 1929 | will wait the full (typically long) duration of TCP/IP`s internal keep alive |
428 | 1909 | timer prior to reconnecting under the following scenario (all of the following | 1930 | timer prior to reconnecting under the following scenario (all of the following |
429 | 1910 | occur):</p> | 1931 | occur):</p> |
430 | 1911 | <ul> | 1932 | <ul> |
432 | 1912 | <li>An server's (IOC's) operating system crashes (or is abruptly turned off) | 1933 | <li>An server`s (IOC`s) operating system crashes (or is abruptly turned off) |
433 | 1913 | or a vxWorks system is stopped by any means</li> | 1934 | or a vxWorks system is stopped by any means</li> |
434 | 1914 | <li>This operating system does not immediately reboot using the same IP | 1935 | <li>This operating system does not immediately reboot using the same IP |
435 | 1915 | address</li> | 1936 | address</li> |
436 | @@ -1937,9 +1958,15 @@ | |||
437 | 1937 | 1958 | ||
438 | 1938 | <p>Short lived CA client applications that issue a CA put request and then | 1959 | <p>Short lived CA client applications that issue a CA put request and then |
439 | 1939 | immediately exit the process (return from <code>main</code> or call | 1960 | immediately exit the process (return from <code>main</code> or call |
440 | 1961 | <<<<<<< TREE | ||
441 | 1940 | <code>exit</code>) may find that there request isn't executed. To guarantee | 1962 | <code>exit</code>) may find that there request isn't executed. To guarantee |
442 | 1941 | that the request is sent call <code>ca_flush_io()</code> followed by | 1963 | that the request is sent call <code>ca_flush_io()</code> followed by |
443 | 1942 | <code>ca_context_destroy()</code> prior to terminating the process.</p> | 1964 | <code>ca_context_destroy()</code> prior to terminating the process.</p> |
444 | 1965 | ======= | ||
445 | 1966 | <code>exit</code>) may find that there request isn`t executed. To guarantee | ||
446 | 1967 | that the request is sent call <code>ca_flush</code> followed by | ||
447 | 1968 | <code>ca_context_destroy</code> prior to terminating the process.</p> | ||
448 | 1969 | >>>>>>> MERGE-SOURCE | ||
449 | 1943 | 1970 | ||
450 | 1944 | <h3><a name="Problems">ENOBUFS Messages</a></h3> | 1971 | <h3><a name="Problems">ENOBUFS Messages</a></h3> |
451 | 1945 | 1972 | ||
452 | @@ -1952,7 +1979,7 @@ | |||
453 | 1952 | earlier vxWorks versions is rumored to lead to permanent IP communications | 1979 | earlier vxWorks versions is rumored to lead to permanent IP communications |
454 | 1953 | stalls which are resolved only by a system reboot. IP kernels that use mbufs | 1980 | stalls which are resolved only by a system reboot. IP kernels that use mbufs |
455 | 1954 | frequently allow the initial and maximum number of mbufs to be configured. | 1981 | frequently allow the initial and maximum number of mbufs to be configured. |
457 | 1955 | Consult your OS's documentation for configuration procedures which vary between | 1982 | Consult your OS`s documentation for configuration procedures which vary between |
458 | 1956 | OS and even between different versions of the same OS.</p> | 1983 | OS and even between different versions of the same OS.</p> |
459 | 1957 | 1984 | ||
460 | 1958 | <h4>Contributing Circumstances</h4> | 1985 | <h4>Contributing Circumstances</h4> |
461 | @@ -1965,9 +1992,9 @@ | |||
462 | 1965 | increase the size of the mbuf pool.</li> | 1992 | increase the size of the mbuf pool.</li> |
463 | 1966 | </ul> | 1993 | </ul> |
464 | 1967 | <ul> | 1994 | <ul> |
468 | 1968 | <li>The server has multiple connections where the server's sustained event | 1995 | <li>The server has multiple connections where the server`s sustained event |
469 | 1969 | (monitor subscription update) production rate is higher than the client's | 1996 | (monitor subscription update) production rate is higher than the client`s |
470 | 1970 | or the network's sustained event consumption rate. This ties up a per | 1997 | or the network`s sustained event consumption rate. This ties up a per |
471 | 1971 | socket quota of mbufs for data that are pending transmission to the client | 1998 | socket quota of mbufs for data that are pending transmission to the client |
472 | 1972 | via the network. In particular, if there are multiple clients that | 1999 | via the network. In particular, if there are multiple clients that |
473 | 1973 | subscribe for monitor events but do not call ca_pend_event() or ca_poll() | 2000 | subscribe for monitor events but do not call ca_pend_event() or ca_poll() |
474 | @@ -1978,7 +2005,7 @@ | |||
475 | 1978 | <li>The server does not get a chance to run (because some other higher | 2005 | <li>The server does not get a chance to run (because some other higher |
476 | 1979 | priority thread is running) and the CA clients are sending a high volume of | 2006 | priority thread is running) and the CA clients are sending a high volume of |
477 | 1980 | data over TCP or UDP. This ties up a quota of mbufs for each socket in the | 2007 | data over TCP or UDP. This ties up a quota of mbufs for each socket in the |
479 | 1981 | server that isn't being reduced by the server's socket read system | 2008 | server that isn`t being reduced by the server`s socket read system |
480 | 1982 | calls.</li> | 2009 | calls.</li> |
481 | 1983 | </ul> | 2010 | </ul> |
482 | 1984 | <ul> | 2011 | <ul> |
483 | @@ -1992,7 +2019,7 @@ | |||
484 | 1992 | <li>When sites switch to the vxWorks 5.4 IP kernel they frequently run into | 2019 | <li>When sites switch to the vxWorks 5.4 IP kernel they frequently run into |
485 | 1993 | network pool exhaustion problems. This may be because the original vxWorks | 2020 | network pool exhaustion problems. This may be because the original vxWorks |
486 | 1994 | IP kernel expanded the network pool as needed at runtime while the new | 2021 | IP kernel expanded the network pool as needed at runtime while the new |
488 | 1995 | kernel's pool is statically configured at compile time, and does | 2022 | kernel`s pool is statically configured at compile time, and does |
489 | 1996 | <em>not</em> expand as needed at runtime. Also, at certain sites problems | 2023 | <em>not</em> expand as needed at runtime. Also, at certain sites problems |
490 | 1997 | related to vxWorks network driver pool exhaustion have also been reported | 2024 | related to vxWorks network driver pool exhaustion have also been reported |
491 | 1998 | (this can also result in ENOBUF diagnostic messages).</li> | 2025 | (this can also result in ENOBUF diagnostic messages).</li> |
492 | @@ -2017,8 +2044,8 @@ | |||
493 | 2017 | <p>If the subscription update producer in the server produces subscription | 2044 | <p>If the subscription update producer in the server produces subscription |
494 | 2018 | updates faster than the subscription update consumer in the client consumes | 2045 | updates faster than the subscription update consumer in the client consumes |
495 | 2019 | them, then events have to be discarded if the buffering in the server | 2046 | them, then events have to be discarded if the buffering in the server |
498 | 2020 | isn't allowed to grow to an infinite size. This is a law of nature | 2047 | isn`t allowed to grow to an infinite size. This is a law of nature |
499 | 2021 | - based on queuing theory of course.</p> | 2048 | – based on queuing theory of course.</p> |
500 | 2022 | 2049 | ||
501 | 2023 | <p>What is done depends on the version of the CA server. All server versions | 2050 | <p>What is done depends on the version of the CA server. All server versions |
502 | 2024 | place quotas on the maximum number of subscription updates allowed on the | 2051 | place quotas on the maximum number of subscription updates allowed on the |
503 | @@ -2040,10 +2067,10 @@ | |||
504 | 2040 | getting time warped, but also guarantees that intervening events are discarded | 2067 | getting time warped, but also guarantees that intervening events are discarded |
505 | 2041 | until the slow client catches up.</p> | 2068 | until the slow client catches up.</p> |
506 | 2042 | 2069 | ||
511 | 2043 | <p>There is currently no message on the IOC's console when a | 2070 | <p>There is currently no message on the IOC`s console when a particular |
512 | 2044 | particular client is slow on the uptake. A message of this type used to exist | 2071 | client is slow on the uptake. A message of this type used to exist many years |
513 | 2045 | many years ago, but it was a source of confusion (and what we will call | 2072 | ago, but it was a source of confusion (and what we will call message noise) so |
514 | 2046 | message noise) so it was removed. </p> | 2073 | it was removed. </p> |
515 | 2047 | 2074 | ||
516 | 2048 | <p>There is unfortunately no field in the protocol allowing the server to | 2075 | <p>There is unfortunately no field in the protocol allowing the server to |
517 | 2049 | indicate that an intervening subscription update was discarded. We should | 2076 | indicate that an intervening subscription update was discarded. We should |
518 | @@ -2056,12 +2083,12 @@ | |||
519 | 2056 | <h3><a name="Flushing">Flushing and Blocking</a></h3> | 2083 | <h3><a name="Flushing">Flushing and Blocking</a></h3> |
520 | 2057 | 2084 | ||
521 | 2058 | <p>Significant performance gains can be realized when the CA client library | 2085 | <p>Significant performance gains can be realized when the CA client library |
523 | 2059 | doesn't wait for a response to return from the server after each request. All | 2086 | doesn`t wait for a response to return from the server after each request. All |
524 | 2060 | requests which require interaction with a CA server are accumulated (buffered) | 2087 | requests which require interaction with a CA server are accumulated (buffered) |
525 | 2061 | and not forwarded to the IOC until one of ca_flush_io, ca_pend_io, | 2088 | and not forwarded to the IOC until one of ca_flush_io, ca_pend_io, |
526 | 2062 | ca_pend_event, or ca_sg_pend are called allowing several operations to be | 2089 | ca_pend_event, or ca_sg_pend are called allowing several operations to be |
527 | 2063 | efficiently sent over the network together. Any process variable values written | 2090 | efficiently sent over the network together. Any process variable values written |
529 | 2064 | into your program's variables by ca_get() should not be referenced by your | 2091 | into your program`s variables by ca_get() should not be referenced by your |
530 | 2065 | program until ECA_NORMAL has been received from ca_pend_io().</p> | 2092 | program until ECA_NORMAL has been received from ca_pend_io().</p> |
531 | 2066 | 2093 | ||
532 | 2067 | <h3><a name="Status">Status Codes</a></h3> | 2094 | <h3><a name="Status">Status Codes</a></h3> |
533 | @@ -2076,22 +2103,22 @@ | |||
534 | 2076 | validity of the request and whether it was successfully enqueued to the server, | 2103 | validity of the request and whether it was successfully enqueued to the server, |
535 | 2077 | but communication of completion status is deferred until a user callback is | 2104 | but communication of completion status is deferred until a user callback is |
536 | 2078 | called, or lacking that an exception handler is called. An error number and the | 2105 | called, or lacking that an exception handler is called. An error number and the |
539 | 2079 | error's severity are embedded in CA status (error) constants. Applications | 2106 | error`s severity are embedded in CA status (error) constants. Applications |
540 | 2080 | shouldn't test the success of a CA function call by checking to see if the | 2107 | shouldn`t test the success of a CA function call by checking to see if the |
541 | 2081 | returned value is zero as is the UNIX convention. Below are several methods to | 2108 | returned value is zero as is the UNIX convention. Below are several methods to |
542 | 2082 | test CA function returns. See <a href="#ca_signal">ca_signal() and SEVCHK</a> | 2109 | test CA function returns. See <a href="#ca_signal">ca_signal() and SEVCHK</a> |
543 | 2083 | for more information on this topic.</p> | 2110 | for more information on this topic.</p> |
545 | 2084 | <pre>status = ca_XXXX(); | 2111 | <pre><code>status = ca_XXXX(); |
546 | 2085 | SEVCHK( status, "ca_XXXX() returned failure status"); | 2112 | SEVCHK( status, "ca_XXXX() returned failure status"); |
547 | 2086 | 2113 | ||
548 | 2087 | if ( status & CA_M_SUCCESS ) { | 2114 | if ( status & CA_M_SUCCESS ) { |
550 | 2088 | printf ( "The requested ca_XXXX() operation didn't complete successfully"); | 2115 | printf ( "The requested ca_XXXX() operation didn`t complete successfully"); |
551 | 2089 | } | 2116 | } |
552 | 2090 | 2117 | ||
553 | 2091 | if ( status != ECA_NORMAL ) { | 2118 | if ( status != ECA_NORMAL ) { |
555 | 2092 | printf("The requested ca_XXXX() operation didn't complete successfully because \"%s\"\n", | 2119 | printf("The requested ca_XXXX() operation didn`t complete successfully because \"%s\"\n", |
556 | 2093 | ca_message ( status ) ); | 2120 | ca_message ( status ) ); |
558 | 2094 | }</pre> | 2121 | }</code></pre> |
559 | 2095 | 2122 | ||
560 | 2096 | <h3><a name="Channel">Channel Access Data Types</a></h3> | 2123 | <h3><a name="Channel">Channel Access Data Types</a></h3> |
561 | 2097 | 2124 | ||
562 | @@ -2251,7 +2278,7 @@ | |||
563 | 2251 | href="#dbr_size_n">dbr_size_n</a> function can be used to determine the correct | 2278 | href="#dbr_size_n">dbr_size_n</a> function can be used to determine the correct |
564 | 2252 | number of bytes to reserve when there are more than one value field elements in | 2279 | number of bytes to reserve when there are more than one value field elements in |
565 | 2253 | a structured CA data type.</p> | 2280 | a structured CA data type.</p> |
567 | 2254 | <pre>#include <stdio.h> | 2281 | <pre><code>#include <stdio.h> |
568 | 2255 | #include <stdlib.h> | 2282 | #include <stdlib.h> |
569 | 2256 | 2283 | ||
570 | 2257 | #include "cadef.h" | 2284 | #include "cadef.h" |
571 | @@ -2314,7 +2341,7 @@ | |||
572 | 2314 | free ( pTD ); | 2341 | free ( pTD ); |
573 | 2315 | 2342 | ||
574 | 2316 | return 0; | 2343 | return 0; |
576 | 2317 | }</pre> | 2344 | }</code></pre> |
577 | 2318 | 2345 | ||
578 | 2319 | <h3><a name="User">User Supplied Callback Functions</a></h3> | 2346 | <h3><a name="User">User Supplied Callback Functions</a></h3> |
579 | 2320 | 2347 | ||
580 | @@ -2324,16 +2351,16 @@ | |||
581 | 2324 | asynchronous completion via this mechanism. The <code>event_handler_args | 2351 | asynchronous completion via this mechanism. The <code>event_handler_args |
582 | 2325 | </code>structure is passed <em>by value</em> to the application supplied | 2352 | </code>structure is passed <em>by value</em> to the application supplied |
583 | 2326 | callback. In this structure the <code>dbr</code> field is a void pointer to any | 2353 | callback. In this structure the <code>dbr</code> field is a void pointer to any |
594 | 2327 | data that might be returned. The <code>status</code> field will be | 2354 | data that might be returned. The <code>status</code> field will be set to one |
595 | 2328 | set to one of the CA error codes in caerr.h and will indicate the status of the | 2355 | of the CA error codes in caerr.h and will indicate the status of the operation |
596 | 2329 | operation performed in the IOC. If the status field isn't set to ECA_NORMAL or | 2356 | performed in the IOC. If the status field isn`t set to ECA_NORMAL or data isn`t |
597 | 2330 | data isn't normally returned from the operation (i.e. put call back) then you | 2357 | normally returned from the operation (i.e. put call back) then you should |
598 | 2331 | should expect that the <code>dbr</code> field will be set to a nill pointer | 2358 | expect that the <code>dbr</code>field will be set to a nill pointer (zero). The |
599 | 2332 | (zero). The fields <code>usr</code>, <code>chid</code>, and <code>type</code> | 2359 | fields <code>usr</code>, <code>chid</code>, and <code>type</code> are set to |
600 | 2333 | are set to the values specified when the request was made by the application. | 2360 | the values specified when the request was made by the application. The "dbr" |
601 | 2334 | The "dbr" pointer, and any data that it points to, are valid only when | 2361 | pointer, and any data that it points to, are valid only when executing within |
602 | 2335 | executing within the user's callback function.</p> | 2362 | the user`s callback function.</p> |
603 | 2336 | <pre>typedef struct event_handler_args { | 2363 | <pre><code>typedef struct event_handler_args { |
604 | 2337 | void *usr; /* user argument supplied with request */ | 2364 | void *usr; /* user argument supplied with request */ |
605 | 2338 | chanId chid; /* channel id */ | 2365 | chanId chid; /* channel id */ |
606 | 2339 | long type; /* the type of the item returned */ | 2366 | long type; /* the type of the item returned */ |
607 | @@ -2350,13 +2377,13 @@ | |||
608 | 2350 | const struct dbr_time_double * pTD = | 2377 | const struct dbr_time_double * pTD = |
609 | 2351 | ( const struct dbr_time_double * ) args.dbr; | 2378 | ( const struct dbr_time_double * ) args.dbr; |
610 | 2352 | } | 2379 | } |
612 | 2353 | }</pre> | 2380 | }</code></pre> |
613 | 2354 | 2381 | ||
614 | 2355 | <h3><a name="Channel1">Channel Access Exceptions</a></h3> | 2382 | <h3><a name="Channel1">Channel Access Exceptions</a></h3> |
615 | 2356 | 2383 | ||
616 | 2357 | <p>When the server detects a failure, and there is no client call back function | 2384 | <p>When the server detects a failure, and there is no client call back function |
619 | 2358 | attached to the request, an exception handler is executed in the client. | 2385 | attached to the request, an exception handler is executed in the client. The |
620 | 2359 | The default exception handler prints a message on the console and exits if the | 2386 | default exception handler prints a message on the console and exits if the |
621 | 2360 | exception condition is severe. Certain internal exceptions within the CA client | 2387 | exception condition is severe. Certain internal exceptions within the CA client |
622 | 2361 | library, and failures detected by the SEVCHK macro may also cause the exception | 2388 | library, and failures detected by the SEVCHK macro may also cause the exception |
623 | 2362 | handler to be invoked. To modify this behavior see <a | 2389 | handler to be invoked. To modify this behavior see <a |
624 | @@ -2365,10 +2392,10 @@ | |||
625 | 2365 | <h3><a name="Server">Server and Client Share the Same Address Space on The Same | 2392 | <h3><a name="Server">Server and Client Share the Same Address Space on The Same |
626 | 2366 | Host</a></h3> | 2393 | Host</a></h3> |
627 | 2367 | 2394 | ||
629 | 2368 | <p>If the Process Variable's server and it's client are colocated within the | 2395 | <p>If the Process Variable`s server and its client are colocated within the |
630 | 2369 | same memory address space and the same host then the ca_xxx() operations bypass | 2396 | same memory address space and the same host then the ca_xxx() operations bypass |
631 | 2370 | the server and directly interact with the server tool component (commonly the | 2397 | the server and directly interact with the server tool component (commonly the |
633 | 2371 | IOC's function block database). In this situation the ca_xxx() routines | 2398 | IOC`s function block database). In this situation the ca_xxx() routines |
634 | 2372 | frequently return the completion status of the requested operation directly to | 2399 | frequently return the completion status of the requested operation directly to |
635 | 2373 | the caller with no opportunity for asynchronous notification of failure via an | 2400 | the caller with no opportunity for asynchronous notification of failure via an |
636 | 2374 | exception handler. Likewise, callbacks may be directly invoked by the CA | 2401 | exception handler. Likewise, callbacks may be directly invoked by the CA |
637 | @@ -2377,10 +2404,10 @@ | |||
638 | 2377 | <h3><a name="Arrays">Arrays</a></h3> | 2404 | <h3><a name="Arrays">Arrays</a></h3> |
639 | 2378 | 2405 | ||
640 | 2379 | <p>For routines that require an argument specifying the number of array | 2406 | <p>For routines that require an argument specifying the number of array |
643 | 2380 | elements, no more than the process variable's maximum native element count may | 2407 | elements, no more than the process variable`s maximum native element count may |
644 | 2381 | be requested. The process variable's maximum native element count is available | 2408 | be requested. The process variable`s maximum native element count is available |
645 | 2382 | from ca_element_count() when the channel is connected. If fewer elements than | 2409 | from ca_element_count() when the channel is connected. If fewer elements than |
647 | 2383 | the process variable's native element count are requested, the requested values | 2410 | the process variable`s native element count are requested, the requested values |
648 | 2384 | will be fetched beginning at element zero. By default CA limits the number of | 2411 | will be fetched beginning at element zero. By default CA limits the number of |
649 | 2385 | elements in an array to be no more than approximately 16k divided by the size | 2412 | elements in an array to be no more than approximately 16k divided by the size |
650 | 2386 | of one element in the array. Starting with EPICS R3.14 the maximum array size | 2413 | of one element in the array. Starting with EPICS R3.14 the maximum array size |
651 | @@ -2391,10 +2418,10 @@ | |||
652 | 2391 | <p>Application programs should assume that CA servers may be restarted, and | 2418 | <p>Application programs should assume that CA servers may be restarted, and |
653 | 2392 | that network connectivity is transient. When you create a CA channel its | 2419 | that network connectivity is transient. When you create a CA channel its |
654 | 2393 | initial connection state will most commonly be disconnected. If the Process | 2420 | initial connection state will most commonly be disconnected. If the Process |
656 | 2394 | Variable's server is available the library will immediately initiate the | 2421 | Variable`s server is available the library will immediately initiate the |
657 | 2395 | necessary actions to make a connection with it. Otherwise, the client library | 2422 | necessary actions to make a connection with it. Otherwise, the client library |
658 | 2396 | will monitor the state of servers on the network and connect or reconnect with | 2423 | will monitor the state of servers on the network and connect or reconnect with |
660 | 2397 | the process variable's server as it becomes available. After the channel | 2424 | the process variable`s server as it becomes available. After the channel |
661 | 2398 | connects the application program can freely perform IO operations through the | 2425 | connects the application program can freely perform IO operations through the |
662 | 2399 | channel, but should expect that the channel might disconnect at any time due to | 2426 | channel, but should expect that the channel might disconnect at any time due to |
663 | 2400 | network connectivity disruptions or server restarts.</p> | 2427 | network connectivity disruptions or server restarts.</p> |
664 | @@ -2412,7 +2439,7 @@ | |||
665 | 2412 | that prefer to poll for connection state changes instead of opting for | 2439 | that prefer to poll for connection state changes instead of opting for |
666 | 2413 | asynchronous notification. The <code>ca_pend_io</code> function blocks only for | 2440 | asynchronous notification. The <code>ca_pend_io</code> function blocks only for |
667 | 2414 | channels created specifying a nill connection handler callback function. The | 2441 | channels created specifying a nill connection handler callback function. The |
669 | 2415 | user's connection state change function will be run immediately from within | 2442 | user`s connection state change function will be run immediately from within |
670 | 2416 | <code><a href="#ca_create_channel">ca_create_channel</a></code> if the CA | 2443 | <code><a href="#ca_create_channel">ca_create_channel</a></code> if the CA |
671 | 2417 | client and CA server are both hosted within the same address space (within the | 2444 | client and CA server are both hosted within the same address space (within the |
672 | 2418 | same process).</p> | 2445 | same process).</p> |
673 | @@ -2423,12 +2450,12 @@ | |||
674 | 2423 | all OS (in past releases the library was thread safe only on vxWorks). When the | 2450 | all OS (in past releases the library was thread safe only on vxWorks). When the |
675 | 2424 | client library is initialized the programmer may specify if preemptive callback | 2451 | client library is initialized the programmer may specify if preemptive callback |
676 | 2425 | is to be enabled. Preemptive callback is disabled by default. If preemptive | 2452 | is to be enabled. Preemptive callback is disabled by default. If preemptive |
683 | 2426 | callback is enabled, then the user's callback functions might be called by | 2453 | callback is enabled, then the user`s callback functions might be called by CA`s |
684 | 2427 | CA's auxiliary threads when the main initiating channel access thread is not | 2454 | auxiliary threads when the main initiating channel access thread is not inside |
685 | 2428 | inside of a function in the channel access client library. Otherwise, the | 2455 | of a function in the channel access client library. Otherwise, the user`s |
686 | 2429 | user's callback functions will be called only when the main initiating channel | 2456 | callback functions will be called only when the main initiating channel access |
687 | 2430 | access thread is executing inside of the CA client library. When the CA client | 2457 | thread is executing inside of the CA client library. When the CA client library |
688 | 2431 | library invokes a user's callback function, it will always wait for the current | 2458 | invokes a user`s callback function, it will always wait for the current |
689 | 2432 | callback to complete prior to executing another callback function. Programmers | 2459 | callback to complete prior to executing another callback function. Programmers |
690 | 2433 | enabling preemptive callback should be familiar with using mutex locks to | 2460 | enabling preemptive callback should be familiar with using mutex locks to |
691 | 2434 | create a reliable multi-threaded program.</p> | 2461 | create a reliable multi-threaded program.</p> |
692 | @@ -2457,10 +2484,10 @@ | |||
693 | 2457 | database CA links and the sequencer are designed to not use the same CA client | 2484 | database CA links and the sequencer are designed to not use the same CA client |
694 | 2458 | library threads, network circuits, and data structures. Each thread that calls | 2485 | library threads, network circuits, and data structures. Each thread that calls |
695 | 2459 | <a href="#ca_context_create">ca_context_create()</a> for the first time either | 2486 | <a href="#ca_context_create">ca_context_create()</a> for the first time either |
700 | 2460 | directly or implicitly when calling any CA library function for the first | 2487 | directly or implicitly when calling any CA library function for the first time, |
701 | 2461 | time, creates a CA client library context. A CA client library context contains | 2488 | creates a CA client library context. A CA client library context contains all |
702 | 2462 | all of the threads, network circuits, and data structures required to connect | 2489 | of the threads, network circuits, and data structures required to connect and |
703 | 2463 | and communicate with the channels that a CA client application has created. The | 2490 | communicate with the channels that a CA client application has created. The |
704 | 2464 | priority of auxiliary threads spawned by the CA client library are at fixed | 2491 | priority of auxiliary threads spawned by the CA client library are at fixed |
705 | 2465 | offsets from the priority of the thread that called <a | 2492 | offsets from the priority of the thread that called <a |
706 | 2466 | href="#ca_context_create">ca_context_create()</a>. An application specific | 2493 | href="#ca_context_create">ca_context_create()</a>. An application specific |
707 | @@ -2474,9 +2501,10 @@ | |||
708 | 2474 | It is not possible to attach a thread to a non-preemptive CA context created | 2501 | It is not possible to attach a thread to a non-preemptive CA context created |
709 | 2475 | explicitly <em>or implicitly</em> with | 2502 | explicitly <em>or implicitly</em> with |
710 | 2476 | ca_create_context(ca_disable_preemptive_callback). Once a thread has joined | 2503 | ca_create_context(ca_disable_preemptive_callback). Once a thread has joined |
714 | 2477 | with a CA context it need only make ordinary ca_xxxx() library calls to use the | 2504 | with a CA context it need only make ordinary ca_xxxx()library calls to use the |
715 | 2478 | context.</p> | 2505 | context. There is no need to specify the context identifier when invoking the |
716 | 2479 | 2506 | CA calls because the context identifier is stored in a thread private variable | |
717 | 2507 | by ca_attach_context().</p> | ||
718 | 2480 | 2508 | ||
719 | 2481 | <p>A CA client library context can be shut down and cleaned up, after | 2509 | <p>A CA client library context can be shut down and cleaned up, after |
720 | 2482 | destroying any channels or application specific threads that are attached to | 2510 | destroying any channels or application specific threads that are attached to |
721 | @@ -2493,14 +2521,14 @@ | |||
722 | 2493 | ca_sg_block() or alternatively it must call ca_poll() at least every 100 | 2521 | ca_sg_block() or alternatively it must call ca_poll() at least every 100 |
723 | 2494 | milli-seconds. In single threaded applications a file descriptor manager like | 2522 | milli-seconds. In single threaded applications a file descriptor manager like |
724 | 2495 | Xt or the interface described in fdManager.h can be used to monitor both mouse | 2523 | Xt or the interface described in fdManager.h can be used to monitor both mouse |
726 | 2496 | clicks and also CA's file descriptors so that ca_poll() can be called | 2524 | clicks and also CA`s file descriptors so that ca_poll() can be called |
727 | 2497 | immediately when CA server messages arrives over the network.</p> | 2525 | immediately when CA server messages arrives over the network.</p> |
728 | 2498 | 2526 | ||
729 | 2499 | <h3><a name="Avoid">Avoid Emulating Bad Practices that May Still be | 2527 | <h3><a name="Avoid">Avoid Emulating Bad Practices that May Still be |
730 | 2500 | Common</a></h3> | 2528 | Common</a></h3> |
731 | 2501 | 2529 | ||
732 | 2502 | <p>With the embryonic releases of EPICS it was a common practice to examine a | 2530 | <p>With the embryonic releases of EPICS it was a common practice to examine a |
734 | 2503 | channel's connection state, its native type, and its native element count by | 2531 | channel`s connection state, its native type, and its native element count by |
735 | 2504 | directly accessing fields in a structure using a pointer stored in type | 2532 | directly accessing fields in a structure using a pointer stored in type |
736 | 2505 | <code>chid</code>. Likewise, a user private pointer in the per channel | 2533 | <code>chid</code>. Likewise, a user private pointer in the per channel |
737 | 2506 | structure was also commonly set by directly accessing fields in the channel | 2534 | structure was also commonly set by directly accessing fields in the channel |
738 | @@ -2530,9 +2558,9 @@ | |||
739 | 2530 | <ul> | 2558 | <ul> |
740 | 2531 | <li>The vxWorks shell thread runs at the very highest priority in the system | 2559 | <li>The vxWorks shell thread runs at the very highest priority in the system |
741 | 2532 | and therefore socket calls are made at a priority that is above the | 2560 | and therefore socket calls are made at a priority that is above the |
745 | 2533 | priority of tNetTask - a practice that has caused the WRS IP kernel | 2561 | priority of tNetTask. This has caused problems with the WRS IP kernel in |
746 | 2534 | to get sick in the past. That symptom was observed some time ago, but we | 2562 | the past. That symptom was observed some time ago, but we don`t know |
747 | 2535 | don't know if WRS has fixed the problem.</li> | 2563 | if WRS has fixed the problem.</li> |
748 | 2536 | </ul> | 2564 | </ul> |
749 | 2537 | <ul> | 2565 | <ul> |
750 | 2538 | <li>The vxWorks shell thread runs at the very highest priority in the system | 2566 | <li>The vxWorks shell thread runs at the very highest priority in the system |
751 | @@ -2547,7 +2575,7 @@ | |||
752 | 2547 | <ul> | 2575 | <ul> |
753 | 2548 | <li>In EPICS R3.13 the CA client library installed vxWorks task exit handlers | 2576 | <li>In EPICS R3.13 the CA client library installed vxWorks task exit handlers |
754 | 2549 | behaved strangely if CA functions were called from the vxWorks shell, | 2577 | behaved strangely if CA functions were called from the vxWorks shell, |
756 | 2550 | ca_task_exit() wasn't called, and the vxWorks shell restarted. In | 2578 | ca_task_exit() wasn`t called, and the vxWorks shell restarted. In |
757 | 2551 | EPICS R3.14 vxWorks task exit handlers are not installed and therefore | 2579 | EPICS R3.14 vxWorks task exit handlers are not installed and therefore |
758 | 2552 | cleanup is solely the responsibility of the user. With EPICS R3.14 the user | 2580 | cleanup is solely the responsibility of the user. With EPICS R3.14 the user |
759 | 2553 | must call ca_context_destroy or ca_task_exit to clean up on vxWorks. This | 2581 | must call ca_context_destroy or ca_task_exit to clean up on vxWorks. This |
760 | @@ -2565,10 +2593,10 @@ | |||
761 | 2565 | <h2><a name="Function Call Reference"></a>Function Call Reference</h2> | 2593 | <h2><a name="Function Call Reference"></a>Function Call Reference</h2> |
762 | 2566 | 2594 | ||
763 | 2567 | <h3><code><a name="ca_context_create">ca_context_create()</a></code></h3> | 2595 | <h3><code><a name="ca_context_create">ca_context_create()</a></code></h3> |
768 | 2568 | <pre>#include <cadef.h> | 2596 | <pre><code>#include <cadef.h> |
769 | 2569 | enum ca_preemptive_callback_select | 2597 | enum ca_preemptive_callback_select |
770 | 2570 | { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; | 2598 | { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; |
771 | 2571 | int ca_context_create ( enum ca_preemptive_callback_select SELECT );</pre> | 2599 | int ca_context_create ( enum ca_preemptive_callback_select SELECT );</code></pre> |
772 | 2572 | 2600 | ||
773 | 2573 | <h4>Description</h4> | 2601 | <h4>Description</h4> |
774 | 2574 | 2602 | ||
775 | @@ -2592,7 +2620,7 @@ | |||
776 | 2592 | are two implications to consider. </dd> | 2620 | are two implications to consider. </dd> |
777 | 2593 | <dd><p>First, if preemptive callback mode is enabled the developer must | 2621 | <dd><p>First, if preemptive callback mode is enabled the developer must |
778 | 2594 | provide mutual exclusion protection for his data structures. In this mode | 2622 | provide mutual exclusion protection for his data structures. In this mode |
780 | 2595 | it's possible for two threads to touch the application's data structures | 2623 | it`s possible for two threads to touch the application`s data structures |
781 | 2596 | at once: this might be the initializing thread (the thread that called | 2624 | at once: this might be the initializing thread (the thread that called |
782 | 2597 | ca_context_create) and also a private thread created by the CA client | 2625 | ca_context_create) and also a private thread created by the CA client |
783 | 2598 | library for the purpose of receiving network messages and calling | 2626 | library for the purpose of receiving network messages and calling |
784 | @@ -2631,7 +2659,7 @@ | |||
785 | 2631 | 2659 | ||
786 | 2632 | <h4>Description</h4> | 2660 | <h4>Description</h4> |
787 | 2633 | 2661 | ||
789 | 2634 | <p>Shut down the calling thread's channel access client context and free any | 2662 | <p>Shut down the calling thread`s channel access client context and free any |
790 | 2635 | resources allocated. Detach the calling thread from any CA client context.</p> | 2663 | resources allocated. Detach the calling thread from any CA client context.</p> |
791 | 2636 | 2664 | ||
792 | 2637 | <p>Any user-created threads that have attached themselves to the CA context | 2665 | <p>Any user-created threads that have attached themselves to the CA context |
793 | @@ -2647,8 +2675,13 @@ | |||
794 | 2647 | <p>On many OS that execute programs in a process based environment the | 2675 | <p>On many OS that execute programs in a process based environment the |
795 | 2648 | resources used by the client library such as sockets and allocated memory are | 2676 | resources used by the client library such as sockets and allocated memory are |
796 | 2649 | automatically released by the system when the process exits and | 2677 | automatically released by the system when the process exits and |
797 | 2678 | <<<<<<< TREE | ||
798 | 2650 | ca_context_destroy() hasn't been called, but on light weight systems such as | 2679 | ca_context_destroy() hasn't been called, but on light weight systems such as |
799 | 2651 | vxWorks or RTEMS no cleanup occurs unless the application calls | 2680 | vxWorks or RTEMS no cleanup occurs unless the application calls |
800 | 2681 | ======= | ||
801 | 2682 | ca_context_destroy() hasn`t been called, but on light weight systems such as | ||
802 | 2683 | vxWorks or RTEMS no cleanup occurs unless the application call | ||
803 | 2684 | >>>>>>> MERGE-SOURCE | ||
804 | 2652 | ca_context_destroy().</p> | 2685 | ca_context_destroy().</p> |
805 | 2653 | 2686 | ||
806 | 2654 | <h4>Returns</h4> | 2687 | <h4>Returns</h4> |
807 | @@ -2659,27 +2692,42 @@ | |||
808 | 2659 | 2692 | ||
809 | 2660 | <p><a href="#ca_context_create">ca_context_create</a>()</p> | 2693 | <p><a href="#ca_context_create">ca_context_create</a>()</p> |
810 | 2661 | 2694 | ||
811 | 2695 | <<<<<<< TREE | ||
812 | 2662 | <h3><code><a name="ca_create_channel">ca_create_channel()</a></code></h3> | 2696 | <h3><code><a name="ca_create_channel">ca_create_channel()</a></code></h3> |
813 | 2663 | <pre>#include <cadef.h> | 2697 | <pre>#include <cadef.h> |
814 | 2664 | typedef void ( caCh ) (struct connection_handler_args); | 2698 | typedef void ( caCh ) (struct connection_handler_args); |
815 | 2665 | int ca_create_channel (const char *PVNAME, | 2699 | int ca_create_channel (const char *PVNAME, |
816 | 2666 | caCh *USERFUNC, void *PUSER, | 2700 | caCh *USERFUNC, void *PUSER, |
817 | 2667 | capri PRIORITY, chid *PCHID );</pre> | 2701 | capri PRIORITY, chid *PCHID );</pre> |
818 | 2702 | ======= | ||
819 | 2703 | <h3><a name="ca_create_channel"><code>ca_create_channel()</code></a></h3> | ||
820 | 2704 | <pre><code>#include <cadef.h> | ||
821 | 2705 | typedef void ( *pCallBack ) ( | ||
822 | 2706 | struct connection_handler_args ); | ||
823 | 2707 | int ca_create_channel | ||
824 | 2708 | ( | ||
825 | 2709 | const char *PROCESS_VARIABLE_NAME, | ||
826 | 2710 | caCh *USERFUNC, | ||
827 | 2711 | void *PUSER, | ||
828 | 2712 | capri priority, | ||
829 | 2713 | chid *PCHID | ||
830 | 2714 | );</code></pre> | ||
831 | 2715 | >>>>>>> MERGE-SOURCE | ||
832 | 2668 | 2716 | ||
833 | 2669 | <h4>Description</h4> | 2717 | <h4>Description</h4> |
834 | 2670 | 2718 | ||
835 | 2671 | <p>This function creates a CA channel. The CA client library will attempt to | 2719 | <p>This function creates a CA channel. The CA client library will attempt to |
837 | 2672 | establish and maintain a virtual circuit between the caller's application and a | 2720 | establish and maintain a virtual circuit between the caller`s application and a |
838 | 2673 | named process variable in a CA server. Each call to ca_create_channel allocates | 2721 | named process variable in a CA server. Each call to ca_create_channel allocates |
839 | 2674 | resources in the CA client library and potentially also a CA server. The | 2722 | resources in the CA client library and potentially also a CA server. The |
840 | 2675 | function ca_clear_channel() is used to release these resources. If successful, | 2723 | function ca_clear_channel() is used to release these resources. If successful, |
842 | 2676 | the routine writes a channel identifier into the user's variable of type | 2724 | the routine writes a channel identifier into the user`s variable of type |
843 | 2677 | "chid". This identifier can be used with any channel access call that operates | 2725 | "chid". This identifier can be used with any channel access call that operates |
844 | 2678 | on a channel.</p> | 2726 | on a channel.</p> |
845 | 2679 | 2727 | ||
846 | 2680 | <p>The circuit may be initially connected or disconnected depending on the | 2728 | <p>The circuit may be initially connected or disconnected depending on the |
847 | 2681 | state of the network and the location of the channel. A channel will only enter | 2729 | state of the network and the location of the channel. A channel will only enter |
849 | 2682 | a connected state after server's address is determined, and only if channel | 2730 | a connected state after server`s address is determined, and only if channel |
850 | 2683 | access successfully establishes a virtual circuit through the network to the | 2731 | access successfully establishes a virtual circuit through the network to the |
851 | 2684 | server. Channel access routines that send a request to a server will return | 2732 | server. Channel access routines that send a request to a server will return |
852 | 2685 | ECA_DISCONNCHID if the channel is currently disconnected.</p> | 2733 | ECA_DISCONNCHID if the channel is currently disconnected.</p> |
853 | @@ -2703,7 +2751,7 @@ | |||
854 | 2703 | 2751 | ||
855 | 2704 | <p>Due to the inherently transient nature of network connections the order of | 2752 | <p>Due to the inherently transient nature of network connections the order of |
856 | 2705 | connection call backs relative to the order that ca_create_channel() calls are | 2753 | connection call backs relative to the order that ca_create_channel() calls are |
858 | 2706 | made by the application can't be guaranteed, and application programs may need | 2754 | made by the application can`t be guaranteed, and application programs may need |
859 | 2707 | to be prepared for a connected channel to enter a disconnected state at any | 2755 | to be prepared for a connected channel to enter a disconnected state at any |
860 | 2708 | time.</p> | 2756 | time.</p> |
861 | 2709 | 2757 | ||
862 | @@ -2723,29 +2771,29 @@ | |||
863 | 2723 | </dl> | 2771 | </dl> |
864 | 2724 | <dl> | 2772 | <dl> |
865 | 2725 | <dt><code>USERFUNC</code></dt> | 2773 | <dt><code>USERFUNC</code></dt> |
867 | 2726 | <dd>Optional address of the user's call back function to be run when the | 2774 | <dd>Optional address of the user`s call back function to be run when the |
868 | 2727 | connection state changes. Casual users of channel access may decide to | 2775 | connection state changes. Casual users of channel access may decide to |
869 | 2728 | set this field to nil or 0 if they do not need to have a call back | 2776 | set this field to nil or 0 if they do not need to have a call back |
872 | 2729 | function run in response to each connection state change event. | 2777 | function run in response to each connection state change event. |
873 | 2730 | <p>The following structure is passed <em>by value </em>to the user's | 2778 | <p>The following structure is passed <em>by value </em>to the user`s |
874 | 2731 | connection connection callback function. The <code>op</code> field will | 2779 | connection connection callback function. The <code>op</code> field will |
875 | 2732 | be set by the CA client library to <code>CA_OP_CONN_UP</code> when the | 2780 | be set by the CA client library to <code>CA_OP_CONN_UP</code> when the |
876 | 2733 | channel connects, and to <code>CA_OP_CONN_DOWN</code> when the channel | 2781 | channel connects, and to <code>CA_OP_CONN_DOWN</code> when the channel |
877 | 2734 | disconnects. See <code><a href="#ca_puser">ca_puser</a></code> if the | 2782 | disconnects. See <code><a href="#ca_puser">ca_puser</a></code> if the |
878 | 2735 | <code>PUSER</code> argument is required in your callback | 2783 | <code>PUSER</code> argument is required in your callback |
879 | 2736 | handler<code>.</code></p> | 2784 | handler<code>.</code></p> |
884 | 2737 | <pre>struct ca_connection_handler_args { | 2785 | <pre><code>struct ca_connection_handler_args { |
885 | 2738 | chanId chid; /* channel id */ | 2786 | chanId chid; /* channel id */ |
886 | 2739 | long op; /* one of CA_OP_CONN_UP or CA_OP_CONN_DOWN */ | 2787 | long op; /* one of CA_OP_CONN_UP or CA_OP_CONN_DOWN */ |
887 | 2740 | };</pre> | 2788 | };</code></pre> |
888 | 2741 | </dd> | 2789 | </dd> |
889 | 2742 | </dl> | 2790 | </dl> |
890 | 2743 | <dl> | 2791 | <dl> |
891 | 2744 | <dt><code>PUSER</code></dt> | 2792 | <dt><code>PUSER</code></dt> |
896 | 2745 | <dd>The value of this void pointer argument is retained in | 2793 | <dd>The value of this void pointer argument is retained in storage |
897 | 2746 | storage associated with the specified channel. See the MACROS manual page | 2794 | associated with the specified channel. See the MACROS manual page for |
898 | 2747 | for reading and writing this field. Casual users of channel access may | 2795 | reading and writing this field. Casual users of channel access may wish |
899 | 2748 | wish to set this field to nil or 0.</dd> | 2796 | to set this field to nil or 0.</dd> |
900 | 2749 | </dl> | 2797 | </dl> |
901 | 2750 | <dl> | 2798 | <dl> |
902 | 2751 | <dt><code>PRIORITY</code></dt> | 2799 | <dt><code>PRIORITY</code></dt> |
903 | @@ -2778,9 +2826,9 @@ | |||
904 | 2778 | 2826 | ||
905 | 2779 | <p>ECA_ALLOCMEM - Unable to allocate memory</p> | 2827 | <p>ECA_ALLOCMEM - Unable to allocate memory</p> |
906 | 2780 | 2828 | ||
910 | 2781 | <h3><code><a name="ca_clear_channel">ca_clear_channel()</a></code></h3> | 2829 | <h3><a name="ca_clear_channel"></a><code>ca_clear_channel()</code></h3> |
911 | 2782 | <pre>#include <cadef.h> | 2830 | <pre><code>#include <cadef.h> |
912 | 2783 | int ca_clear_channel (chid CHID);</pre> | 2831 | int ca_clear_channel (chid CHID);</code></pre> |
913 | 2784 | 2832 | ||
914 | 2785 | <h4>Description</h4> | 2833 | <h4>Description</h4> |
915 | 2786 | 2834 | ||
916 | @@ -2808,8 +2856,8 @@ | |||
917 | 2808 | 2856 | ||
918 | 2809 | <p>ECA_BADCHID - Corrupted CHID</p> | 2857 | <p>ECA_BADCHID - Corrupted CHID</p> |
919 | 2810 | 2858 | ||
922 | 2811 | <h3><code><a name="ca_put">ca_put()</a></code></h3> | 2859 | <h3><a name="ca_put"><code>ca_put()</code></a></h3> |
923 | 2812 | <pre>#include <cadef.h> | 2860 | <pre><code>#include <cadef.h> |
924 | 2813 | int ca_put ( chtype TYPE, | 2861 | int ca_put ( chtype TYPE, |
925 | 2814 | chid CHID, void *PVALUE ); | 2862 | chid CHID, void *PVALUE ); |
926 | 2815 | int ca_array_put ( chtype TYPE, unsigned long COUNT, | 2863 | int ca_array_put ( chtype TYPE, unsigned long COUNT, |
927 | @@ -2820,13 +2868,21 @@ | |||
928 | 2820 | caEventCallBackFunc PFUNC, void *USERARG ); | 2868 | caEventCallBackFunc PFUNC, void *USERARG ); |
929 | 2821 | int ca_array_put_callback ( chtype TYPE, unsigned long COUNT, | 2869 | int ca_array_put_callback ( chtype TYPE, unsigned long COUNT, |
930 | 2822 | chid CHID, const void *PVALUE, | 2870 | chid CHID, const void *PVALUE, |
931 | 2871 | <<<<<<< TREE | ||
932 | 2823 | caEventCallBackFunc PFUNC, void *USERARG );</pre> | 2872 | caEventCallBackFunc PFUNC, void *USERARG );</pre> |
933 | 2873 | ======= | ||
934 | 2874 | pCallBack PFUNC, void *USERARG );</code></pre> | ||
935 | 2875 | >>>>>>> MERGE-SOURCE | ||
936 | 2824 | 2876 | ||
937 | 2825 | <h4>Description</h4> | 2877 | <h4>Description</h4> |
938 | 2826 | 2878 | ||
939 | 2827 | <p>Write a scalar or array value to a process variable.</p> | 2879 | <p>Write a scalar or array value to a process variable.</p> |
940 | 2828 | 2880 | ||
941 | 2881 | <<<<<<< TREE | ||
942 | 2829 | <p>When ca_put or ca_array_put are invoked the client will receive no response | 2882 | <p>When ca_put or ca_array_put are invoked the client will receive no response |
943 | 2883 | ======= | ||
944 | 2884 | <p>When ca_array_put or ca_put are invoked the client will receive no response | ||
945 | 2885 | >>>>>>> MERGE-SOURCE | ||
946 | 2830 | unless the request can not be fulfilled in the server. If unsuccessful an | 2886 | unless the request can not be fulfilled in the server. If unsuccessful an |
947 | 2831 | exception handler is run on the client side.</p> | 2887 | exception handler is run on the client side.</p> |
948 | 2832 | 2888 | ||
949 | @@ -2838,7 +2894,7 @@ | |||
950 | 2838 | </p> | 2894 | </p> |
951 | 2839 | 2895 | ||
952 | 2840 | <p>If the channel disconnects before a put callback request can be completed, | 2896 | <p>If the channel disconnects before a put callback request can be completed, |
954 | 2841 | then the client's call back function is called with failure status, but this | 2897 | then the client`s call back function is called with failure status, but this |
955 | 2842 | does not guarantee that the server did not receive and process the request | 2898 | does not guarantee that the server did not receive and process the request |
956 | 2843 | before the disconnect. If a connection is lost and then resumed outstanding ca | 2899 | before the disconnect. If a connection is lost and then resumed outstanding ca |
957 | 2844 | put requests are not automatically reissued following reconnect.</p> | 2900 | put requests are not automatically reissued following reconnect.</p> |
958 | @@ -2852,8 +2908,8 @@ | |||
959 | 2852 | 2908 | ||
960 | 2853 | <h4>Description (IOC Database Specific)</h4> | 2909 | <h4>Description (IOC Database Specific)</h4> |
961 | 2854 | 2910 | ||
964 | 2855 | <p>A CA put request causes the record to process if the record's SCAN field is | 2911 | <p>A CA put request causes the record to process if the record`s SCAN field is |
965 | 2856 | set to passive, and the field being written has it's process passive attribute | 2912 | set to passive, and the field being written has its process passive attribute |
966 | 2857 | set to true. If such a record is already processing when a put request is | 2913 | set to true. If such a record is already processing when a put request is |
967 | 2858 | initiated the specified field is written immediately, and the record is | 2914 | initiated the specified field is written immediately, and the record is |
968 | 2859 | scheduled to process again as soon as it finishes processing. Earlier instances | 2915 | scheduled to process again as soon as it finishes processing. Earlier instances |
969 | @@ -2861,21 +2917,45 @@ | |||
970 | 2861 | discarded, but the last put request initiated is always written and | 2917 | discarded, but the last put request initiated is always written and |
971 | 2862 | processed.</p> | 2918 | processed.</p> |
972 | 2863 | 2919 | ||
982 | 2864 | <p>A CA put <span style="font-style: italic;">callback</span> request causes | 2920 | <p>A CA put <em>callback</em> request causes the record to process if the |
983 | 2865 | the record to process if the record's SCAN field is set to passive, and the | 2921 | record`s SCAN field is set to passive, and the field being written has its |
984 | 2866 | field being written has it's process passive attribute set to true. For such a | 2922 | process passive attribute set to true. For such a record, the user`s put |
985 | 2867 | record, the user's put callback function is not called until after the record, | 2923 | callback function is not called until after the record, and any records that |
986 | 2868 | and any records that the record links to, finish processing. If such a record | 2924 | the record links to, finish processing. If such a record is already processing |
987 | 2869 | is already processing when a put <span | 2925 | when a put <em>callback</em> request is initiated the put <em>callback</em> |
988 | 2870 | style="font-style: italic;">callback</span> request is initiated the put <span | 2926 | request is postponed until the record, and any records it links to, finish |
989 | 2871 | style="font-style: italic;">callback</span> request is postponed until the | 2927 | processing.</p> |
981 | 2872 | record, and any records it links to, finish processing.</p> | ||
990 | 2873 | 2928 | ||
993 | 2874 | <p>If the record's SCAN field is not set to passive, or the field being written | 2929 | <p>If the record`s SCAN field is not set to passive, or the field being written |
994 | 2875 | has it's process passive attribute set to false then the CA put or CA put | 2930 | has its process passive attribute set to false, then the CA put or CA put |
995 | 2876 | callback request cause the specified field to be immediately written, but they | 2931 | callback request cause the specified field to be immediately written, but they |
996 | 2877 | do not cause the record to be processed.</p> | 2932 | do not cause the record to be processed.</p> |
997 | 2878 | 2933 | ||
998 | 2934 | <h4>Description (IOC Database Specific)</h4> | ||
999 | 2935 | |||
1000 | 2936 | <p>A CA put request causes the record to process if the record`s SCAN field is | ||
1001 | 2937 | set to passive, and the field being written has its process passive attribute | ||
1002 | 2938 | set to true. If such a record is already processing when a put request is | ||
1003 | 2939 | initiated the specified field is written immediately, and the record is | ||
1004 | 2940 | scheduled to process again as soon as it finishes processing. Earlier instances | ||
1005 | 2941 | of multiple put requests initiated while the record is being processing may be | ||
1006 | 2942 | discarded, but the last put request initiated is always written and | ||
1007 | 2943 | processed.</p> | ||
1008 | 2944 | |||
1009 | 2945 | <p>A CA put <em>callback</em> request causes the record to process if the | ||
1010 | 2946 | record`s SCAN field is set to passive, and the field being written has its | ||
1011 | 2947 | process passive attribute set to true. For such a record, the user`s put | ||
1012 | 2948 | callback function is not called until after the record, and any records that | ||
1013 | 2949 | the record links to, finish processing. If such a record is already processing | ||
1014 | 2950 | when a put <em>callback</em> request is initiated the put <em>callback</em> | ||
1015 | 2951 | request is postponed until the record, and any records it links to, finish | ||
1016 | 2952 | processing.</p> | ||
1017 | 2953 | |||
1018 | 2954 | <p>If the record`s SCAN field is not set to passive, or the field being written | ||
1019 | 2955 | has its process passive attribute set to false then the CA put or CA put | ||
1020 | 2956 | <em>callback</em> request cause the specified field to be immediately written, | ||
1021 | 2957 | but they do not cause the record to be processed.</p> | ||
1022 | 2958 | |||
1023 | 2879 | <h4>Arguments</h4> | 2959 | <h4>Arguments</h4> |
1024 | 2880 | <dl> | 2960 | <dl> |
1025 | 2881 | <dt><code>TYPE</code></dt> | 2961 | <dt><code>TYPE</code></dt> |
1026 | @@ -2958,7 +3038,7 @@ | |||
1027 | 2958 | requests are not automatically reissued following reconnect.</p> | 3038 | requests are not automatically reissued following reconnect.</p> |
1028 | 2959 | 3039 | ||
1029 | 2960 | <p>When ca_get_callback or ca_array_get_callback are invoked a value is read | 3040 | <p>When ca_get_callback or ca_array_get_callback are invoked a value is read |
1031 | 2961 | from the channel and then the user's callback is invoked with a pointer to the | 3041 | from the channel and then the user`s callback is invoked with a pointer to the |
1032 | 2962 | retrieved value. Note that ca_pend_io will not block for the delivery of values | 3042 | retrieved value. Note that ca_pend_io will not block for the delivery of values |
1033 | 2963 | requested by ca_get_callback. If the channel disconnects before a ca get | 3043 | requested by ca_get_callback. If the channel disconnects before a ca get |
1034 | 2964 | callback request can be completed, then the clients call back function is | 3044 | callback request can be completed, then the clients call back function is |
1035 | @@ -2974,7 +3054,14 @@ | |||
1036 | 2974 | 3054 | ||
1037 | 2975 | <h4>Description (IOC Database Specific)</h4> | 3055 | <h4>Description (IOC Database Specific)</h4> |
1038 | 2976 | 3056 | ||
1040 | 2977 | <p>A CA get or CA get callback request causes the record's field to be read | 3057 | <p>A CA get or CA get callback request causes the record`s field to be read |
1041 | 3058 | immediately independent of whether the record is currently being processed or | ||
1042 | 3059 | not. There is currently no mechanism in place to cause a record to be processed | ||
1043 | 3060 | when a CA get request is initiated.</p> | ||
1044 | 3061 | |||
1045 | 3062 | <h4>Description (IOC Database Specific)</h4> | ||
1046 | 3063 | |||
1047 | 3064 | <p>A CA get or CA get callback request causes the record`s field to be read | ||
1048 | 2978 | immediately independent of whether the record is currently being processed or | 3065 | immediately independent of whether the record is currently being processed or |
1049 | 2979 | not. There is currently no mechanism in place to cause a record to be processed | 3066 | not. There is currently no mechanism in place to cause a record to be processed |
1050 | 2980 | when a CA get request is initiated.</p> | 3067 | when a CA get request is initiated.</p> |
1051 | @@ -3042,6 +3129,7 @@ | |||
1052 | 3042 | 3129 | ||
1053 | 3043 | <p><a href="#ca_sg_get">ca_sg_array_get</a>()</p> | 3130 | <p><a href="#ca_sg_get">ca_sg_array_get</a>()</p> |
1054 | 3044 | 3131 | ||
1055 | 3132 | <<<<<<< TREE | ||
1056 | 3045 | <h3><code><a name="ca_add_event">ca_create_subscription()</a></code></h3> | 3133 | <h3><code><a name="ca_add_event">ca_create_subscription()</a></code></h3> |
1057 | 3046 | <pre>#include <cadef.h> | 3134 | <pre>#include <cadef.h> |
1058 | 3047 | typedef void ( caEventCallBackFunc ) (struct event_handler_args); | 3135 | typedef void ( caEventCallBackFunc ) (struct event_handler_args); |
1059 | @@ -3049,25 +3137,35 @@ | |||
1060 | 3049 | chid CHID, unsigned long MASK, | 3137 | chid CHID, unsigned long MASK, |
1061 | 3050 | caEventCallBackFunc USERFUNC, void *USERARG, | 3138 | caEventCallBackFunc USERFUNC, void *USERARG, |
1062 | 3051 | evid *PEVID );</pre> | 3139 | evid *PEVID );</pre> |
1063 | 3140 | ======= | ||
1064 | 3141 | <h3><a name="ca_add_event"></a><code>ca_create_subscription()</code></h3> | ||
1065 | 3142 | <pre><code>#include <cadef.h> | ||
1066 | 3143 | typedef void ( *pCallBack ) ( | ||
1067 | 3144 | struct event_handler_args ); | ||
1068 | 3145 | int ca_create_subscription ( chtype TYPE, | ||
1069 | 3146 | unsigned long COUNT, chid CHID, | ||
1070 | 3147 | unsigned long MASK, pCallBack USERFUNC, void *USERARG, | ||
1071 | 3148 | evid *PEVID );</code></pre> | ||
1072 | 3149 | >>>>>>> MERGE-SOURCE | ||
1073 | 3052 | 3150 | ||
1074 | 3053 | <h4>Description</h4> | 3151 | <h4>Description</h4> |
1075 | 3054 | 3152 | ||
1076 | 3055 | <p>Register a state change subscription and specify a call back function to be | 3153 | <p>Register a state change subscription and specify a call back function to be |
1077 | 3056 | invoked whenever the process variable undergoes significant state changes. A | 3154 | invoked whenever the process variable undergoes significant state changes. A |
1079 | 3057 | significant change can be a change in the process variable's value, alarm | 3155 | significant change can be a change in the process variable`s value, alarm |
1080 | 3058 | status, or alarm severity. In the process control function block database the | 3156 | status, or alarm severity. In the process control function block database the |
1081 | 3059 | deadband field determines the magnitude of a significant change for for the | 3157 | deadband field determines the magnitude of a significant change for for the |
1083 | 3060 | process variable's value. Each call to this function consumes resources in the | 3158 | process variable`s value. Each call to this function consumes resources in the |
1084 | 3061 | client library and potentially a CA server until one of ca_clear_channel or | 3159 | client library and potentially a CA server until one of ca_clear_channel or |
1085 | 3062 | ca_clear_event is called.</p> | 3160 | ca_clear_event is called.</p> |
1086 | 3063 | 3161 | ||
1087 | 3064 | <p>Subscriptions may be installed or canceled against both connected and | 3162 | <p>Subscriptions may be installed or canceled against both connected and |
1088 | 3065 | disconnected channels. The specified USERFUNC is called once immediately after | 3163 | disconnected channels. The specified USERFUNC is called once immediately after |
1090 | 3066 | the subscription is installed with the process variable's current state if the | 3164 | the subscription is installed with the process variable`s current state if the |
1091 | 3067 | process variable is connected. Otherwise, the specified USERFUNC is called | 3165 | process variable is connected. Otherwise, the specified USERFUNC is called |
1092 | 3068 | immediately after establishing a connection (or reconnection) with the process | 3166 | immediately after establishing a connection (or reconnection) with the process |
1093 | 3069 | variable. The specified USERFUNC is called immediately with the process | 3167 | variable. The specified USERFUNC is called immediately with the process |
1095 | 3070 | variable's current state from within ca_add_event() if the client and the | 3168 | variable`s current state from within ca_add_event() if the client and the |
1096 | 3071 | process variable share the same address space.</p> | 3169 | process variable share the same address space.</p> |
1097 | 3072 | 3170 | ||
1098 | 3073 | <p>If a subscription is installed on a channel in a disconnected state then the | 3171 | <p>If a subscription is installed on a channel in a disconnected state then the |
1099 | @@ -3124,8 +3222,8 @@ | |||
1100 | 3124 | <dl> | 3222 | <dl> |
1101 | 3125 | <dt><code>PEVID</code></dt> | 3223 | <dt><code>PEVID</code></dt> |
1102 | 3126 | <dd>This is a pointer to user supplied event id which is overwritten if | 3224 | <dd>This is a pointer to user supplied event id which is overwritten if |
1105 | 3127 | successful. This event id can later be used to clear a specific | 3225 | successful. This event id can later be used to clear a specific event. |
1106 | 3128 | event. This option may may be omitted by passing a nil pointer.</dd> | 3226 | This option may may be omitted by passing a nill pointer.</dd> |
1107 | 3129 | </dl> | 3227 | </dl> |
1108 | 3130 | <dl> | 3228 | <dl> |
1109 | 3131 | <dt><code>MASK</code></dt> | 3229 | <dt><code>MASK</code></dt> |
1110 | @@ -3142,7 +3240,7 @@ | |||
1111 | 3142 | </ul> | 3240 | </ul> |
1112 | 3143 | <p>For functions above that do not include a trigger specification, | 3241 | <p>For functions above that do not include a trigger specification, |
1113 | 3144 | events will be triggered when there are significant changes in the | 3242 | events will be triggered when there are significant changes in the |
1115 | 3145 | channel's value or when there are changes in the channel's alarm state. | 3243 | channel`s value or when there are changes in the channel`s alarm state. |
1116 | 3146 | This is the same as "DBE_VALUE | DBE_ALARM."</p> | 3244 | This is the same as "DBE_VALUE | DBE_ALARM."</p> |
1117 | 3147 | </dd> | 3245 | </dd> |
1118 | 3148 | </dl> | 3246 | </dl> |
1119 | @@ -3232,9 +3330,9 @@ | |||
1120 | 3232 | network delays such as Ethernet collision exponential back off until | 3330 | network delays such as Ethernet collision exponential back off until |
1121 | 3233 | retransmission delays which can be quite long on overloaded networks.</p> | 3331 | retransmission delays which can be quite long on overloaded networks.</p> |
1122 | 3234 | 3332 | ||
1126 | 3235 | <p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine will | 3333 | <p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine |
1127 | 3236 | not process CA's background activities if none of the selected IO requests are | 3334 | will not process CA`s background activities if none of the selected IO requests |
1128 | 3237 | pending.</p> | 3335 | are pending.</p> |
1129 | 3238 | 3336 | ||
1130 | 3239 | <h4>Arguments</h4> | 3337 | <h4>Arguments</h4> |
1131 | 3240 | <dl> | 3338 | <dl> |
1132 | @@ -3303,7 +3401,7 @@ | |||
1133 | 3303 | requests.</p> | 3401 | requests.</p> |
1134 | 3304 | 3402 | ||
1135 | 3305 | <p>Both <code>ca_pend_event</code> and <code>ca_poll</code> return ECA_TIMEOUT | 3403 | <p>Both <code>ca_pend_event</code> and <code>ca_poll</code> return ECA_TIMEOUT |
1137 | 3306 | when successful. This behavior probably isn't intuitive, but it is preserved to | 3404 | when successful. This behavior probably isn`t intuitive, but it is preserved to |
1138 | 3307 | insure backwards compatibility.</p> | 3405 | insure backwards compatibility.</p> |
1139 | 3308 | 3406 | ||
1140 | 3309 | <p>See also <a href="#Thread">Thread Safety and Preemptive Callback to User | 3407 | <p>See also <a href="#Thread">Thread Safety and Preemptive Callback to User |
1141 | @@ -3329,8 +3427,8 @@ | |||
1142 | 3329 | 3427 | ||
1143 | 3330 | <h4>Description</h4> | 3428 | <h4>Description</h4> |
1144 | 3331 | 3429 | ||
1147 | 3332 | <p>Flush outstanding IO requests to the server. This routine might be useful | 3430 | <p>Flush outstanding IO requests to the server. This routine might be useful to |
1148 | 3333 | to users who need to flush requests prior to performing client side labor in | 3431 | users who need to flush requests prior to performing client side labor in |
1149 | 3334 | parallel with labor performed in the server.</p> | 3432 | parallel with labor performed in the server.</p> |
1150 | 3335 | 3433 | ||
1151 | 3336 | <p>Outstanding requests are also sent whenever the buffer which holds them | 3434 | <p>Outstanding requests are also sent whenever the buffer which holds them |
1152 | @@ -3340,10 +3438,10 @@ | |||
1153 | 3340 | 3438 | ||
1154 | 3341 | <p>ECA_NORMAL - Normal successful completion</p> | 3439 | <p>ECA_NORMAL - Normal successful completion</p> |
1155 | 3342 | 3440 | ||
1158 | 3343 | <h3><code><a name="ca_signal">ca_signal()</a></code></h3> | 3441 | <h3><code><a name="ca_signal">ca_signal</a>()</code></h3> |
1159 | 3344 | <pre>#include <cadef.h> | 3442 | <pre><code>#include <cadef.h> |
1160 | 3345 | int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING ); | 3443 | int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING ); |
1162 | 3346 | void SEVCHK( CA_STATUS, CONTEXT_STRING );</pre> | 3444 | void SEVCHK( CA_STATUS, CONTEXT_STRING );</code></pre> |
1163 | 3347 | 3445 | ||
1164 | 3348 | <h4>Description</h4> | 3446 | <h4>Description</h4> |
1165 | 3349 | 3447 | ||
1166 | @@ -3359,8 +3457,8 @@ | |||
1167 | 3359 | code testing the status returned from each channel access call.</p> | 3457 | code testing the status returned from each channel access call.</p> |
1168 | 3360 | 3458 | ||
1169 | 3361 | <h4>Examples</h4> | 3459 | <h4>Examples</h4> |
1172 | 3362 | <pre>status = ca_context_create (...); | 3460 | <pre><code>status = ca_context_create (...); |
1173 | 3363 | SEVCHK ( status, "Unable to create a CA client context" );</pre> | 3461 | SEVCHK ( status, "Unable to create a CA client context" );</code></pre> |
1174 | 3364 | 3462 | ||
1175 | 3365 | <p>If the application only wishes to print the message associated with an error | 3463 | <p>If the application only wishes to print the message associated with an error |
1176 | 3366 | code or test the severity of an error there are also functions provided for | 3464 | code or test the severity of an error there are also functions provided for |
1177 | @@ -3396,7 +3494,7 @@ | |||
1178 | 3396 | information about this type of error is passed from the server to the client in | 3494 | information about this type of error is passed from the server to the client in |
1179 | 3397 | an exception message. When the client receives this exception message an | 3495 | an exception message. When the client receives this exception message an |
1180 | 3398 | exception handler callback is called.The default exception handler prints a | 3496 | exception handler callback is called.The default exception handler prints a |
1182 | 3399 | diagnostic message on the client's standard out and terminates execution if the | 3497 | diagnostic message on the client`s standard out and terminates execution if the |
1183 | 3400 | error condition is severe.</p> | 3498 | error condition is severe.</p> |
1184 | 3401 | 3499 | ||
1185 | 3402 | <p>Note that certain fields in "struct exception_handler_args" are not | 3500 | <p>Note that certain fields in "struct exception_handler_args" are not |
1186 | @@ -3409,23 +3507,23 @@ | |||
1187 | 3409 | <dl> | 3507 | <dl> |
1188 | 3410 | <dt><code>USERFUNC</code></dt> | 3508 | <dt><code>USERFUNC</code></dt> |
1189 | 3411 | <dd>Address of user callback function to be executed when an exceptions | 3509 | <dd>Address of user callback function to be executed when an exceptions |
1192 | 3412 | occur. Passing a nil value causes the default exception handler to be | 3510 | occur. Passing a nill value causes the default exception handler to be |
1193 | 3413 | reinstalled. The following structure is passed by value to the user's | 3511 | reinstalled. The following structure is passed by value to the user`s |
1194 | 3414 | callback function. Currently, the <code>op</code> field can be one of | 3512 | callback function. Currently, the <code>op</code> field can be one of |
1195 | 3415 | <code>CA_OP_GET, CA_OP_PUT, CA_OP_CREATE_CHANNEL, CA_OP_ADD_EVENT, | 3513 | <code>CA_OP_GET, CA_OP_PUT, CA_OP_CREATE_CHANNEL, CA_OP_ADD_EVENT, |
1198 | 3416 | CA_OP_CLEAR_EVENT, or CA_OP_OTHER.</code> | 3514 | CA_OP_CLEAR_EVENT, or CA_OP_OTHER.</code> |
1199 | 3417 | <pre>struct exception_handler_args { | 3515 | <pre><code>struct exception_handler_args { |
1200 | 3418 | void *usr; /* user argument supplied when installed */ | 3516 | void *usr; /* user argument supplied when installed */ |
1201 | 3419 | chanId chid; /* channel id (may be nill) */ | 3517 | chanId chid; /* channel id (may be nill) */ |
1202 | 3420 | long type; /* type requested */ | 3518 | long type; /* type requested */ |
1203 | 3421 | long count; /* count requested */ | 3519 | long count; /* count requested */ |
1205 | 3422 | void *addr; /* user's address to write results of CA_OP_GET */ | 3520 | void *addr; /* user`s address to write results of CA_OP_GET */ |
1206 | 3423 | long stat; /* channel access ECA_XXXX status code */ | 3521 | long stat; /* channel access ECA_XXXX status code */ |
1207 | 3424 | long op; /* CA_OP_GET, CA_OP_PUT, ..., CA_OP_OTHER */ | 3522 | long op; /* CA_OP_GET, CA_OP_PUT, ..., CA_OP_OTHER */ |
1208 | 3425 | const char *ctx; /* a character string containing context info */ | 3523 | const char *ctx; /* a character string containing context info */ |
1209 | 3426 | sonst char *pFile; /* source file name (may be NULL) */ | 3524 | sonst char *pFile; /* source file name (may be NULL) */ |
1210 | 3427 | unsigned lineNo; /* source file line number (may be zero) */ | 3525 | unsigned lineNo; /* source file line number (may be zero) */ |
1212 | 3428 | };</pre> | 3526 | };</code></pre> |
1213 | 3429 | </dd> | 3527 | </dd> |
1214 | 3430 | </dl> | 3528 | </dl> |
1215 | 3431 | <dl> | 3529 | <dl> |
1216 | @@ -3435,7 +3533,7 @@ | |||
1217 | 3435 | </dl> | 3533 | </dl> |
1218 | 3436 | 3534 | ||
1219 | 3437 | <h4>Example</h4> | 3535 | <h4>Example</h4> |
1221 | 3438 | <pre>void ca_exception_handler ( | 3536 | <pre><code>void ca_exception_handler ( |
1222 | 3439 | struct exception_handler_args args) | 3537 | struct exception_handler_args args) |
1223 | 3440 | { | 3538 | { |
1224 | 3441 | char buf[512]; | 3539 | char buf[512]; |
1225 | @@ -3448,11 +3546,11 @@ | |||
1226 | 3448 | pName = "?"; | 3546 | pName = "?"; |
1227 | 3449 | } | 3547 | } |
1228 | 3450 | sprintf ( buf, | 3548 | sprintf ( buf, |
1232 | 3451 | "%s - with request chan=%s op=%d data type=%s count=%d", | 3549 | "%s - with request chan=%s op=%d data type=%s count=%d", |
1233 | 3452 | args.ctx, pName, args.op, dbr_type_to_text ( args.type ), args.count ); | 3550 | args.ctx, pName, args.op, dbr_type_to_text ( args.type ), args.count ); |
1234 | 3453 | ca_signal ( args.stat, buf ); | 3551 | ca_signal ( args.stat, buf ); |
1235 | 3454 | } | 3552 | } |
1237 | 3455 | ca_add_exception_event ( ca_exception_handler , 0 );</pre> | 3553 | ca_add_exception_event ( ca_exception_handler , 0 );</code></pre> |
1238 | 3456 | 3554 | ||
1239 | 3457 | <h4>Returns</h4> | 3555 | <h4>Returns</h4> |
1240 | 3458 | 3556 | ||
1241 | @@ -3460,9 +3558,11 @@ | |||
1242 | 3460 | 3558 | ||
1243 | 3461 | <p></p> | 3559 | <p></p> |
1244 | 3462 | 3560 | ||
1248 | 3463 | <h3><code><a name="ca_add_fd_registration">ca_add_fd_registration()</a></code></h3> | 3561 | <h3><code><a name="ca_add_fd_" |
1249 | 3464 | <pre>#include <cadef.h> | 3562 | id="ca_add_fd_registration">ca_add_fd_registration()</a></code></h3> |
1250 | 3465 | int ca_add_fd_registration ( void ( USERFUNC * ) ( void *USERARG, int FD, int OPENED ), void * USERARG )</pre> | 3563 | <pre><code>#include <cadef.h> |
1251 | 3564 | int ca_add_fd_registration ( void ( USERFUNC * ) ( void *USERARG, | ||
1252 | 3565 | int FD, int OPENED ), void * USERARG )</code></pre> | ||
1253 | 3466 | 3566 | ||
1254 | 3467 | <h4>Description</h4> | 3567 | <h4>Description</h4> |
1255 | 3468 | 3568 | ||
1256 | @@ -3496,7 +3596,7 @@ | |||
1257 | 3496 | file descriptor was closed.</p> | 3596 | file descriptor was closed.</p> |
1258 | 3497 | 3597 | ||
1259 | 3498 | <h4>Example</h4> | 3598 | <h4>Example</h4> |
1261 | 3499 | <pre>int s; | 3599 | <pre><code>int s; |
1262 | 3500 | static struct myStruct aStruct; | 3600 | static struct myStruct aStruct; |
1263 | 3501 | 3601 | ||
1264 | 3502 | void fdReg ( struct myStruct *pStruct, int fd, int opened ) | 3602 | void fdReg ( struct myStruct *pStruct, int fd, int opened ) |
1265 | @@ -3505,7 +3605,7 @@ | |||
1266 | 3505 | else printf ( "fd %d was closed\n", fd ); | 3605 | else printf ( "fd %d was closed\n", fd ); |
1267 | 3506 | } | 3606 | } |
1268 | 3507 | s = ca_add_fd_registration ( fdReg, & aStruct ); | 3607 | s = ca_add_fd_registration ( fdReg, & aStruct ); |
1270 | 3508 | SEVCHK ( s, NULL );</pre> | 3608 | SEVCHK ( s, NULL );</code></pre> |
1271 | 3509 | 3609 | ||
1272 | 3510 | <h4>Comments</h4> | 3610 | <h4>Comments</h4> |
1273 | 3511 | 3611 | ||
1274 | @@ -3531,9 +3631,15 @@ | |||
1275 | 3531 | 3631 | ||
1276 | 3532 | <h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler | 3632 | <h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler |
1277 | 3533 | ()</a></code></h3> | 3633 | ()</a></code></h3> |
1278 | 3634 | <<<<<<< TREE | ||
1279 | 3534 | <pre>#include <cadef.h> | 3635 | <pre>#include <cadef.h> |
1280 | 3535 | typedef int caPrintfFunc ( const char *pFormat, va_list args ); | 3636 | typedef int caPrintfFunc ( const char *pFormat, va_list args ); |
1281 | 3536 | int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre> | 3637 | int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre> |
1282 | 3638 | ======= | ||
1283 | 3639 | <pre><code>#include <cadef.h> | ||
1284 | 3640 | typedef int caPrintfFunc ( const char *pFromat, va_list args ); | ||
1285 | 3641 | int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</code></pre> | ||
1286 | 3642 | >>>>>>> MERGE-SOURCE | ||
1287 | 3537 | 3643 | ||
1288 | 3538 | <h4>Description</h4> | 3644 | <h4>Description</h4> |
1289 | 3539 | 3645 | ||
1290 | @@ -3544,28 +3650,34 @@ | |||
1291 | 3544 | <dl> | 3650 | <dl> |
1292 | 3545 | <dt><code>PFUNC</code></dt> | 3651 | <dt><code>PFUNC</code></dt> |
1293 | 3546 | <dd>The address of a user supplied call back handler to be invoked when CA | 3652 | <dd>The address of a user supplied call back handler to be invoked when CA |
1295 | 3547 | prints diagnostic messages. Installing a nil pointer will cause the | 3653 | prints diagnostic messages. Installing a nill pointer will cause the |
1296 | 3548 | default call back handler to be reinstalled.</dd> | 3654 | default call back handler to be reinstalled.</dd> |
1297 | 3549 | </dl> | 3655 | </dl> |
1298 | 3550 | 3656 | ||
1299 | 3551 | <h4>Examples</h4> | 3657 | <h4>Examples</h4> |
1301 | 3552 | <pre>int my_printf ( char *pformat, va_list args ) { | 3658 | <pre><code>int my_printf ( char *pformat, va_list args ) { |
1302 | 3553 | int status; | 3659 | int status; |
1303 | 3554 | status = vfprintf( stderr, pformat, args); | 3660 | status = vfprintf( stderr, pformat, args); |
1304 | 3555 | return status; | 3661 | return status; |
1305 | 3556 | } | 3662 | } |
1306 | 3557 | status = ca_replace_printf_handler ( my_printf ); | 3663 | status = ca_replace_printf_handler ( my_printf ); |
1308 | 3558 | SEVCHK ( status, "failed to install my printf handler" );</pre> | 3664 | SEVCHK ( status, "failed to install my printf handler" );</code></pre> |
1309 | 3559 | 3665 | ||
1310 | 3560 | <h4>Returns</h4> | 3666 | <h4>Returns</h4> |
1311 | 3561 | 3667 | ||
1312 | 3562 | <p>ECA_NORMAL - Normal successful completion</p> | 3668 | <p>ECA_NORMAL - Normal successful completion</p> |
1313 | 3563 | 3669 | ||
1314 | 3564 | <h3><code><a name="ca_replace">ca_replace_access_rights_event()</a></code></h3> | 3670 | <h3><code><a name="ca_replace">ca_replace_access_rights_event()</a></code></h3> |
1315 | 3671 | <<<<<<< TREE | ||
1316 | 3565 | <pre>#include <cadef.h> | 3672 | <pre>#include <cadef.h> |
1317 | 3566 | typedef void ( caEventCallBackFunc )(struct access_rights_handler_args); | 3673 | typedef void ( caEventCallBackFunc )(struct access_rights_handler_args); |
1318 | 3567 | int ca_replace_access_rights_event ( chid CHAN, | 3674 | int ca_replace_access_rights_event ( chid CHAN, |
1319 | 3568 | caEventCallBackFunc PFUNC );</pre> | 3675 | caEventCallBackFunc PFUNC );</pre> |
1320 | 3676 | ======= | ||
1321 | 3677 | <pre><code>#include <cadef.h> | ||
1322 | 3678 | typedef void ( *pCallBack )( struct access_rights_handler_args ); | ||
1323 | 3679 | int ca_replace ( chid CHAN, pCallBack PFUNC );</code></pre> | ||
1324 | 3680 | >>>>>>> MERGE-SOURCE | ||
1325 | 3569 | 3681 | ||
1326 | 3570 | <h4>Description</h4> | 3682 | <h4>Description</h4> |
1327 | 3571 | 3683 | ||
1328 | @@ -3574,9 +3686,9 @@ | |||
1329 | 3574 | 3686 | ||
1330 | 3575 | <p>The callback handler is called in the following situations.</p> | 3687 | <p>The callback handler is called in the following situations.</p> |
1331 | 3576 | <ul> | 3688 | <ul> |
1333 | 3577 | <li>whenever CA connects the channel immediately before the channel's | 3689 | <li>whenever CA connects the channel immediately before the channel`s |
1334 | 3578 | connection handler is called</li> | 3690 | connection handler is called</li> |
1336 | 3579 | <li>whenever CA disconnects the channel immediately after the channel's | 3691 | <li>whenever CA disconnects the channel immediately after the channel`s |
1337 | 3580 | disconnect call back is called</li> | 3692 | disconnect call back is called</li> |
1338 | 3581 | <li>once immediately after installation if the channel is connected.</li> | 3693 | <li>once immediately after installation if the channel is connected.</li> |
1339 | 3582 | <li>whenever the access rights state of a connected channel changes</li> | 3694 | <li>whenever the access rights state of a connected channel changes</li> |
1340 | @@ -3591,10 +3703,10 @@ | |||
1341 | 3591 | </dl> | 3703 | </dl> |
1342 | 3592 | <dl> | 3704 | <dl> |
1343 | 3593 | <dt><code>PFUNC</code></dt> | 3705 | <dt><code>PFUNC</code></dt> |
1345 | 3594 | <dd>Address of user supplied call back function. A nil pointer uninstalls | 3706 | <dd>Address of user supplied call back function. A nill pointer uninstalls |
1346 | 3595 | the current handler. The following arguments are passed <em>by value</em> | 3707 | the current handler. The following arguments are passed <em>by value</em> |
1347 | 3596 | to the supplied callback handler. | 3708 | to the supplied callback handler. |
1349 | 3597 | <pre>typedef struct ca_access_rights { | 3709 | <pre><code>typedef struct ca_access_rights { |
1350 | 3598 | unsigned read_access:1; | 3710 | unsigned read_access:1; |
1351 | 3599 | unsigned write_access:1; | 3711 | unsigned write_access:1; |
1352 | 3600 | } caar; | 3712 | } caar; |
1353 | @@ -3603,7 +3715,7 @@ | |||
1354 | 3603 | struct access_rights_handler_args { | 3715 | struct access_rights_handler_args { |
1355 | 3604 | chanId chid; /* channel id */ | 3716 | chanId chid; /* channel id */ |
1356 | 3605 | caar ar; /* new access rights state */ | 3717 | caar ar; /* new access rights state */ |
1358 | 3606 | };</pre> | 3718 | };</code></pre> |
1359 | 3607 | </dd> | 3719 | </dd> |
1360 | 3608 | </dl> | 3720 | </dl> |
1361 | 3609 | 3721 | ||
1362 | @@ -3611,9 +3723,15 @@ | |||
1363 | 3611 | 3723 | ||
1364 | 3612 | <p>ECA_NORMAL - Normal successful completion</p> | 3724 | <p>ECA_NORMAL - Normal successful completion</p> |
1365 | 3613 | 3725 | ||
1366 | 3726 | <h4>See Also</h4> | ||
1367 | 3727 | |||
1368 | 3728 | <p>ca_modify_user_name()</p> | ||
1369 | 3729 | |||
1370 | 3730 | <p>ca_modify_host_name()</p> | ||
1371 | 3731 | |||
1372 | 3614 | <h3><code><a name="ca_field_type">ca_field_type()</a></code></h3> | 3732 | <h3><code><a name="ca_field_type">ca_field_type()</a></code></h3> |
1375 | 3615 | <pre>#include <cadef.h> | 3733 | <pre><code>#include <cadef.h> |
1376 | 3616 | chtype ca_field_type ( CHID );</pre> | 3734 | chtype ca_field_type ( CHID );</code></pre> |
1377 | 3617 | 3735 | ||
1378 | 3618 | <h4>Description</h4> | 3736 | <h4>Description</h4> |
1379 | 3619 | 3737 | ||
1380 | @@ -3634,8 +3752,8 @@ | |||
1381 | 3634 | </dl> | 3752 | </dl> |
1382 | 3635 | 3753 | ||
1383 | 3636 | <h3><code><a name="ca_element_count">ca_element_count()</a></code></h3> | 3754 | <h3><code><a name="ca_element_count">ca_element_count()</a></code></h3> |
1386 | 3637 | <pre>#include <cadef.h> | 3755 | <pre><code>#include <cadef.h> |
1387 | 3638 | unsigned ca_element_count ( CHID );</pre> | 3756 | unsigned ca_element_count ( CHID );</code></pre> |
1388 | 3639 | 3757 | ||
1389 | 3640 | <h4>Description</h4> | 3758 | <h4>Description</h4> |
1390 | 3641 | 3759 | ||
1391 | @@ -3651,13 +3769,13 @@ | |||
1392 | 3651 | <h4>Returns</h4> | 3769 | <h4>Returns</h4> |
1393 | 3652 | <dl> | 3770 | <dl> |
1394 | 3653 | <dt><code>COUNT</code></dt> | 3771 | <dt><code>COUNT</code></dt> |
1397 | 3654 | <dd>The maximum array element count in the server. An element count of | 3772 | <dd>The maximum array element count in the server. An element count of zero |
1398 | 3655 | zero is returned if the channel is disconnected.</dd> | 3773 | is returned if the channel is disconnected.</dd> |
1399 | 3656 | </dl> | 3774 | </dl> |
1400 | 3657 | 3775 | ||
1401 | 3658 | <h3><code><a name="ca_name">ca_name()</a></code></h3> | 3776 | <h3><code><a name="ca_name">ca_name()</a></code></h3> |
1404 | 3659 | <pre>#include <cadef.h> | 3777 | <pre><code>#include <cadef.h> |
1405 | 3660 | char * ca_name ( CHID );</pre> | 3778 | char * ca_name ( CHID );</code></pre> |
1406 | 3661 | 3779 | ||
1407 | 3662 | <h4>Description</h4> | 3780 | <h4>Description</h4> |
1408 | 3663 | 3781 | ||
1409 | @@ -3677,8 +3795,8 @@ | |||
1410 | 3677 | </dl> | 3795 | </dl> |
1411 | 3678 | 3796 | ||
1412 | 3679 | <h3><code><a name="ca_set_puser">ca_set_puser()</a></code></h3> | 3797 | <h3><code><a name="ca_set_puser">ca_set_puser()</a></code></h3> |
1415 | 3680 | <pre>#include <cadef.h> | 3798 | <pre><code>#include <cadef.h> |
1416 | 3681 | void ca_set_puser ( chid CHID, void *PUSER );</pre> | 3799 | void ca_set_puser ( chid CHID, void *PUSER );</code></pre> |
1417 | 3682 | 3800 | ||
1418 | 3683 | <h4>Description</h4> | 3801 | <h4>Description</h4> |
1419 | 3684 | 3802 | ||
1420 | @@ -3696,8 +3814,8 @@ | |||
1421 | 3696 | </dl> | 3814 | </dl> |
1422 | 3697 | 3815 | ||
1423 | 3698 | <h3><code><a name="ca_puser">ca_puser()</a></code></h3> | 3816 | <h3><code><a name="ca_puser">ca_puser()</a></code></h3> |
1426 | 3699 | <pre>#include <cadef.h> | 3817 | <pre><code>#include <cadef.h> |
1427 | 3700 | void * ca_puser ( CHID );</pre> | 3818 | void * ca_puser ( CHID );</code></pre> |
1428 | 3701 | 3819 | ||
1429 | 3702 | <h4>Description</h4> | 3820 | <h4>Description</h4> |
1430 | 3703 | 3821 | ||
1431 | @@ -3717,13 +3835,13 @@ | |||
1432 | 3717 | </dl> | 3835 | </dl> |
1433 | 3718 | 3836 | ||
1434 | 3719 | <h3><code><a name="ca_state">ca_state()</a></code></h3> | 3837 | <h3><code><a name="ca_state">ca_state()</a></code></h3> |
1436 | 3720 | <pre>#include <cadef.h> | 3838 | <pre><code>#include <cadef.h> |
1437 | 3721 | enum channel_state { | 3839 | enum channel_state { |
1443 | 3722 | cs_never_conn, /* valid chid, server not found or unavailable */ | 3840 | cs_never_conn, /* valid chid, server not found or unavailable */ |
1444 | 3723 | cs_prev_conn, /* valid chid, previously connected to server */ | 3841 | cs_prev_conn, /* valid chid, previously connected to server */ |
1445 | 3724 | cs_conn, /* valid chid, connected to server */ | 3842 | cs_conn, /* valid chid, connected to server */ |
1446 | 3725 | cs_closed }; /* channel deleted by user */ | 3843 | cs_closed }; /* channel deleted by user */ |
1447 | 3726 | enum channel_state ca_state ( CHID );</pre> | 3844 | enum channel_state ca_state ( CHID );</code></pre> |
1448 | 3727 | 3845 | ||
1449 | 3728 | <h4>Description</h4> | 3846 | <h4>Description</h4> |
1450 | 3729 | 3847 | ||
1451 | @@ -3743,8 +3861,8 @@ | |||
1452 | 3743 | </dl> | 3861 | </dl> |
1453 | 3744 | 3862 | ||
1454 | 3745 | <h3><code><a name="ca_message">ca_message()</a></code></h3> | 3863 | <h3><code><a name="ca_message">ca_message()</a></code></h3> |
1457 | 3746 | <pre>#include <cadef.h> | 3864 | <pre><code>#include <cadef.h> |
1458 | 3747 | const char * ca_message ( STATUS );</pre> | 3865 | const char * ca_message ( STATUS );</code></pre> |
1459 | 3748 | 3866 | ||
1460 | 3749 | <h4>Description</h4> | 3867 | <h4>Description</h4> |
1461 | 3750 | 3868 | ||
1462 | @@ -3764,8 +3882,8 @@ | |||
1463 | 3764 | </dl> | 3882 | </dl> |
1464 | 3765 | 3883 | ||
1465 | 3766 | <h3><code><a name="ca_host_name">ca_host_name()</a></code></h3> | 3884 | <h3><code><a name="ca_host_name">ca_host_name()</a></code></h3> |
1468 | 3767 | <pre>#include <cadef.h> | 3885 | <pre><code>#include <cadef.h> |
1469 | 3768 | char * ca_host_name ( CHID );</pre> | 3886 | char * ca_host_name ( CHID );</code></pre> |
1470 | 3769 | 3887 | ||
1471 | 3770 | <h4>Description</h4> | 3888 | <h4>Description</h4> |
1472 | 3771 | 3889 | ||
1473 | @@ -3781,13 +3899,13 @@ | |||
1474 | 3781 | <h4>Returns</h4> | 3899 | <h4>Returns</h4> |
1475 | 3782 | <dl> | 3900 | <dl> |
1476 | 3783 | <dt><code>STRING</code></dt> | 3901 | <dt><code>STRING</code></dt> |
1478 | 3784 | <dd>The process variable server's host name. If the channel is disconnected | 3902 | <dd>The process variable server`s host name. If the channel is disconnected |
1479 | 3785 | the string "<disconnected>" is returned.</dd> | 3903 | the string "<disconnected>" is returned.</dd> |
1480 | 3786 | </dl> | 3904 | </dl> |
1481 | 3787 | 3905 | ||
1482 | 3788 | <h3><code><a name="ca_read_access">ca_read_access()</a></code></h3> | 3906 | <h3><code><a name="ca_read_access">ca_read_access()</a></code></h3> |
1485 | 3789 | <pre>#include <cadef.h> | 3907 | <pre><code>#include <cadef.h> |
1486 | 3790 | int ca_read_access ( CHID );</pre> | 3908 | int ca_read_access ( CHID );</code></pre> |
1487 | 3791 | 3909 | ||
1488 | 3792 | <h4>Description</h4> | 3910 | <h4>Description</h4> |
1489 | 3793 | 3911 | ||
1490 | @@ -3808,8 +3926,8 @@ | |||
1491 | 3808 | </dl> | 3926 | </dl> |
1492 | 3809 | 3927 | ||
1493 | 3810 | <h3><code><a name="ca_write_access">ca_write_access()</a></code></h3> | 3928 | <h3><code><a name="ca_write_access">ca_write_access()</a></code></h3> |
1496 | 3811 | <pre>#include <cadef.h> | 3929 | <pre><code>#include <cadef.h> |
1497 | 3812 | int ca_write_access ( CHID );</pre> | 3930 | int ca_write_access ( CHID );</code></pre> |
1498 | 3813 | 3931 | ||
1499 | 3814 | <h4>Description</h4> | 3932 | <h4>Description</h4> |
1500 | 3815 | 3933 | ||
1501 | @@ -3830,8 +3948,8 @@ | |||
1502 | 3830 | </dl> | 3948 | </dl> |
1503 | 3831 | 3949 | ||
1504 | 3832 | <h3><code><a name="dbr_size[]">dbr_size[]</a></code></h3> | 3950 | <h3><code><a name="dbr_size[]">dbr_size[]</a></code></h3> |
1507 | 3833 | <pre>#include <db_access.h> | 3951 | <pre><code>#include <db_access.h> |
1508 | 3834 | extern unsigned dbr_size[/* TYPE */];</pre> | 3952 | extern unsigned dbr_size[/*TYPE*/];</code></pre> |
1509 | 3835 | 3953 | ||
1510 | 3836 | <h4>Description</h4> | 3954 | <h4>Description</h4> |
1511 | 3837 | 3955 | ||
1512 | @@ -3850,8 +3968,8 @@ | |||
1513 | 3850 | </dl> | 3968 | </dl> |
1514 | 3851 | 3969 | ||
1515 | 3852 | <h3><code><a name="dbr_size_n">dbr_size_n()</a></code></h3> | 3970 | <h3><code><a name="dbr_size_n">dbr_size_n()</a></code></h3> |
1518 | 3853 | <pre>#include <db_access.h> | 3971 | <pre><code>#include <db_access.h> |
1519 | 3854 | unsigned dbr_size_n ( TYPE, COUNT );</pre> | 3972 | unsigned dbr_size_n ( TYPE, COUNT );</code></pre> |
1520 | 3855 | 3973 | ||
1521 | 3856 | <h4>Description</h4> | 3974 | <h4>Description</h4> |
1522 | 3857 | 3975 | ||
1523 | @@ -3879,8 +3997,8 @@ | |||
1524 | 3879 | </dl> | 3997 | </dl> |
1525 | 3880 | 3998 | ||
1526 | 3881 | <h3><code><a name="dbr_value_size">dbr_value_size[]</a></code></h3> | 3999 | <h3><code><a name="dbr_value_size">dbr_value_size[]</a></code></h3> |
1529 | 3882 | <pre>#include <db_access.h> | 4000 | <pre><code>#include <db_access.h> |
1530 | 3883 | extern unsigned dbr_value_size[/* TYPE */];</pre> | 4001 | extern unsigned dbr_value_size[/* TYPE */];</code></pre> |
1531 | 3884 | 4002 | ||
1532 | 3885 | <h4>Description</h4> | 4003 | <h4>Description</h4> |
1533 | 3886 | 4004 | ||
1534 | @@ -3902,8 +4020,8 @@ | |||
1535 | 3902 | </dl> | 4020 | </dl> |
1536 | 3903 | 4021 | ||
1537 | 3904 | <h3><code><a name="dbr_type_t">dbr_type_to_text</a>()</code></h3> | 4022 | <h3><code><a name="dbr_type_t">dbr_type_to_text</a>()</code></h3> |
1540 | 3905 | <pre>#include <db_access.h> | 4023 | <pre><code>#include <db_access.h> |
1541 | 3906 | const char * dbr_type_text ( chtype TYPE );</pre> | 4024 | const char * dbr_type_text ( chtype TYPE );</code></pre> |
1542 | 3907 | 4025 | ||
1543 | 3908 | <h4>Description</h4> | 4026 | <h4>Description</h4> |
1544 | 3909 | 4027 | ||
1545 | @@ -3933,17 +4051,17 @@ | |||
1546 | 3933 | prints diagnostics to standard out.</p> | 4051 | prints diagnostics to standard out.</p> |
1547 | 3934 | 4052 | ||
1548 | 3935 | <h4>Examples</h4> | 4053 | <h4>Examples</h4> |
1550 | 3936 | <pre>void ca_test_event (); | 4054 | <pre><code>void ca_test_event (); |
1551 | 3937 | status = ca_add_event ( type, chid, ca_test_event, NULL, NULL ); | 4055 | status = ca_add_event ( type, chid, ca_test_event, NULL, NULL ); |
1553 | 3938 | SEVCHK ( status, .... );</pre> | 4056 | SEVCHK ( status, .... );</code></pre> |
1554 | 3939 | 4057 | ||
1555 | 3940 | <h4>See Also</h4> | 4058 | <h4>See Also</h4> |
1556 | 3941 | 4059 | ||
1557 | 3942 | <p><a href="#ca_add_event">ca_add_event</a>()</p> | 4060 | <p><a href="#ca_add_event">ca_add_event</a>()</p> |
1558 | 3943 | 4061 | ||
1559 | 3944 | <h3><code><a name="ca_sg_create">ca_sg_create()</a></code></h3> | 4062 | <h3><code><a name="ca_sg_create">ca_sg_create()</a></code></h3> |
1562 | 3945 | <pre>#include <cadef.h> | 4063 | <pre><code>#include <cadef.h> |
1563 | 3946 | int ca_sg_create ( CA_SYNC_GID *PGID );</pre> | 4064 | int ca_sg_create ( CA_SYNC_GID *PGID );</code></pre> |
1564 | 3947 | 4065 | ||
1565 | 3948 | <h4>Description</h4> | 4066 | <h4>Description</h4> |
1566 | 3949 | 4067 | ||
1567 | @@ -3967,9 +4085,9 @@ | |||
1568 | 3967 | </dl> | 4085 | </dl> |
1569 | 3968 | 4086 | ||
1570 | 3969 | <h4>Examples</h4> | 4087 | <h4>Examples</h4> |
1572 | 3970 | <pre>CA_SYNC_GID gid; | 4088 | <pre><code>CA_SYNC_GID gid; |
1573 | 3971 | status = ca_sg_create ( &gid ); | 4089 | status = ca_sg_create ( &gid ); |
1575 | 3972 | SEVCHK ( status, Sync group create failed );</pre> | 4090 | SEVCHK ( status, Sync group create failed );</code></pre> |
1576 | 3973 | 4091 | ||
1577 | 3974 | <h4>Returns</h4> | 4092 | <h4>Returns</h4> |
1578 | 3975 | 4093 | ||
1579 | @@ -3992,8 +4110,8 @@ | |||
1580 | 3992 | <p><a href="#ca_sg_get">ca_sg_array_get</a>()</p> | 4110 | <p><a href="#ca_sg_get">ca_sg_array_get</a>()</p> |
1581 | 3993 | 4111 | ||
1582 | 3994 | <h3><code><a name="ca_sg_delete">ca_sg_delete()</a></code></h3> | 4112 | <h3><code><a name="ca_sg_delete">ca_sg_delete()</a></code></h3> |
1585 | 3995 | <pre>#include <cadef.h> | 4113 | <pre><code>#include <cadef.h> |
1586 | 3996 | int ca_sg_delete ( CA_SYNC_GID GID );</pre> | 4114 | int ca_sg_delete ( CA_SYNC_GID GID );</code></pre> |
1587 | 3997 | 4115 | ||
1588 | 3998 | <h4>Description</h4> | 4116 | <h4>Description</h4> |
1589 | 3999 | 4117 | ||
1590 | @@ -4006,9 +4124,9 @@ | |||
1591 | 4006 | </dl> | 4124 | </dl> |
1592 | 4007 | 4125 | ||
1593 | 4008 | <h4>Examples</h4> | 4126 | <h4>Examples</h4> |
1595 | 4009 | <pre>CA_SYNC_GID gid; | 4127 | <pre><code>CA_SYNC_GID gid; |
1596 | 4010 | status = ca_sg_delete ( gid ); | 4128 | status = ca_sg_delete ( gid ); |
1598 | 4011 | SEVCHK ( status, Sync group delete failed );</pre> | 4129 | SEVCHK ( status, Sync group delete failed );</code></pre> |
1599 | 4012 | 4130 | ||
1600 | 4013 | <h4>Returns</h4> | 4131 | <h4>Returns</h4> |
1601 | 4014 | 4132 | ||
1602 | @@ -4020,9 +4138,15 @@ | |||
1603 | 4020 | 4138 | ||
1604 | 4021 | <p><a href="#ca_sg_create">ca_sg_create</a>()</p> | 4139 | <p><a href="#ca_sg_create">ca_sg_create</a>()</p> |
1605 | 4022 | 4140 | ||
1606 | 4141 | <<<<<<< TREE | ||
1607 | 4023 | <h3><code><a name="ca_sg_block">ca_sg_block()</a></code></h3> | 4142 | <h3><code><a name="ca_sg_block">ca_sg_block()</a></code></h3> |
1608 | 4024 | <pre>#include <cadef.h> | 4143 | <pre>#include <cadef.h> |
1609 | 4025 | int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre> | 4144 | int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre> |
1610 | 4145 | ======= | ||
1611 | 4146 | <h3><a name="ca_sg_block"><code>ca_sg_block</code></a><code>()</code></h3> | ||
1612 | 4147 | <pre><code>#include <cadef.h> | ||
1613 | 4148 | int ca_sg_block ( CA_SYNC_GID GID, double timeout );</code></pre> | ||
1614 | 4149 | >>>>>>> MERGE-SOURCE | ||
1615 | 4026 | 4150 | ||
1616 | 4027 | <h4>Description</h4> | 4151 | <h4>Description</h4> |
1617 | 4028 | 4152 | ||
1618 | @@ -4036,7 +4160,7 @@ | |||
1619 | 4036 | are outstanding then ca_sg_block() will return immediately without processing | 4160 | are outstanding then ca_sg_block() will return immediately without processing |
1620 | 4037 | any pending channel access activities.</p> | 4161 | any pending channel access activities.</p> |
1621 | 4038 | 4162 | ||
1623 | 4039 | <p>Values written into your program's variables by a channel access synchronous | 4163 | <p>Values written into your program`s variables by a channel access synchronous |
1624 | 4040 | group request should not be referenced by your program until ECA_NORMAL has | 4164 | group request should not be referenced by your program until ECA_NORMAL has |
1625 | 4041 | been received from ca_sg_block(). This routine will process pending channel | 4165 | been received from ca_sg_block(). This routine will process pending channel |
1626 | 4042 | access background activity while it is waiting.</p> | 4166 | access background activity while it is waiting.</p> |
1627 | @@ -4051,9 +4175,15 @@ | |||
1628 | 4051 | </dl> | 4175 | </dl> |
1629 | 4052 | 4176 | ||
1630 | 4053 | <h4>Examples</h4> | 4177 | <h4>Examples</h4> |
1631 | 4178 | <<<<<<< TREE | ||
1632 | 4054 | <pre>CA_SYNC_GID gid; | 4179 | <pre>CA_SYNC_GID gid; |
1633 | 4055 | status = ca_sg_block(gid, 0.0); | 4180 | status = ca_sg_block(gid, 0.0); |
1634 | 4056 | SEVCHK(status, Sync group block failed);</pre> | 4181 | SEVCHK(status, Sync group block failed);</pre> |
1635 | 4182 | ======= | ||
1636 | 4183 | <pre><code>CA_SYNC_GID gid; | ||
1637 | 4184 | status = ca_sg_block(gid); | ||
1638 | 4185 | SEVCHK(status, Sync group block failed);</code></pre> | ||
1639 | 4186 | >>>>>>> MERGE-SOURCE | ||
1640 | 4057 | 4187 | ||
1641 | 4058 | <h4>Returns</h4> | 4188 | <h4>Returns</h4> |
1642 | 4059 | 4189 | ||
1643 | @@ -4072,8 +4202,8 @@ | |||
1644 | 4072 | <p><a href="#ca_sg_reset">ca_sg_reset</a>()</p> | 4202 | <p><a href="#ca_sg_reset">ca_sg_reset</a>()</p> |
1645 | 4073 | 4203 | ||
1646 | 4074 | <h3><code><a name="ca_sg_test">ca_sg_test()</a></code></h3> | 4204 | <h3><code><a name="ca_sg_test">ca_sg_test()</a></code></h3> |
1649 | 4075 | <pre>#include <cadef.h> | 4205 | <pre><code>#include <cadef.h> |
1650 | 4076 | int ca_sg_test ( CA_SYNC_GID GID )</pre> | 4206 | int ca_sg_test ( CA_SYNC_GID GID )</code></pre> |
1651 | 4077 | 4207 | ||
1652 | 4078 | <h4>Description</h4> | 4208 | <h4>Description</h4> |
1653 | 4079 | 4209 | ||
1654 | @@ -4092,8 +4222,8 @@ | |||
1655 | 4092 | completed.</p> | 4222 | completed.</p> |
1656 | 4093 | 4223 | ||
1657 | 4094 | <h4>Examples</h4> | 4224 | <h4>Examples</h4> |
1660 | 4095 | <pre>CA_SYNC_GID gid; | 4225 | <pre><code>CA_SYNC_GID gid; |
1661 | 4096 | status = ca_sg_test ( gid );</pre> | 4226 | status = ca_sg_test ( gid );</code></pre> |
1662 | 4097 | 4227 | ||
1663 | 4098 | <h4>Returns</h4> | 4228 | <h4>Returns</h4> |
1664 | 4099 | 4229 | ||
1665 | @@ -4102,8 +4232,8 @@ | |||
1666 | 4102 | <p>ECA_IOINPROGRESS - Some IO operations still in progress</p> | 4232 | <p>ECA_IOINPROGRESS - Some IO operations still in progress</p> |
1667 | 4103 | 4233 | ||
1668 | 4104 | <h3><code><a name="ca_sg_reset">ca_sg_reset()</a></code></h3> | 4234 | <h3><code><a name="ca_sg_reset">ca_sg_reset()</a></code></h3> |
1671 | 4105 | <pre>#include <cadef.h> | 4235 | <pre><code>#include <cadef.h> |
1672 | 4106 | int ca_sg_reset ( CA_SYNC_GID GID )</pre> | 4236 | int ca_sg_reset ( CA_SYNC_GID GID )</code></pre> |
1673 | 4107 | 4237 | ||
1674 | 4108 | <h4>Description</h4> | 4238 | <h4>Description</h4> |
1675 | 4109 | 4239 | ||
1676 | @@ -4118,8 +4248,8 @@ | |||
1677 | 4118 | </dl> | 4248 | </dl> |
1678 | 4119 | 4249 | ||
1679 | 4120 | <h4>Examples</h4> | 4250 | <h4>Examples</h4> |
1682 | 4121 | <pre>CA_SYNC_GID gid; | 4251 | <pre><code>CA_SYNC_GID gid; |
1683 | 4122 | status = ca_sg_reset(gid);</pre> | 4252 | status = ca_sg_reset(gid);</code></pre> |
1684 | 4123 | 4253 | ||
1685 | 4124 | <h4>Returns</h4> | 4254 | <h4>Returns</h4> |
1686 | 4125 | 4255 | ||
1687 | @@ -4127,10 +4257,10 @@ | |||
1688 | 4127 | 4257 | ||
1689 | 4128 | <p>ECA_BADSYNCGRP - Invalid synchronous group</p> | 4258 | <p>ECA_BADSYNCGRP - Invalid synchronous group</p> |
1690 | 4129 | 4259 | ||
1693 | 4130 | <h3><code><a name="ca_sg_put">ca_sg_array_put()</a></code></h3> | 4260 | <h3><code><a name="ca_sg_put">ca_sg_put()</a></code></h3> |
1694 | 4131 | <pre>#include <cadef.h> | 4261 | <pre><code>#include <cadef.h> |
1695 | 4132 | int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE, | 4262 | int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE, |
1697 | 4133 | unsigned long COUNT, chid CHID, void *PVALUE );</pre> | 4263 | unsigned long COUNT, chid CHID, void *PVALUE );</code></pre> |
1698 | 4134 | 4264 | ||
1699 | 4135 | <p>Write a value, or array of values, to a channel and increment the | 4265 | <p>Write a value, or array of values, to a channel and increment the |
1700 | 4136 | outstanding request count of a synchronous group. The ca_sg_array_put | 4266 | outstanding request count of a synchronous group. The ca_sg_array_put |
1701 | @@ -4189,11 +4319,11 @@ | |||
1702 | 4189 | 4319 | ||
1703 | 4190 | <p><a href="#ca_flush_io">ca_flush_io</a>()</p> | 4320 | <p><a href="#ca_flush_io">ca_flush_io</a>()</p> |
1704 | 4191 | 4321 | ||
1710 | 4192 | <h3><code><a name="ca_sg_get">ca_sg_array_get()</a></code></h3> | 4322 | <h3><code><a name="ca_sg_get">ca_sg_get()</a></code></h3> |
1711 | 4193 | <pre>#include <cadef.h> | 4323 | <pre><code>#include <cadef.h> |
1712 | 4194 | int ca_sg_array_get ( CA_SYNC_GID GID, | 4324 | int ca_sg_array_get ( CA_SYNC_GID GID, |
1713 | 4195 | chtype TYPE, unsigned long COUNT, | 4325 | chtype TYPE, unsigned long COUNT, |
1714 | 4196 | chid CHID, void *PVALUE );</pre> | 4326 | chid CHID, void *PVALUE );</code></pre> |
1715 | 4197 | 4327 | ||
1716 | 4198 | <h4>Description</h4> | 4328 | <h4>Description</h4> |
1717 | 4199 | 4329 | ||
1718 | @@ -4201,7 +4331,7 @@ | |||
1719 | 4201 | synchronous group. The ca_sg_array_get functionality is implemented using | 4331 | synchronous group. The ca_sg_array_get functionality is implemented using |
1720 | 4202 | ca_array_get_callback.</p> | 4332 | ca_array_get_callback.</p> |
1721 | 4203 | 4333 | ||
1723 | 4204 | <p>The values written into your program's variables by ca_sg_get should not be | 4334 | <p>The values written into your program`s variables by ca_sg_get should not be |
1724 | 4205 | referenced by your program until ECA_NORMAL has been received from ca_sg_block, | 4335 | referenced by your program until ECA_NORMAL has been received from ca_sg_block, |
1725 | 4206 | or until ca_sg_test returns ECA_IODONE.</p> | 4336 | or until ca_sg_test returns ECA_IODONE.</p> |
1726 | 4207 | 4337 | ||
1727 | @@ -4285,7 +4415,7 @@ | |||
1728 | 4285 | 4415 | ||
1729 | 4286 | <h4>Description</h4> | 4416 | <h4>Description</h4> |
1730 | 4287 | 4417 | ||
1732 | 4288 | <p>Returns a pointer to the current thread's CA context. If none then nil is | 4418 | <p>Returns a pointer to the current thread`s CA context. If none then nill is |
1733 | 4289 | returned.</p> | 4419 | returned.</p> |
1734 | 4290 | 4420 | ||
1735 | 4291 | <h4>See Also</h4> | 4421 | <h4>See Also</h4> |
1736 | @@ -4355,7 +4485,13 @@ | |||
1737 | 4355 | <p><a href="#ca_context_destroy">ca_context_destroy</a>()</p> | 4485 | <p><a href="#ca_context_destroy">ca_context_destroy</a>()</p> |
1738 | 4356 | 4486 | ||
1739 | 4357 | <h3><code><a name="ca_dump_dbr">ca_dump_dbr()</a></code></h3> | 4487 | <h3><code><a name="ca_dump_dbr">ca_dump_dbr()</a></code></h3> |
1740 | 4488 | <<<<<<< TREE | ||
1741 | 4358 | <code><pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre></code> | 4489 | <code><pre>void ca_dump_dbr (chtype TYPE, unsigned COUNT, const void * PDBR);</pre></code> |
1742 | 4490 | ======= | ||
1743 | 4491 | <pre><code> | ||
1744 | 4492 | void ca_dump_dbr (chtype TYPE, | ||
1745 | 4493 | unsigned COUNT, const void * PDBR);</code></pre> | ||
1746 | 4494 | >>>>>>> MERGE-SOURCE | ||
1747 | 4359 | 4495 | ||
1748 | 4360 | <h4>Description</h4> | 4496 | <h4>Description</h4> |
1749 | 4361 | 4497 | ||
1750 | @@ -4444,7 +4580,7 @@ | |||
1751 | 4444 | <dd>Preemptive callback not enabled - additional threads may not join | 4580 | <dd>Preemptive callback not enabled - additional threads may not join |
1752 | 4445 | context</dd> | 4581 | context</dd> |
1753 | 4446 | <dt>ECA_16KARRAYCLIENT</dt> | 4582 | <dt>ECA_16KARRAYCLIENT</dt> |
1755 | 4447 | <dd>Client's protocol revision does not support transfers exceeding 16k | 4583 | <dd>Client`s protocol revision does not support transfers exceeding 16k |
1756 | 4448 | bytes</dd> | 4584 | bytes</dd> |
1757 | 4449 | </dl> | 4585 | </dl> |
1758 | 4450 | 4586 |
In a lot of places, apostrophes (') are replaced by a right-single-quote character (’). This is wrong, as an apostophe is syntactically and semantically a different character than a single quote. (See http:// en.wikipedia. org/wiki/ Apostrophe for details.)
In line 2530, the − should be a &endash;.
In line 2884, the <span style="font-style: italic;"></span> should rather be be <em></em>.
In line 2884, last paragraph: "it's" -> "its", add a comma after "set to false".
Both "nil" and "nill" seem to be used in the document for a null pointer. Maybe straighten that out globally.
Apart from that, the changes look fine to me.