diff --git a/src/ca/CAref.html b/src/ca/CAref.html index 13bcd795f..374e32309 100644 --- a/src/ca/CAref.html +++ b/src/ca/CAref.html @@ -1009,7 +1009,7 @@ d:/user/R3.14.clean/epics/base/lib/WIN32-x86/
acctst <PV name> [progress logging level] [channel duplication count] +acctst <PV name> [progress logging level] [channel duplication count] [test repetition count] [enable preemptive callback]Description
@@ -2079,7 +2079,7 @@ example, be beneficial when tuning an archiver installation.Significant performance gains can be realized when the CA client library doesn't wait for a response to return from the server after each request. All requests which require interaction with a CA server are accumulated (buffered) -and not forwarded to the IOC until one of
-ca_flush_io(), +and not forwarded to the IOC until one ofca_flush_io(),ca_pend_io(),ca_pend_event(), orca_sg_block()are called allowing several operations to be efficiently sent over the network together. Any process variable values written @@ -2103,16 +2103,16 @@ 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. Seeca_signal()andSEVCHK()for more information on this topic.status = ca_XXXX(); -SEVCHK( status, "ca_XXXX() returned failure 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"); -} +if ( status & CA_M_SUCCESS ) { + printf ( "The requested ca_XXXX() operation didn't complete successfully"); +} -if ( status != ECA_NORMAL ) { +if ( status != ECA_NORMAL ) { printf("The requested ca_XXXX() operation didn't complete successfully because \"%s\"\n", - ca_message ( status ) ); + ca_message ( status ) ); }Channel Access Data Types
@@ -2285,7 +2285,7 @@ int main ( int argc, char ** argv ) unsigned nBytes; unsigned elementCount; char timeString[32]; - unsigned i; + unsigned i; chid chan; double sum; int status; @@ -2328,7 +2328,7 @@ int main ( int argc, char ** argv ) epicsTimeToStrftime ( timeString, sizeof ( timeString ), "%a %b %d %Y %H:%M:%S.%f", & pTD->stamp ); - printf ( "The sum of elements in %s at %s was %f\n", + printf ( "The sum of elements in %s at %s was %f\n", argv[1], timeString, sum ); ca_clear_channel ( chan ); @@ -2359,7 +2359,7 @@ executing within the user's callback function.typedef struct event_handler_args { void *usr; /* user argument supplied with request */ chanId chid; /* channel id */ - long type; /* the type of the item returned */ + long type; /* the type of the item returned */ long count; /* the element count of the item returned */ const void *dbr; /* a pointer to the item returned */ int status; /* ECA_XXX status of the requested op from the server */ @@ -2382,7 +2382,7 @@ attached to the request, 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. Certain internal exceptions within the CA client library, and failures detected by the SEVCHK macro may also cause the exception -handler to be invoked. To modify this behavior see +handler to be invoked. To modify this behavior seeca_add_exception_event().Server and Client Share the Same Address Space on The Same @@ -2674,6 +2674,14 @@ automatically released by the system when the process exits and vxWorks or RTEMS no cleanup occurs unless the application calls
ca_context_destroy(). +Note: This operation blocks until any user callbacks for any channel +created in the current context have run to completion. If callbacks take a +lock (mutex) then it is the user's responsibility to ensure that this lock +is not held when
+ca_clear_context()is called, otherwise a +deadlock may ensue. (See also +ca_clear_channel()and +ca_clear_subscription().)Returns
ECA_NORMAL - Normal successful completion
@@ -2819,6 +2827,12 @@ efficiently sent over the network in one message. clearing a channel does shutdown and reclaim any channel state change event subscriptions (monitors) registered with the channel. +Note: This operation blocks until any user callbacks for this channel +have run to completion. If callbacks take a lock (mutex) then it is the +user's responsibility to ensure that this lock is not held when +
+ca_clear_channel()is called, otherwise a deadlock may ensue. +(See alsoca_clear_subscription().)Arguments
- @@ -2833,16 +2847,16 @@ subscriptions (monitors) registered with the channel.
CHID
ca_put()#include <cadef.h> -int ca_put ( chtype TYPE, - chid CHID, void *PVALUE ); -int ca_array_put ( chtype TYPE, unsigned long COUNT, +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 ( caEventCallBackFunc ) (struct event_handler_args); -int ca_put_callback ( chtype TYPE, - chid CHID, const void *PVALUE, - caEventCallBackFunc PFUNC, void *USERARG ); -int ca_array_put_callback ( chtype TYPE, unsigned long COUNT, - chid CHID, const void *PVALUE, +int ca_put_callback ( chtype TYPE, + chid CHID, const void *PVALUE, + caEventCallBackFunc PFUNC, void *USERARG ); +int ca_array_put_callback ( chtype TYPE, unsigned long COUNT, + chid CHID, const void *PVALUE, caEventCallBackFunc PFUNC, void *USERARG );Description
@@ -3069,7 +3083,7 @@ when a CA get request is initiated. typedef void ( caEventCallBackFunc ) (struct event_handler_args); int ca_create_subscription ( chtype TYPE, unsigned long COUNT, chid CHID, unsigned long MASK, - caEventCallBackFunc USERFUNC, void *USERARG, + caEventCallBackFunc USERFUNC, void *USERARG, evid *PEVID );Description
@@ -3153,7 +3167,7 @@ indicating the current state of the channel.
MASKca_flush_io(), c
ca_pend_event(), or ca_sg_block() are called. This allows several requests to be
efficiently sent together in one message.
+Note: This operation blocks until any user callbacks for this channel
+have run to completion. If callbacks take a lock (mutex) then it is the
+user's responsibility to ensure that this lock is not held when
+ca_clear_subscription() is called, otherwise a deadlock may
+ensue. (See also ca_clear_channel().)
+
Arguments
- EVID
@@ -3364,7 +3385,7 @@ becomes full.
ca_signal()
#include <cadef.h>
-int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
+int ca_signal ( long CA_STATUS, const char * CONTEXT_STRING );
void SEVCHK( CA_STATUS, CONTEXT_STRING );
Description
@@ -3381,7 +3402,7 @@ 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 (...);
+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
@@ -3405,7 +3426,7 @@ this purpose.
ca_add_exception_event()
-#include <cadef.h>
+#include <cadef.h>
typedef void (*pCallback) ( struct exception_handler_args HANDLERARGS );
int ca_add_exception_event ( pCallback USERFUNC, void *USERARG );
@@ -3614,7 +3635,7 @@ specified channel.
PFUNC
- Pointer to a user supplied callback function. A null pointer uninstalls
the current handler. The following arguments are passed by value
- to the supplied callback handler.
+ to the supplied callback handler.
typedef struct ca_access_rights {
unsigned read_access:1;
unsigned write_access:1;
@@ -3954,8 +3975,8 @@ type.
prints diagnostics to standard out.
Examples
-void ca_test_event ();
-status = ca_create_subscription ( type, chid, ca_test_event, NULL, NULL );
+void ca_test_event ();
+status = ca_create_subscription ( type, chid, ca_test_event, NULL, NULL );
SEVCHK ( status, .... );
See Also
@@ -3989,8 +4010,8 @@ outstanding within them at any given time.
Examples
-CA_SYNC_GID gid;
-status = ca_sg_create ( &gid );
+CA_SYNC_GID gid;
+status = ca_sg_create ( &gid );
SEVCHK ( status, Sync group create failed );
Returns
@@ -4028,8 +4049,8 @@ int ca_sg_delete ( CA_SYNC_GID GID );
Examples
-CA_SYNC_GID gid;
-status = ca_sg_delete ( gid );
+CA_SYNC_GID gid;
+status = ca_sg_delete ( gid );
SEVCHK ( status, Sync group delete failed );
Returns
@@ -4140,7 +4161,7 @@ will not block unless additional subsequent requests are made.
Examples
-CA_SYNC_GID gid;
+CA_SYNC_GID gid;
status = ca_sg_reset(gid);
Returns
@@ -4153,7 +4174,7 @@ status = ca_sg_reset(gid);
#include <cadef.h>
int ca_sg_put ( CA_SYNC_GID GID, chtype TYPE,
chid CHID, void *PVALUE );
-int ca_sg_array_put ( CA_SYNC_GID GID, chtype TYPE,
+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
@@ -4294,7 +4315,7 @@ reissued.
ca_client_status()
int ca_client_status ( unsigned level );
-int ca_context_status ( struct ca_client_context *CONTEXT,
+int ca_context_status ( struct ca_client_context *CONTEXT,
unsigned LEVEL );
Description