installed

This commit is contained in:
Jeff Hill
2001-03-07 16:15:53 +00:00
parent 0f9e890314
commit 8fd9d6cb8e
2 changed files with 208 additions and 0 deletions

82
src/ca/getCopy.cpp Normal file
View File

@@ -0,0 +1,82 @@
/*
* $Id$
*
*
* L O S A L A M O S
* Los Alamos National Laboratory
* Los Alamos, New Mexico 87545
*
* Copyright, 1986, The Regents of the University of California.
*
*
* Author Jeffrey O. Hill
* johill@lanl.gov
* 505 665 1831
*/
#include "iocinf.h"
#include "oldAccess.h"
#include "cac_IL.h"
tsFreeList < class getCopy, 1024 > getCopy::freeList;
epicsMutex getCopy::freeListMutex;
getCopy::getCopy ( cac &cacCtxIn, chtype typeIn,
unsigned long countIn, void *pValueIn ) :
count ( countIn ), cacCtx ( cacCtxIn ), pValue ( pValueIn ),
readSeq ( cacCtxIn.sequenceNumberOfOutstandingIO () ), type ( typeIn )
{
cacCtxIn.incrementOutstandingIO ();
}
getCopy::~getCopy ()
{
}
void getCopy::release ()
{
delete this;
}
void getCopy::completionNotify ( cacChannelIO &io )
{
this->cacNotify::completionNotify ( io );
}
void getCopy::completionNotify ( cacChannelIO &chan, unsigned typeIn,
unsigned long countIn, const void *pDataIn )
{
if ( this->type == typeIn ) {
memcpy ( this->pValue, pDataIn, dbr_size_n ( typeIn, countIn ) );
this->cacCtx.decrementOutstandingIO ( this->readSeq );
}
else {
this->exceptionNotify ( chan, ECA_INTERNAL,
"bad data type match in get copy back response" );
}
}
void getCopy::exceptionNotify ( cacChannelIO &chan,
int status, const char *pContext )
{
this->cacNotify::exceptionNotify ( chan, status, pContext );
}
void getCopy::exceptionNotify ( cacChannelIO &chan,
int status, const char *pContext, unsigned type, unsigned long count )
{
this->cacNotify::exceptionNotify ( chan, status, pContext, type, count );
}
void getCopy::show ( unsigned level ) const
{
int tmpType = static_cast <int> ( this->type );
printf ( "read copy IO at %p, type %s, element count %lu\n",
static_cast <const void *> ( this ), dbf_type_to_text ( tmpType ), this->count );
if ( level > 0u ) {
printf ( "\tsequence number %u, user's storage %p\n",
this->readSeq, static_cast <const void *> ( this->pValue ) );
}
}