major revisions
This commit is contained in:
55
src/ca/cacServiceList.cpp
Normal file
55
src/ca/cacServiceList.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
/*
|
||||
* $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"
|
||||
|
||||
epicsShareDef cacServiceList cacGlobalServiceList;
|
||||
|
||||
cacServiceList::cacServiceList ()
|
||||
{
|
||||
}
|
||||
|
||||
void cacServiceList::registerService ( cacServiceIO &service )
|
||||
{
|
||||
this->lock ();
|
||||
this->services.add ( service );
|
||||
this->unlock ();
|
||||
}
|
||||
|
||||
bool cacServiceList::createChannel (const char *pName, cacChannel &chan)
|
||||
{
|
||||
cacChannelIO *pChanIO = 0;
|
||||
|
||||
this->lock ();
|
||||
tsDLIterBD <cacServiceIO> iter ( this->services.first () );
|
||||
while ( iter != iter.eol () ) {
|
||||
pChanIO = iter->createChannelIO ( chan, pName );
|
||||
if ( pChanIO ) {
|
||||
break;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
this->unlock ();
|
||||
|
||||
if ( pChanIO ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user