This is Unofficial EPICS BASE Doxygen Site
getCopy Class Reference

#include "oldAccess.h"

+ Inheritance diagram for getCopy:
+ Collaboration diagram for getCopy:

Public Member Functions

 getCopy (epicsGuard< epicsMutex > &guard, ca_client_context &cacCtx, oldChannelNotify &, unsigned type, arrayElementCount count, void *pValue)
 
 ~getCopy ()
 
void show (unsigned level) const
 
void cancel ()
 
void * operator new (size_t size, tsFreeList< class getCopy, 1024, epicsMutexNOOP > &)
 
void completion (epicsGuard< epicsMutex > &, unsigned type, arrayElementCount count, const void *pData)
 
 getCopy (const getCopy &)
 
getCopyoperator= (const getCopy &)
 
void operator delete (void *)
 
- Public Member Functions inherited from cacReadNotify
virtual ~cacReadNotify ()=0
 

Public Attributes

epicsPlacementDeleteOperator((void *, tsFreeList< class getCopy, 1024, epicsMutexNOOP > &)) private ca_client_context cacCtx )
 
oldChannelNotifychan
 
void * pValue
 
unsigned ioSeqNo
 
unsigned type
 
void exception epicsGuard< epicsMutex > int status
 
void exception epicsGuard< epicsMutex > int const char * pContext
 
void exception epicsGuard< epicsMutex > int const char unsigned type
 
void exception epicsGuard< epicsMutex > int const char unsigned arrayElementCount count
 
- Public Attributes inherited from cacReadNotify
virtual void exception epicsGuard< epicsMutex > int status
 
virtual void exception epicsGuard< epicsMutex > int const char * pContext
 
virtual void exception epicsGuard< epicsMutex > int const char unsigned type
 
virtual void exception epicsGuard< epicsMutex > int const char unsigned arrayElementCount count = 0
 

Detailed Description

Definition at line 161 of file oldAccess.h.

Constructor & Destructor Documentation

getCopy::getCopy ( epicsGuard< epicsMutex > &  guard,
ca_client_context cacCtx,
oldChannelNotify chanIn,
unsigned  type,
arrayElementCount  count,
void *  pValue 
)

Definition at line 36 of file getCopy.cpp.

39  :
40  count ( countIn ), cacCtx ( cacCtxIn ), chan ( chanIn ), pValue ( pValueIn ),
41  ioSeqNo ( 0 ), type ( typeIn )
42 {
43  this->ioSeqNo = cacCtxIn.sequenceNumberOfOutstandingIO ( guard );
44  cacCtxIn.incrementOutstandingIO ( guard, this->ioSeqNo );
45 }
void * pValue
Definition: oldAccess.h:179
unsigned ioSeqNo
Definition: oldAccess.h:180
unsigned type
Definition: oldAccess.h:181
oldChannelNotify & chan
Definition: oldAccess.h:178
epicsPlacementDeleteOperator((void *, tsFreeList< class getCopy, 1024, epicsMutexNOOP > &)) private ca_client_context cacCtx)
Definition: oldAccess.h:173
void exception epicsGuard< epicsMutex > int const char unsigned arrayElementCount count
Definition: oldAccess.h:185
getCopy::~getCopy ( )

Definition at line 47 of file getCopy.cpp.

48 {
49 }
getCopy::getCopy ( const getCopy )

Member Function Documentation

void getCopy::cancel ( )

Definition at line 51 of file getCopy.cpp.

52 {
53  epicsGuard < epicsMutex > guard ( this->cacCtx.mutexRef () );
54  this->cacCtx.decrementOutstandingIO ( guard, this->ioSeqNo );
55 }
unsigned ioSeqNo
Definition: oldAccess.h:180
epicsPlacementDeleteOperator((void *, tsFreeList< class getCopy, 1024, epicsMutexNOOP > &)) private ca_client_context cacCtx)
Definition: oldAccess.h:173
void getCopy::completion ( epicsGuard< epicsMutex > &  guard,
unsigned  type,
arrayElementCount  count,
const void *  pData 
)
virtual

Implements cacReadNotify.

Definition at line 57 of file getCopy.cpp.

60 {
61  if ( this->type == typeIn ) {
62  unsigned size = dbr_size_n ( typeIn, countIn );
63  memcpy ( this->pValue, pDataIn, size );
64  this->cacCtx.decrementOutstandingIO ( guard, this->ioSeqNo );
65  this->cacCtx.destroyGetCopy ( guard, *this );
66  // this object destroyed by preceding function call
67  }
68  else {
69  this->exception ( guard, ECA_INTERNAL,
70  "bad data type match in get copy back response",
71  typeIn, countIn);
72  // this object destroyed by preceding function call
73  }
74 }
#define ECA_INTERNAL
Definition: caerr.h:94
void * pValue
Definition: oldAccess.h:179
unsigned ioSeqNo
Definition: oldAccess.h:180
unsigned type
Definition: oldAccess.h:181
#define dbr_size_n(TYPE, COUNT)
Definition: db_access.h:518
epicsPlacementDeleteOperator((void *, tsFreeList< class getCopy, 1024, epicsMutexNOOP > &)) private ca_client_context cacCtx)
Definition: oldAccess.h:173
void getCopy::operator delete ( void *  )

Definition at line 106 of file getCopy.cpp.

107 {
108  // Visual C++ .net appears to require operator delete if
109  // placement operator delete is defined? I smell a ms rat
110  // because if I declare placement new and delete, but
111  // comment out the placement delete definition there are
112  // no undefined symbols.
113  errlogPrintf ( "%s:%d this compiler is confused about placement delete - memory was probably leaked",
114  __FILE__, __LINE__ );
115 }
int errlogPrintf(const char *pFormat,...)
Definition: errlog.c:105
void * getCopy::operator new ( size_t  size,
tsFreeList< class getCopy, 1024, epicsMutexNOOP > &  freeList 
)
inline

Definition at line 514 of file oldAccess.h.

516 {
517  return freeList.allocate ( size );
518 }
void * allocate(size_t size)
Definition: tsFreeList.h:126
getCopy& getCopy::operator= ( const getCopy )
void getCopy::show ( unsigned  level) const

Definition at line 95 of file getCopy.cpp.

96 {
97  int tmpType = static_cast <int> ( this->type );
98  ::printf ( "read copy IO at %p, type %s, element count %lu\n",
99  static_cast <const void *> ( this ), dbf_type_to_text ( tmpType ), this->count );
100  if ( level > 0u ) {
101  ::printf ( "\tIO sequence number %u, user's storage %p\n",
102  this->ioSeqNo, static_cast <const void *> ( this->pValue ) );
103  }
104 }
#define dbf_type_to_text(type)
Definition: db_access.h:677
void * pValue
Definition: oldAccess.h:179
#define printf
Definition: epicsStdio.h:41
unsigned ioSeqNo
Definition: oldAccess.h:180
unsigned type
Definition: oldAccess.h:181
void exception epicsGuard< epicsMutex > int const char unsigned arrayElementCount count
Definition: oldAccess.h:185

Member Data Documentation

epicsPlacementDeleteOperator (( void *, tsFreeList < class getCopy, 1024, epicsMutexNOOP > & )) private ca_client_context getCopy::cacCtx)

Definition at line 173 of file oldAccess.h.

oldChannelNotify& getCopy::chan

Definition at line 178 of file oldAccess.h.

void exception epicsGuard< epicsMutex > int const char unsigned arrayElementCount getCopy::count

Definition at line 185 of file oldAccess.h.

unsigned getCopy::ioSeqNo

Definition at line 180 of file oldAccess.h.

void exception epicsGuard< epicsMutex > int const char* getCopy::pContext

Definition at line 185 of file oldAccess.h.

void* getCopy::pValue

Definition at line 179 of file oldAccess.h.

void exception epicsGuard< epicsMutex > int getCopy::status

Definition at line 185 of file oldAccess.h.

unsigned getCopy::type

Definition at line 181 of file oldAccess.h.

void exception epicsGuard< epicsMutex > int const char unsigned getCopy::type

Definition at line 185 of file oldAccess.h.


The documentation for this class was generated from the following files: