diff --git a/src/ca/CAref.html b/src/ca/CAref.html index 4582df14d..d5229f8ba 100644 --- a/src/ca/CAref.html +++ b/src/ca/CAref.html @@ -1,12 +1,3 @@ - - - - - - - - - @@ -15,7 +6,7 @@
SNS Division
-Copyright Experimental Physics and Industrial Control -System (EPICS) Copyright, 1995, The University of California, The University -of Chicago Portions of this material resulted from work developed under a -U.S. Government contract and are subject to the following license: For a -period of five years from March 30, 1993, the Government is granted for -itself and others acting on its behalf a paid-up, nonexclusive, irrevocable -worldwide license in this computer software to reproduce, prepare derivative -works, and perform publicly and display publicly. Upon request of Licensee, -and with DOE and Licensors approval, this period may be renewed for two -additional five year periods. Following the expiration of this period or -periods, the Government is granted for itself and others acting on its -behalf, a paid-up, nonexclusive, irrevocable worldwide license in this -computer software to reproduce, prepare derivative works, distribute copies -to the public, perform publicly and display publicly, and to permit others to -do so. NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, -NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR -ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, -OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, -OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. Initial -development by: The Controls and Automation Group (AOT-8), Ground Test -Accelerator, Accelerator Technology Division, Los Alamos National Laboratory. -Co-developed with: The Controls and Computing Group, Accelerator Systems -Division, Advanced Photon Source, Argonne National Laboratory.
+
+Copyright © 2002 The University of Chicago, as Operator of Argonne
+National Laboratory.
+Copyright © 2002 The Regents of the University of California, as Operator
+of Los Alamos National Laboratory.
+EPICS BASE Versions 3.13.7 and higher are distributed subject to a
+Software License Agreement found in the file LICENSE that is included
+with this distribution.
+
Why Reconfigure Channel Access
@@ -642,24 +621,24 @@ from the operation (i.e. put call back) then you should expect that the field "dbr" will be set to NULL. The fields "usr", "chid", "type", and "count" are set to the values specified when the operation was initiated by the application. -struct event_handler_args {
- void *usr; /* user argument supplied when event added */
- chid chid; /* channel id */
- long type; /* dbr type of the value returned */
- long count; /* element count of the item(s) returned */
- void *dbr; /* pointer to the value returned */
- int status; /* ECA_XXX status of the op from server */
-};
+struct event_handler_args {
+ void *usr; /* user argument supplied when event added */
+ chid chid; /* channel id */
+ long type; /* dbr type of the value returned */
+ long count; /* element count of the item(s) returned */
+ void *dbr; /* pointer to the value returned */
+ int status; /* ECA_XXX status of the op from server */
+};
-When the server detects a failure, and there -is no client call back function attached to the request, then an exception -handler is executed in the client. The default exception handler prints a -message on the console and exits if the exception condition is severe. To -modify this behavior see ca_add_exception_event().
+When the server detects a failure, and there is no client call back function +attached to the request, then an exception handler is executed in the client. +The default exception handler prints a message on the console and exits if the +exception condition is severe. To modify this behavior see +ca_add_exception_event().
If the server for the channel and the client are located on the same node then the ca_xxx() operations bypass the server and directly interact with the -server tool (the IOC's database). Therefore, the ca_XXX() routines always +server tool (the IOC's database). Therefore, the ca_xxx() routines always return the status of the operation directly to the caller with no opportunity for asynchronous notification of failure via an exception handler.
@@ -725,17 +704,17 @@ constants. Applications shouldn't test the success of a CA function call by checking to see if the returned value is zero as is the UNIX convention. Below are several methods to test CA function returns. See ca_signal() on page 24 for more information on this topic. -status = ca_XXXX();
-SEVCHK( status, "ca_XXXX() returned failure status");
-
-if ( status & CA_M_SUCCESS ) {
- printf ( "The requested ca_XXXX() operation didn't complete successfully\n");
-}
-
-if ( status != ECA_NORMAL ) {
- printf("The requested ca_XXXX() operation didn't complete successfully because \"%s\"\n",
- ca_message ( status ) );
-}
+status = ca_XXXX();
+SEVCHK( status, "ca_XXXX() returned failure status");
+
+if ( status & CA_M_SUCCESS ) {
+ printf ( "The requested ca_XXXX() operation didn't complete successfully\n");
+}
+
+if ( status != ECA_NORMAL ) {
+ printf("The requested ca_XXXX() operation didn't complete successfully because \"%s\"\n",
+ ca_message ( status ) );
+}
With the embryonic releases of EPICS it was a common practice to examine a
channel's connection state, its native type, and its native element count by
@@ -755,7 +734,7 @@ instances off channel_id->count with
ca_element_count(channel_id). This approach should be reliable
on all versions of EPICS in use today. The construct ca_puser(chid) =
xxxx is particularly problematic. The best mechanisms for setting the
-per channel private pointer will be to pass the user private pointer in when
+per channel private pointer will be to pass the user private pointer in when
creating the channel. This approach is implemented on all versions.
Otherwise, you can also use ca_set_puser(CHID,PUSER), but this
function is available only after the first official (post beta) release of
@@ -764,10 +743,10 @@ EPICS 3.13.
ca_context_create()#include <cadef.h>-
enum ca_preemptive_callback_select
+#include <cadef.h>
+enum ca_preemptive_callback_select
{ ca_disable_preemptive_callback, ca_enable_preemptive_callback };
-int ca_context_create ( enum ca_preemptive_callback_select SELECT );
+int ca_context_create ( enum ca_preemptive_callback_select SELECT );
SELECTSpecifies if preemptive calback is allowed. If it is allowed your +
ca_disable_preemptive_callback.
- ca_disable_preemptive_callback.ca_context_destroy()
ca_context_destroy()#include <cadef.h>-
void ca_context_destroy();+
#include <cadef.h> +void ca_context_destroy();
ca_create_channel()#include <cadef.h>
-typedef void ( *pCallBack ) (
- struct connection_handler_args );
-int epicsShareAPI ca_create_channel
+#include <cadef.h>
+typedef void ( *pCallBack ) (
+ struct connection_handler_args );
+int epicsShareAPI ca_create_channel
(
const char *PROCESS_VARIABLE_NAME,
caCh *USERFUNC,
@@ -869,7 +847,7 @@ are made by the application can't be guaranteed, and application programs may
need to be prepared for a connected channel to enter a disconnected state at
any time.
-If ca_disable_preemptive_callback is specified then
+
If ca_disable_preemptive_callback is specified then
additional threads are not allowed to join the CA context using
ca_context_attach() because allowing other threads to join implies that CA
callbacks will be called preemptively from more than one thread.
@@ -877,29 +855,26 @@ callbacks will be called preemptively from more than one thread.
Arguments
PROCESS_VARIABLE_NAME
- A nil terminated process variable name string. EPICS process
+
- A nil terminated process variable name string. EPICS process
control function block database variable names are of the form
"<record name>.<field name>". If the field name and the
period separator are omitted then the "VAL" field is implicit. For
example "RFHV01" and "RFHV01.VAL" reference the same EPICS process
- control function block database variable.
-
+ control function block database variable.
USERFUNC
- Optional address of the user's call back function to be run when
+
- Optional address of the user's call back function to be run when
the connection state changes. Casual users of channel access may decide
to set this field to nil or 0 if they do not need to have a call back
- function run in response to each connection state change event.
-
+ function run in response to each connection state change event.
PUSER
- The value of this void pointer argument is retained in
+
- The value of this void pointer argument is retained in
storage associated with the specified channel. See the MACROS manual
page for reading and writing this field. Casual users of channel access
- may wish to set this field to nil or 0.
-
+ may wish to set this field to nil or 0.
PRIORITY
@@ -929,8 +904,8 @@ callbacks will be called preemptively from more than one thread.
ECA_ALLOCMEM - Unable to allocate memory
ca_clear_channel()
-#include <cadef.h>
-int ca_clear_channel (evid CHID);
+#include <cadef.h>
+int ca_clear_channel (evid CHID);
Description
@@ -949,8 +924,7 @@ subscriptions
Arguments
CHID
- Identifies the channel to delete.
-
+ - Identifies the channel to delete.
Returns
@@ -960,20 +934,20 @@ subscriptions
ECA_BADCHID - Corrupted CHID
ca_put()
-#include <cadef.h>
-int ca_put ( chtype TYPE,
- chid CHID, void *PVALUE );
-int ca_array_put ( chtype TYPE,
- unsigned long COUNT,
- chid CHID, const void *PVALUE);
-typedef void ( *pCallBack ) (struct event_handler_args );
-int ca_put_callback ( chtype TYPE,
- chid CHID, const void *PVALUE,
- pCallBack PFUNC, void *USERARG );
-int ca_array_put_callback ( chtype TYPE,
- unsigned long COUNT,
- chid CHID, const void *PVALUE,
- pCallBack PFUNC, void *USERARG );
+#include <cadef.h>
+int ca_put ( chtype TYPE,
+ chid CHID, void *PVALUE );
+int ca_array_put ( chtype TYPE,
+ unsigned long COUNT,
+ chid CHID, const void *PVALUE);
+typedef void ( *pCallBack ) (struct event_handler_args );
+int ca_put_callback ( chtype TYPE,
+ chid CHID, const void *PVALUE,
+ pCallBack PFUNC, void *USERARG );
+int ca_array_put_callback ( chtype TYPE,
+ unsigned long COUNT,
+ chid CHID, const void *PVALUE,
+ pCallBack PFUNC, void *USERARG );
Description
@@ -1005,39 +979,33 @@ This allows several requests to be efficiently combined into one message.
Arguments
TYPE
- The external type of the supplied value to be written. Conversion
+
- The external type of the supplied value to be written. Conversion
will occur if this does not match the native type. Specify one from the
- set of DBR_XXXX in db_access.h
-
+ set of DBR_XXXX in db_access.h
COUNT
- Element count to be written to the specified channel. This must
- match the array pointed to by PVALUE.
-
+ - Element count to be written to the specified channel. This must
+ match the array pointed to by PVALUE.
CHID
- Channel identifier
-
+ - Channel identifier
PVALUE
- Pointer to a value or array of values provided by the application
- to be written to the channel.
-
+ - Pointer to a value or array of values provided by the application
+ to be written to the channel.
PFUNC
- address of user supplied function to be run when the requested
- operation completes
-
+ - address of user supplied function to be run when the requested
+ operation completes
USERARG
- pointer sized variable retained and then passed back to user
- supplied function above
-
+ - pointer sized variable retained and then passed back to user
+ supplied function above
Returns
@@ -1064,17 +1032,17 @@ ca_flush_io()
ca_pend_event()
ca_get()
-#include <cadef.h>
-int ca_get ( chtype TYPE,
- chid CHID, void *PVALUE );
-int ca_array_get ( chtype TYPE, unsigned long COUNT,
- chid CHID, void *PVALUE );
-typedef void ( *pCallBack ) (struct event_handler_args );
-int ca_get_callback ( chtype TYPE,
- chid CHID, pCallBack USERFUNC, void *USERARG);
-int ca_array_get_callback ( chtype TYPE, unsigned long COUNT,
- chid CHID,
- pCallBack USERFUNC, void *USERARG );
+#include <cadef.h>
+int ca_get ( chtype TYPE,
+ chid CHID, void *PVALUE );
+int ca_array_get ( chtype TYPE, unsigned long COUNT,
+ chid CHID, void *PVALUE );
+typedef void ( *pCallBack ) (struct event_handler_args );
+int ca_get_callback ( chtype TYPE,
+ chid CHID, pCallBack USERFUNC, void *USERARG);
+int ca_array_get_callback ( chtype TYPE, unsigned long COUNT,
+ chid CHID,
+ pCallBack USERFUNC, void *USERARG );
Description
@@ -1102,39 +1070,33 @@ in one message.
Arguments
TYPE
- The external type of the user variable to return the value into.
+
- The external type of the user variable to return the value into.
Conversion will occur if this does not match the native type. Specify
- one from the set of DBR_XXXX in db_access.h
-
+ one from the set of DBR_XXXX in db_access.h
COUNT
- Element count to be read from the specified channel. Must match
- the array pointed to by PVALUE.
-
+ - Element count to be read from the specified channel. Must match
+ the array pointed to by PVALUE.
CHID
- Channel identifier
-
+ - Channel identifier
PVALUE
- Pointer to an application supplied buffer where the current value
- of the channel is to be written.
-
+ - Pointer to an application supplied buffer where the current value
+ of the channel is to be written.
USERFUNC
- Address of user supplied function to be run when the requested
- operation completes.
-
+ - Address of user supplied function to be run when the requested
+ operation completes.
USERARG
- Pointer sized variable retained and then passsed back to user
- supplied call back function above.
-
+ - Pointer sized variable retained and then passsed back to user
+ supplied call back function above.
Returns
@@ -1161,23 +1123,22 @@ ca_pend_io()
ca_pend_event()
ca_add_event()
-#include <cadef.h>
-typedef void ( *pCallBack ) (
- struct event_handler_args );
-int ca_add_event( chtype TYPE, chid CHID,
- pCallBack USERFUNC, void *USERARG,
- evid *PEVID);
-int ca_add_array_event( chtype TYPE,
- unsigned long COUNT, chid CHID,
- pCallBack USERFUNC, void *USERARG,
- double RESERVED, double RESERVED,
- double RESERVED, evid *PEVID );
-
-int ca_add_masked_array_event ( chtype TYPE,
- unsigned long COUNT, chid CHID,
- pCallBack USERFUNC, void *USERARG,
- double RESERVED, double RESERVED, double RESERVED,
- evid *PEVID, unsigned long MASK );
+#include <cadef.h>
+typedef void ( *pCallBack ) (
+ struct event_handler_args );
+int ca_add_event( chtype TYPE, chid CHID,
+ pCallBack USERFUNC, void *USERARG,
+ evid *PEVID);
+int ca_add_array_event( chtype TYPE,
+ unsigned long COUNT, chid CHID,
+ pCallBack USERFUNC, void *USERARG,
+ double RESERVED, double RESERVED,
+ double RESERVED, evid *PEVID );
+int ca_add_masked_array_event ( chtype TYPE,
+ unsigned long COUNT, chid CHID,
+ pCallBack USERFUNC, void *USERARG,
+ double RESERVED, double RESERVED, double RESERVED,
+ evid *PEVID, unsigned long MASK );
Description
@@ -1269,8 +1230,7 @@ least
For functions above that do not include a trigger specification,
events will be triggered when there are significant changes in the
channel's value or when there are changes in the channel's alarm state.
- This is the same as "DBE_VALUE | DBE_ALARM."
-
+ This is the same as "DBE_VALUE | DBE_ALARM."
Returns
@@ -1291,8 +1251,8 @@ ca_pend_event()
ca_flush_io()
ca_clear_event()
-#include <cadef.h>
-int ca_clear_event ( evid EVID );
+#include <cadef.h>
+int ca_clear_event ( evid EVID );
Description
@@ -1306,8 +1266,7 @@ efficiently sent together in one message.
Arguments
- EVID
- event id returned by ca_add_event()
-
+ - event id returned by ca_add_event()
Returns
@@ -1317,8 +1276,8 @@ efficiently sent together in one message.
ECA_BADCHID - Corrupted CHID SEE ALSO ca_add_event()
ca_pend_io()
-#include <cadef.h>
-int ca_pend_io ( double TIMEOUT );
+#include <cadef.h>
+int ca_pend_io ( double TIMEOUT );
Description
@@ -1375,8 +1334,8 @@ network delays such as Ethernet collision backoff and retransmission.
ca_test_io()
-#include <cadef.h>
-int ca_test_io();
+#include <cadef.h>
+int ca_test_io();
Description
@@ -1398,9 +1357,9 @@ ca_pend_io() or
ca_pend_event()
-#include <cadef.h>
-int ca_pend_event ( double TIMEOUT );
-int ca_poll ();
+#include <cadef.h>
+int ca_pend_event ( double TIMEOUT );
+int ca_poll ();
Description
@@ -1430,8 +1389,8 @@ channel access labor has been processed.
handler
ca_flush_io()
-#include <cadef.h>
-int ca_flush_io();
+#include <cadef.h>
+int ca_flush_io();
Description
@@ -1447,9 +1406,9 @@ becomes full.
ECA_NORMAL - Normal successful completion
ca_signal()
-#include <cadef.h>
-int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
-void SEVCHK( CA_STATUS, CONTEXT_STRING );
+#include <cadef.h>
+int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
+void SEVCHK( CA_STATUS, CONTEXT_STRING );
Description
@@ -1465,8 +1424,8 @@ recommended error handler for simple applications which do not wish to write
code testing the status returned from each channel access call.
Examples
-status = ca_context_create (...);
-SEVCHK ( status, "Unable to create a CA client context" );
+status = ca_context_create (...);
+SEVCHK ( status, "Unable to create a CA client context" );
If the application only wishes to print the message associated with an
error code or test the severity of an error there are also functions provided
@@ -1475,25 +1434,23 @@ for this purpose.
Arguments
CA_STATUS
- The status (error code) returned from a channel access
- function.
-
+ - The status (error code) returned from a channel access
+ function.
CONTEXT_STRING
- A null terminated character string to supply as error context to
- diagnostics.
-
+ - A null terminated character string to supply as error context to
+ diagnostics.
Returns
ECA_NORMAL - Normal successful completion
-ca_add_exception_event()
-#include <cadef.h>
-typedef void (*pCallback) ( struct exception_handler_args HANDLERARGS );
-int ca_add_exception_event ( pCallback USERFUNC, void *USERARG );
+ca_add_exception_event()
+#include <cadef.h>
+typedef void (*pCallback) ( struct exception_handler_args HANDLERARGS );
+int ca_add_exception_event ( pCallback USERFUNC, void *USERARG );
Description
@@ -1515,23 +1472,21 @@ field should not be used.
Arguments
USERFUNC
- Addressof usercall back functionto beexecuted when exceptions
+
- Addressof usercall back functionto beexecuted when exceptions
occur. Passing a nil value causes the default exception handler to be
- reinstalled.
-
+ reinstalled.
USERARG
- pointer sized variable retained and passed back to user function
- above
-
+ - pointer sized variable retained and passed back to user function
+ above
Example
void ca_exception_handler (
struct exception_handler_args args)
-{
- char buf[512];
+{
+ char buf[512];
char *pName;
if ( args.chid ) {
@@ -1541,21 +1496,21 @@ field should not be used.
pName = "?";
}
sprintf ( buf,
- "%s - with request chan=%s op=%d data type=%s count=%d",
- args.ctx, pName, args.op, dbr_type_to_text ( args.type ), args.count );
- ca_signal ( args.stat, buf );
-
-}
-ca_add_exception_event ( ca_exception_handler , 0 );
+ "%s - with request chan=%s op=%d data type=%s count=%d",
+ args.ctx, pName, args.op, dbr_type_to_text ( args.type ), args.count );
+ ca_signal ( args.stat, buf );
+
+}
+ca_add_exception_event ( ca_exception_handler , 0 );
Returns
ECA_NORMAL - Normal successful completion
ca_replace_printf_handler ()
-#include <cadef.h>
-typedef int caPrintfFunc ( const char *pFromat, va_list args );
-int ca_replace_printf_handler ( caPrintfFunc *PFUNC );
+#include <cadef.h>
+typedef int caPrintfFunc ( const char *pFromat, va_list args );
+int ca_replace_printf_handler ( caPrintfFunc *PFUNC );
Description
@@ -1565,29 +1520,28 @@ default handler uses fprintf to send messages to 'stderr'.
Arguments
PFUNC
- The address of a user supplied call back handler to be invoked
+
- The address of a user supplied call back handler to be invoked
when CA prints diagnostic messages. Installing a nil pointer will cause
- the default call back handler to be reinstalled.
-
+ the default call back handler to be reinstalled.
Examples
-int my_printf ( char *pformat, va_list args ) {
- int status;
- status = vfprintf( stderr, pformat, args);
- return status;
-}
-status = ca_replace_printf_handler ( my_printf );
-SEVCHK ( status, "failed to install my printf handler" );
+int my_printf ( char *pformat, va_list args ) {
+ int status;
+ status = vfprintf( stderr, pformat, args);
+ return status;
+}
+status = ca_replace_printf_handler ( my_printf );
+SEVCHK ( status, "failed to install my printf handler" );
Returns
ECA_NORMAL - Normal successful completion
ca_replace_access_rights_event()
-#include <cadef.h>
-typedef void ( *pCallBack )( struct access_rights_handler_args );
-int ca_replace_access_rights_event ( chid CHAN, pCallBack PFUNC );
+#include <cadef.h>
+typedef void ( *pCallBack )( struct access_rights_handler_args );
+int ca_replace_access_rights_event ( chid CHAN, pCallBack PFUNC );
Description
@@ -1609,14 +1563,12 @@ the specified channel.
Arguments
CHAN
- The channel identifier.
-
+ - The channel identifier.
PFUNC
- Address of user supplied call back function. A nil pointer
- uninstalls the current handler.
-
+ - Address of user supplied call back function. A nil pointer
+ uninstalls the current handler.
Returns
@@ -1630,8 +1582,8 @@ the specified channel.
ca_modify_host_name()
ca_field_type()
-#include <cadef.h>
-chtype ca_field_type ( CHID );
+#include <cadef.h>
+chtype ca_field_type ( CHID );
Description
@@ -1640,22 +1592,20 @@ the specified channel.
Arguments
CHID
- channel identifier
-
+ - channel identifier
Returns
TYPE
- The data type code will be a member of the set of DBF_XXXX in
+
- The data type code will be a member of the set of DBF_XXXX in
db_access.h. The constant TYPENOTCONN is returned if the channel is
- disconnected.
-
+ disconnected.
ca_element_count()
-#include <cadef.h>
-unsigned ca_element_count ( CHID );
+#include <cadef.h>
+unsigned ca_element_count ( CHID );
Description
@@ -1665,46 +1615,41 @@ channel.
Arguments
CHID
- channel identifier
-
+ - channel identifier
Returns
COUNT
- The maximum array element count in the server. An element count
- of zero is returned if the channel is disconnected.
-
+ - The maximum array element count in the server. An element count
+ of zero is returned if the channel is disconnected.
ca_name()
-#include <cadef.h>
-char * ca_name ( CHID );
+#include <cadef.h>
+char * ca_name ( CHID );
Description
Return the name provided when the supplied channel id was
-created.
+created.
Arguments
CHID
- channel identifier
-
+ - channel identifier
-Returns
+Returns
PNAME
- The channel name. The string returned is valid as long as the
- channel specified exists.
-
+ - The channel name. The string returned is valid as long as the
+ channel specified exists.
-ca_set_puser()
-#include <cadef.h>
-void ca_set_puser ( chid CHID, void *PUSER );
+ca_set_puser()
+#include <cadef.h>
+void ca_set_puser ( chid CHID, void *PUSER );
Description
@@ -1714,18 +1659,16 @@ use at the users discretion.
Arguments
- CHID
- channel identifier
-
+ - channel identifier
- PUSER
- user private void pointer
-
+ - user private void pointer
-ca_puser()
-#include <cadef.h>
-void * ca_puser ( CHID );
+ca_puser()
+#include <cadef.h>
+void * ca_puser ( CHID );
Description
@@ -1735,27 +1678,24 @@ use at the users discretion.
Arguments
CHID
- channel identifier
-
+ - channel identifier
Returns
PUSER
- user private pointer
-
+ - user private pointer
channel_state()
-
-/* channel connection state */
-#include <cadef.h>
-enum channel_state {
- cs_never_conn, /* valid chid, server not found or unavaliable */
- cs_prev_conn, /* valid chid, previously connected to server */
- cs_conn, /* valid chid, connected to server */
- cs_closed }; /* channel deleted by user */
-enum channel_state ca_state ( CHID );
+/* channel connection state */
+#include <cadef.h>
+enum channel_state {
+ cs_never_conn, /* valid chid, server not found or unavaliable */
+ cs_prev_conn, /* valid chid, previously connected to server */
+ cs_conn, /* valid chid, connected to server */
+ cs_closed }; /* channel deleted by user */
+enum channel_state ca_state ( CHID );
Description
@@ -1765,20 +1705,18 @@ IO channel.
Arguments
CHID
- channel identifier
-
+ - channel identifier
Returns
STATE
- the conection state
-
+ - the conection state
ca_message()
-#include <cadef.h>
-const char * ca_message ( STATUS );
+#include <cadef.h>
+const char * ca_message ( STATUS );
Description
@@ -1788,20 +1726,18 @@ status code.
Arguments
STATUS
- a CA status code
-
+ - a CA status code
Returns
- STR
ING
- the corresponding error message string
-
+ - the corresponding error message string
ca_host_name()
-#include <cadef.h>
-char * ca_host_name ( CHID );
+#include <cadef.h>
+char * ca_host_name ( CHID );
Description
@@ -1811,21 +1747,19 @@ channel is currently connected.
Arguments
CHID
- the channel identifier
-
+ - the channel identifier
Returns
STRING
- The process variable server's host name. If the channel is
- disconnected the string "<disconnected>" is returned.
-
+ - The process variable server's host name. If the channel is
+ disconnected the string "<disconnected>" is returned.
ca_read_access()
-#include <cadef.h>
-int ca_read_access ( CHID );
+#include <cadef.h>
+int ca_read_access ( CHID );
Description
@@ -1835,21 +1769,19 @@ specified channel and
Arguments
CHID
- the channel identifier
-
+ - the channel identifier
Returns
STRING
- boolean true if the client currently has read access to the
- specified channel and boolean false otherwisex
-
+ - boolean true if the client currently has read access to the
+ specified channel and boolean false otherwisex
ca_write_access()
-#include <cadef.h>
-int ca_write_access ( CHID );
+#include <cadef.h>
+int ca_write_access ( CHID );
Description
@@ -1859,21 +1791,19 @@ specified channel and
Arguments
CHID
- the channel identifier
-
+ - the channel identifier
Returns
STRING
- boolean true if the client currently has write access to the
- specified channel and boolean false otherwise
-
+ - boolean true if the client currently has write access to the
+ specified channel and boolean false otherwise
dbr_size[]
-#include <db_access.h>
-extern unsigned dbr_size[/*TYPE*/];
+#include <db_access.h>
+extern unsigned dbr_size[/*TYPE*/];
Description
@@ -1882,21 +1812,19 @@ specified channel and
Arguments
TYPE
- The data type code. A member of the set of DBF_XXXX in
- db_access.h.
-
+ - The data type code. A member of the set of DBF_XXXX in
+ db_access.h.
Returns
SIZE
- the size in bytes of the specified type
-
+ - the size in bytes of the specified type
dbr_size_n()
-#include <db_access.h>
-unsigned dbr_size_n ( TYPE, COUNT );
+#include <db_access.h>
+unsigned dbr_size_n ( TYPE, COUNT );
Description
@@ -1909,26 +1837,23 @@ pointer to the value field.
Arguments
TYPE
- The data type
-
+ - The data type
COUNT
- The element count
-
+ - The element count
Returns
SIZE
- the size in bytes of the specified type with the specified number
- of elements
-
+ - the size in bytes of the specified type with the specified number
+ of elements
-dbr_value_size[]
-#include <db_access.h>
-extern unsigned dbr_value_size[/* TYPE */];
+dbr_value_size[]
+#include <db_access.h>
+extern unsigned dbr_value_size[/* TYPE */];
Description
@@ -1939,17 +1864,15 @@ field is returned otherwise the size of the type is returned.
Arguments
TYPE
- The data type code. A member of the set of DBF_XXXX in
- db_access.h.
-
+ - The data type code. A member of the set of DBF_XXXX in
+ db_access.h.
Returns
SIZE
- the size in bytes of the value field if the type is a structure
- and otherwise the size in bytes of the type
-
+ - the size in bytes of the value field if the type is a structure
+ and otherwise the size in bytes of the type
ca_test_event()
@@ -1961,18 +1884,18 @@ field is returned otherwise the size of the type is returned.
A built-in subscription update call back handler for debugging purposes
that prints diagnostics to standard out.
-Examples
-void ca_test_event ();
-status = ca_add_event ( type, chid, ca_test_event, NULL, NULL );
-SEVCHK ( status, .... );
+Examples
+void ca_test_event ();
+status = ca_add_event ( type, chid, ca_test_event, NULL, NULL );
+SEVCHK ( status, .... );
See Also
ca_sg_create()
-#include <cadef.h>
-int ca_sg_create ( CA_SYNC_GID *PGID );
+#include <cadef.h>
+int ca_sg_create ( CA_SYNC_GID *PGID );
Description
@@ -1989,25 +1912,25 @@ out and in all likelihood will never be satisfied.
Any number of asynchronous groups can have application requested
operations outstanding within them at any given time.
-Arguments
+Arguments
+
PGID
- Pointer to a user supplied CA_SYNC_GID.
-
+ - Pointer to a user supplied CA_SYNC_GID.
-Examples
-CA_SYNC_GID gid;
-status = ca_sg_create ( &gid );
-SEVCHK ( status, Sync group create failed );
+Examples
+CA_SYNC_GID gid;
+status = ca_sg_create ( &gid );
+SEVCHK ( status, Sync group create failed );
-Returns
+Returns
ECA_NORMAL - Normal successful completion
ECA_ALLOCMEM - Failed, unable to allocate memory
-See Also
+See Also
ca_sg_delete()
ca_sg_block()
@@ -2021,8 +1944,8 @@ ca_sg_delete()
ca_sg_get()
ca_sg_delete()
-#include <cadef.h>
-int ca_sg_delete ( CA_SYNC_GID GID );
+#include <cadef.h>
+int ca_sg_delete ( CA_SYNC_GID GID );
Description
@@ -2031,14 +1954,13 @@ ca_sg_delete()
Arguments
- GID
- Identifier of the synchronous group to be deleted.
-
+ - Identifier of the synchronous group to be deleted.
Examples
-CA_SYNC_GID gid;
-status = ca_sg_delete ( gid );
-SEVCHK ( status, Sync group delete failed );
+CA_SYNC_GID gid;
+status = ca_sg_delete ( gid );
+SEVCHK ( status, Sync group delete failed );
Returns
@@ -2051,10 +1973,10 @@ ca_sg_delete()
ca_sg_block()
-#include <cadef.h>
-int ca_sg_block ( CA_SYNC_GID GID, double timeout );
+#include <cadef.h>
+int ca_sg_block ( CA_SYNC_GID GID, double timeout );
-Description
+Description
Flushes the send buffer and then waits until outstanding requests complete
or the specified time out expires. At this time outstanding requests include
@@ -2071,19 +1993,18 @@ synchronous group request should not be referenced by your program until
ECA_NORMAL has been received from ca_sg_block(). This routine will process
pending channel access background activity while it is waiting.
-Arguments
+Arguments
- GID
- Identifier of the synchronous group.
-
+ - Identifier of the synchronous group.
-Examples
-CA_SYNC_GID gid;
-status = ca_sg_block(gid);
-SEVCHK(status, Sync group block failed);
+Examples
+CA_SYNC_GID gid;
+status = ca_sg_block(gid);
+SEVCHK(status, Sync group block failed);
-Returns
+Returns
ECA_NORMAL - Normal successful completion
@@ -2093,15 +2014,15 @@ pending
ECA_BADSYNCGRP - Invalid synchronous group
-See Also
+See Also
ca_sg_test()
ca_sg_reset()
ca_sg_test()
-#include <cadef.h>
-int ca_sg_test ( CA_SYNC_GID GID )
+#include <cadef.h>
+int ca_sg_test ( CA_SYNC_GID GID )
Description
@@ -2111,8 +2032,7 @@ completed.
Arguments
GID
- Identifier of the synchronous group.
-
+ - Identifier of the synchronous group.
Description
@@ -2121,8 +2041,8 @@ completed.
completed.
Examples
-CA_SYNC_GID gid;
-status = ca_sg_test ( gid );
+CA_SYNC_GID gid;
+status = ca_sg_test ( gid );
Returns
@@ -2131,8 +2051,8 @@ completed.
ECA_IOINPROGRESS - Some IO operations still in progress
ca_sg_reset()
-#include <cadef.h>
-int ca_sg_reset ( CA_SYNC_GID GID )
+#include <cadef.h>
+int ca_sg_reset ( CA_SYNC_GID GID )
Description
@@ -2140,27 +2060,26 @@ completed.
group to zero so that ca_sg_test() will return ECA_IODONE and ca_sg_block()
will not block unless additional subsequent requests are made.
-Arguments
+Arguments
GID
- Identifier of the synchronous group.
-
+ - Identifier of the synchronous group.
-Examples
-CA_SYNC_GID gid;
-status = ca_sg_reset(gid);
+Examples
+CA_SYNC_GID gid;
+status = ca_sg_reset(gid);
-Returns
+Returns
ECA_NORMAL - Normal successful completion
ECA_BADSYNCGRP - Invalid synchronous group
ca_sg_put()
-#include <cadef.h>
-int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
- unsigned long COUNT, chid CHID, void *PVALUE );
+#include <cadef.h>
+int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
+ unsigned long COUNT, chid CHID, void *PVALUE );
Write a value, or array of values, to a channel and increment the
outstanding request count of a synchronous group.
@@ -2173,38 +2092,33 @@ be efficiently sent in one message.
If a connection is lost and then resumed outstanding puts are not
reissued.
-Arguments
+Arguments
GID
- synchronous group identifier
-
+ - synchronous group identifier
TYPE
- The type of supplied value. Conversion will occur if it does not
+
- The type of supplied value. Conversion will occur if it does not
match the native type. Specify one from the set of DBR_XXXX in
- db_access.h.
-
+ db_access.h.
COUNT
- element count to be written to the specified channel - must match
- the array pointed to by PVALUE
-
+ - element count to be written to the specified channel - must match
+ the array pointed to by PVALUE
CHID
- channel identifier
-
+ - channel identifier
PVALUE
- A pointer to an application supplied buffer containing the value
- or array of valuesReturns
-
+ - A pointer to an application supplied buffer containing the value
+ or array of valuesReturns
-Returns
+Returns
ECA_NORMAL - Normal successful completion
@@ -2225,10 +2139,10 @@ reissued.
ca_sg_get()
-#include <cadef.h>
-int ca_sg_array_get ( CA_SYNC_GID GID,
- chtype TYPE, unsigned long COUNT,
- chid CHID, void *PVALUE );
+#include <cadef.h>
+int ca_sg_array_get ( CA_SYNC_GID GID,
+ chtype TYPE, unsigned long COUNT,
+ chid CHID, void *PVALUE );
Description
@@ -2250,32 +2164,27 @@ reissued.
Arguments
GID
- Identifier of the synchronous group.
-
+ - Identifier of the synchronous group.
TYPE
- External type of returned value. Conversion will occur if this
+
- External type of returned value. Conversion will occur if this
does not match native type. Specify one from the set of DBR_XXXX in
- db_access.h
-
+ db_access.h
COUNT
- Element count to be read from the specified channel. It must match
- the array pointed to by PVALUE.
-
+ - Element count to be read from the specified channel. It must match
+ the array pointed to by PVALUE.
CHID
- channel identifier
-
+ - channel identifier
PVALUE
- Pointer to application supplied buffer that is to contain the
- value or array of values to be returned
-
+ - Pointer to application supplied buffer that is to contain the
+ value or array of values to be returned
Returns
@@ -2302,9 +2211,8 @@ reissued.
ca_client_status()
int ca_client_status ( unsigned level );
-
-int ca_context_status ( struct ca_client_context *,
- unsigned level );
+int ca_context_status ( struct ca_client_context *,
+ unsigned level );
CONTEXTA pointer to the CA context to join with.
LEVELThe interest level. Increasing level produces increasing - detail.
-ca_attach_context()
int ca_attach_context (struct ca_client_context *CONTEXT);+
int ca_attach_context (struct ca_client_context *CONTEXT);
Become a member of the specified CA context. If
-ca_disable_preemptive_callback is specified when ca_context_create()
-is called ( or if ca_task_initialize() is called ) then additional threads
-are not allowed to join the CA context because allowing other
-threads to join implies that CA callbacks will be called preemptively from
-more than one thread.
Become a member of the specified CA context. If
+ca_disable_preemptive_callback is specified when
+ca_context_create() is called (or if ca_task_initialize() is called) then
+additional threads are not allowed to join the CA context because
+allowing other threads to join implies that CA callbacks will be called
+preemptively from more than one thread.
CONTEXTA pointer to the CA context to join with.
-acctst <PV name> [progress logging level] [channel duplication count] - [test repetition count] [enable preemptive callback]+ [test repetition count] [enable preemptive callback]
caEventRate <PV name>
+caEventRate <PV name>
ca_test <PV name> [value to be written]
+ca_test <PV name> [value to be written]
CVS Revision $Id: CAref.html,v 1.16 2001/11/20 23:33:05 jhill Exp -$
+CVS Revision +$Id$ +