This is Unofficial EPICS BASE Doxygen Site
oldAccess.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  *
12  *
13  * L O S A L A M O S
14  * Los Alamos National Laboratory
15  * Los Alamos, New Mexico 87545
16  *
17  * Copyright, The Regents of the University of California.
18  *
19  *
20  * Author Jeffrey O. Hill
21  * johill@lanl.gov
22  * 505 665 1831
23  */
24 
25 #ifndef INC_oldAccess_H
26 #define INC_oldAccess_H
27 
28 #include <memory>
29 
30 #include "tsFreeList.h"
31 #include "compilerDependencies.h"
32 #include "osiSock.h"
33 
34 #include "libCaAPI.h"
35 #include "caProto.h"
36 #include "cacIO.h"
37 #include "cadef.h"
38 #include "syncGroup.h"
39 
41 public:
44  const char * pName, caCh * pConnCallBackIn,
45  void * pPrivateIn, capri priority );
46  void destructor (
47  CallbackGuard & cbGuard,
48  epicsGuard < epicsMutex > & mutexGuard );
49 
50  // legacy C API
51  friend unsigned epicsStdCall ca_get_host_name (
52  chid pChan, char * pBuf, unsigned bufLength );
53  friend const char * epicsStdCall ca_host_name (
54  chid pChan );
55  friend const char * epicsStdCall ca_name (
56  chid pChan );
57  friend void epicsStdCall ca_set_puser (
58  chid pChan, void * puser );
59  friend void * epicsStdCall ca_puser (
60  chid pChan );
61  friend int epicsStdCall ca_change_connection_event (
62  chid pChan, caCh * pfunc );
63  friend int epicsStdCall ca_replace_access_rights_event (
64  chid pChan, caArh *pfunc );
65  friend int epicsStdCall ca_array_get ( chtype type,
66  arrayElementCount count, chid pChan, void * pValue );
67  friend int epicsStdCall ca_array_get_callback ( chtype type,
68  arrayElementCount count, chid pChan,
69  caEventCallBackFunc *pfunc, void *arg );
70  friend int epicsStdCall ca_array_put (
71  chtype type, arrayElementCount count,
72  chid pChan, const void * pValue );
73  friend int epicsStdCall ca_array_put_callback (
74  chtype type, arrayElementCount count,
75  chid pChan, const void *pValue,
76  caEventCallBackFunc *pfunc, void *usrarg );
77  friend double epicsStdCall ca_beacon_period (
78  chid pChan );
79  friend unsigned epicsStdCall ca_search_attempts (
80  chid pChan );
81  friend unsigned epicsStdCall ca_write_access (
82  chid pChan );
83  friend unsigned epicsStdCall ca_read_access (
84  chid pChan );
85  friend short epicsStdCall ca_field_type (
86  chid pChan );
87  friend arrayElementCount epicsStdCall ca_element_count (
88  chid pChan );
89  friend int epicsStdCall ca_v42_ok (
90  chid pChan );
91  friend int epicsStdCall ca_create_subscription (
92  chtype type, arrayElementCount count, chid pChan,
93  long mask, caEventCallBackFunc * pCallBack,
94  void * pCallBackArg, evid * monixptr );
95  friend enum channel_state epicsStdCall ca_state (
96  chid pChan );
97  friend double epicsStdCall ca_receive_watchdog_delay (
98  chid pChan );
99 
100  unsigned getName (
102  char * pBuf, unsigned bufLen ) const throw ();
103  void show (
105  unsigned level ) const;
106  void initiateConnect (
108  void read (
110  unsigned type, arrayElementCount count,
111  cacReadNotify &notify, cacChannel::ioid *pId = 0 );
112  void write (
114  unsigned type, arrayElementCount count, const void *pValue,
115  cacWriteNotify &, cacChannel::ioid *pId = 0 );
116  void ioCancel (
117  CallbackGuard & callbackGuard,
118  epicsGuard < epicsMutex > & mutualExclusionGuard,
119  const cacChannel::ioid & );
120  void ioShow (
122  const cacChannel::ioid &, unsigned level ) const;
126 
127  void * operator new ( size_t size,
129  epicsPlacementDeleteOperator (( void * ,
131 protected:
132  ~oldChannelNotify ();
133 private:
134  ca_client_context & cacCtx;
135  cacChannel & io;
136  caCh * pConnCallBack;
137  void * pPrivate;
138  caArh * pAccessRightsFunc;
139  unsigned ioSeqNo;
140  bool currentlyConnected;
141  bool prevConnected;
142  void connectNotify ( epicsGuard < epicsMutex > & );
143  void disconnectNotify ( epicsGuard < epicsMutex > & );
144  void serviceShutdownNotify (
145  epicsGuard < epicsMutex > & mutualExclusionGuard );
146  void accessRightsNotify (
148  void exception ( epicsGuard < epicsMutex > &,
149  int status, const char * pContext );
150  void readException ( epicsGuard < epicsMutex > &,
151  int status, const char * pContext,
152  unsigned type, arrayElementCount count, void *pValue );
153  void writeException ( epicsGuard < epicsMutex > &,
154  int status, const char * pContext,
155  unsigned type, arrayElementCount count );
157  oldChannelNotify & operator = ( const oldChannelNotify & );
158  void operator delete ( void * );
159 };
160 
161 class getCopy : public cacReadNotify {
162 public:
163  getCopy (
165  ca_client_context & cacCtx,
166  oldChannelNotify &, unsigned type,
167  arrayElementCount count, void *pValue );
168  ~getCopy ();
169  void show ( unsigned level ) const;
170  void cancel ();
171  void * operator new ( size_t size,
173  epicsPlacementDeleteOperator (( void *,
175 private:
176  arrayElementCount count;
177  ca_client_context & cacCtx;
179  void * pValue;
180  unsigned ioSeqNo;
181  unsigned type;
182  void completion (
183  epicsGuard < epicsMutex > &, unsigned type,
184  arrayElementCount count, const void *pData );
185  void exception (
186  epicsGuard < epicsMutex > &, int status,
187  const char *pContext, unsigned type, arrayElementCount count );
188  getCopy ( const getCopy & );
189  getCopy & operator = ( const getCopy & );
190  void operator delete ( void * );
191 };
192 
193 class getCallback : public cacReadNotify {
194 public:
195  getCallback (
196  oldChannelNotify & chanIn,
197  caEventCallBackFunc *pFunc, void *pPrivate );
198  ~getCallback ();
199  void * operator new ( size_t size,
201  epicsPlacementDeleteOperator (( void *,
203 private:
204  oldChannelNotify & chan;
205  caEventCallBackFunc * pFunc;
206  void * pPrivate;
207  void completion (
208  epicsGuard < epicsMutex > &, unsigned type,
209  arrayElementCount count, const void *pData);
210  void exception (
211  epicsGuard < epicsMutex > &, int status,
212  const char * pContext, unsigned type, arrayElementCount count );
213  getCallback ( const getCallback & );
214  getCallback & operator = ( const getCallback & );
215  void operator delete ( void * );
216 };
217 
218 class putCallback : public cacWriteNotify {
219 public:
220  putCallback (
222  caEventCallBackFunc *pFunc, void *pPrivate );
223  ~putCallback ();
224  void * operator new ( size_t size,
226  epicsPlacementDeleteOperator (( void *,
228 private:
229  oldChannelNotify & chan;
230  caEventCallBackFunc * pFunc;
231  void *pPrivate;
232  void completion ( epicsGuard < epicsMutex > & );
233  void exception (
234  epicsGuard < epicsMutex > &, int status, const char *pContext,
235  unsigned type, arrayElementCount count );
236  putCallback ( const putCallback & );
237  putCallback & operator = ( const putCallback & );
238  void operator delete ( void * );
239 };
240 
241 struct oldSubscription : private cacStateNotify {
242 public:
245  oldChannelNotify & chanIn, cacChannel & io,
246  unsigned type, arrayElementCount nElem, unsigned mask,
247  caEventCallBackFunc * pFuncIn, void * pPrivateIn,
248  evid * );
249  ~oldSubscription ();
250  oldChannelNotify & channel () const;
251  // The primary mutex must be released when calling the user's
252  // callback, and therefore a finite interval exists when we are
253  // moving forward with the intent to call the users callback
254  // but the users IO could be deleted during this interval.
255  // To prevent the user's callback from being called after
256  // destroying his IO we must past a guard for the callback
257  // mutex here.
258  void cancel (
259  CallbackGuard & callbackGuard,
260  epicsGuard < epicsMutex > & mutualExclusionGuard );
261  void * operator new ( size_t size,
263  epicsPlacementDeleteOperator (( void *,
265 private:
266  oldChannelNotify & chan;
267  cacChannel::ioid id;
269  void * pPrivate;
270  void current (
271  epicsGuard < epicsMutex > &, unsigned type,
272  arrayElementCount count, const void *pData );
273  void exception (
274  epicsGuard < epicsMutex > &, int status,
275  const char *pContext, unsigned type, arrayElementCount count );
276  oldSubscription ( const oldSubscription & );
277  oldSubscription & operator = ( const oldSubscription & );
278  void operator delete ( void * );
279 };
280 
281 extern "C" void cacOnceFunc ( void * );
282 
284 {
285 public:
286  ca_client_context ( bool enablePreemptiveCallback = false );
287  virtual ~ca_client_context ();
288  void changeExceptionEvent (
289  caExceptionHandler * pfunc, void * arg );
290  void registerForFileDescriptorCallBack (
291  CAFDHANDLER * pFunc, void * pArg );
292  void replaceErrLogHandler ( caPrintfFunc * ca_printf_func );
293  cacChannel & createChannel (
294  epicsGuard < epicsMutex > &, const char * pChannelName,
296  void flush ( epicsGuard < epicsMutex > & );
299  int pendIO ( const double & timeout );
300  int pendEvent ( const double & timeout );
301  bool ioComplete () const;
302  void show ( unsigned level ) const;
303  unsigned circuitCount () const;
304  unsigned sequenceNumberOfOutstandingIO (
305  epicsGuard < epicsMutex > & ) const;
306  unsigned beaconAnomaliesSinceProgramStart () const;
307  void incrementOutstandingIO (
308  epicsGuard < epicsMutex > &, unsigned ioSeqNo );
309  void decrementOutstandingIO (
310  epicsGuard < epicsMutex > &, unsigned ioSeqNo );
311  void exception (
312  epicsGuard < epicsMutex > &, int status, const char * pContext,
313  const char * pFileName, unsigned lineNo );
314  void exception (
315  epicsGuard < epicsMutex > &, int status, const char * pContext,
316  const char * pFileName, unsigned lineNo, oldChannelNotify & chan,
317  unsigned type, arrayElementCount count, unsigned op );
318  void blockForEventAndEnableCallbacks (
319  epicsEvent & event, const double & timeout );
320  CASG * lookupCASG ( epicsGuard < epicsMutex > &, unsigned id );
321  static void installDefaultService ( cacService & );
322  void installCASG ( epicsGuard < epicsMutex > &, CASG & );
323  void uninstallCASG ( epicsGuard < epicsMutex > &, CASG & );
324  void selfTest () const;
325 // perhaps these should be eliminated in deference to the exception mechanism
326  int printFormated ( const char * pformat, ... ) const;
327  int varArgsPrintFormated ( const char * pformat, va_list args ) const;
328  void signal ( int ca_status, const char * pfilenm,
329  int lineno, const char * pFormat, ... );
330  void vSignal ( int ca_status, const char * pfilenm,
331  int lineno, const char *pFormat, va_list args );
332  bool preemptiveCallbakIsEnabled () const;
333  void destroyGetCopy ( epicsGuard < epicsMutex > &, getCopy & );
334  void destroyGetCallback ( epicsGuard < epicsMutex > &, getCallback & );
335  void destroyPutCallback ( epicsGuard < epicsMutex > &, putCallback & );
336  void destroySubscription ( epicsGuard < epicsMutex > &, oldSubscription & );
337  epicsMutex & mutexRef () const;
338 
339  template < class T >
340  void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & );
341 
342  // legacy C API
343  friend int epicsStdCall ca_create_channel (
344  const char * name_str, caCh * conn_func, void * puser,
345  capri priority, chid * chanptr );
346  friend int epicsStdCall ca_clear_channel ( chid pChan );
347  friend int epicsStdCall ca_array_get ( chtype type,
348  arrayElementCount count, chid pChan, void * pValue );
349  friend int epicsStdCall ca_array_get_callback ( chtype type,
350  arrayElementCount count, chid pChan,
351  caEventCallBackFunc *pfunc, void *arg );
352  friend int epicsStdCall ca_array_put ( chtype type,
353  arrayElementCount count, chid pChan, const void * pValue );
354  friend int epicsStdCall ca_array_put_callback ( chtype type,
355  arrayElementCount count, chid pChan, const void * pValue,
356  caEventCallBackFunc *pfunc, void *usrarg );
357  friend int epicsStdCall ca_create_subscription (
358  chtype type, arrayElementCount count, chid pChan,
359  long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg,
360  evid *monixptr );
361  friend int epicsStdCall ca_flush_io ();
362  friend int epicsStdCall ca_clear_subscription ( evid pMon );
363  friend int epicsStdCall ca_sg_create ( CA_SYNC_GID * pgid );
364  friend int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid );
365  friend int epicsStdCall ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout );
366  friend int epicsStdCall ca_sg_reset ( const CA_SYNC_GID gid );
367  friend int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid );
368  friend int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid,
369  chtype type, arrayElementCount count,
370  chid pChan, void *pValue );
371  friend int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid,
372  chtype type, arrayElementCount count,
373  chid pChan, const void *pValue );
374  friend int ca_sync_group_destroy ( CallbackGuard & cbGuard,
376  ca_client_context & cac, const CA_SYNC_GID gid );
377  friend void sync_group_reset ( ca_client_context & client,
378  CASG & sg );
379 
380  // exceptions
381  class noSocket {};
382 private:
390  mutable epicsMutex mutex;
391  mutable epicsMutex cbMutex;
392  epicsEvent ioDone;
393  epicsEvent callbackThreadActivityComplete;
394  epicsThreadId createdByThread;
395  std::auto_ptr < CallbackGuard > pCallbackGuard;
396  std::auto_ptr < cacContext > pServiceContext;
397  caExceptionHandler * ca_exception_func;
398  void * ca_exception_arg;
399  caPrintfFunc * pVPrintfFunc;
400  CAFDHANDLER * fdRegFunc;
401  void * fdRegArg;
402  SOCKET sock;
403  unsigned pndRecvCnt;
404  unsigned ioSeqNo;
405  unsigned callbackThreadsPending;
406  ca_uint16_t localPort;
407  bool fdRegFuncNeedsToBeCalled;
408  bool noWakeupSincePend;
409 
410  void attachToClientCtx ();
411  void callbackProcessingInitiateNotify ();
412  void callbackProcessingCompleteNotify ();
413  cacContext & createNetworkContext (
414  epicsMutex & mutualExclusion, epicsMutex & callbackControl );
415  void _sendWakeupMsg ();
416 
418  ca_client_context & operator = ( const ca_client_context & );
419 
420  friend void cacOnceFunc ( void * );
421  static cacService * pDefaultService;
422  static epicsMutex * pDefaultServiceInstallMutex;
423  static const unsigned flushBlockThreshold;
424 };
425 
426 int fetchClientContext ( ca_client_context * * ppcac );
427 
429 {
430  return this->cacCtx;
431 }
432 
433 inline unsigned oldChannelNotify::getName (
435  char * pBuf, unsigned bufLen ) const throw ()
436 {
437  return this->io.getName ( guard, pBuf, bufLen );
438 }
439 
442  unsigned level ) const
443 {
444  this->io.show ( guard, level );
445 }
446 
448  epicsGuard < epicsMutex > & guard )
449 {
450  this->io.initiateConnect ( guard );
451 }
452 
454  CallbackGuard & callbackGuard,
455  epicsGuard < epicsMutex > & mutualExclusionGuard,
456  const cacChannel::ioid & id )
457 {
458  this->io.ioCancel ( callbackGuard, mutualExclusionGuard, id );
459 }
460 
463  const cacChannel::ioid & id, unsigned level ) const
464 {
465  this->io.ioShow ( guard, id, level );
466 }
467 
469  epicsGuard < epicsMutex > & guard )
470 {
471  this->cacCtx.eliminateExcessiveSendBacklog ( guard, this->io );
472 }
473 
474 inline void * oldChannelNotify::operator new ( size_t size,
476 {
477  return freeList.allocate ( size );
478 }
479 
480 #ifdef CXX_PLACEMENT_DELETE
481 inline void oldChannelNotify::operator delete ( void *pCadaver,
483 {
484  freeList.release ( pCadaver );
485 }
486 #endif
487 
488 inline void * oldSubscription::operator new ( size_t size,
490 {
491  return freeList.allocate ( size );
492 }
493 
494 #ifdef CXX_PLACEMENT_DELETE
495 inline void oldSubscription::operator delete ( void *pCadaver,
497 {
498  freeList.release ( pCadaver );
499 }
500 #endif
501 
503  CallbackGuard & callbackGuard,
504  epicsGuard < epicsMutex > & mutualExclusionGuard )
505 {
506  this->chan.ioCancel ( callbackGuard, mutualExclusionGuard, this->id );
507 }
508 
510 {
511  return this->chan;
512 }
513 
514 inline void * getCopy::operator new ( size_t size,
516 {
517  return freeList.allocate ( size );
518 }
519 
520 #ifdef CXX_PLACEMENT_DELETE
521 inline void getCopy::operator delete ( void *pCadaver,
523 {
524  freeList.release ( pCadaver );
525 }
526 #endif
527 
528 inline void * putCallback::operator new ( size_t size,
530 {
531  return freeList.allocate ( size );
532 }
533 
534 #ifdef CXX_PLACEMENT_DELETE
535 inline void putCallback::operator delete ( void * pCadaver,
537 {
538  freeList.release ( pCadaver );
539 }
540 #endif
541 
542 inline void * getCallback::operator new ( size_t size,
544 {
545  return freeList.allocate ( size );
546 }
547 
548 #ifdef CXX_PLACEMENT_DELETE
549 inline void getCallback::operator delete ( void * pCadaver,
551 {
552  freeList.release ( pCadaver );
553 }
554 #endif
555 
557 {
558  return this->pCallbackGuard.get () == 0;
559 }
560 
561 inline bool ca_client_context::ioComplete () const
562 {
563  return ( this->pndRecvCnt == 0u );
564 }
565 
567  epicsGuard < epicsMutex > & ) const
568 {
569  // perhaps on SMP systems THERE should be lock/unlock around this
570  return this->ioSeqNo;
571 }
572 
573 template < class T >
575  epicsGuard < epicsMutex > & guard, T & io )
576 {
577  if ( this->pCallbackGuard.get() &&
578  this->createdByThread == epicsThreadGetIdSelf () ) {
579  io.destroy ( *this->pCallbackGuard.get(), guard );
580  }
581  else {
582  // dont reverse the lock hierarchy
583  epicsGuardRelease < epicsMutex > guardRelease ( guard );
584  {
585  //
586  // we will definately stall out here if all of the
587  // following are true
588  //
589  // o user creates non-preemtive mode client library context
590  // o user doesnt periodically call a ca function
591  // o user calls this function from an auxiillary thread
592  //
593  CallbackGuard cbGuard ( this->cbMutex );
594  epicsGuard < epicsMutex > guard ( this->mutex );
595  io.destroy ( cbGuard, guard );
596  }
597  }
598 }
599 
600 #endif // ifndef INC_oldAccess_H
double timeout
Definition: pvutils.cpp:25
void caCh(struct connection_handler_args args)
Definition: cadef.h:57
friend short epicsStdCall ca_field_type(chid pChan)
friend int epicsStdCall ca_array_put(chtype type, arrayElementCount count, chid pChan, const void *pValue)
Definition: cac.h:97
friend unsigned epicsStdCall ca_write_access(chid pChan)
friend unsigned epicsStdCall ca_read_access(chid pChan)
unsigned getName(epicsGuard< epicsMutex > &, char *pBuf, unsigned bufLen) const
Definition: oldAccess.h:433
friend int epicsStdCall ca_array_get(chtype type, arrayElementCount count, chid pChan, void *pValue)
friend int epicsStdCall ca_array_get_callback(chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg)
int lineno
Definition: antelope.c:33
friend void epicsStdCall ca_set_puser(chid pChan, void *puser)
virtual void initiateConnect(epicsGuard< epicsMutex > &)=0
bool preemptiveCallbakIsEnabled() const
Definition: oldAccess.h:556
friend arrayElementCount epicsStdCall ca_element_count(chid pChan)
int epicsStdCall ca_create_channel(const char *name_str, caCh *conn_func, void *puser, capri priority, chid *chanptr)
Definition: access.cpp:288
void caArh(struct access_rights_handler_args args)
Definition: cadef.h:70
ca_client_context & getClientCtx()
Definition: oldAccess.h:428
friend double epicsStdCall ca_receive_watchdog_delay(chid pChan)
void caExceptionHandler(struct exception_handler_args)
Definition: cadef.h:251
void caEventCallBackFunc(struct event_handler_args)
Definition: cadef.h:92
friend void *epicsStdCall ca_puser(chid pChan)
unsigned CA_SYNC_GID
Definition: cadef.h:113
pvd::StructureConstPtr type
LIBCA_API int epicsStdCall ca_sg_array_put(const CA_SYNC_GID gid, chtype type, unsigned long count, chid chan, const void *pValue)
Definition: syncgrp.cpp:246
unsigned short ca_uint16_t
Definition: caProto.h:75
unsigned priLev
Definition: cacIO.h:165
channel_state
Definition: cadef.h:166
LIBCA_API int epicsStdCall ca_sg_delete(const CA_SYNC_GID gid)
Definition: syncgrp.cpp:68
friend int epicsStdCall ca_array_put_callback(chtype type, arrayElementCount count, chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg)
void CAFDHANDLER(void *parg, int fd, int opened)
Definition: cadef.h:657
LIBCA_API int epicsStdCall ca_sg_create(CA_SYNC_GID *pgid)
Definition: syncgrp.cpp:24
friend enum channel_state epicsStdCall ca_state(chid pChan)
bool ioComplete() const
Definition: oldAccess.h:561
void destructor(CallbackGuard &cbGuard, epicsGuard< epicsMutex > &mutexGuard)
virtual unsigned getName(epicsGuard< epicsMutex > &, char *pBuf, unsigned bufLen) const =0
virtual void ioShow(epicsGuard< epicsMutex > &, const ioid &, unsigned level) const =0
double ca_real
Definition: cadef.h:49
unsigned ioid
Definition: cacIO.h:173
int ca_sync_group_destroy(CallbackGuard &cbGuard, epicsGuard< epicsMutex > &guard, ca_client_context &cac, const CA_SYNC_GID gid)
Definition: syncgrp.cpp:49
Definition: server.h:76
epicsMutex mutex
Definition: pvAccess.cpp:71
int epicsStdCall ca_flush_io()
Definition: access.cpp:509
friend unsigned epicsStdCall ca_search_attempts(chid pChan)
unsigned capri
Definition: cadef.h:189
void initiateConnect(epicsGuard< epicsMutex > &)
Definition: oldAccess.h:447
friend int epicsStdCall ca_change_connection_event(chid pChan, caCh *pfunc)
LIBCA_API int epicsStdCall ca_clear_subscription(evid pMon)
void cancel(CallbackGuard &callbackGuard, epicsGuard< epicsMutex > &mutualExclusionGuard)
Definition: oldAccess.h:502
int SOCKET
Definition: osdSock.h:31
friend const char *epicsStdCall ca_name(chid pChan)
void ioShow(epicsGuard< epicsMutex > &guard, const cacChannel::ioid &, unsigned level) const
Definition: oldAccess.h:461
void whenThereIsAnExceptionDestroySyncGroupIO(epicsGuard< epicsMutex > &, T &)
Definition: oldAccess.h:574
int caPrintfFunc(const char *pformat, va_list args)
Definition: cadef.h:821
int epicsStdCall ca_clear_channel(chid pChan)
Definition: access.cpp:363
LIBCA_API int epicsStdCall ca_sg_test(const CA_SYNC_GID gid)
Definition: syncgrp.cpp:202
friend unsigned epicsStdCall ca_get_host_name(chid pChan, char *pBuf, unsigned bufLength)
unsigned sequenceNumberOfOutstandingIO(epicsGuard< epicsMutex > &) const
Definition: oldAccess.h:566
LIBCA_API int epicsStdCall ca_sg_array_get(const CA_SYNC_GID gid, chtype type, unsigned long count, chid chan, void *pValue)
Definition: syncgrp.cpp:308
unsigned long arrayElementCount
Definition: cacIO.h:57
friend int epicsStdCall ca_replace_access_rights_event(chid pChan, caArh *pfunc)
friend int epicsStdCall ca_v42_ok(chid pChan)
void ioCancel(CallbackGuard &callbackGuard, epicsGuard< epicsMutex > &mutualExclusionGuard, const cacChannel::ioid &)
Definition: oldAccess.h:453
friend const char *epicsStdCall ca_host_name(chid pChan)
long chtype
Definition: cadef.h:47
oldChannelNotify & channel() const
Definition: oldAccess.h:509
void write(epicsGuard< epicsMutex > &, unsigned type, arrayElementCount count, const void *pValue, cacWriteNotify &, cacChannel::ioid *pId=0)
void * allocate(size_t size)
Definition: tsFreeList.h:126
virtual void show(epicsGuard< epicsMutex > &, unsigned level) const =0
virtual void ioCancel(CallbackGuard &callbackGuard, epicsGuard< epicsMutex > &mutualExclusionGuard, const ioid &)=0
epicsEventId flush
Definition: errlog.c:70
void eliminateExcessiveSendBacklog(epicsGuard< epicsMutex > &, cacChannel &)
void sync_group_reset(ca_client_context &client, CASG &sg)
Definition: syncgrp.cpp:96
void cacOnceFunc(void *)
int fetchClientContext(ca_client_context **ppcac)
Definition: access.cpp:137
ChannelPut::shared_pointer op
Definition: pvAccess.cpp:132
LIBCA_API int epicsStdCall ca_sg_reset(const CA_SYNC_GID gid)
Definition: syncgrp.cpp:155
Compiler specific declarations.
void eliminateExcessiveSendBacklog(epicsGuard< epicsMutex > &)
Definition: oldAccess.h:468
oldChannelNotify(epicsGuard< epicsMutex > &, struct ca_client_context &, const char *pName, caCh *pConnCallBackIn, void *pPrivateIn, capri priority)
LIBCA_API int epicsStdCall ca_sg_block(const CA_SYNC_GID gid, ca_real timeout)
Definition: syncgrp.cpp:127
friend double epicsStdCall ca_beacon_period(chid pChan)
void read(epicsGuard< epicsMutex > &, unsigned type, arrayElementCount count, cacReadNotify &notify, cacChannel::ioid *pId=0)
friend int epicsStdCall ca_create_subscription(chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc *pCallBack, void *pCallBackArg, evid *monixptr)
void show(epicsGuard< epicsMutex > &, unsigned level) const
Definition: oldAccess.h:440
LIBCOM_API epicsThreadId epicsStdCall epicsThreadGetIdSelf(void)
Definition: osdThread.c:810