Merge lp:~johill-lanl/epics-base/ca-ref-man-maint into lp:~epics-core/epics-base/3.15

Proposed by Jeff Hill
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
Reviewer Review Type Date Requested Status
Andrew Johnson Approve
Ralph Lange Needs Fixing
Review via email: mp+53647@code.launchpad.net

Description of the change

This syncs the changes in the ca reference manual on the cvs main trunk with the main trunk at launchpad

To post a comment you must log in.
Revision history for this message
Ralph Lange (ralph-lange) wrote :

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.

review: Needs Fixing
Revision history for this message
Andrew Johnson (anj) wrote :

Actually Ralph's en dash (the HTML entity name is actually &ndash; BTW) should IMHO be an &mdash; — here it "demarcates a break of thought or some similar interpolation (stronger than the interpolation demarcated by parentheses)" to quote Wikipedia again, from http://en.wikipedia.org/wiki/Dash#Em_dash

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.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

But, the same Wikipedia article says further down (http://en.wikipedia.org/wiki/Dash#En_dash_versus_em_dash) that the "spaced en dash" is recommended by a number of style guides as an visually more pleasing replacement for the em dash (which is typically not surrounded by spaces).

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.

12223. By Jeff Hill

responded to Ralph and Andrew's comments

Revision history for this message
Jeff Hill (johill-lanl) wrote :

Ok, I believe that I have fixed all of it; now you have bigger changes to review ;-)

Revision history for this message
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 &copy; and &uuml; 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.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/ca/client/CAref.html'
--- src/ca/client/CAref.html 2013-07-05 18:26:26 +0000
+++ src/ca/client/CAref.html 2013-11-07 19:43:28 +0000
@@ -7,8 +7,8 @@
7 <style type="text/css">7 <style type="text/css">
8 <!--8 <!--
9h3 code {9h3 code {
10 background-color: #ddf;10background-color: #ddf;
11 font-size: larger;11font-size: larger;
12}12}
13-->13-->
1414
@@ -20,30 +20,30 @@
2020
21<h1>EPICS R3.14 Channel Access Reference Manual</h1>21<h1>EPICS R3.14 Channel Access Reference Manual</h1>
22<address>22<address>
23 Jeffrey O. Hill23 Jeffrey O. Hill
24</address>24</address>
2525
26<p><span style="font-size: x-small; font-weight:lighter;">Los Alamos National26<p><span style="font-size: x-small; font-weight:lighter;">Los Alamos National
27Laboratory, SNS Division</span></p>27Laboratory, SNS Division</span></p>
28<address>28<address>
29 Ralph Lange29 Ralph Lange
30</address>30</address>
3131
32<p><span style="font-size: x-small; font-weight:lighter;">Helmholtz-Zentrum32<p><span style="font-size: x-small; font-weight:lighter;">Helmholtz-Zentrum
33Berlin (BESSY II)</span></p>33Berlin (BESSY II)</span></p>
3434
35<p><span style="font-size: xx-small; font-weight:lighter;">Copyright &copy; 200935<p><span style="font-size: xx-small; font-weight:lighter;">Copyright © 2009
36Helmholtz-Zentrum Berlin f&uuml;r Materialien und Energie GmbH.<br>36Helmholtz-Zentrum Berlin für Materialien und Energie GmbH.<br>
37Copyright &copy; 2002 The University of Chicago, as Operator of Argonne National37Copyright © 2002 The University of Chicago, as Operator of Argonne National
38Laboratory.<br>38Laboratory.<br>
39Copyright &copy; 2002 The Regents of the University of California, as Operator of39Copyright © 2002 The Regents of the University of California, as Operator of
40Los Alamos National Laboratory.<br>40Los Alamos National Laboratory.<br>
41Copyright &copy; 2002 Berliner Speicherringgesellschaft f&uuml;r Synchrotronstrahlung41Copyright © 2002 Berliner Speicherringgesellschaft für Synchrotronstrahlung
42GmbH.</span></p>42GmbH.</span></p>
4343
44<p><span style="font-size: xx-small; font-weight:lighter;">EPICS BASE is44<p><span style="font-size: xx-small; font-weight:lighter;">EPICS BASE is
45distributed subject to a Software License Agreement found45distributed subject to a Software License Agreement found in the file LICENSE
46in the file LICENSE that is included with this distribution.</span></p>46that is included with this distribution.</span></p>
4747
48<p><a href="http://www.w3.org/Amaya/"><img48<p><a href="http://www.w3.org/Amaya/"><img
49src="http://www.w3.org/Amaya/Icons/w3c-amaya.gif" alt="W3C-Amaya" height="31"49src="http://www.w3.org/Amaya/Icons/w3c-amaya.gif" alt="W3C-Amaya" height="31"
@@ -107,17 +107,17 @@
107107
108<h3><a href="#Troubleshooting">Troubleshooting</a></h3>108<h3><a href="#Troubleshooting">Troubleshooting</a></h3>
109<ul>109<ul>
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>
111 <ul>111 <ul>
112 <li><a href="#Broadcast">Client and Server Broadcast Addresses Dont112 <li><a href="#Broadcast">Client and Server Broadcast Addresses Dont
113 Match</a></li>113 Match</a></li>
114 <li><a href="#Client">Client Isnt Configured to Use the Server's114 <li><a href="#Client">Client Isnt Configured to Use the Server`s
115 Port</a></li>115 Port</a></li>
116 <li><a href="#Unicast">Unicast Addresses in the EPICS_CA_ADDR_LIST Does116 <li><a href="#Unicast">Unicast Addresses in the EPICS_CA_ADDR_LIST Does
117 not Reliably Contact Servers Sharing the Same UDP Port on the Same117 not Reliably Contact Servers Sharing the Same UDP Port on the Same
118 Host</a></li>118 Host</a></li>
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>
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>
121 </ul>121 </ul>
122 </li>122 </li>
123 <li><a href="#Requests">Put Requests Just Prior to Process Termination Appear123 <li><a href="#Requests">Put Requests Just Prior to Process Termination Appear
@@ -165,7 +165,8 @@
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>
166 <li><a href="#ca_test_io">test to see if certain requests have166 <li><a href="#ca_test_io">test to see if certain requests have
167 completed</a></li>167 completed</a></li>
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
169 activities</a></li>
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>
170 <li><a href="#ca_add_exception_event">replace the default exception171 <li><a href="#ca_add_exception_event">replace the default exception
171 handler</a></li>172 handler</a></li>
@@ -246,7 +247,11 @@
246247
247<h3>Why Reconfigure Channel Access</h3>248<h3>Why Reconfigure Channel Access</h3>
248249
250<<<<<<< TREE
249<p>Typical reasons to reconfigure EPICS Channel Access:</p>251<p>Typical reasons to reconfigure EPICS Channel Access:</p>
252=======
253<p>Typicall reasons to reconfigure EPICS Channel Access:</p>
254>>>>>>> MERGE-SOURCE
250<ul>255<ul>
251 <li>Two independent control systems must share a network without fear of256 <li>Two independent control systems must share a network without fear of
252 interaction</li>257 interaction</li>
@@ -363,9 +368,8 @@
363servers that host the channels identified. Likewise CA clients efficiently368servers that host the channels identified. Likewise CA clients efficiently
364discover that CA servers have recently joined the LAN or disconnected from the369discover that CA servers have recently joined the LAN or disconnected from the
365LAN by monitoring periodically broadcasted beacons sent out by the servers.370LAN by monitoring periodically broadcasted beacons sent out by the servers.
366Since hardware broadcasting requires special hardware capabilities, we are371However, additional configuration is required when EPICS is extended to operate
367required to provide additional configuration information when EPICS is extended372over a wide area network (WAN).</p>
368to operate over a wide area network (WAN).</p>
369373
370<h3><a name="Network">IP Network Administration Background Information</a></h3>374<h3><a name="Network">IP Network Administration Background Information</a></h3>
371375
@@ -374,7 +378,7 @@
374is determined by the IP netmask. Portions of the IP address corresponding to378is determined by the IP netmask. Portions of the IP address corresponding to
375zeros in the netmask specify the hosts address within an IP subnet. Portions of379zeros in the netmask specify the hosts address within an IP subnet. Portions of
376the IP address corresponding to binary ones in the netmask specify the address380the IP address corresponding to binary ones in the netmask specify the address
377of a host's IP subnet. Normally the scope of a broadcasted frame will be381of a host`s IP subnet. Normally the scope of a broadcasted frame will be
378limited to one IP subnet. Addresses with the host address portion set to all382limited to one IP subnet. Addresses with the host address portion set to all
379zeros or all ones are special. Modern IP kernel implementations reserve383zeros or all ones are special. Modern IP kernel implementations reserve
380destination addresses with the host portion set to all ones for the purpose of384destination addresses with the host portion set to all ones for the purpose of
@@ -454,6 +458,7 @@
454458
455<h3><a name="firewall">Firewalls</a></h3>459<h3><a name="firewall">Firewalls</a></h3>
456460
461<<<<<<< TREE
457<p>If you want channel access clients on a machine to be able to see462<p>If you want channel access clients on a machine to be able to see
458beacons and replies to broadcast PV search requests, you need to permit463beacons and replies to broadcast PV search requests, you need to permit
459inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064)464inbound UDP packets with source port EPICS_CA_SERVER_PORT (default is 5064)
@@ -464,8 +469,18 @@
464 -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT469 -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT
465 -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT470 -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT
466</pre>471</pre>
472=======
473<p>If you want channel access clients on a machine to be able to see beacons
474and replies to broadcast PV search requests you need to permit inbound UDP
475packets with source port EPICS_CA_SERVER_PORT (default is 5064) or destination
476port EPICS_CA_REPEATER_PORT (default is 5065). On systems using iptables this
477can be accomplished by rules like</p>
478<pre> -A INPUT -s 192.168.0.0/22 -p udp --sport 5064 -j ACCEPT
479 -A INPUT -s 192.168.0.0/22 -p udp --dport 5065 -j ACCEPT</pre>
480>>>>>>> MERGE-SOURCE
467481
468<p>If you want channel access servers (e.g. "soft IOCs") on a machine to be482<p>If you want channel access servers (e.g. "soft IOCs") on a machine to be
483<<<<<<< TREE
469able to be seen by clients, you need to permit inbound TCP or UDP packets with484able to be seen by clients, you need to permit inbound TCP or UDP packets with
470destination port EPICS_CA_SERVER_PORT (default is 5064).485destination port EPICS_CA_SERVER_PORT (default is 5064).
471On systems using iptables this can be accomplished by rules like</p>486On systems using iptables this can be accomplished by rules like</p>
@@ -474,6 +489,13 @@
474 -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT489 -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT
475 -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT490 -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT
476</pre>491</pre>
492=======
493able to see clients you need to permit inbound TCP or UDP packets with source
494port EPICS_CA_SERVER_PORT (default is 5064). On systems using iptables this can
495be accomplished by rules like</p>
496<pre> -A INPUT -s 192.168.0.0/22 -p udp --dport 5064 -j ACCEPT
497 -A INPUT -s 192.168.0.0/22 -p tcp --dport 5064 -j ACCEPT</pre>
498>>>>>>> MERGE-SOURCE
477499
478<p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from500<p>In all cases the "-s 192.168.0.0/22" specifies the range of addresses from
479which you wish to accept packets.</p>501which you wish to accept packets.</p>
@@ -488,7 +510,7 @@
488resolution (search) request contains a list of Process Variable names.If one of510resolution (search) request contains a list of Process Variable names.If one of
489the servers reachable by this address list knows the IP address of a CA server511the servers reachable by this address list knows the IP address of a CA server
490that can service one or more of the specified Process Variables, then it sends512that can service one or more of the specified Process Variables, then it sends
491back a response containing the server's IP address and port number.</p>513back a response containing the server`s IP address and port number.</p>
492514
493<p>During initialization CA builds the list of server destination addresses515<p>During initialization CA builds the list of server destination addresses
494used when sending CA client name resolution (search) requests. This table is516used when sending CA client name resolution (search) requests. This table is
@@ -497,10 +519,9 @@
497broadcast address of that subnet is added to the list. For each point to point519broadcast address of that subnet is added to the list. For each point to point
498interface found, the destination address of that link is added to the list.520interface found, the destination address of that link is added to the list.
499This automatic server address list initialization can be disabled if the EPICS521This automatic server address list initialization can be disabled if the EPICS
500environment variable EPICS_CA_AUTO_ADDR_LIST exists and its value is either522environment variable EPICS_CA_AUTO_ADDR_LIST exists and its value is either of
501of "no" or "NO". The typical default is to enable network interface523"no" or "NO". The typical default is to enable network interface introspection
502introspection driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES"524driven initialization with EPICS_CA_AUTO_ADDR_LIST set to "YES" or "yes".</p>
503or "yes".</p>
504525
505<p>Following network interface introspection, any IP addresses specified in the526<p>Following network interface introspection, any IP addresses specified in the
506EPICS environment variable EPICS_CA_ADDR_LIST are added to the list of527EPICS environment variable EPICS_CA_ADDR_LIST are added to the list of
@@ -511,8 +532,8 @@
511EPICS_CA_ADDR_LIST may be dotted IP addresses or host names if the local OS has532EPICS_CA_ADDR_LIST may be dotted IP addresses or host names if the local OS has
512support for host name to IP address translation. When multiple names are added533support for host name to IP address translation. When multiple names are added
513to EPICS_CA_ADDR_LIST they must be separated by white space. There is no534to EPICS_CA_ADDR_LIST they must be separated by white space. There is no
514requirement that the addresses specified in the EPICS_CA_ADDR_LIST be535requirement that the addresses specified in the EPICS_CA_ADDR_LIST be broadcast
515broadcast addresses, but this will often be the most convenient choice.</p>536addresses, but this will often be the most convenient choice.</p>
516537
517<p>For any IP addresses specified in the EPICS environment variable538<p>For any IP addresses specified in the EPICS environment variable
518EPICS_CA_NAME_SERVERS, TCP connections are opened and used for CA client name539EPICS_CA_NAME_SERVERS, TCP connections are opened and used for CA client name
@@ -560,7 +581,7 @@
560<p>Frequently vxWorks systems boot by default with routes limiting access only581<p>Frequently vxWorks systems boot by default with routes limiting access only
561to the local subnet. If a EPICS system is operating in a WAN environment it may582to the local subnet. If a EPICS system is operating in a WAN environment it may
562be necessary to configure routes into the vxWorks system which enable a vxWorks583be necessary to configure routes into the vxWorks system which enable a vxWorks
563based CA server to respond to requests originating outside it's subnet. These584based CA server to respond to requests originating outside its subnet. These
564routing restrictions can also apply to vxWorks base CA clients communicating585routing restrictions can also apply to vxWorks base CA clients communicating
565with off subnet servers. An EPICS system manager can implement an rudimentary,586with off subnet servers. An EPICS system manager can implement an rudimentary,
566but robust, form of access control for a particular host by not providing587but robust, form of access control for a particular host by not providing
@@ -571,7 +592,7 @@
571592
572<p>If the CA client library does not see a beacon from a server that it is593<p>If the CA client library does not see a beacon from a server that it is
573connected to for EPICS_CA_CONN_TMO seconds then an state-of-health message is594connected to for EPICS_CA_CONN_TMO seconds then an state-of-health message is
574sent to the server over TCP/IP. If this state-of-health message isn't promptly595sent to the server over TCP/IP. If this state-of-health message isn`t promptly
575replied to then the client library will conclude that channels communicating596replied to then the client library will conclude that channels communicating
576with the server are no longer responsive and inform the CA client side597with the server are no longer responsive and inform the CA client side
577application via function callbacks. The parameter EPICS_CA_CONN_TMO is598application via function callbacks. The parameter EPICS_CA_CONN_TMO is
@@ -588,7 +609,7 @@
588but does not immediately disconnect the TCP circuit. Instead the CA client609but does not immediately disconnect the TCP circuit. Instead the CA client
589library postpones circuit shutdown until receiving indication of circuit610library postpones circuit shutdown until receiving indication of circuit
590disconnect from the IP kernel. This can occur either because a server is611disconnect from the IP kernel. This can occur either because a server is
591restarted or because the IP kernel's internal TCP circuit inactivity keep alive612restarted or because the IP kernel`s internal TCP circuit inactivity keep alive
592timer has expired after a typically long duration (as is appropriate for IP613timer has expired after a typically long duration (as is appropriate for IP
593based systems that need to avoid thrashing during periods of excessive load).614based systems that need to avoid thrashing during periods of excessive load).
594The net result is less search and TCP circuit setup and shutdown activity615The net result is less search and TCP circuit setup and shutdown activity
@@ -624,7 +645,7 @@
624below).</p>645below).</p>
625646
626<p>The CA client library continually estimates the beacon period of all server647<p>The CA client library continually estimates the beacon period of all server
627beacons received. If a particular server's beacon period becomes significantly648beacons received. If a particular server`s beacon period becomes significantly
628shorter or longer then the client is said to detect a beacon anomaly. The649shorter or longer then the client is said to detect a beacon anomaly. The
629library boosts the search interval for unresolved channels when a beacon650library boosts the search interval for unresolved channels when a beacon
630anomaly is seen or when <em>any</em> successful search response is received,651anomaly is seen or when <em>any</em> successful search response is received,
@@ -634,7 +655,7 @@
634preexisting unresolved channels. The program "casw" prints a message on655preexisting unresolved channels. The program "casw" prints a message on
635standard out for each CA client beacon anomaly detect event.</p>656standard out for each CA client beacon anomaly detect event.</p>
636657
637<p>See also <a href="#Client1">When a Client Does not See the Server's658<p>See also <a href="#Client1">When a Client Does not See the Server`s
638Beacon</a>.</p>659Beacon</a>.</p>
639660
640<h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search661<h3><a name="Configurin3" id="Configurin3">Configuring the Maximum Search
@@ -643,7 +664,7 @@
643<p>The rate at which name resolution (search) requests are sent exponentially664<p>The rate at which name resolution (search) requests are sent exponentially
644backs off to a plateau rate. The value of this plateau has an impact on network665backs off to a plateau rate. The value of this plateau has an impact on network
645traffic because it determines the rate that clients search for channel names666traffic because it determines the rate that clients search for channel names
646that are miss-spelled or otherwise don't exist in a server. Furthermore, for667that are miss-spelled or otherwise don`t exist in a server. Furthermore, for
647clients that are unable to see the beacon from a new server, the plateau rate668clients that are unable to see the beacon from a new server, the plateau rate
648may also determine the maximum interval that the client will wait until669may also determine the maximum interval that the client will wait until
649discovering a new server.</p>670discovering a new server.</p>
@@ -652,7 +673,7 @@
652seconds is determined by the EPICS_CA_MAX_SEARCH_PERIOD environment673seconds is determined by the EPICS_CA_MAX_SEARCH_PERIOD environment
653variable.</p>674variable.</p>
654675
655<p>See also <a href="#Client1">When a Client Does not See the Server's676<p>See also <a href="#Client1">When a Client Does not See the Server`s
656Beacon</a>.</p>677Beacon</a>.</p>
657678
658<h3><a name="Repeater">The CA Repeater</a></h3>679<h3><a name="Repeater">The CA Repeater</a></h3>
@@ -764,7 +785,7 @@
764<p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the785<p>The CA client library uses EPICS_CA_MAX_ARRAY_BYTES to determines the
765maximum array that it will send or receive. Likewise, the CA server uses786maximum array that it will send or receive. Likewise, the CA server uses
766EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or787EPICS_CA_MAX_ARRAY_BYTES to determine the maximum array that it may send or
767receive. The client does not influence the server's message size quotas and788receive. The client does not influence the server`s message size quotas and
768visa versa. In fact the value of EPICS_CA_MAX_ARRAY_BYTES need not be the same789visa versa. In fact the value of EPICS_CA_MAX_ARRAY_BYTES need not be the same
769in the client and the server. If the server receives a request which is too790in the client and the server. If the server receives a request which is too
770large to read or respond to in entirety then it sends an exception message to791large to read or respond to in entirety then it sends an exception message to
@@ -832,14 +853,14 @@
832853
833<p>The server configures its port number from the EPICS_CAS_SERVER_PORT854<p>The server configures its port number from the EPICS_CAS_SERVER_PORT
834environment variable if it is specified. Otherwise the EPICS_CA_SERVER_PORT855environment variable if it is specified. Otherwise the EPICS_CA_SERVER_PORT
835environment variable determines the server's port number. Two servers can share856environment variable determines the server`s port number. Two servers can share
836the same UDP port number on the same machine, but there are restrictions - see857the same UDP port number on the same machine, but there are restrictions - see
837a <a href="#Unicast">discussion of unicast addresses and two servers sharing858a <a href="#Unicast">discussion of unicast addresses and two servers sharing
838the same UDP port on the same host</a>.</p>859the same UDP port on the same host</a>.</p>
839860
840<h4>Server Beacons</h4>861<h4>Server Beacons</h4>
841862
842<p>The EPICS_CAS_BEACON_PERIOD parameter determines the server's beacon period863<p>The EPICS_CAS_BEACON_PERIOD parameter determines the server`s beacon period
843and is specified in floating point seconds. The default is typically 15864and is specified in floating point seconds. The default is typically 15
844seconds. See also <a href="#Disconnect">EPICS_CA_CONN_TMO</a> and <a865seconds. See also <a href="#Disconnect">EPICS_CA_CONN_TMO</a> and <a
845href="#Dynamic">Dynamic Changes in the CA Client Library Search866href="#Dynamic">Dynamic Changes in the CA Client Library Search
@@ -865,17 +886,17 @@
865list is not augmented.</p>886list is not augmented.</p>
866887
867<p>The EPICS_CAS_BEACON_PORT parameter specifies the destination port for888<p>The EPICS_CAS_BEACON_PORT parameter specifies the destination port for
868server beacons. The only exception to this occurs when ports are specified889server beacons. The only exception to this occurs when ports are specified in
869in EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If890EPICS_CAS_BEACON_ADDR_LIST or possibly in EPICS_CA_ADDR_LIST. If
870EPICS_CAS_BEACON_PORT is not specified then beacons are sent to the port891EPICS_CAS_BEACON_PORT is not specified then beacons are sent to the port
871specified in EPICS_CA_REPEATER_PORT.</p>892specified in EPICS_CA_REPEATER_PORT.</p>
872893
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>
874895
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,
876and therefore accept messages only over, a limited set of the local host's897and therefore accept messages only over, a limited set of the local host`s
877network interfaces (each specified by it's IP address). On UNIX systems type898network interfaces (each specified by its IP address). On UNIX systems type
878"netstat -i" (type "ipconfig" on windows) to see a list of the local host's899"netstat -i" (type "ipconfig" on windows) to see a list of the local host`s
879network interfaces. Specifically, UDP search messages addressed to both the IP900network interfaces. Specifically, UDP search messages addressed to both the IP
880addresses in EPICS_CAS_INTF_ADDR_LIST and also to the broadcast addresses of901addresses in EPICS_CAS_INTF_ADDR_LIST and also to the broadcast addresses of
881the corresponding LAN interfaces will be accepted by the server. By default,902the corresponding LAN interfaces will be accepted by the server. By default,
@@ -1054,7 +1075,7 @@
10541075
1055<p>CA server beacon anomalies occur when a new server joins the network, a1076<p>CA server beacon anomalies occur when a new server joins the network, a
1056server is rebooted, network connectivity to a server is reestablished, or if a1077server is rebooted, network connectivity to a server is reestablished, or if a
1057server's CPU exits a CPU load saturated state.</p>1078server`s CPU exits a CPU load saturated state.</p>
10581079
1059<p>CA clients with unresolved channels reset their search request scheduling1080<p>CA clients with unresolved channels reset their search request scheduling
1060timers whenever they see a beacon anomaly.</p>1081timers whenever they see a beacon anomaly.</p>
@@ -1159,7 +1180,7 @@
1159 </tr>1180 </tr>
1160 <tr>1181 <tr>
1161 <td>-d &lt;type&gt;</td>1182 <td>-d &lt;type&gt;</td>
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)
11631184
1164 <p>or number of one of the following types:</p>1185 <p>or number of one of the following types:</p>
11651186
@@ -1604,7 +1625,7 @@
1604stdout.</p>1625stdout.</p>
16051626
1606<p>The -s option allows to specify an interest level for calling Channel1627<p>The -s option allows to specify an interest level for calling Channel
1607Access' internal report function ca_client_status(), that prints lots of1628Access` internal report function ca_client_status(), that prints lots of
1608internal informations on stdout, including environment settings, used CA ports1629internal informations on stdout, including environment settings, used CA ports
1609etc.</p>1630etc.</p>
16101631
@@ -1646,7 +1667,7 @@
16461667
1647<p>This is an example CA server that is sometimes used for testing purposes. An1668<p>This is an example CA server that is sometimes used for testing purposes. An
1648example server can be created with the makeBaseApp perl script, as descibed in1669example server can be created with the makeBaseApp perl script, as descibed in
1649the application Developer's Guide.</p>1670the application Developer`s Guide.</p>
16501671
1651<table border="1">1672<table border="1">
1652 <col>1673 <col>
@@ -1832,21 +1853,21 @@
1832<h4><a name="Broadcast">Client and Server Broadcast Addresses Dont1853<h4><a name="Broadcast">Client and Server Broadcast Addresses Dont
1833Match</a></h4>1854Match</a></h4>
18341855
1835<p>Verify that the broadcast addresses are identical on the server's host and1856<p>Verify that the broadcast addresses are identical on the server`s host and
1836on the client's host. This can be checked on UNIX with "netstat -i" or1857on the client`s host. This can be checked on UNIX with "netstat -i" or
1837"ifconfig -a"; on vxWorks with ifShow; and on windows with ipconfig. It is1858"ifconfig -a"; on vxWorks with ifShow; and on windows with ipconfig. It is
1838normal for the broadcast addresses to not be identical if the client and server1859normal for the broadcast addresses to not be identical if the client and server
1839are not directly attached to the same IP subnet, and in this situation the1860are not directly attached to the same IP subnet, and in this situation the
1840EPICS_CA_ADDR_LIST must be set. Otherwise, if the client and server are1861EPICS_CA_ADDR_LIST must be set. Otherwise, if the client and server are
1841intended to be on the same IP subnet, then the problem may be that the IP1862intended to be on the same IP subnet, then the problem may be that the IP
1842netmask is incorrectly set in the network interface configuration. On most1863netmask is incorrectly set in the network interface configuration. On most
1843operating systems, when the host's IP address is configured, the host's IP1864operating systems, when the host`s IP address is configured, the host`s IP
1844subnet mask is also configured.</p>1865subnet mask is also configured.</p>
18451866
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>
18471868
1848<p>Verify that the client and server are using the same UDP port. Check the1869<p>Verify that the client and server are using the same UDP port. Check the
1849server's port by running "netstat -a | grep nnn" where nnn is the port number1870server`s port by running "netstat -a | grep nnn" where nnn is the port number
1850configured in the client. If you do not set EPICS_CA_SERVER_PORT or1871configured in the client. If you do not set EPICS_CA_SERVER_PORT or
1851EPICS_CAS_SERVER_PORT then the default port will be 5064.</p>1872EPICS_CAS_SERVER_PORT then the default port will be 5064.</p>
18521873
@@ -1861,20 +1882,20 @@
1861existing CA server then both servers will use the same UDP port, and the 2nd1882existing CA server then both servers will use the same UDP port, and the 2nd
1862server will be allocated an ephemeral TCP port. Clients can be configured to1883server will be allocated an ephemeral TCP port. Clients can be configured to
1863use the same port number for both servers. They will locate the 2nd server via1884use the same port number for both servers. They will locate the 2nd server via
1864the shared UDP port, and transparently connect to the 2nd server's ephemeral1885the shared UDP port, and transparently connect to the 2nd server`s ephemeral
1865TCP port. Be aware however that If there are two server's running on the same1886TCP port. Be aware however that If there are two server`s running on the same
1866host sharing the same UDP port then they will both receive UDP search requests1887host sharing the same UDP port then they will both receive UDP search requests
1867sent as broadcasts, but unfortunately (due to a weakness of most IP kernel1888sent as broadcasts, but unfortunately (due to a weakness of most IP kernel
1868implementations) only one of the servers will typically receive UDP search1889implementations) only one of the servers will typically receive UDP search
1869requests sent to unicast addresses (i.e. a single specific host's ip1890requests sent to unicast addresses (i.e. a single specific host`s ip
1870address).</p>1891address).</p>
18711892
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>
18731894
1874<p>Two conclusions deserve special emphasis. <em>First, if a client does not1895<p>Two conclusions deserve special emphasis. <em>First, if a client does not
1875see the server's beacons, then it will use additional network and server1896see the server`s beacons, then it will use additional network and server
1876resources sending periodic state-of-health messages.</em> <em>Second, if a1897resources sending periodic state-of-health messages.</em> <em>Second, if a
1877client does not see a newly introduced server's beacon, then it will take up to1898client does not see a newly introduced server`s beacon, then it will take up to
1878EPICS_CA_MAX_SEARCH_PERIOD to find that newly introduced server.</em> Also,1899EPICS_CA_MAX_SEARCH_PERIOD to find that newly introduced server.</em> Also,
1879starting with EPICS R3.14.7 the client library does <em>not</em> suspend1900starting with EPICS R3.14.7 the client library does <em>not</em> suspend
1880searching for a channel after 100 unsuccessful attempts until a beacon anomaly1901searching for a channel after 100 unsuccessful attempts until a beacon anomaly
@@ -1882,18 +1903,18 @@
1882EPICS and it timed out attempting to find a server whoose beacon cant be seen1903EPICS and it timed out attempting to find a server whoose beacon cant be seen
1883by the client library then the client application might need to be restarted in1904by the client library then the client application might need to be restarted in
1884order to connect to this new beacon-out-of-range server. The typical situation1905order to connect to this new beacon-out-of-range server. The typical situation
1885where a client would not see the server's beacon might be when the client isnt1906where a client would not see the server`s beacon might be when the client isnt
1886on the same IP subnet as the server, and the client's EPICS_CA_ADDR_LIST was1907on the same IP subnet as the server, and the client`s EPICS_CA_ADDR_LIST was
1887modified to include a destination address for the server, but the server's1908modified to include a destination address for the server, but the server`s
1888beacon address list was not modified so that it's beacons are received by the1909beacon address list was not modified so that its beacons are received by the
1889client.</p>1910client.</p>
18901911
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>
18921913
1893<p>When communication over a virtual circuit times out, then each channel1914<p>When communication over a virtual circuit times out, then each channel
1894attached to the circuit enters a disconnected state and the disconnect callback1915attached to the circuit enters a disconnected state and the disconnect callback
1895handler specified for the channel is called. However, the circuit is not1916handler specified for the channel is called. However, the circuit is not
1896disconnected until TCP/IP's internal, typically long duration, keep alive timer1917disconnected until TCP/IP`s internal, typically long duration, keep alive timer
1897expires. The disconnected channels remain attached to the beleaguered circuit1918expires. The disconnected channels remain attached to the beleaguered circuit
1898and no attempt is made to search for, or to reestablish, a new circuit. If, at1919and no attempt is made to search for, or to reestablish, a new circuit. If, at
1899some time in the future, the circuit becomes responsive again, then the1920some time in the future, the circuit becomes responsive again, then the
@@ -1905,11 +1926,11 @@
1905reattempt to find servers for each channel and connect circuits to them.</p>1926reattempt to find servers for each channel and connect circuits to them.</p>
19061927
1907<p>A well known negative side effect of the above behavior is that CA clients1928<p>A well known negative side effect of the above behavior is that CA clients
1908will wait the full (typically long) duration of TCP/IP's internal keep alive1929will wait the full (typically long) duration of TCP/IP`s internal keep alive
1909timer prior to reconnecting under the following scenario (all of the following1930timer prior to reconnecting under the following scenario (all of the following
1910occur):</p>1931occur):</p>
1911<ul>1932<ul>
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)
1913 or a vxWorks system is stopped by any means</li>1934 or a vxWorks system is stopped by any means</li>
1914 <li>This operating system does not immediately reboot using the same IP1935 <li>This operating system does not immediately reboot using the same IP
1915 address</li>1936 address</li>
@@ -1937,9 +1958,15 @@
19371958
1938<p>Short lived CA client applications that issue a CA put request and then1959<p>Short lived CA client applications that issue a CA put request and then
1939immediately exit the process (return from <code>main</code> or call1960immediately exit the process (return from <code>main</code> or call
1961<<<<<<< TREE
1940<code>exit</code>) may find that there request isn't executed. To guarantee1962<code>exit</code>) may find that there request isn't executed. To guarantee
1941that the request is sent call <code>ca_flush_io()</code> followed by1963that the request is sent call <code>ca_flush_io()</code> followed by
1942<code>ca_context_destroy()</code> prior to terminating the process.</p>1964<code>ca_context_destroy()</code> prior to terminating the process.</p>
1965=======
1966<code>exit</code>) may find that there request isn`t executed. To guarantee
1967that the request is sent call <code>ca_flush</code> followed by
1968<code>ca_context_destroy</code> prior to terminating the process.</p>
1969>>>>>>> MERGE-SOURCE
19431970
1944<h3><a name="Problems">ENOBUFS Messages</a></h3>1971<h3><a name="Problems">ENOBUFS Messages</a></h3>
19451972
@@ -1952,7 +1979,7 @@
1952earlier vxWorks versions is rumored to lead to permanent IP communications1979earlier vxWorks versions is rumored to lead to permanent IP communications
1953stalls which are resolved only by a system reboot. IP kernels that use mbufs1980stalls which are resolved only by a system reboot. IP kernels that use mbufs
1954frequently allow the initial and maximum number of mbufs to be configured.1981frequently allow the initial and maximum number of mbufs to be configured.
1955Consult your OS's documentation for configuration procedures which vary between1982Consult your OS`s documentation for configuration procedures which vary between
1956OS and even between different versions of the same OS.</p>1983OS and even between different versions of the same OS.</p>
19571984
1958<h4>Contributing Circumstances</h4>1985<h4>Contributing Circumstances</h4>
@@ -1965,9 +1992,9 @@
1965 increase the size of the mbuf pool.</li>1992 increase the size of the mbuf pool.</li>
1966</ul>1993</ul>
1967<ul>1994<ul>
1968 <li>The server has multiple connections where the server's sustained event1995 <li>The server has multiple connections where the server`s sustained event
1969 (monitor subscription update) production rate is higher than the client's1996 (monitor subscription update) production rate is higher than the client`s
1970 or the network's sustained event consumption rate. This ties up a per1997 or the network`s sustained event consumption rate. This ties up a per
1971 socket quota of mbufs for data that are pending transmission to the client1998 socket quota of mbufs for data that are pending transmission to the client
1972 via the network. In particular, if there are multiple clients that1999 via the network. In particular, if there are multiple clients that
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()
@@ -1978,7 +2005,7 @@
1978 <li>The server does not get a chance to run (because some other higher2005 <li>The server does not get a chance to run (because some other higher
1979 priority thread is running) and the CA clients are sending a high volume of2006 priority thread is running) and the CA clients are sending a high volume of
1980 data over TCP or UDP. This ties up a quota of mbufs for each socket in the2007 data over TCP or UDP. This ties up a quota of mbufs for each socket in the
1981 server that isn't being reduced by the server's socket read system2008 server that isn`t being reduced by the server`s socket read system
1982 calls.</li>2009 calls.</li>
1983</ul>2010</ul>
1984<ul>2011<ul>
@@ -1992,7 +2019,7 @@
1992 <li>When sites switch to the vxWorks 5.4 IP kernel they frequently run into2019 <li>When sites switch to the vxWorks 5.4 IP kernel they frequently run into
1993 network pool exhaustion problems. This may be because the original vxWorks2020 network pool exhaustion problems. This may be because the original vxWorks
1994 IP kernel expanded the network pool as needed at runtime while the new2021 IP kernel expanded the network pool as needed at runtime while the new
1995 kernel's pool is statically configured at compile time, and does2022 kernel`s pool is statically configured at compile time, and does
1996 <em>not</em> expand as needed at runtime. Also, at certain sites problems2023 <em>not</em> expand as needed at runtime. Also, at certain sites problems
1997 related to vxWorks network driver pool exhaustion have also been reported2024 related to vxWorks network driver pool exhaustion have also been reported
1998 (this can also result in ENOBUF diagnostic messages).</li>2025 (this can also result in ENOBUF diagnostic messages).</li>
@@ -2017,8 +2044,8 @@
2017<p>If the subscription update producer in the server produces subscription2044<p>If the subscription update producer in the server produces subscription
2018updates faster than the subscription update consumer in the client consumes2045updates faster than the subscription update consumer in the client consumes
2019them, then events have to be discarded if the buffering in the server2046them, then events have to be discarded if the buffering in the server
2020isn't allowed to grow to an infinite size. This is a law of nature2047isn`t allowed to grow to an infinite size. This is a law of nature
2021- based on queuing theory of course.</p>2048&ndash; based on queuing theory of course.</p>
20222049
2023<p>What is done depends on the version of the CA server. All server versions2050<p>What is done depends on the version of the CA server. All server versions
2024place quotas on the maximum number of subscription updates allowed on the2051place quotas on the maximum number of subscription updates allowed on the
@@ -2040,10 +2067,10 @@
2040getting time warped, but also guarantees that intervening events are discarded2067getting time warped, but also guarantees that intervening events are discarded
2041until the slow client catches up.</p>2068until the slow client catches up.</p>
20422069
2043<p>There is currently no message on the IOC's console when a2070<p>There is currently no message on the IOC`s console when a particular
2044particular client is slow on the uptake. A message of this type used to exist2071client is slow on the uptake. A message of this type used to exist many years
2045many years ago, but it was a source of confusion (and what we will call2072ago, but it was a source of confusion (and what we will call message noise) so
2046message noise) so it was removed. </p>2073it was removed. </p>
20472074
2048<p>There is unfortunately no field in the protocol allowing the server to2075<p>There is unfortunately no field in the protocol allowing the server to
2049indicate that an intervening subscription update was discarded. We should2076indicate that an intervening subscription update was discarded. We should
@@ -2056,12 +2083,12 @@
2056<h3><a name="Flushing">Flushing and Blocking</a></h3>2083<h3><a name="Flushing">Flushing and Blocking</a></h3>
20572084
2058<p>Significant performance gains can be realized when the CA client library2085<p>Significant performance gains can be realized when the CA client library
2059doesn't wait for a response to return from the server after each request. All2086doesn`t wait for a response to return from the server after each request. All
2060requests which require interaction with a CA server are accumulated (buffered)2087requests which require interaction with a CA server are accumulated (buffered)
2061and not forwarded to the IOC until one of ca_flush_io, ca_pend_io,2088and not forwarded to the IOC until one of ca_flush_io, ca_pend_io,
2062ca_pend_event, or ca_sg_pend are called allowing several operations to be2089ca_pend_event, or ca_sg_pend are called allowing several operations to be
2063efficiently sent over the network together. Any process variable values written2090efficiently sent over the network together. Any process variable values written
2064into your program's variables by ca_get() should not be referenced by your2091into your program`s variables by ca_get() should not be referenced by your
2065program until ECA_NORMAL has been received from ca_pend_io().</p>2092program until ECA_NORMAL has been received from ca_pend_io().</p>
20662093
2067<h3><a name="Status">Status Codes</a></h3>2094<h3><a name="Status">Status Codes</a></h3>
@@ -2076,22 +2103,22 @@
2076validity of the request and whether it was successfully enqueued to the server,2103validity of the request and whether it was successfully enqueued to the server,
2077but communication of completion status is deferred until a user callback is2104but communication of completion status is deferred until a user callback is
2078called, or lacking that an exception handler is called. An error number and the2105called, or lacking that an exception handler is called. An error number and the
2079error's severity are embedded in CA status (error) constants. Applications2106error`s severity are embedded in CA status (error) constants. Applications
2080shouldn't test the success of a CA function call by checking to see if the2107shouldn`t test the success of a CA function call by checking to see if the
2081returned value is zero as is the UNIX convention. Below are several methods to2108returned value is zero as is the UNIX convention. Below are several methods to
2082test CA function returns. See <a href="#ca_signal">ca_signal() and SEVCHK</a>2109test CA function returns. See <a href="#ca_signal">ca_signal() and SEVCHK</a>
2083for more information on this topic.</p>2110for more information on this topic.</p>
2084<pre>status = ca_XXXX(); 2111<pre><code>status = ca_XXXX();
2085SEVCHK( status, "ca_XXXX() returned failure status"); 2112SEVCHK( status, "ca_XXXX() returned failure status");
20862113
2087if ( status &amp; CA_M_SUCCESS ) { 2114if ( status &amp; CA_M_SUCCESS ) {
2088 printf ( "The requested ca_XXXX() operation didn't complete successfully"); 2115 printf ( "The requested ca_XXXX() operation didn`t complete successfully");
2089} 2116}
20902117
2091if ( status != ECA_NORMAL ) { 2118if ( status != ECA_NORMAL ) {
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",
2093 ca_message ( status ) ); 2120 ca_message ( status ) );
2094}</pre>2121}</code></pre>
20952122
2096<h3><a name="Channel">Channel Access Data Types</a></h3>2123<h3><a name="Channel">Channel Access Data Types</a></h3>
20972124
@@ -2251,7 +2278,7 @@
2251href="#dbr_size_n">dbr_size_n</a> function can be used to determine the correct2278href="#dbr_size_n">dbr_size_n</a> function can be used to determine the correct
2252number of bytes to reserve when there are more than one value field elements in2279number of bytes to reserve when there are more than one value field elements in
2253a structured CA data type.</p>2280a structured CA data type.</p>
2254<pre>#include &lt;stdio.h&gt;2281<pre><code>#include &lt;stdio.h&gt;
2255#include &lt;stdlib.h&gt;2282#include &lt;stdlib.h&gt;
22562283
2257#include "cadef.h"2284#include "cadef.h"
@@ -2314,7 +2341,7 @@
2314 free ( pTD );2341 free ( pTD );
23152342
2316 return 0;2343 return 0;
2317}</pre>2344}</code></pre>
23182345
2319<h3><a name="User">User Supplied Callback Functions</a></h3>2346<h3><a name="User">User Supplied Callback Functions</a></h3>
23202347
@@ -2324,16 +2351,16 @@
2324asynchronous completion via this mechanism. The <code>event_handler_args2351asynchronous completion via this mechanism. The <code>event_handler_args
2325</code>structure is passed <em>by value</em> to the application supplied2352</code>structure is passed <em>by value</em> to the application supplied
2326callback. In this structure the <code>dbr</code> field is a void pointer to any2353callback. In this structure the <code>dbr</code> field is a void pointer to any
2327data that might be returned. The <code>status</code> field will be2354data that might be returned. The <code>status</code> field will be set to one
2328set to one of the CA error codes in caerr.h and will indicate the status of the2355of the CA error codes in caerr.h and will indicate the status of the operation
2329operation performed in the IOC. If the status field isn't set to ECA_NORMAL or2356performed in the IOC. If the status field isn`t set to ECA_NORMAL or data isn`t
2330data isn't normally returned from the operation (i.e. put call back) then you2357normally returned from the operation (i.e. put call back) then you should
2331should expect that the <code>dbr</code> field will be set to a nill pointer2358expect that the <code>dbr</code>field will be set to a nill pointer (zero). The
2332(zero). The fields <code>usr</code>, <code>chid</code>, and <code>type</code>2359fields <code>usr</code>, <code>chid</code>, and <code>type</code> are set to
2333are set to the values specified when the request was made by the application.2360the values specified when the request was made by the application. The "dbr"
2334The "dbr" pointer, and any data that it points to, are valid only when2361pointer, and any data that it points to, are valid only when executing within
2335executing within the user's callback function.</p>2362the user`s callback function.</p>
2336<pre>typedef struct event_handler_args {2363<pre><code>typedef struct event_handler_args {
2337 void *usr; /* user argument supplied with request */2364 void *usr; /* user argument supplied with request */
2338 chanId chid; /* channel id */2365 chanId chid; /* channel id */
2339 long type; /* the type of the item returned */ 2366 long type; /* the type of the item returned */
@@ -2350,13 +2377,13 @@
2350 const struct dbr_time_double * pTD =2377 const struct dbr_time_double * pTD =
2351 ( const struct dbr_time_double * ) args.dbr;2378 ( const struct dbr_time_double * ) args.dbr;
2352 }2379 }
2353}</pre>2380}</code></pre>
23542381
2355<h3><a name="Channel1">Channel Access Exceptions</a></h3>2382<h3><a name="Channel1">Channel Access Exceptions</a></h3>
23562383
2357<p>When the server detects a failure, and there is no client call back function2384<p>When the server detects a failure, and there is no client call back function
2358attached to the request, an exception handler is executed in the client.2385attached to the request, an exception handler is executed in the client. The
2359The default exception handler prints a message on the console and exits if the2386default exception handler prints a message on the console and exits if the
2360exception condition is severe. Certain internal exceptions within the CA client2387exception condition is severe. Certain internal exceptions within the CA client
2361library, and failures detected by the SEVCHK macro may also cause the exception2388library, and failures detected by the SEVCHK macro may also cause the exception
2362handler to be invoked. To modify this behavior see <a2389handler to be invoked. To modify this behavior see <a
@@ -2365,10 +2392,10 @@
2365<h3><a name="Server">Server and Client Share the Same Address Space on The Same2392<h3><a name="Server">Server and Client Share the Same Address Space on The Same
2366Host</a></h3>2393Host</a></h3>
23672394
2368<p>If the Process Variable's server and it's client are colocated within the2395<p>If the Process Variable`s server and its client are colocated within the
2369same memory address space and the same host then the ca_xxx() operations bypass2396same memory address space and the same host then the ca_xxx() operations bypass
2370the server and directly interact with the server tool component (commonly the2397the server and directly interact with the server tool component (commonly the
2371IOC's function block database). In this situation the ca_xxx() routines2398IOC`s function block database). In this situation the ca_xxx() routines
2372frequently return the completion status of the requested operation directly to2399frequently return the completion status of the requested operation directly to
2373the caller with no opportunity for asynchronous notification of failure via an2400the caller with no opportunity for asynchronous notification of failure via an
2374exception handler. Likewise, callbacks may be directly invoked by the CA2401exception handler. Likewise, callbacks may be directly invoked by the CA
@@ -2377,10 +2404,10 @@
2377<h3><a name="Arrays">Arrays</a></h3>2404<h3><a name="Arrays">Arrays</a></h3>
23782405
2379<p>For routines that require an argument specifying the number of array2406<p>For routines that require an argument specifying the number of array
2380elements, no more than the process variable's maximum native element count may2407elements, no more than the process variable`s maximum native element count may
2381be requested. The process variable's maximum native element count is available2408be requested. The process variable`s maximum native element count is available
2382from ca_element_count() when the channel is connected. If fewer elements than2409from ca_element_count() when the channel is connected. If fewer elements than
2383the process variable's native element count are requested, the requested values2410the process variable`s native element count are requested, the requested values
2384will be fetched beginning at element zero. By default CA limits the number of2411will be fetched beginning at element zero. By default CA limits the number of
2385elements in an array to be no more than approximately 16k divided by the size2412elements in an array to be no more than approximately 16k divided by the size
2386of one element in the array. Starting with EPICS R3.14 the maximum array size2413of one element in the array. Starting with EPICS R3.14 the maximum array size
@@ -2391,10 +2418,10 @@
2391<p>Application programs should assume that CA servers may be restarted, and2418<p>Application programs should assume that CA servers may be restarted, and
2392that network connectivity is transient. When you create a CA channel its2419that network connectivity is transient. When you create a CA channel its
2393initial connection state will most commonly be disconnected. If the Process2420initial connection state will most commonly be disconnected. If the Process
2394Variable's server is available the library will immediately initiate the2421Variable`s server is available the library will immediately initiate the
2395necessary actions to make a connection with it. Otherwise, the client library2422necessary actions to make a connection with it. Otherwise, the client library
2396will monitor the state of servers on the network and connect or reconnect with2423will monitor the state of servers on the network and connect or reconnect with
2397the process variable's server as it becomes available. After the channel2424the process variable`s server as it becomes available. After the channel
2398connects the application program can freely perform IO operations through the2425connects the application program can freely perform IO operations through the
2399channel, but should expect that the channel might disconnect at any time due to2426channel, but should expect that the channel might disconnect at any time due to
2400network connectivity disruptions or server restarts.</p>2427network connectivity disruptions or server restarts.</p>
@@ -2412,7 +2439,7 @@
2412that prefer to poll for connection state changes instead of opting for2439that prefer to poll for connection state changes instead of opting for
2413asynchronous notification. The <code>ca_pend_io</code> function blocks only for2440asynchronous notification. The <code>ca_pend_io</code> function blocks only for
2414channels created specifying a nill connection handler callback function. The2441channels created specifying a nill connection handler callback function. The
2415user's connection state change function will be run immediately from within2442user`s connection state change function will be run immediately from within
2416<code><a href="#ca_create_channel">ca_create_channel</a></code> if the CA2443<code><a href="#ca_create_channel">ca_create_channel</a></code> if the CA
2417client and CA server are both hosted within the same address space (within the2444client and CA server are both hosted within the same address space (within the
2418same process).</p>2445same process).</p>
@@ -2423,12 +2450,12 @@
2423all OS (in past releases the library was thread safe only on vxWorks). When the2450all OS (in past releases the library was thread safe only on vxWorks). When the
2424client library is initialized the programmer may specify if preemptive callback2451client library is initialized the programmer may specify if preemptive callback
2425is to be enabled. Preemptive callback is disabled by default. If preemptive2452is to be enabled. Preemptive callback is disabled by default. If preemptive
2426callback is enabled, then the user's callback functions might be called by2453callback is enabled, then the user`s callback functions might be called by CA`s
2427CA's auxiliary threads when the main initiating channel access thread is not2454auxiliary threads when the main initiating channel access thread is not inside
2428inside of a function in the channel access client library. Otherwise, the2455of a function in the channel access client library. Otherwise, the user`s
2429user's callback functions will be called only when the main initiating channel2456callback functions will be called only when the main initiating channel access
2430access thread is executing inside of the CA client library. When the CA client2457thread is executing inside of the CA client library. When the CA client library
2431library invokes a user's callback function, it will always wait for the current2458invokes a user`s callback function, it will always wait for the current
2432callback to complete prior to executing another callback function. Programmers2459callback to complete prior to executing another callback function. Programmers
2433enabling preemptive callback should be familiar with using mutex locks to2460enabling preemptive callback should be familiar with using mutex locks to
2434create a reliable multi-threaded program.</p>2461create a reliable multi-threaded program.</p>
@@ -2457,10 +2484,10 @@
2457database CA links and the sequencer are designed to not use the same CA client2484database CA links and the sequencer are designed to not use the same CA client
2458library threads, network circuits, and data structures. Each thread that calls2485library threads, network circuits, and data structures. Each thread that calls
2459<a href="#ca_context_create">ca_context_create()</a> for the first time either2486<a href="#ca_context_create">ca_context_create()</a> for the first time either
2460directly or implicitly when calling any CA library function for the first2487directly or implicitly when calling any CA library function for the first time,
2461time, creates a CA client library context. A CA client library context contains2488creates a CA client library context. A CA client library context contains all
2462all of the threads, network circuits, and data structures required to connect2489of the threads, network circuits, and data structures required to connect and
2463and communicate with the channels that a CA client application has created. The2490communicate with the channels that a CA client application has created. The
2464priority of auxiliary threads spawned by the CA client library are at fixed2491priority of auxiliary threads spawned by the CA client library are at fixed
2465offsets from the priority of the thread that called <a2492offsets from the priority of the thread that called <a
2466href="#ca_context_create">ca_context_create()</a>. An application specific2493href="#ca_context_create">ca_context_create()</a>. An application specific
@@ -2474,9 +2501,10 @@
2474It is not possible to attach a thread to a non-preemptive CA context created2501It is not possible to attach a thread to a non-preemptive CA context created
2475explicitly <em>or implicitly</em> with2502explicitly <em>or implicitly</em> with
2476ca_create_context(ca_disable_preemptive_callback). Once a thread has joined2503ca_create_context(ca_disable_preemptive_callback). Once a thread has joined
2477with a CA context it need only make ordinary ca_xxxx() library calls to use the2504with a CA context it need only make ordinary ca_xxxx()library calls to use the
2478context.</p>2505context. There is no need to specify the context identifier when invoking the
24792506CA calls because the context identifier is stored in a thread private variable
2507by ca_attach_context().</p>
24802508
2481<p>A CA client library context can be shut down and cleaned up, after2509<p>A CA client library context can be shut down and cleaned up, after
2482destroying any channels or application specific threads that are attached to2510destroying any channels or application specific threads that are attached to
@@ -2493,14 +2521,14 @@
2493ca_sg_block() or alternatively it must call ca_poll() at least every 1002521ca_sg_block() or alternatively it must call ca_poll() at least every 100
2494milli-seconds. In single threaded applications a file descriptor manager like2522milli-seconds. In single threaded applications a file descriptor manager like
2495Xt or the interface described in fdManager.h can be used to monitor both mouse2523Xt or the interface described in fdManager.h can be used to monitor both mouse
2496clicks and also CA's file descriptors so that ca_poll() can be called2524clicks and also CA`s file descriptors so that ca_poll() can be called
2497immediately when CA server messages arrives over the network.</p>2525immediately when CA server messages arrives over the network.</p>
24982526
2499<h3><a name="Avoid">Avoid Emulating Bad Practices that May Still be2527<h3><a name="Avoid">Avoid Emulating Bad Practices that May Still be
2500Common</a></h3>2528Common</a></h3>
25012529
2502<p>With the embryonic releases of EPICS it was a common practice to examine a2530<p>With the embryonic releases of EPICS it was a common practice to examine a
2503channel's connection state, its native type, and its native element count by2531channel`s connection state, its native type, and its native element count by
2504directly accessing fields in a structure using a pointer stored in type2532directly accessing fields in a structure using a pointer stored in type
2505<code>chid</code>. Likewise, a user private pointer in the per channel2533<code>chid</code>. Likewise, a user private pointer in the per channel
2506structure was also commonly set by directly accessing fields in the channel2534structure was also commonly set by directly accessing fields in the channel
@@ -2530,9 +2558,9 @@
2530<ul>2558<ul>
2531 <li>The vxWorks shell thread runs at the very highest priority in the system2559 <li>The vxWorks shell thread runs at the very highest priority in the system
2532 and therefore socket calls are made at a priority that is above the2560 and therefore socket calls are made at a priority that is above the
2533 priority of tNetTask - a practice that has caused the WRS IP kernel2561 priority of tNetTask. This has caused problems with the WRS IP kernel in
2534 to get sick in the past. That symptom was observed some time ago, but we2562 the past. That symptom was observed some time ago, but we don`t know
2535 don't know if WRS has fixed the problem.</li>2563 if WRS has fixed the problem.</li>
2536</ul>2564</ul>
2537<ul>2565<ul>
2538 <li>The vxWorks shell thread runs at the very highest priority in the system2566 <li>The vxWorks shell thread runs at the very highest priority in the system
@@ -2547,7 +2575,7 @@
2547<ul>2575<ul>
2548 <li>In EPICS R3.13 the CA client library installed vxWorks task exit handlers2576 <li>In EPICS R3.13 the CA client library installed vxWorks task exit handlers
2549 behaved strangely if CA functions were called from the vxWorks shell,2577 behaved strangely if CA functions were called from the vxWorks shell,
2550 ca_task_exit() wasn't called, and the vxWorks shell restarted. In2578 ca_task_exit() wasn`t called, and the vxWorks shell restarted. In
2551 EPICS R3.14 vxWorks task exit handlers are not installed and therefore2579 EPICS R3.14 vxWorks task exit handlers are not installed and therefore
2552 cleanup is solely the responsibility of the user. With EPICS R3.14 the user2580 cleanup is solely the responsibility of the user. With EPICS R3.14 the user
2553 must call ca_context_destroy or ca_task_exit to clean up on vxWorks. This2581 must call ca_context_destroy or ca_task_exit to clean up on vxWorks. This
@@ -2565,10 +2593,10 @@
2565<h2><a name="Function Call Reference"></a>Function Call Reference</h2>2593<h2><a name="Function Call Reference"></a>Function Call Reference</h2>
25662594
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>
2568<pre>#include &lt;cadef.h&gt;2596<pre><code>#include &lt;cadef.h&gt;
2569enum ca_preemptive_callback_select2597enum ca_preemptive_callback_select
2570 { ca_disable_preemptive_callback, ca_enable_preemptive_callback };2598 { ca_disable_preemptive_callback, ca_enable_preemptive_callback };
2571int ca_context_create ( enum ca_preemptive_callback_select SELECT );</pre>2599int ca_context_create ( enum ca_preemptive_callback_select SELECT );</code></pre>
25722600
2573<h4>Description</h4>2601<h4>Description</h4>
25742602
@@ -2592,7 +2620,7 @@
2592 are two implications to consider. </dd>2620 are two implications to consider. </dd>
2593 <dd><p>First, if preemptive callback mode is enabled the developer must2621 <dd><p>First, if preemptive callback mode is enabled the developer must
2594 provide mutual exclusion protection for his data structures. In this mode2622 provide mutual exclusion protection for his data structures. In this mode
2595 it's possible for two threads to touch the application's data structures2623 it`s possible for two threads to touch the application`s data structures
2596 at once: this might be the initializing thread (the thread that called2624 at once: this might be the initializing thread (the thread that called
2597 ca_context_create) and also a private thread created by the CA client2625 ca_context_create) and also a private thread created by the CA client
2598 library for the purpose of receiving network messages and calling2626 library for the purpose of receiving network messages and calling
@@ -2631,7 +2659,7 @@
26312659
2632<h4>Description</h4>2660<h4>Description</h4>
26332661
2634<p>Shut down the calling thread's channel access client context and free any2662<p>Shut down the calling thread`s channel access client context and free any
2635resources allocated. Detach the calling thread from any CA client context.</p>2663resources allocated. Detach the calling thread from any CA client context.</p>
26362664
2637<p>Any user-created threads that have attached themselves to the CA context2665<p>Any user-created threads that have attached themselves to the CA context
@@ -2647,8 +2675,13 @@
2647<p>On many OS that execute programs in a process based environment the2675<p>On many OS that execute programs in a process based environment the
2648resources used by the client library such as sockets and allocated memory are2676resources used by the client library such as sockets and allocated memory are
2649automatically released by the system when the process exits and2677automatically released by the system when the process exits and
2678<<<<<<< TREE
2650ca_context_destroy() hasn't been called, but on light weight systems such as2679ca_context_destroy() hasn't been called, but on light weight systems such as
2651vxWorks or RTEMS no cleanup occurs unless the application calls2680vxWorks or RTEMS no cleanup occurs unless the application calls
2681=======
2682ca_context_destroy() hasn`t been called, but on light weight systems such as
2683vxWorks or RTEMS no cleanup occurs unless the application call
2684>>>>>>> MERGE-SOURCE
2652ca_context_destroy().</p>2685ca_context_destroy().</p>
26532686
2654<h4>Returns</h4>2687<h4>Returns</h4>
@@ -2659,27 +2692,42 @@
26592692
2660<p><a href="#ca_context_create">ca_context_create</a>()</p>2693<p><a href="#ca_context_create">ca_context_create</a>()</p>
26612694
2695<<<<<<< TREE
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>
2663<pre>#include &lt;cadef.h&gt;2697<pre>#include &lt;cadef.h&gt;
2664typedef void ( caCh ) (struct connection_handler_args);2698typedef void ( caCh ) (struct connection_handler_args);
2665int ca_create_channel (const char *PVNAME,2699int ca_create_channel (const char *PVNAME,
2666 caCh *USERFUNC, void *PUSER,2700 caCh *USERFUNC, void *PUSER,
2667 capri PRIORITY, chid *PCHID );</pre>2701 capri PRIORITY, chid *PCHID );</pre>
2702=======
2703<h3><a name="ca_create_channel"><code>ca_create_channel()</code></a></h3>
2704<pre><code>#include &lt;cadef.h&gt;
2705typedef void ( *pCallBack ) (
2706 struct connection_handler_args );
2707int ca_create_channel
2708(
2709 const char *PROCESS_VARIABLE_NAME,
2710 caCh *USERFUNC,
2711 void *PUSER,
2712 capri priority,
2713 chid *PCHID
2714);</code></pre>
2715>>>>>>> MERGE-SOURCE
26682716
2669<h4>Description</h4>2717<h4>Description</h4>
26702718
2671<p>This function creates a CA channel. The CA client library will attempt to2719<p>This function creates a CA channel. The CA client library will attempt to
2672establish and maintain a virtual circuit between the caller's application and a2720establish and maintain a virtual circuit between the caller`s application and a
2673named process variable in a CA server. Each call to ca_create_channel allocates2721named process variable in a CA server. Each call to ca_create_channel allocates
2674resources in the CA client library and potentially also a CA server. The2722resources in the CA client library and potentially also a CA server. The
2675function ca_clear_channel() is used to release these resources. If successful,2723function ca_clear_channel() is used to release these resources. If successful,
2676the routine writes a channel identifier into the user's variable of type2724the routine writes a channel identifier into the user`s variable of type
2677"chid". This identifier can be used with any channel access call that operates2725"chid". This identifier can be used with any channel access call that operates
2678on a channel.</p>2726on a channel.</p>
26792727
2680<p>The circuit may be initially connected or disconnected depending on the2728<p>The circuit may be initially connected or disconnected depending on the
2681state of the network and the location of the channel. A channel will only enter2729state of the network and the location of the channel. A channel will only enter
2682a connected state after server's address is determined, and only if channel2730a connected state after server`s address is determined, and only if channel
2683access successfully establishes a virtual circuit through the network to the2731access successfully establishes a virtual circuit through the network to the
2684server. Channel access routines that send a request to a server will return2732server. Channel access routines that send a request to a server will return
2685ECA_DISCONNCHID if the channel is currently disconnected.</p>2733ECA_DISCONNCHID if the channel is currently disconnected.</p>
@@ -2703,7 +2751,7 @@
27032751
2704<p>Due to the inherently transient nature of network connections the order of2752<p>Due to the inherently transient nature of network connections the order of
2705connection call backs relative to the order that ca_create_channel() calls are2753connection call backs relative to the order that ca_create_channel() calls are
2706made by the application can't be guaranteed, and application programs may need2754made by the application can`t be guaranteed, and application programs may need
2707to be prepared for a connected channel to enter a disconnected state at any2755to be prepared for a connected channel to enter a disconnected state at any
2708time.</p>2756time.</p>
27092757
@@ -2723,29 +2771,29 @@
2723</dl>2771</dl>
2724<dl>2772<dl>
2725 <dt><code>USERFUNC</code></dt>2773 <dt><code>USERFUNC</code></dt>
2726 <dd>Optional address of the user's call back function to be run when the2774 <dd>Optional address of the user`s call back function to be run when the
2727 connection state changes. Casual users of channel access may decide to2775 connection state changes. Casual users of channel access may decide to
2728 set this field to nil or 0 if they do not need to have a call back2776 set this field to nil or 0 if they do not need to have a call back
2729 function run in response to each connection state change event.2777 function run in response to each connection state change event.
2730 <p>The following structure is passed <em>by value </em>to the user's2778 <p>The following structure is passed <em>by value </em>to the user`s
2731 connection connection callback function. The <code>op</code> field will2779 connection connection callback function. The <code>op</code> field will
2732 be set by the CA client library to <code>CA_OP_CONN_UP</code> when the2780 be set by the CA client library to <code>CA_OP_CONN_UP</code> when the
2733 channel connects, and to <code>CA_OP_CONN_DOWN</code> when the channel2781 channel connects, and to <code>CA_OP_CONN_DOWN</code> when the channel
2734 disconnects. See <code><a href="#ca_puser">ca_puser</a></code> if the2782 disconnects. See <code><a href="#ca_puser">ca_puser</a></code> if the
2735 <code>PUSER</code> argument is required in your callback2783 <code>PUSER</code> argument is required in your callback
2736 handler<code>.</code></p>2784 handler<code>.</code></p>
2737 <pre>struct ca_connection_handler_args {2785 <pre><code>struct ca_connection_handler_args {
2738 chanId chid; /* channel id */2786 chanId chid; /* channel id */
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 */
2740};</pre>2788};</code></pre>
2741 </dd>2789 </dd>
2742</dl>2790</dl>
2743<dl>2791<dl>
2744 <dt><code>PUSER</code></dt>2792 <dt><code>PUSER</code></dt>
2745 <dd>The value of this void pointer argument is retained in2793 <dd>The value of this void pointer argument is retained in storage
2746 storage associated with the specified channel. See the MACROS manual page2794 associated with the specified channel. See the MACROS manual page for
2747 for reading and writing this field. Casual users of channel access may2795 reading and writing this field. Casual users of channel access may wish
2748 wish to set this field to nil or 0.</dd>2796 to set this field to nil or 0.</dd>
2749</dl>2797</dl>
2750<dl>2798<dl>
2751 <dt><code>PRIORITY</code></dt>2799 <dt><code>PRIORITY</code></dt>
@@ -2778,9 +2826,9 @@
27782826
2779<p>ECA_ALLOCMEM - Unable to allocate memory</p>2827<p>ECA_ALLOCMEM - Unable to allocate memory</p>
27802828
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>
2782<pre>#include &lt;cadef.h&gt;2830<pre><code>#include &lt;cadef.h&gt;
2783int ca_clear_channel (chid CHID);</pre>2831int ca_clear_channel (chid CHID);</code></pre>
27842832
2785<h4>Description</h4>2833<h4>Description</h4>
27862834
@@ -2808,8 +2856,8 @@
28082856
2809<p>ECA_BADCHID - Corrupted CHID</p>2857<p>ECA_BADCHID - Corrupted CHID</p>
28102858
2811<h3><code><a name="ca_put">ca_put()</a></code></h3>2859<h3><a name="ca_put"><code>ca_put()</code></a></h3>
2812<pre>#include &lt;cadef.h&gt;2860<pre><code>#include &lt;cadef.h&gt;
2813int ca_put ( chtype TYPE, 2861int ca_put ( chtype TYPE,
2814 chid CHID, void *PVALUE ); 2862 chid CHID, void *PVALUE );
2815int ca_array_put ( chtype TYPE, unsigned long COUNT, 2863int ca_array_put ( chtype TYPE, unsigned long COUNT,
@@ -2820,13 +2868,21 @@
2820 caEventCallBackFunc PFUNC, void *USERARG ); 2868 caEventCallBackFunc PFUNC, void *USERARG );
2821int ca_array_put_callback ( chtype TYPE, unsigned long COUNT, 2869int ca_array_put_callback ( chtype TYPE, unsigned long COUNT,
2822 chid CHID, const void *PVALUE, 2870 chid CHID, const void *PVALUE,
2871<<<<<<< TREE
2823 caEventCallBackFunc PFUNC, void *USERARG );</pre>2872 caEventCallBackFunc PFUNC, void *USERARG );</pre>
2873=======
2874 pCallBack PFUNC, void *USERARG );</code></pre>
2875>>>>>>> MERGE-SOURCE
28242876
2825<h4>Description</h4>2877<h4>Description</h4>
28262878
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>
28282880
2881<<<<<<< TREE
2829<p>When ca_put or ca_array_put are invoked the client will receive no response2882<p>When ca_put or ca_array_put are invoked the client will receive no response
2883=======
2884<p>When ca_array_put or ca_put are invoked the client will receive no response
2885>>>>>>> MERGE-SOURCE
2830unless the request can not be fulfilled in the server. If unsuccessful an2886unless the request can not be fulfilled in the server. If unsuccessful an
2831exception handler is run on the client side.</p>2887exception handler is run on the client side.</p>
28322888
@@ -2838,7 +2894,7 @@
2838</p>2894</p>
28392895
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,
2841then the client's call back function is called with failure status, but this2897then the client`s call back function is called with failure status, but this
2842does not guarantee that the server did not receive and process the request2898does not guarantee that the server did not receive and process the request
2843before the disconnect. If a connection is lost and then resumed outstanding ca2899before the disconnect. If a connection is lost and then resumed outstanding ca
2844put requests are not automatically reissued following reconnect.</p>2900put requests are not automatically reissued following reconnect.</p>
@@ -2852,8 +2908,8 @@
28522908
2853<h4>Description (IOC Database Specific)</h4>2909<h4>Description (IOC Database Specific)</h4>
28542910
2855<p>A CA put request causes the record to process if the record's SCAN field is2911<p>A CA put request causes the record to process if the record`s SCAN field is
2856set to passive, and the field being written has it's process passive attribute2912set to passive, and the field being written has its process passive attribute
2857set to true. If such a record is already processing when a put request is2913set to true. If such a record is already processing when a put request is
2858initiated the specified field is written immediately, and the record is2914initiated the specified field is written immediately, and the record is
2859scheduled to process again as soon as it finishes processing. Earlier instances2915scheduled to process again as soon as it finishes processing. Earlier instances
@@ -2861,21 +2917,45 @@
2861discarded, but the last put request initiated is always written and2917discarded, but the last put request initiated is always written and
2862processed.</p>2918processed.</p>
28632919
2864<p>A CA put <span style="font-style: italic;">callback</span> request causes2920<p>A CA put <em>callback</em> request causes the record to process if the
2865the record to process if the record's SCAN field is set to passive, and the2921record`s SCAN field is set to passive, and the field being written has its
2866field being written has it's process passive attribute set to true. For such a2922process passive attribute set to true. For such a record, the user`s put
2867record, the user's put callback function is not called until after the record,2923callback function is not called until after the record, and any records that
2868and any records that the record links to, finish processing. If such a record2924the record links to, finish processing. If such a record is already processing
2869is already processing when a put <span2925when a put <em>callback</em> request is initiated the put <em>callback</em>
2870style="font-style: italic;">callback</span> request is initiated the put <span2926request is postponed until the record, and any records it links to, finish
2871style="font-style: italic;">callback</span> request is postponed until the2927processing.</p>
2872record, and any records it links to, finish processing.</p>
28732928
2874<p>If the record's SCAN field is not set to passive, or the field being written2929<p>If the record`s SCAN field is not set to passive, or the field being written
2875has it's process passive attribute set to false then the CA put or CA put2930has its process passive attribute set to false, then the CA put or CA put
2876callback request cause the specified field to be immediately written, but they2931callback request cause the specified field to be immediately written, but they
2877do not cause the record to be processed.</p>2932do not cause the record to be processed.</p>
28782933
2934<h4>Description (IOC Database Specific)</h4>
2935
2936<p>A CA put request causes the record to process if the record`s SCAN field is
2937set to passive, and the field being written has its process passive attribute
2938set to true. If such a record is already processing when a put request is
2939initiated the specified field is written immediately, and the record is
2940scheduled to process again as soon as it finishes processing. Earlier instances
2941of multiple put requests initiated while the record is being processing may be
2942discarded, but the last put request initiated is always written and
2943processed.</p>
2944
2945<p>A CA put <em>callback</em> request causes the record to process if the
2946record`s SCAN field is set to passive, and the field being written has its
2947process passive attribute set to true. For such a record, the user`s put
2948callback function is not called until after the record, and any records that
2949the record links to, finish processing. If such a record is already processing
2950when a put <em>callback</em> request is initiated the put <em>callback</em>
2951request is postponed until the record, and any records it links to, finish
2952processing.</p>
2953
2954<p>If the record`s SCAN field is not set to passive, or the field being written
2955has its process passive attribute set to false then the CA put or CA put
2956<em>callback</em> request cause the specified field to be immediately written,
2957but they do not cause the record to be processed.</p>
2958
2879<h4>Arguments</h4>2959<h4>Arguments</h4>
2880<dl>2960<dl>
2881 <dt><code>TYPE</code></dt>2961 <dt><code>TYPE</code></dt>
@@ -2958,7 +3038,7 @@
2958requests are not automatically reissued following reconnect.</p>3038requests are not automatically reissued following reconnect.</p>
29593039
2960<p>When ca_get_callback or ca_array_get_callback are invoked a value is read3040<p>When ca_get_callback or ca_array_get_callback are invoked a value is read
2961from the channel and then the user's callback is invoked with a pointer to the3041from the channel and then the user`s callback is invoked with a pointer to the
2962retrieved value. Note that ca_pend_io will not block for the delivery of values3042retrieved value. Note that ca_pend_io will not block for the delivery of values
2963requested by ca_get_callback. If the channel disconnects before a ca get3043requested by ca_get_callback. If the channel disconnects before a ca get
2964callback request can be completed, then the clients call back function is3044callback request can be completed, then the clients call back function is
@@ -2974,7 +3054,14 @@
29743054
2975<h4>Description (IOC Database Specific)</h4>3055<h4>Description (IOC Database Specific)</h4>
29763056
2977<p>A CA get or CA get callback request causes the record's field to be read3057<p>A CA get or CA get callback request causes the record`s field to be read
3058immediately independent of whether the record is currently being processed or
3059not. There is currently no mechanism in place to cause a record to be processed
3060when a CA get request is initiated.</p>
3061
3062<h4>Description (IOC Database Specific)</h4>
3063
3064<p>A CA get or CA get callback request causes the record`s field to be read
2978immediately independent of whether the record is currently being processed or3065immediately independent of whether the record is currently being processed or
2979not. There is currently no mechanism in place to cause a record to be processed3066not. There is currently no mechanism in place to cause a record to be processed
2980when a CA get request is initiated.</p>3067when a CA get request is initiated.</p>
@@ -3042,6 +3129,7 @@
30423129
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>
30443131
3132<<<<<<< TREE
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>
3046<pre>#include &lt;cadef.h&gt;3134<pre>#include &lt;cadef.h&gt;
3047typedef void ( caEventCallBackFunc ) (struct event_handler_args);3135typedef void ( caEventCallBackFunc ) (struct event_handler_args);
@@ -3049,25 +3137,35 @@
3049 chid CHID, unsigned long MASK,3137 chid CHID, unsigned long MASK,
3050 caEventCallBackFunc USERFUNC, void *USERARG, 3138 caEventCallBackFunc USERFUNC, void *USERARG,
3051 evid *PEVID );</pre>3139 evid *PEVID );</pre>
3140=======
3141<h3><a name="ca_add_event"></a><code>ca_create_subscription()</code></h3>
3142<pre><code>#include &lt;cadef.h&gt;
3143typedef void ( *pCallBack ) (
3144 struct event_handler_args );
3145int ca_create_subscription ( chtype TYPE,
3146 unsigned long COUNT, chid CHID,
3147 unsigned long MASK, pCallBack USERFUNC, void *USERARG,
3148 evid *PEVID );</code></pre>
3149>>>>>>> MERGE-SOURCE
30523150
3053<h4>Description</h4>3151<h4>Description</h4>
30543152
3055<p>Register a state change subscription and specify a call back function to be3153<p>Register a state change subscription and specify a call back function to be
3056invoked whenever the process variable undergoes significant state changes. A3154invoked whenever the process variable undergoes significant state changes. A
3057significant change can be a change in the process variable's value, alarm3155significant change can be a change in the process variable`s value, alarm
3058status, or alarm severity. In the process control function block database the3156status, or alarm severity. In the process control function block database the
3059deadband field determines the magnitude of a significant change for for the3157deadband field determines the magnitude of a significant change for for the
3060process variable's value. Each call to this function consumes resources in the3158process variable`s value. Each call to this function consumes resources in the
3061client library and potentially a CA server until one of ca_clear_channel or3159client library and potentially a CA server until one of ca_clear_channel or
3062ca_clear_event is called.</p>3160ca_clear_event is called.</p>
30633161
3064<p>Subscriptions may be installed or canceled against both connected and3162<p>Subscriptions may be installed or canceled against both connected and
3065disconnected channels. The specified USERFUNC is called once immediately after3163disconnected channels. The specified USERFUNC is called once immediately after
3066the subscription is installed with the process variable's current state if the3164the subscription is installed with the process variable`s current state if the
3067process variable is connected. Otherwise, the specified USERFUNC is called3165process variable is connected. Otherwise, the specified USERFUNC is called
3068immediately after establishing a connection (or reconnection) with the process3166immediately after establishing a connection (or reconnection) with the process
3069variable. The specified USERFUNC is called immediately with the process3167variable. The specified USERFUNC is called immediately with the process
3070variable's current state from within ca_add_event() if the client and the3168variable`s current state from within ca_add_event() if the client and the
3071process variable share the same address space.</p>3169process variable share the same address space.</p>
30723170
3073<p>If a subscription is installed on a channel in a disconnected state then the3171<p>If a subscription is installed on a channel in a disconnected state then the
@@ -3124,8 +3222,8 @@
3124<dl>3222<dl>
3125 <dt><code>PEVID</code></dt>3223 <dt><code>PEVID</code></dt>
3126 <dd>This is a pointer to user supplied event id which is overwritten if3224 <dd>This is a pointer to user supplied event id which is overwritten if
3127 successful. This event id can later be used to clear a specific3225 successful. This event id can later be used to clear a specific event.
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>
3129</dl>3227</dl>
3130<dl>3228<dl>
3131 <dt><code>MASK</code></dt>3229 <dt><code>MASK</code></dt>
@@ -3142,7 +3240,7 @@
3142 </ul>3240 </ul>
3143 <p>For functions above that do not include a trigger specification,3241 <p>For functions above that do not include a trigger specification,
3144 events will be triggered when there are significant changes in the3242 events will be triggered when there are significant changes in the
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.
3146 This is the same as "DBE_VALUE | DBE_ALARM."</p>3244 This is the same as "DBE_VALUE | DBE_ALARM."</p>
3147 </dd>3245 </dd>
3148</dl>3246</dl>
@@ -3232,9 +3330,9 @@
3232network delays such as Ethernet collision exponential back off until3330network delays such as Ethernet collision exponential back off until
3233retransmission delays which can be quite long on overloaded networks.</p>3331retransmission delays which can be quite long on overloaded networks.</p>
32343332
3235<p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine will3333<p>Unlike <code><a href="#ca_pend_event">ca_pend_event</a></code>, this routine
3236not process CA's background activities if none of the selected IO requests are3334will not process CA`s background activities if none of the selected IO requests
3237pending.</p>3335are pending.</p>
32383336
3239<h4>Arguments</h4>3337<h4>Arguments</h4>
3240<dl>3338<dl>
@@ -3303,7 +3401,7 @@
3303requests.</p>3401requests.</p>
33043402
3305<p>Both <code>ca_pend_event</code> and <code>ca_poll</code> return ECA_TIMEOUT3403<p>Both <code>ca_pend_event</code> and <code>ca_poll</code> return ECA_TIMEOUT
3306when successful. This behavior probably isn't intuitive, but it is preserved to3404when successful. This behavior probably isn`t intuitive, but it is preserved to
3307insure backwards compatibility.</p>3405insure backwards compatibility.</p>
33083406
3309<p>See also <a href="#Thread">Thread Safety and Preemptive Callback to User3407<p>See also <a href="#Thread">Thread Safety and Preemptive Callback to User
@@ -3329,8 +3427,8 @@
33293427
3330<h4>Description</h4>3428<h4>Description</h4>
33313429
3332<p>Flush outstanding IO requests to the server. This routine might be useful3430<p>Flush outstanding IO requests to the server. This routine might be useful to
3333to users who need to flush requests prior to performing client side labor in3431users who need to flush requests prior to performing client side labor in
3334parallel with labor performed in the server.</p>3432parallel with labor performed in the server.</p>
33353433
3336<p>Outstanding requests are also sent whenever the buffer which holds them3434<p>Outstanding requests are also sent whenever the buffer which holds them
@@ -3340,10 +3438,10 @@
33403438
3341<p>ECA_NORMAL - Normal successful completion</p>3439<p>ECA_NORMAL - Normal successful completion</p>
33423440
3343<h3><code><a name="ca_signal">ca_signal()</a></code></h3>3441<h3><code><a name="ca_signal">ca_signal</a>()</code></h3>
3344<pre>#include &lt;cadef.h&gt;3442<pre><code>#include &lt;cadef.h&gt;
3345int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING ); 3443int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
3346void SEVCHK( CA_STATUS, CONTEXT_STRING );</pre>3444void SEVCHK( CA_STATUS, CONTEXT_STRING );</code></pre>
33473445
3348<h4>Description</h4>3446<h4>Description</h4>
33493447
@@ -3359,8 +3457,8 @@
3359code testing the status returned from each channel access call.</p>3457code testing the status returned from each channel access call.</p>
33603458
3361<h4>Examples</h4>3459<h4>Examples</h4>
3362<pre>status = ca_context_create (...); 3460<pre><code>status = ca_context_create (...);
3363SEVCHK ( status, "Unable to create a CA client context" );</pre>3461SEVCHK ( status, "Unable to create a CA client context" );</code></pre>
33643462
3365<p>If the application only wishes to print the message associated with an error3463<p>If the application only wishes to print the message associated with an error
3366code or test the severity of an error there are also functions provided for3464code or test the severity of an error there are also functions provided for
@@ -3396,7 +3494,7 @@
3396information about this type of error is passed from the server to the client in3494information about this type of error is passed from the server to the client in
3397an exception message. When the client receives this exception message an3495an exception message. When the client receives this exception message an
3398exception handler callback is called.The default exception handler prints a3496exception handler callback is called.The default exception handler prints a
3399diagnostic message on the client's standard out and terminates execution if the3497diagnostic message on the client`s standard out and terminates execution if the
3400error condition is severe.</p>3498error condition is severe.</p>
34013499
3402<p>Note that certain fields in "struct exception_handler_args" are not3500<p>Note that certain fields in "struct exception_handler_args" are not
@@ -3409,23 +3507,23 @@
3409<dl>3507<dl>
3410 <dt><code>USERFUNC</code></dt>3508 <dt><code>USERFUNC</code></dt>
3411 <dd>Address of user callback function to be executed when an exceptions3509 <dd>Address of user callback function to be executed when an exceptions
3412 occur. Passing a nil value causes the default exception handler to be3510 occur. Passing a nill value causes the default exception handler to be
3413 reinstalled. The following structure is passed by value to the user's3511 reinstalled. The following structure is passed by value to the user`s
3414 callback function. Currently, the <code>op</code> field can be one of3512 callback function. Currently, the <code>op</code> field can be one of
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,
3416 CA_OP_CLEAR_EVENT, or CA_OP_OTHER.</code>3514 CA_OP_CLEAR_EVENT, or CA_OP_OTHER.</code>
3417 <pre>struct exception_handler_args {3515 <pre><code>struct exception_handler_args {
3418 void *usr; /* user argument supplied when installed */3516 void *usr; /* user argument supplied when installed */
3419 chanId chid; /* channel id (may be nill) */3517 chanId chid; /* channel id (may be nill) */
3420 long type; /* type requested */3518 long type; /* type requested */
3421 long count; /* count requested */3519 long count; /* count requested */
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 */
3423 long stat; /* channel access ECA_XXXX status code */3521 long stat; /* channel access ECA_XXXX status code */
3424 long op; /* CA_OP_GET, CA_OP_PUT, ..., CA_OP_OTHER */3522 long op; /* CA_OP_GET, CA_OP_PUT, ..., CA_OP_OTHER */
3425 const char *ctx; /* a character string containing context info */3523 const char *ctx; /* a character string containing context info */
3426 sonst char *pFile; /* source file name (may be NULL) */3524 sonst char *pFile; /* source file name (may be NULL) */
3427 unsigned lineNo; /* source file line number (may be zero) */3525 unsigned lineNo; /* source file line number (may be zero) */
3428};</pre>3526};</code></pre>
3429 </dd>3527 </dd>
3430</dl>3528</dl>
3431<dl>3529<dl>
@@ -3435,7 +3533,7 @@
3435</dl>3533</dl>
34363534
3437<h4>Example</h4>3535<h4>Example</h4>
3438<pre>void ca_exception_handler (3536<pre><code>void ca_exception_handler (
3439 struct exception_handler_args args)3537 struct exception_handler_args args)
3440{3538{
3441 char buf[512];3539 char buf[512];
@@ -3448,11 +3546,11 @@
3448 pName = "?";3546 pName = "?";
3449 }3547 }
3450 sprintf ( buf,3548 sprintf ( buf,
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",
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 );
3453 ca_signal ( args.stat, buf );3551 ca_signal ( args.stat, buf );
3454}3552}
3455ca_add_exception_event ( ca_exception_handler , 0 );</pre>3553ca_add_exception_event ( ca_exception_handler , 0 );</code></pre>
34563554
3457<h4>Returns</h4>3555<h4>Returns</h4>
34583556
@@ -3460,9 +3558,11 @@
34603558
3461<p></p>3559<p></p>
34623560
3463<h3><code><a name="ca_add_fd_registration">ca_add_fd_registration()</a></code></h3>3561<h3><code><a name="ca_add_fd_"
3464<pre>#include &lt;cadef.h&gt;3562id="ca_add_fd_registration">ca_add_fd_registration()</a></code></h3>
3465int ca_add_fd_registration ( void ( USERFUNC * ) ( void *USERARG, int FD, int OPENED ), void * USERARG )</pre>3563<pre><code>#include &lt;cadef.h&gt;
3564int ca_add_fd_registration ( void ( USERFUNC * ) ( void *USERARG,
3565 int FD, int OPENED ), void * USERARG )</code></pre>
34663566
3467<h4>Description</h4>3567<h4>Description</h4>
34683568
@@ -3496,7 +3596,7 @@
3496file descriptor was closed.</p>3596file descriptor was closed.</p>
34973597
3498<h4>Example</h4>3598<h4>Example</h4>
3499<pre>int s;3599<pre><code>int s;
3500static struct myStruct aStruct;3600static struct myStruct aStruct;
35013601
3502void fdReg ( struct myStruct *pStruct, int fd, int opened )3602void fdReg ( struct myStruct *pStruct, int fd, int opened )
@@ -3505,7 +3605,7 @@
3505 else printf ( "fd %d was closed\n", fd );3605 else printf ( "fd %d was closed\n", fd );
3506}3606}
3507s = ca_add_fd_registration ( fdReg, &amp; aStruct );3607s = ca_add_fd_registration ( fdReg, &amp; aStruct );
3508SEVCHK ( s, NULL );</pre>3608SEVCHK ( s, NULL );</code></pre>
35093609
3510<h4>Comments</h4>3610<h4>Comments</h4>
35113611
@@ -3531,9 +3631,15 @@
35313631
3532<h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler3632<h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler
3533()</a></code></h3>3633()</a></code></h3>
3634<<<<<<< TREE
3534<pre>#include &lt;cadef.h&gt;3635<pre>#include &lt;cadef.h&gt;
3535typedef int caPrintfFunc ( const char *pFormat, va_list args );3636typedef int caPrintfFunc ( const char *pFormat, va_list args );
3536int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre>3637int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre>
3638=======
3639<pre><code>#include &lt;cadef.h&gt;
3640typedef int caPrintfFunc ( const char *pFromat, va_list args );
3641int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</code></pre>
3642>>>>>>> MERGE-SOURCE
35373643
3538<h4>Description</h4>3644<h4>Description</h4>
35393645
@@ -3544,28 +3650,34 @@
3544<dl>3650<dl>
3545 <dt><code>PFUNC</code></dt>3651 <dt><code>PFUNC</code></dt>
3546 <dd>The address of a user supplied call back handler to be invoked when CA3652 <dd>The address of a user supplied call back handler to be invoked when CA
3547 prints diagnostic messages. Installing a nil pointer will cause the3653 prints diagnostic messages. Installing a nill pointer will cause the
3548 default call back handler to be reinstalled.</dd>3654 default call back handler to be reinstalled.</dd>
3549</dl>3655</dl>
35503656
3551<h4>Examples</h4>3657<h4>Examples</h4>
3552<pre>int my_printf ( char *pformat, va_list args ) {3658<pre><code>int my_printf ( char *pformat, va_list args ) {
3553 int status;3659 int status;
3554 status = vfprintf( stderr, pformat, args);3660 status = vfprintf( stderr, pformat, args);
3555 return status;3661 return status;
3556}3662}
3557status = ca_replace_printf_handler ( my_printf );3663status = ca_replace_printf_handler ( my_printf );
3558SEVCHK ( status, "failed to install my printf handler" );</pre>3664SEVCHK ( status, "failed to install my printf handler" );</code></pre>
35593665
3560<h4>Returns</h4>3666<h4>Returns</h4>
35613667
3562<p>ECA_NORMAL - Normal successful completion</p>3668<p>ECA_NORMAL - Normal successful completion</p>
35633669
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>
3671<<<<<<< TREE
3565<pre>#include &lt;cadef.h&gt;3672<pre>#include &lt;cadef.h&gt;
3566typedef void ( caEventCallBackFunc )(struct access_rights_handler_args);3673typedef void ( caEventCallBackFunc )(struct access_rights_handler_args);
3567int ca_replace_access_rights_event ( chid CHAN,3674int ca_replace_access_rights_event ( chid CHAN,
3568 caEventCallBackFunc PFUNC );</pre>3675 caEventCallBackFunc PFUNC );</pre>
3676=======
3677<pre><code>#include &lt;cadef.h&gt;
3678typedef void ( *pCallBack )( struct access_rights_handler_args );
3679int ca_replace ( chid CHAN, pCallBack PFUNC );</code></pre>
3680>>>>>>> MERGE-SOURCE
35693681
3570<h4>Description</h4>3682<h4>Description</h4>
35713683
@@ -3574,9 +3686,9 @@
35743686
3575<p>The callback handler is called in the following situations.</p>3687<p>The callback handler is called in the following situations.</p>
3576<ul>3688<ul>
3577 <li>whenever CA connects the channel immediately before the channel's3689 <li>whenever CA connects the channel immediately before the channel`s
3578 connection handler is called</li>3690 connection handler is called</li>
3579 <li>whenever CA disconnects the channel immediately after the channel's3691 <li>whenever CA disconnects the channel immediately after the channel`s
3580 disconnect call back is called</li>3692 disconnect call back is called</li>
3581 <li>once immediately after installation if the channel is connected.</li>3693 <li>once immediately after installation if the channel is connected.</li>
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>
@@ -3591,10 +3703,10 @@
3591</dl>3703</dl>
3592<dl>3704<dl>
3593 <dt><code>PFUNC</code></dt>3705 <dt><code>PFUNC</code></dt>
3594 <dd>Address of user supplied call back function. A nil pointer uninstalls3706 <dd>Address of user supplied call back function. A nill pointer uninstalls
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>
3596 to the supplied callback handler. 3708 to the supplied callback handler.
3597 <pre>typedef struct ca_access_rights {3709 <pre><code>typedef struct ca_access_rights {
3598 unsigned read_access:1;3710 unsigned read_access:1;
3599 unsigned write_access:1;3711 unsigned write_access:1;
3600} caar;3712} caar;
@@ -3603,7 +3715,7 @@
3603struct access_rights_handler_args {3715struct access_rights_handler_args {
3604 chanId chid; /* channel id */3716 chanId chid; /* channel id */
3605 caar ar; /* new access rights state */3717 caar ar; /* new access rights state */
3606};</pre>3718};</code></pre>
3607 </dd>3719 </dd>
3608</dl>3720</dl>
36093721
@@ -3611,9 +3723,15 @@
36113723
3612<p>ECA_NORMAL - Normal successful completion</p>3724<p>ECA_NORMAL - Normal successful completion</p>
36133725
3726<h4>See Also</h4>
3727
3728<p>ca_modify_user_name()</p>
3729
3730<p>ca_modify_host_name()</p>
3731
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>
3615<pre>#include &lt;cadef.h&gt;3733<pre><code>#include &lt;cadef.h&gt;
3616chtype ca_field_type ( CHID );</pre>3734chtype ca_field_type ( CHID );</code></pre>
36173735
3618<h4>Description</h4>3736<h4>Description</h4>
36193737
@@ -3634,8 +3752,8 @@
3634</dl>3752</dl>
36353753
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>
3637<pre>#include &lt;cadef.h&gt;3755<pre><code>#include &lt;cadef.h&gt;
3638unsigned ca_element_count ( CHID );</pre>3756unsigned ca_element_count ( CHID );</code></pre>
36393757
3640<h4>Description</h4>3758<h4>Description</h4>
36413759
@@ -3651,13 +3769,13 @@
3651<h4>Returns</h4>3769<h4>Returns</h4>
3652<dl>3770<dl>
3653 <dt><code>COUNT</code></dt>3771 <dt><code>COUNT</code></dt>
3654 <dd>The maximum array element count in the server. An element count of3772 <dd>The maximum array element count in the server. An element count of zero
3655 zero is returned if the channel is disconnected.</dd>3773 is returned if the channel is disconnected.</dd>
3656</dl>3774</dl>
36573775
3658<h3><code><a name="ca_name">ca_name()</a></code></h3>3776<h3><code><a name="ca_name">ca_name()</a></code></h3>
3659<pre>#include &lt;cadef.h&gt;3777<pre><code>#include &lt;cadef.h&gt;
3660char * ca_name ( CHID );</pre>3778char * ca_name ( CHID );</code></pre>
36613779
3662<h4>Description</h4>3780<h4>Description</h4>
36633781
@@ -3677,8 +3795,8 @@
3677</dl>3795</dl>
36783796
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>
3680<pre>#include &lt;cadef.h&gt;3798<pre><code>#include &lt;cadef.h&gt;
3681void ca_set_puser ( chid CHID, void *PUSER );</pre>3799void ca_set_puser ( chid CHID, void *PUSER );</code></pre>
36823800
3683<h4>Description</h4>3801<h4>Description</h4>
36843802
@@ -3696,8 +3814,8 @@
3696</dl>3814</dl>
36973815
3698<h3><code><a name="ca_puser">ca_puser()</a></code></h3>3816<h3><code><a name="ca_puser">ca_puser()</a></code></h3>
3699<pre>#include &lt;cadef.h&gt;3817<pre><code>#include &lt;cadef.h&gt;
3700void * ca_puser ( CHID );</pre>3818void * ca_puser ( CHID );</code></pre>
37013819
3702<h4>Description</h4>3820<h4>Description</h4>
37033821
@@ -3717,13 +3835,13 @@
3717</dl>3835</dl>
37183836
3719<h3><code><a name="ca_state">ca_state()</a></code></h3>3837<h3><code><a name="ca_state">ca_state()</a></code></h3>
3720<pre>#include &lt;cadef.h&gt;3838<pre><code>#include &lt;cadef.h&gt;
3721enum channel_state {3839enum channel_state {
3722 cs_never_conn, /* valid chid, server not found or unavailable */3840 cs_never_conn, /* valid chid, server not found or unavailable */
3723 cs_prev_conn, /* valid chid, previously connected to server */3841 cs_prev_conn, /* valid chid, previously connected to server */
3724 cs_conn, /* valid chid, connected to server */3842 cs_conn, /* valid chid, connected to server */
3725 cs_closed }; /* channel deleted by user */3843 cs_closed }; /* channel deleted by user */
3726enum channel_state ca_state ( CHID );</pre>3844enum channel_state ca_state ( CHID );</code></pre>
37273845
3728<h4>Description</h4>3846<h4>Description</h4>
37293847
@@ -3743,8 +3861,8 @@
3743</dl>3861</dl>
37443862
3745<h3><code><a name="ca_message">ca_message()</a></code></h3>3863<h3><code><a name="ca_message">ca_message()</a></code></h3>
3746<pre>#include &lt;cadef.h&gt;3864<pre><code>#include &lt;cadef.h&gt;
3747const char * ca_message ( STATUS );</pre>3865const char * ca_message ( STATUS );</code></pre>
37483866
3749<h4>Description</h4>3867<h4>Description</h4>
37503868
@@ -3764,8 +3882,8 @@
3764</dl>3882</dl>
37653883
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>
3767<pre>#include &lt;cadef.h&gt;3885<pre><code>#include &lt;cadef.h&gt;
3768char * ca_host_name ( CHID );</pre>3886char * ca_host_name ( CHID );</code></pre>
37693887
3770<h4>Description</h4>3888<h4>Description</h4>
37713889
@@ -3781,13 +3899,13 @@
3781<h4>Returns</h4>3899<h4>Returns</h4>
3782<dl>3900<dl>
3783 <dt><code>STRING</code></dt>3901 <dt><code>STRING</code></dt>
3784 <dd>The process variable server's host name. If the channel is disconnected3902 <dd>The process variable server`s host name. If the channel is disconnected
3785 the string "&lt;disconnected&gt;" is returned.</dd>3903 the string "&lt;disconnected&gt;" is returned.</dd>
3786</dl>3904</dl>
37873905
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>
3789<pre>#include &lt;cadef.h&gt;3907<pre><code>#include &lt;cadef.h&gt;
3790int ca_read_access ( CHID );</pre>3908int ca_read_access ( CHID );</code></pre>
37913909
3792<h4>Description</h4>3910<h4>Description</h4>
37933911
@@ -3808,8 +3926,8 @@
3808</dl>3926</dl>
38093927
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>
3811<pre>#include &lt;cadef.h&gt;3929<pre><code>#include &lt;cadef.h&gt;
3812int ca_write_access ( CHID );</pre>3930int ca_write_access ( CHID );</code></pre>
38133931
3814<h4>Description</h4>3932<h4>Description</h4>
38153933
@@ -3830,8 +3948,8 @@
3830</dl>3948</dl>
38313949
3832<h3><code><a name="dbr_size[]">dbr_size[]</a></code></h3>3950<h3><code><a name="dbr_size[]">dbr_size[]</a></code></h3>
3833<pre>#include &lt;db_access.h&gt;3951<pre><code>#include &lt;db_access.h&gt;
3834extern unsigned dbr_size[/* TYPE */];</pre>3952extern unsigned dbr_size[/*TYPE*/];</code></pre>
38353953
3836<h4>Description</h4>3954<h4>Description</h4>
38373955
@@ -3850,8 +3968,8 @@
3850</dl>3968</dl>
38513969
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>
3853<pre>#include &lt;db_access.h&gt;3971<pre><code>#include &lt;db_access.h&gt;
3854unsigned dbr_size_n ( TYPE, COUNT );</pre>3972unsigned dbr_size_n ( TYPE, COUNT );</code></pre>
38553973
3856<h4>Description</h4>3974<h4>Description</h4>
38573975
@@ -3879,8 +3997,8 @@
3879</dl>3997</dl>
38803998
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>
3882<pre>#include &lt;db_access.h&gt;4000<pre><code>#include &lt;db_access.h&gt;
3883extern unsigned dbr_value_size[/* TYPE */];</pre>4001extern unsigned dbr_value_size[/* TYPE */];</code></pre>
38844002
3885<h4>Description</h4>4003<h4>Description</h4>
38864004
@@ -3902,8 +4020,8 @@
3902</dl>4020</dl>
39034021
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>
3905<pre>#include &lt;db_access.h&gt;4023<pre><code>#include &lt;db_access.h&gt;
3906const char * dbr_type_text ( chtype TYPE );</pre>4024const char * dbr_type_text ( chtype TYPE );</code></pre>
39074025
3908<h4>Description</h4>4026<h4>Description</h4>
39094027
@@ -3933,17 +4051,17 @@
3933prints diagnostics to standard out.</p>4051prints diagnostics to standard out.</p>
39344052
3935<h4>Examples</h4>4053<h4>Examples</h4>
3936<pre>void ca_test_event (); 4054<pre><code>void ca_test_event ();
3937status = ca_add_event ( type, chid, ca_test_event, NULL, NULL ); 4055status = ca_add_event ( type, chid, ca_test_event, NULL, NULL );
3938SEVCHK ( status, .... );</pre>4056SEVCHK ( status, .... );</code></pre>
39394057
3940<h4>See Also</h4>4058<h4>See Also</h4>
39414059
3942<p><a href="#ca_add_event">ca_add_event</a>()</p>4060<p><a href="#ca_add_event">ca_add_event</a>()</p>
39434061
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>
3945<pre>#include &lt;cadef.h&gt;4063<pre><code>#include &lt;cadef.h&gt;
3946int ca_sg_create ( CA_SYNC_GID *PGID );</pre>4064int ca_sg_create ( CA_SYNC_GID *PGID );</code></pre>
39474065
3948<h4>Description</h4>4066<h4>Description</h4>
39494067
@@ -3967,9 +4085,9 @@
3967</dl>4085</dl>
39684086
3969<h4>Examples</h4>4087<h4>Examples</h4>
3970<pre>CA_SYNC_GID gid; 4088<pre><code>CA_SYNC_GID gid;
3971status = ca_sg_create ( &amp;gid ); 4089status = ca_sg_create ( &amp;gid );
3972SEVCHK ( status, Sync group create failed );</pre>4090SEVCHK ( status, Sync group create failed );</code></pre>
39734091
3974<h4>Returns</h4>4092<h4>Returns</h4>
39754093
@@ -3992,8 +4110,8 @@
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>
39934111
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>
3995<pre>#include &lt;cadef.h&gt;4113<pre><code>#include &lt;cadef.h&gt;
3996int ca_sg_delete ( CA_SYNC_GID GID );</pre>4114int ca_sg_delete ( CA_SYNC_GID GID );</code></pre>
39974115
3998<h4>Description</h4>4116<h4>Description</h4>
39994117
@@ -4006,9 +4124,9 @@
4006</dl>4124</dl>
40074125
4008<h4>Examples</h4>4126<h4>Examples</h4>
4009<pre>CA_SYNC_GID gid; 4127<pre><code>CA_SYNC_GID gid;
4010status = ca_sg_delete ( gid ); 4128status = ca_sg_delete ( gid );
4011SEVCHK ( status, Sync group delete failed );</pre>4129SEVCHK ( status, Sync group delete failed );</code></pre>
40124130
4013<h4>Returns</h4>4131<h4>Returns</h4>
40144132
@@ -4020,9 +4138,15 @@
40204138
4021<p><a href="#ca_sg_create">ca_sg_create</a>()</p>4139<p><a href="#ca_sg_create">ca_sg_create</a>()</p>
40224140
4141<<<<<<< TREE
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>
4024<pre>#include &lt;cadef.h&gt;4143<pre>#include &lt;cadef.h&gt;
4025int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre>4144int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre>
4145=======
4146<h3><a name="ca_sg_block"><code>ca_sg_block</code></a><code>()</code></h3>
4147<pre><code>#include &lt;cadef.h&gt;
4148int ca_sg_block ( CA_SYNC_GID GID, double timeout );</code></pre>
4149>>>>>>> MERGE-SOURCE
40264150
4027<h4>Description</h4>4151<h4>Description</h4>
40284152
@@ -4036,7 +4160,7 @@
4036are outstanding then ca_sg_block() will return immediately without processing4160are outstanding then ca_sg_block() will return immediately without processing
4037any pending channel access activities.</p>4161any pending channel access activities.</p>
40384162
4039<p>Values written into your program's variables by a channel access synchronous4163<p>Values written into your program`s variables by a channel access synchronous
4040group request should not be referenced by your program until ECA_NORMAL has4164group request should not be referenced by your program until ECA_NORMAL has
4041been received from ca_sg_block(). This routine will process pending channel4165been received from ca_sg_block(). This routine will process pending channel
4042access background activity while it is waiting.</p>4166access background activity while it is waiting.</p>
@@ -4051,9 +4175,15 @@
4051</dl>4175</dl>
40524176
4053<h4>Examples</h4>4177<h4>Examples</h4>
4178<<<<<<< TREE
4054<pre>CA_SYNC_GID gid;4179<pre>CA_SYNC_GID gid;
4055status = ca_sg_block(gid, 0.0);4180status = ca_sg_block(gid, 0.0);
4056SEVCHK(status, Sync group block failed);</pre>4181SEVCHK(status, Sync group block failed);</pre>
4182=======
4183<pre><code>CA_SYNC_GID gid;
4184status = ca_sg_block(gid);
4185SEVCHK(status, Sync group block failed);</code></pre>
4186>>>>>>> MERGE-SOURCE
40574187
4058<h4>Returns</h4>4188<h4>Returns</h4>
40594189
@@ -4072,8 +4202,8 @@
4072<p><a href="#ca_sg_reset">ca_sg_reset</a>()</p>4202<p><a href="#ca_sg_reset">ca_sg_reset</a>()</p>
40734203
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>
4075<pre>#include &lt;cadef.h&gt;4205<pre><code>#include &lt;cadef.h&gt;
4076int ca_sg_test ( CA_SYNC_GID GID )</pre>4206int ca_sg_test ( CA_SYNC_GID GID )</code></pre>
40774207
4078<h4>Description</h4>4208<h4>Description</h4>
40794209
@@ -4092,8 +4222,8 @@
4092completed.</p>4222completed.</p>
40934223
4094<h4>Examples</h4>4224<h4>Examples</h4>
4095<pre>CA_SYNC_GID gid;4225<pre><code>CA_SYNC_GID gid;
4096status = ca_sg_test ( gid );</pre>4226status = ca_sg_test ( gid );</code></pre>
40974227
4098<h4>Returns</h4>4228<h4>Returns</h4>
40994229
@@ -4102,8 +4232,8 @@
4102<p>ECA_IOINPROGRESS - Some IO operations still in progress</p>4232<p>ECA_IOINPROGRESS - Some IO operations still in progress</p>
41034233
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>
4105<pre>#include &lt;cadef.h&gt;4235<pre><code>#include &lt;cadef.h&gt;
4106int ca_sg_reset ( CA_SYNC_GID GID )</pre>4236int ca_sg_reset ( CA_SYNC_GID GID )</code></pre>
41074237
4108<h4>Description</h4>4238<h4>Description</h4>
41094239
@@ -4118,8 +4248,8 @@
4118</dl>4248</dl>
41194249
4120<h4>Examples</h4>4250<h4>Examples</h4>
4121<pre>CA_SYNC_GID gid; 4251<pre><code>CA_SYNC_GID gid;
4122status = ca_sg_reset(gid);</pre>4252status = ca_sg_reset(gid);</code></pre>
41234253
4124<h4>Returns</h4>4254<h4>Returns</h4>
41254255
@@ -4127,10 +4257,10 @@
41274257
4128<p>ECA_BADSYNCGRP - Invalid synchronous group</p>4258<p>ECA_BADSYNCGRP - Invalid synchronous group</p>
41294259
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>
4131<pre>#include &lt;cadef.h&gt;4261<pre><code>#include &lt;cadef.h&gt;
4132int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE, 4262int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
4133 unsigned long COUNT, chid CHID, void *PVALUE );</pre>4263 unsigned long COUNT, chid CHID, void *PVALUE );</code></pre>
41344264
4135<p>Write a value, or array of values, to a channel and increment the4265<p>Write a value, or array of values, to a channel and increment the
4136outstanding request count of a synchronous group. The ca_sg_array_put4266outstanding request count of a synchronous group. The ca_sg_array_put
@@ -4189,11 +4319,11 @@
41894319
4190<p><a href="#ca_flush_io">ca_flush_io</a>()</p>4320<p><a href="#ca_flush_io">ca_flush_io</a>()</p>
41914321
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>
4193<pre>#include &lt;cadef.h&gt;4323<pre><code>#include &lt;cadef.h&gt;
4194int ca_sg_array_get ( CA_SYNC_GID GID,4324int ca_sg_array_get ( CA_SYNC_GID GID,
4195 chtype TYPE, unsigned long COUNT,4325 chtype TYPE, unsigned long COUNT,
4196 chid CHID, void *PVALUE );</pre>4326 chid CHID, void *PVALUE );</code></pre>
41974327
4198<h4>Description</h4>4328<h4>Description</h4>
41994329
@@ -4201,7 +4331,7 @@
4201synchronous group. The ca_sg_array_get functionality is implemented using4331synchronous group. The ca_sg_array_get functionality is implemented using
4202ca_array_get_callback.</p>4332ca_array_get_callback.</p>
42034333
4204<p>The values written into your program's variables by ca_sg_get should not be4334<p>The values written into your program`s variables by ca_sg_get should not be
4205referenced by your program until ECA_NORMAL has been received from ca_sg_block,4335referenced by your program until ECA_NORMAL has been received from ca_sg_block,
4206or until ca_sg_test returns ECA_IODONE.</p>4336or until ca_sg_test returns ECA_IODONE.</p>
42074337
@@ -4285,7 +4415,7 @@
42854415
4286<h4>Description</h4>4416<h4>Description</h4>
42874417
4288<p>Returns a pointer to the current thread's CA context. If none then nil is4418<p>Returns a pointer to the current thread`s CA context. If none then nill is
4289returned.</p>4419returned.</p>
42904420
4291<h4>See Also</h4>4421<h4>See Also</h4>
@@ -4355,7 +4485,13 @@
4355<p><a href="#ca_context_destroy">ca_context_destroy</a>()</p>4485<p><a href="#ca_context_destroy">ca_context_destroy</a>()</p>
43564486
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>
4488<<<<<<< TREE
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>
4490=======
4491<pre><code>
4492void ca_dump_dbr (chtype TYPE,
4493 unsigned COUNT, const void * PDBR);</code></pre>
4494>>>>>>> MERGE-SOURCE
43594495
4360<h4>Description</h4>4496<h4>Description</h4>
43614497
@@ -4444,7 +4580,7 @@
4444 <dd>Preemptive callback not enabled - additional threads may not join4580 <dd>Preemptive callback not enabled - additional threads may not join
4445 context</dd>4581 context</dd>
4446 <dt>ECA_16KARRAYCLIENT</dt>4582 <dt>ECA_16KARRAYCLIENT</dt>
4447 <dd>Client's protocol revision does not support transfers exceeding 16k4583 <dd>Client`s protocol revision does not support transfers exceeding 16k
4448 bytes</dd>4584 bytes</dd>
4449</dl>4585</dl>
44504586

Subscribers

People subscribed via source and target branches