fixed warnings

This commit is contained in:
Jeff Hill
1997-08-05 00:47:27 +00:00
parent 8944d5ac55
commit 1e8abfda04
40 changed files with 921 additions and 752 deletions
+4 -3
View File
@@ -15,10 +15,11 @@
#define caNetAddrH
#ifdef caNetAddrSock
#include <osiSock.h>
#include "osiSock.h"
#endif
#include <epicsAssert.h>
#include "epicsAssert.h"
#include "shareLib.h"
class verifyCANetAddr {
public:
@@ -26,7 +27,7 @@ public:
};
enum caNetAddrType {casnaUDF, casnaSock}; // only IP addresses (and undefined) supported at this time
class caNetAddr {
class epicsShareClass caNetAddr {
friend class verifyCANetAddr;
public:
+14 -10
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.7 1997/06/25 05:09:00 jhill
* removed templInst.cc
*
* Revision 1.6 1997/06/13 09:15:50 jhill
* connect proto changes
*
@@ -50,10 +53,11 @@
*
*/
#include "dbMapper.h" // ait to dbr types
#include "gddAppTable.h" // EPICS application type table
#include "server.h"
#include "caServerIIL.h" // caServerI in line func
#include "dbMapper.h" // ait to dbr types
#include "gddAppTable.h" // EPICS application type table
//
// if the compiler supports explicit instantiation of
@@ -75,7 +79,7 @@
//
// caServer::caServer()
//
caServer::caServer(unsigned pvCountEstimateIn) :
epicsShareFunc caServer::caServer(unsigned pvCountEstimateIn) :
pCAS (new caServerI(*this, pvCountEstimateIn)),
valueEventMask(this->registerEvent("value")),
logEventMask(this->registerEvent("log")),
@@ -103,7 +107,7 @@ caServer::caServer(unsigned pvCountEstimateIn) :
//
// caServer::~caServer()
//
caServer::~caServer()
epicsShareFunc caServer::~caServer()
{
if (this->pCAS) {
delete this->pCAS;
@@ -113,7 +117,7 @@ caServer::~caServer()
//
// caServer::pvExistTest()
//
pvExistReturn caServer::pvExistTest (const casCtx &, const char *)
epicsShareFunc pvExistReturn caServer::pvExistTest (const casCtx &, const char *)
{
return pverDoesNotExistHere;
}
@@ -121,7 +125,7 @@ pvExistReturn caServer::pvExistTest (const casCtx &, const char *)
//
// caServer::createPV()
//
pvCreateReturn caServer::createPV (const casCtx &, const char *)
epicsShareFunc pvCreateReturn caServer::createPV (const casCtx &, const char *)
{
return S_casApp_pvNotFound;
}
@@ -129,7 +133,7 @@ pvCreateReturn caServer::createPV (const casCtx &, const char *)
//
// caServer::registerEvent()
//
casEventMask caServer::registerEvent (const char *pName)
epicsShareFunc casEventMask caServer::registerEvent (const char *pName)
{
if (this->pCAS) {
return this->pCAS->registerEvent(pName);
@@ -144,7 +148,7 @@ casEventMask caServer::registerEvent (const char *pName)
//
// caServer::show()
//
void caServer::show(unsigned level) const
epicsShareFunc void caServer::show(unsigned level) const
{
if (this->pCAS) {
this->pCAS->show(level);
@@ -157,7 +161,7 @@ void caServer::show(unsigned level) const
//
// caServer::setDebugLevel()
//
void caServer::setDebugLevel (unsigned level)
epicsShareFunc void caServer::setDebugLevel (unsigned level)
{
if (pCAS) {
this->pCAS->setDebugLevel(level);
@@ -170,7 +174,7 @@ void caServer::setDebugLevel (unsigned level)
//
// caServer::getDebugLevel()
//
unsigned caServer::getDebugLevel ()
epicsShareFunc unsigned caServer::getDebugLevel ()
{
if (pCAS) {
return this->pCAS->getDebugLevel();
+13 -10
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.8 1997/06/13 09:15:51 jhill
* connect proto changes
*
* Revision 1.7 1997/04/10 19:33:53 jhill
* API changes
*
@@ -295,12 +298,12 @@ void caServerI::connectCB(casIntfOS &intf)
//
void caServerI::advanceBeaconPeriod()
{
//
// return if we are already at the plateau
//
if (this->beaconPeriod >= CAServerMaxBeaconPeriod) {
return;
}
//
// return if we are already at the plateau
//
if (this->beaconPeriod >= CAServerMaxBeaconPeriod) {
return;
}
this->beaconPeriod += this->beaconPeriod;
@@ -383,9 +386,9 @@ void caServerI::sendBeacon()
}
this->osiUnlock();
//
// double the period between beacons (but dont exceed max)
//
this->advanceBeaconPeriod();
//
// double the period between beacons (but dont exceed max)
//
this->advanceBeaconPeriod();
}
+6 -3
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.4 1997/06/13 09:15:53 jhill
* connect proto changes
*
* Revision 1.3 1997/04/10 19:33:54 jhill
* API changes
*
@@ -52,7 +55,7 @@
//
// casAsyncExIOI::casAsyncExIOI()
//
casAsyncExIOI::casAsyncExIOI(
epicsShareFunc casAsyncExIOI::casAsyncExIOI(
const casCtx &ctx, casAsyncPVExistIO &ioIn) :
casAsyncIOI(*ctx.getClient(), ioIn),
msg(*ctx.getMsg()),
@@ -75,7 +78,7 @@ casAsyncExIOI::~casAsyncExIOI()
//
// casAsyncExIOI::postIOCompletion()
//
caStatus casAsyncExIOI::postIOCompletion(const pvExistReturn retValIn)
epicsShareFunc caStatus casAsyncExIOI::postIOCompletion(const pvExistReturn retValIn)
{
this->retVal = retValIn;
return this->postIOCompletionI();
@@ -86,7 +89,7 @@ caStatus casAsyncExIOI::postIOCompletion(const pvExistReturn retValIn)
// casAsyncExIOI::cbFuncAsyncIO()
// (called when IO completion event reaches top of event queue)
//
caStatus casAsyncExIOI::cbFuncAsyncIO()
epicsShareFunc caStatus casAsyncExIOI::cbFuncAsyncIO()
{
caStatus status;
+5 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.3 1997/04/10 19:33:55 jhill
* API changes
*
* Revision 1.2 1996/11/02 00:53:57 jhill
* many improvements
*
@@ -44,7 +47,7 @@
// This must be virtual so that derived destructor will
// be run indirectly. Therefore it cannot be inline.
//
casAsyncIO::~casAsyncIO()
epicsShareFunc casAsyncIO::~casAsyncIO()
{
}
@@ -52,7 +55,7 @@ casAsyncIO::~casAsyncIO()
// casAsyncIO::destroy()
// (default is a normal delete)
//
void casAsyncIO::destroy()
epicsShareFunc void casAsyncIO::destroy()
{
delete this;
}
+5 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.6 1997/04/10 19:33:56 jhill
* API changes
*
* Revision 1.5 1996/12/13 00:08:35 jhill
* dont unlock after destroy
*
@@ -131,7 +134,7 @@ casAsyncIOI::~casAsyncIOI()
// casAsyncIOI::cbFunc()
// (called when IO completion event reaches top of event queue)
//
caStatus casAsyncIOI::cbFunc(class casEventSys &)
epicsShareFunc caStatus casAsyncIOI::cbFunc(class casEventSys &)
{
casCoreClient &theClient = this->client;
caStatus status;
@@ -230,7 +233,7 @@ caServer *casAsyncIOI::getCAS() const
//
// casAsyncIOI::readOP()
//
int casAsyncIOI::readOP()
epicsShareFunc int casAsyncIOI::readOP()
{
//
// not a read op
+5 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.2 1997/06/13 09:15:54 jhill
* connect proto changes
*
* Revision 1.1 1997/04/10 19:38:14 jhill
* installed
*
@@ -52,7 +55,7 @@
//
// casAsyncPVCIOI::casAsyncPVCIOI()
//
casAsyncPVCIOI::casAsyncPVCIOI(const casCtx &ctx,
epicsShareFunc casAsyncPVCIOI::casAsyncPVCIOI(const casCtx &ctx,
casAsyncPVCreateIO &ioIn) :
casAsyncIOI(*ctx.getClient(), ioIn),
msg(*ctx.getMsg()),
@@ -73,7 +76,7 @@ casAsyncPVCIOI::~casAsyncPVCIOI()
//
// casAsyncPVCIOI::postIOCompletion()
//
caStatus casAsyncPVCIOI::postIOCompletion(const pvCreateReturn &retValIn)
epicsShareFunc caStatus casAsyncPVCIOI::postIOCompletion(const pvCreateReturn &retValIn)
{
this->retVal = retValIn;
return this->postIOCompletionI();
+6 -3
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.3 1997/04/10 19:33:56 jhill
* API changes
*
* Revision 1.2 1996/11/06 22:15:54 jhill
* allow monitor init read to using rd async io
*
@@ -56,7 +59,7 @@
//
// casAsyncRdIOI::casAsyncRdIOI()
//
casAsyncRdIOI::casAsyncRdIOI(const casCtx &ctx, casAsyncReadIO &ioIn) :
epicsShareFunc casAsyncRdIOI::casAsyncRdIOI(const casCtx &ctx, casAsyncReadIO &ioIn) :
casAsyncIOI(*ctx.getClient(), ioIn),
msg(*ctx.getMsg()),
chan(*ctx.getChannel()),
@@ -91,7 +94,7 @@ casAsyncRdIOI::~casAsyncRdIOI()
//
// casAsyncRdIOI::postIOCompletion()
//
caStatus casAsyncRdIOI::postIOCompletion(caStatus completionStatusIn,
epicsShareFunc caStatus casAsyncRdIOI::postIOCompletion(caStatus completionStatusIn,
gdd &valueRead)
{
int gddStatus;
@@ -110,7 +113,7 @@ caStatus casAsyncRdIOI::postIOCompletion(caStatus completionStatusIn,
//
// casAsyncRdIOI::readOP()
//
int casAsyncRdIOI::readOP()
epicsShareFunc int casAsyncRdIOI::readOP()
{
return TRUE; // it is a read op
}
+5 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.3 1997/04/10 19:33:57 jhill
* API changes
*
* Revision 1.2 1996/11/06 22:15:56 jhill
* allow monitor init read to using rd async io
*
@@ -47,7 +50,7 @@
//
// casAsyncWtIOI::casAsyncWtIOI()
//
casAsyncWtIOI::casAsyncWtIOI(const casCtx &ctx, casAsyncWriteIO &ioIn) :
epicsShareFunc casAsyncWtIOI::casAsyncWtIOI(const casCtx &ctx, casAsyncWriteIO &ioIn) :
casAsyncIOI(*ctx.getClient(), ioIn),
msg(*ctx.getMsg()),
chan(*ctx.getChannel()),
@@ -72,7 +75,7 @@ casAsyncWtIOI::~casAsyncWtIOI()
//
// casAsyncWtIOI::postIOCompletion()
//
caStatus casAsyncWtIOI::postIOCompletion(caStatus completionStatusIn)
epicsShareFunc caStatus casAsyncWtIOI::postIOCompletion(caStatus completionStatusIn)
{
this->completionStatus = completionStatusIn;
return this->postIOCompletionI();
+18 -4
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.2 1997/04/10 19:33:58 jhill
* API changes
*
* Revision 1.1 1996/11/02 01:01:05 jhill
* installed
*
@@ -36,13 +39,24 @@
*
*/
//
// EPICS
// (some of these are included from casdef.h but
// are included first here so that they are included
// once only before epicsExportSharedSymbols is defined)
//
#include "alarm.h" // EPICS alarm severity/condition
#include "errMdef.h" // EPICS error codes
#include "gdd.h" // EPICS data descriptors
#define epicsExportSharedSymbols
#include "casdef.h"
//
// This must be virtual so that derived destructor will
// be run indirectly. Therefore it cannot be inline.
//
casAsyncReadIO::~casAsyncReadIO()
epicsShareFunc casAsyncReadIO::~casAsyncReadIO()
{
}
@@ -50,7 +64,7 @@ casAsyncReadIO::~casAsyncReadIO()
// This must be virtual so that derived destructor will
// be run indirectly. Therefore it cannot be inline.
//
casAsyncWriteIO::~casAsyncWriteIO()
epicsShareFunc casAsyncWriteIO::~casAsyncWriteIO()
{
}
@@ -58,7 +72,7 @@ casAsyncWriteIO::~casAsyncWriteIO()
// This must be virtual so that derived destructor will
// be run indirectly. Therefore it cannot be inline.
//
casAsyncPVExistIO::~casAsyncPVExistIO()
epicsShareFunc casAsyncPVExistIO::~casAsyncPVExistIO()
{
}
@@ -66,7 +80,7 @@ casAsyncPVExistIO::~casAsyncPVExistIO()
// This must be virtual so that derived destructor will
// be run indirectly. Therefore it cannot be inline.
//
casAsyncPVCreateIO::~casAsyncPVCreateIO()
epicsShareFunc casAsyncPVCreateIO::~casAsyncPVCreateIO()
{
}
+13 -11
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.5 1997/04/10 19:33:59 jhill
* API changes
*
* Revision 1.4 1996/09/04 20:17:34 jhill
* use ptr not ref to satisfy MSVISC++
*
@@ -44,7 +47,6 @@
*
*/
#include "server.h"
#include "casChannelIIL.h" // casChannelI inline func
#include "casPVListChanIL.h" // casPVListChan inline func
@@ -52,7 +54,7 @@
//
// casChannel::casChannel()
//
casChannel::casChannel(const casCtx &ctx) :
epicsShareFunc casChannel::casChannel(const casCtx &ctx) :
casPVListChan (ctx, *this)
{
}
@@ -60,11 +62,11 @@ casChannel::casChannel(const casCtx &ctx) :
//
// casChannel::~casChannel()
//
casChannel::~casChannel()
epicsShareFunc casChannel::~casChannel()
{
}
casPV *casChannel::getPV()
epicsShareFunc casPV *casChannel::getPV()
{
casPVI *pPVI = &this->casChannelI::getPVI();
@@ -79,7 +81,7 @@ casPV *casChannel::getPV()
//
// casChannel::setOwner()
//
void casChannel::setOwner(const char * const /* pUserName */,
epicsShareFunc void casChannel::setOwner(const char * const /* pUserName */,
const char * const /* pHostName */)
{
//
@@ -90,7 +92,7 @@ void casChannel::setOwner(const char * const /* pUserName */,
//
// casChannel::readAccess()
//
aitBool casChannel::readAccess () const
epicsShareFunc aitBool casChannel::readAccess () const
{
return aitTrue;
}
@@ -98,7 +100,7 @@ aitBool casChannel::readAccess () const
//
// casChannel::writeAccess()
//
aitBool casChannel::writeAccess() const
epicsShareFunc aitBool casChannel::writeAccess() const
{
return aitTrue;
}
@@ -107,7 +109,7 @@ aitBool casChannel::writeAccess() const
//
// casChannel::confirmationRequested()
//
aitBool casChannel::confirmationRequested() const
epicsShareFunc aitBool casChannel::confirmationRequested() const
{
return aitFalse;
}
@@ -115,7 +117,7 @@ aitBool casChannel::confirmationRequested() const
//
// casChannel::show()
//
void casChannel::show(unsigned level) const
epicsShareFunc void casChannel::show(unsigned level) const
{
if (level>2u) {
printf("casChannel: read access = %d\n",
@@ -130,7 +132,7 @@ void casChannel::show(unsigned level) const
//
// casChannel::destroy()
//
void casChannel::destroy()
epicsShareFunc void casChannel::destroy()
{
delete this;
}
@@ -138,7 +140,7 @@ void casChannel::destroy()
//
// casChannel::postAccessRightsEvent()
//
void casChannel::postAccessRightsEvent()
epicsShareFunc void casChannel::postAccessRightsEvent()
{
this->casChannelI::postAccessRightsEvent();
}
+38 -1
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.8 1997/06/30 22:54:25 jhill
* use %p with pointers
*
* Revision 1.7 1997/04/10 19:34:01 jhill
* API changes
*
@@ -56,7 +59,6 @@
#include <stdarg.h>
#include "server.h"
#include "casClientIL.h" // inline func for casClient
#include "casEventSysIL.h" // inline func for casEventSys
#include "casCtxIL.h" // inline func for casCtx
#include "inBufIL.h" // inline func for inBuf
@@ -115,6 +117,41 @@ caStatus casClient::init()
return S_cas_success;
}
//
// find the channel associated with a resource id
//
casChannelI *casClient::resIdToChannel(const caResId &id)
{
casChannelI *pChan;
//
// look up the id in a hash table
//
pChan = this->ctx.getServer()->resIdToChannel(id);
//
// update the context
//
this->ctx.setChannel(pChan);
if (!pChan) {
return NULL;
}
//
// If the channel isnt attached to this client then
// something has gone wrong
//
if (&pChan->getClient()!=this) {
return NULL;
}
//
// update the context
//
this->ctx.setPV(&pChan->getPVI());
return pChan;
}
//
// casClient::loadProtoJumpTable()
+3 -38
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.4 1997/04/10 19:34:02 jhill
* API changes
*
* Revision 1.3 1996/12/11 00:59:37 jhill
* added bad chan attachment detection
*
@@ -45,44 +48,6 @@
#ifndef casClientIL_h
#define casClientIL_h
#include "caServerIIL.h" // caServerI inline func
#include "casCtxIL.h" // caServerI inline func
//
// find the channel associated with a resource id
//
inline casChannelI *casClient::resIdToChannel(const caResId &id)
{
casChannelI *pChan;
//
// look up the id in a hash table
//
pChan = this->ctx.getServer()->resIdToChannel(id);
//
// update the context
//
this->ctx.setChannel(pChan);
if (!pChan) {
return NULL;
}
//
// If the channel isnt attached to this client then
// something has gone wrong
//
if (&pChan->getClient()!=this) {
return NULL;
}
//
// update the context
//
this->ctx.setPV(&pChan->getPVI());
return pChan;
}
//
// casClient::getDebugLevel()
//
+13 -10
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.2 1997/04/10 19:34:03 jhill
* API changes
*
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
* ca server installation
*
@@ -65,22 +68,22 @@ casClientMon::~casClientMon()
//
caStatus casClientMon::callBack(gdd &value)
{
casCoreClient &client = this->getChannel().getClient();
caStatus status;
caHdr msg;
casCoreClient &client = this->getChannel().getClient();
caStatus status;
caHdr msg;
//
// reconstruct the msg header
//
msg.m_cmmd = CA_PROTO_EVENT_ADD;
msg.m_postsize = 0u;
msg.m_type = this->getType();
msg.m_count = this->getCount();
msg.m_cid = this->getChannel().getSID();
msg.m_available = this->getClientId();
msg.m_cmmd = CA_PROTO_EVENT_ADD;
msg.m_postsize = 0u;
msg.m_type = this->getType();
msg.m_count = (ca_uint16_t) this->getCount();
msg.m_cid = this->getChannel().getSID();
msg.m_available = this->getClientId();
status = client.monitorResponse (&this->getChannel(),
msg, &value, S_cas_success);
msg, &value, S_cas_success);
return status;
}
+4 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.11 1997/06/30 22:54:27 jhill
* use %p with pointers
*
* Revision 1.10 1997/06/13 09:15:56 jhill
* connect proto changes
*
@@ -61,15 +64,14 @@
*
*
*/
#include "gddApps.h"
#include "server.h"
#include "caServerIIL.h" // caServerI inline func
#include "casClientIL.h" // casClient inline func
#include "dgOutBufIL.h" // dgOutBuf inline func
#include "dgInBufIL.h" // dgInBuf inline func
#include "casCtxIL.h" // casCtx inline func
#include "casCoreClientIL.h" // casCoreClient inline func
#include "gddApps.h"
//
// CA Server Datagram (DG) Client
+3 -2
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.6 1997/04/10 19:34:07 jhill
* API changes
*
* Revision 1.5 1996/12/11 01:01:56 jhill
* casEventMaskEntry constr does res tbl add
*
@@ -47,8 +50,6 @@
*
*/
#include "epicsAssert.h"
#include <stdio.h>
#include <limits.h>
+4 -1
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.5 1997/04/10 19:34:08 jhill
* API changes
*
* Revision 1.4 1996/12/11 01:02:35 jhill
* removed casEventMaskEntry def
*
@@ -52,7 +55,7 @@
class casEventRegistry;
class casEventMask {
class epicsShareClass casEventMask {
friend inline casEventMask operator| (const casEventMask &lhs,
const casEventMask &rhs);
friend inline casEventMask operator& (const casEventMask &lhs,
+4 -1
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.4 1997/04/10 19:34:09 jhill
* API changes
*
* Revision 1.3 1996/11/02 00:54:13 jhill
* many improvements
*
@@ -67,7 +70,7 @@ inline casEventSys::casEventSys (casCoreClient &coreClientIn) :
//
inline caStatus casEventSys::init()
{
if (mutex.init()) {
if (this->mutex.init()) {
return S_cas_noMemory;
}
return S_cas_success;
+94 -98
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.12 1997/06/13 09:15:58 jhill
* connect proto changes
*
* Revision 1.11 1997/04/10 19:34:10 jhill
* API changes
*
@@ -180,16 +183,16 @@ private:
//
class casMonitor : public tsDLNode<casMonitor>, public casRes {
public:
casMonitor(caResId clientIdIn, casChannelI &chan,
unsigned long nElem, unsigned dbrType,
const casEventMask &maskIn, osiMutex &mutexIn);
virtual ~casMonitor();
casMonitor(caResId clientIdIn, casChannelI &chan,
unsigned long nElem, unsigned dbrType,
const casEventMask &maskIn, osiMutex &mutexIn);
virtual ~casMonitor();
caStatus executeEvent(casMonEvent *);
void post(const casEventMask &select, gdd &value);
inline void post(const casEventMask &select, gdd &value);
virtual void show (unsigned level) const;
virtual void show (unsigned level) const;
virtual caStatus callBack(gdd &value)=0;
caResId getClientId() const
@@ -210,26 +213,26 @@ public:
{
return this->ciu;
}
void postIfModified();
private:
casMonEvent overFlowEvent;
unsigned long const nElem;
osiMutex &mutex;
casChannelI &ciu;
const casEventMask mask;
gdd *pModifiedValue;
caResId const clientId;
unsigned char const dbrType;
unsigned char nPend;
unsigned ovf:1;
unsigned enabled:1;
private:
casMonEvent overFlowEvent;
unsigned long const nElem;
osiMutex &mutex;
casChannelI &ciu;
const casEventMask mask;
gdd *pModifiedValue;
caResId const clientId;
unsigned char const dbrType;
unsigned char nPend;
unsigned ovf:1;
unsigned enabled:1;
void enable();
void disable();
void push (gdd &value);
void push (gdd &value);
};
//
@@ -241,17 +244,11 @@ inline void casMonitor::post(const casEventMask &select, gdd &value)
casEventMask result(select&this->mask);
//
// NOOP if this event isnt selected
// or if it is disabled
//
if (result.noEventsSelected()) {
return;
}
//
// NOOP if currently disabled
//
if (!this->enabled) {
return;
}
if (result.noEventsSelected() || !this->enabled) {
return;
}
//
// else push it on the queue
@@ -259,7 +256,6 @@ inline void casMonitor::post(const casEventMask &select, gdd &value)
this->push(value);
}
class caServer;
class casCoreClient;
class casChannelI;
@@ -276,16 +272,16 @@ public:
casAsyncIOI (casCoreClient &client, casAsyncIO &ioExternal);
virtual ~casAsyncIOI();
//
// place notification of IO completion on the event queue
//
//
// place notification of IO completion on the event queue
//
caStatus postIOCompletionI();
inline void lock();
inline void unlock();
virtual caStatus cbFuncAsyncIO()=0;
virtual int readOP();
epicsShareFunc virtual int readOP();
void destroyIfReadOP();
@@ -296,7 +292,7 @@ public:
void reportInvalidAsynchIO(unsigned);
protected:
casCoreClient &client;
casCoreClient &client;
casAsyncIO &ioExternal;
private:
@@ -305,11 +301,11 @@ private:
unsigned ioComplete:1;
unsigned serverDelete:1;
unsigned duplicate:1;
//
// casEvent virtual call back function
// (called when IO completion event reaches top of event queue)
//
caStatus cbFunc(casEventSys &);
//
// casEvent virtual call back function
// (called when IO completion event reaches top of event queue)
//
epicsShareFunc caStatus cbFunc(casEventSys &);
inline casAsyncIO * operator -> ();
};
@@ -321,22 +317,22 @@ private:
//
class casAsyncRdIOI : public casAsyncIOI {
public:
casAsyncRdIOI(const casCtx &ctx, casAsyncReadIO &ioIn);
epicsShareFunc casAsyncRdIOI(const casCtx &ctx, casAsyncReadIO &ioIn);
virtual ~casAsyncRdIOI();
void destroyIfReadOP();
caStatus cbFuncAsyncIO();
epicsShareFunc caStatus cbFuncAsyncIO();
casAsyncIO &getAsyncIO();
caStatus postIOCompletion(caStatus completionStatus,
gdd &valueRead);
int readOP();
epicsShareFunc caStatus postIOCompletion(caStatus completionStatus,
gdd &valueRead);
epicsShareFunc int readOP();
private:
caHdr const msg;
caHdr const msg;
casChannelI &chan;
gdd *pDD;
caStatus completionStatus;
caStatus completionStatus;
};
//
@@ -346,20 +342,20 @@ private:
//
class casAsyncWtIOI : public casAsyncIOI {
public:
casAsyncWtIOI(const casCtx &ctx, casAsyncWriteIO &ioIn);
epicsShareFunc casAsyncWtIOI(const casCtx &ctx, casAsyncWriteIO &ioIn);
virtual ~casAsyncWtIOI();
//
// place notification of IO completion on the event queue
//
caStatus postIOCompletion(caStatus completionStatus);
//
// place notification of IO completion on the event queue
//
epicsShareFunc caStatus postIOCompletion(caStatus completionStatus);
caStatus cbFuncAsyncIO();
epicsShareFunc caStatus cbFuncAsyncIO();
casAsyncIO &getAsyncIO();
private:
caHdr const msg;
caHdr const msg;
casChannelI &chan;
caStatus completionStatus;
caStatus completionStatus;
};
class casDGIntfIO;
@@ -371,18 +367,18 @@ class casDGIntfIO;
//
class casAsyncExIOI : public casAsyncIOI {
public:
casAsyncExIOI(const casCtx &ctx, casAsyncPVExistIO &ioIn);
epicsShareFunc casAsyncExIOI(const casCtx &ctx, casAsyncPVExistIO &ioIn);
virtual ~casAsyncExIOI();
//
// place notification of IO completion on the event queue
//
caStatus postIOCompletion(const pvExistReturn retVal);
//
// place notification of IO completion on the event queue
//
epicsShareFunc caStatus postIOCompletion(const pvExistReturn retVal);
caStatus cbFuncAsyncIO();
epicsShareFunc caStatus cbFuncAsyncIO();
casAsyncIO &getAsyncIO();
private:
caHdr const msg;
caHdr const msg;
pvExistReturn retVal;
casDGIntfIO * const pOutDGIntfIO;
const caNetAddr dgOutAddr;
@@ -395,18 +391,18 @@ private:
//
class casAsyncPVCIOI : public casAsyncIOI {
public:
casAsyncPVCIOI(const casCtx &ctx, casAsyncPVCreateIO &ioIn);
epicsShareFunc casAsyncPVCIOI(const casCtx &ctx, casAsyncPVCreateIO &ioIn);
virtual ~casAsyncPVCIOI();
//
// place notification of IO completion on the event queue
//
caStatus postIOCompletion(const pvCreateReturn &retVal);
//
// place notification of IO completion on the event queue
//
epicsShareFunc caStatus postIOCompletion(const pvCreateReturn &retVal);
caStatus cbFuncAsyncIO();
epicsShareFunc caStatus cbFuncAsyncIO();
casAsyncIO &getAsyncIO();
private:
caHdr const msg;
caHdr const msg;
pvCreateReturn retVal;
};
@@ -420,35 +416,35 @@ class casPVI;
// events can be posted
//
class casChannelI : public tsDLNode<casChannelI>, public casRes,
public casEvent {
public casEvent {
public:
casChannelI (const casCtx &ctx, casChannel &chanAdapter);
virtual ~casChannelI();
casCoreClient &getClient() const
casCoreClient &getClient() const
{
return this->client;
}
const caResId getCID()
const caResId getCID()
{
return this->cid;
}
//
// fetch the unsigned integer server id for this PV
//
inline const caResId getSID();
inline const caResId getSID();
void postAllModifiedEvents();
void postAllModifiedEvents();
//
// addMonitor()
//
inline void addMonitor(casMonitor &mon);
inline void addMonitor(casMonitor &mon);
//
// deleteMonitor()
//
inline void deleteMonitor(casMonitor &mon);
inline void deleteMonitor(casMonitor &mon);
//
// findMonitor
@@ -458,7 +454,7 @@ public:
//
inline casMonitor *findMonitor(const caResId clientIdIn);
casPVI &getPVI() const
casPVI &getPVI() const
{
return this->pv;
}
@@ -486,16 +482,16 @@ public:
//
// access rights event call back
//
caStatus cbFunc(casEventSys &);
caStatus cbFunc(casEventSys &);
inline void postAccessRightsEvent();
protected:
tsDLList<casMonitor> monitorList;
tsDLList<casMonitor> monitorList;
tsDLList<casAsyncIOI> ioInProgList;
casCoreClient &client;
casPVI &pv;
casCoreClient &client;
casPVI &pv;
casChannel &chan;
caResId const cid; // client id
caResId const cid; // client id
unsigned clientDestroyPending:1;
unsigned accessRightsEvPending:1;
};
@@ -527,22 +523,22 @@ public:
casPVI (caServer &cas, casPV &pvAdapter);
virtual ~casPVI();
//
// for use by the server library
//
inline caServerI &getCAS() const;
//
// for use by the server library
//
inline caServerI &getCAS() const;
//
// CA only does 1D arrays for now (and the new server
// temporarily does only scalers)
//
inline aitIndex nativeCount();
//
// CA only does 1D arrays for now (and the new server
// temporarily does only scalers)
//
inline aitIndex nativeCount();
//
// only for use by casMonitor
//
caStatus registerEvent ();
void unregisterEvent ();
//
// only for use by casMonitor
//
caStatus registerEvent ();
void unregisterEvent ();
//
// only for use by casAsyncIOI
@@ -577,7 +573,7 @@ public:
inline casPV * operator -> () const;
virtual casResType resourceType() const;
epicsShareFunc virtual casResType resourceType() const;
virtual void show(unsigned level) const;
+19 -16
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.6 1997/04/10 19:34:14 jhill
* API changes
*
* Revision 1.5 1996/12/06 22:34:22 jhill
* add maxDimension() and maxBound()
*
@@ -58,19 +61,19 @@
#include "casPVIIL.h" // casPVI inline func
#include "casCtxIL.h" // casCtx inline func
casPV::casPV (caServer &casIn) :
epicsShareFunc casPV::casPV (caServer &casIn) :
casPVI (casIn, *this)
{
}
casPV::~casPV()
epicsShareFunc casPV::~casPV()
{
}
//
// casPV::show()
//
void casPV::show(unsigned level) const
epicsShareFunc void casPV::show(unsigned level) const
{
if (level>2u) {
printf ("casPV: Best external type = %d\n",
@@ -81,7 +84,7 @@ void casPV::show(unsigned level) const
//
// casPV::interestRegister()
//
caStatus casPV::interestRegister()
epicsShareFunc caStatus casPV::interestRegister()
{
return S_casApp_success;
}
@@ -89,14 +92,14 @@ caStatus casPV::interestRegister()
//
// casPV::interestDelete()
//
void casPV::interestDelete()
epicsShareFunc void casPV::interestDelete()
{
}
//
// casPV::beginTransaction()
//
caStatus casPV::beginTransaction()
epicsShareFunc caStatus casPV::beginTransaction()
{
return S_casApp_success;
}
@@ -104,14 +107,14 @@ caStatus casPV::beginTransaction()
//
// casPV::endTransaction()
//
void casPV::endTransaction()
epicsShareFunc void casPV::endTransaction()
{
}
//
// casPV::read()
//
caStatus casPV::read(const casCtx &, gdd &)
epicsShareFunc caStatus casPV::read(const casCtx &, gdd &)
{
return S_casApp_noSupport;
}
@@ -119,7 +122,7 @@ caStatus casPV::read(const casCtx &, gdd &)
//
// casPV::write()
//
caStatus casPV::write(const casCtx &, gdd &)
epicsShareFunc caStatus casPV::write(const casCtx &, gdd &)
{
return S_casApp_noSupport;
}
@@ -127,7 +130,7 @@ caStatus casPV::write(const casCtx &, gdd &)
//
// casPV::bestExternalType()
//
aitEnum casPV::bestExternalType() const
epicsShareFunc aitEnum casPV::bestExternalType() const
{
return aitEnumString;
}
@@ -136,7 +139,7 @@ aitEnum casPV::bestExternalType() const
// casPV::maxDimension()
// (base returns zero - scaler)
//
unsigned casPV::maxDimension() const
epicsShareFunc unsigned casPV::maxDimension() const
{
return 0u;
}
@@ -145,7 +148,7 @@ unsigned casPV::maxDimension() const
// casPV::maxBound()
// (base returns scaler bound independent of the dimension arg)
//
aitIndex casPV::maxBound(unsigned /* dimension */) const
epicsShareFunc aitIndex casPV::maxBound(unsigned /* dimension */) const
{
return 1u;
}
@@ -153,7 +156,7 @@ aitIndex casPV::maxBound(unsigned /* dimension */) const
//
// casPV::createChannel()
//
casChannel *casPV::createChannel (const casCtx &ctx, const char * const,
epicsShareFunc casChannel *casPV::createChannel (const casCtx &ctx, const char * const,
const char * const)
{
return new casChannel (ctx);
@@ -162,7 +165,7 @@ casChannel *casPV::createChannel (const casCtx &ctx, const char * const,
//
// casPV::destroy()
//
void casPV::destroy()
epicsShareFunc void casPV::destroy()
{
delete this;
}
@@ -170,7 +173,7 @@ void casPV::destroy()
//
// Server tool calls this function to post a PV event.
//
void casPV::postEvent (const casEventMask &select, gdd &event)
epicsShareFunc void casPV::postEvent (const casEventMask &select, gdd &event)
{
this->casPVI::postEvent (select, event);
}
@@ -184,7 +187,7 @@ void casPV::postEvent (const casEventMask &select, gdd &event)
// for virtual casPV::destroy()
// ***************
//
caServer *casPV::getCAS() const
epicsShareFunc caServer *casPV::getCAS() const
{
return this->casPVI::getExtServer();
}
+4 -1
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.8 1997/04/10 19:34:15 jhill
* API changes
*
* Revision 1.7 1996/12/12 18:55:38 jhill
* fixed client initiated pv delete calls interestDelete() VF bug
*
@@ -203,7 +206,7 @@ void casPVI::destroy()
// casPVI::resourceType()
//
casResType casPVI::resourceType() const
epicsShareFunc casResType casPVI::resourceType() const
{
return casPVT;
}
+19 -17
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.10 1997/04/10 19:34:16 jhill
* API changes
*
* Revision 1.9 1997/01/09 22:22:30 jhill
* MSC cannot use the default constructor
*
@@ -182,8 +185,7 @@ inline void casPVI::deleteSignal()
//
inline caStatus casPVI::bestDBRType (unsigned &dbrType)
{
int dbr;
dbr = gddAitToDbr[(*this)->bestExternalType()];
int dbr = gddAitToDbr[(*this)->bestExternalType()];
if (INVALID_DB_FIELD(dbr)) {
return S_cas_badType;
}
@@ -202,23 +204,23 @@ inline caStatus casPVI::bestDBRType (unsigned &dbrType)
//
inline void casPVI::postEvent (const casEventMask &select, gdd &event)
{
if (this->nMonAttached==0u) {
return;
}
//
// the event queue is looking at the DD
// now so it must not be changed
//
event.markConstant();
if (this->nMonAttached==0u) {
return;
}
//
// the event queue is looking at the DD
// now so it must not be changed
//
event.markConstant();
this->lock();
tsDLIterBD<casPVListChan> iter(this->chanList.first());
const tsDLIterBD<casPVListChan> eol;
while ( iter != eol ) {
iter->postEvent(select, event);
tsDLIterBD<casPVListChan> iter(this->chanList.first());
const tsDLIterBD<casPVListChan> eol;
while ( iter != eol ) {
iter->postEvent(select, event);
++iter;
}
}
this->unlock();
}
+31 -16
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.17 1997/06/30 22:54:28 jhill
* use %p with pointers
*
* Revision 1.16 1997/06/13 09:16:00 jhill
* connect proto changes
*
@@ -78,19 +81,19 @@
*
*/
#include "server.h"
#include "dbMapper.h" // ait to dbr types
#include "gddAppTable.h" // EPICS application type table
#include "gddAppTable.h" // EPICS application type table
#include "gddApps.h" // gdd predefined application type codes
#include "net_convert.h" // byte order conversion from libca
#include "server.h"
#include "caServerIIL.h" // caServerI inline functions
#include "casClientIL.h" // casClient inline functions
#include "casChannelIIL.h" // casChannelI inline functions
#include "casPVIIL.h" // casPVI inline functions
#include "casCtxIL.h" // casCtx inline functions
#include "casEventSysIL.h" // casEventSys inline functions
#include "inBufIL.h" // inBuf inline functions
#include "outBufIL.h" // outBuf inline functions
#include "gddApps.h"
#include "net_convert.h" // byte order conversion from libca
static const caHdr nill_msg = {0u,0u,0u,0u,0u,0u};
@@ -317,7 +320,8 @@ caStatus casStrmClient::readResponse (casChannelI *pChan, const caHdr &msg,
{
caHdr *reply;
unsigned size;
int localStatus;
caStatus localStatus;
int mapDBRStatus;
int strcnt;
if (status!=S_casApp_success) {
@@ -352,8 +356,10 @@ caStatus casStrmClient::readResponse (casChannelI *pChan, const caHdr &msg,
// convert gdd to db_access type
// (places the data in network format)
//
gddMapDbr[msg.m_type].conv_dbr((reply+1), pDesc);
mapDBRStatus = gddMapDbr[msg.m_type].conv_dbr((reply+1), msg.m_count, pDesc);
if (mapDBRStatus<0) {
return this->sendErrWithEpicsStatus(&msg, S_cas_badBounds, ECA_GETFAIL);
}
#ifdef CONVERSION_REQUIRED
/* use type as index into conversion jumptable */
(* cac_dbr_cvrt[msg.m_type])
@@ -462,12 +468,19 @@ caStatus casStrmClient::readNotifyResponse (casChannelI *,
//
if (completionStatus == S_cas_success) {
if (pDesc) {
int mapDBRStatus;
//
// convert gdd to db_access type
// (places the data in network format)
//
gddMapDbr[msg.m_type].conv_dbr((reply+1), pDesc);
reply->m_cid = ECA_NORMAL;
mapDBRStatus = gddMapDbr[msg.m_type].conv_dbr((reply+1), msg.m_count, pDesc);
if (mapDBRStatus<0) {
errMessage(S_cas_badBounds, "get notify request");
reply->m_cid = ECA_GETFAIL;
}
else {
reply->m_cid = ECA_NORMAL;
}
}
else {
errMessage(S_cas_badParameter,
@@ -598,7 +611,7 @@ caStatus casStrmClient::monitorResponse (casChannelI *pChan,
// there appears to be no success/fail
// status from this routine
//
gddMapDbr[msg.m_type].conv_dbr ((pReply+1), pDBRDD);
gddMapDbr[msg.m_type].conv_dbr ((pReply+1), msg.m_count, pDBRDD);
#ifdef CONVERSION_REQUIRED
/* use type as index into conversion jumptable */
@@ -1377,7 +1390,7 @@ caStatus casStrmClient::eventCancelAction()
reply->m_cmmd = CA_PROTO_EVENT_ADD;
reply->m_postsize = 0u;
reply->m_type = pMon->getType();
reply->m_count = pMon->getCount();
reply->m_count = (unsigned short) pMon->getCount();
reply->m_cid = pciu->getCID();
reply->m_available = pMon->getClientId();
@@ -1862,8 +1875,10 @@ caStatus createDBRDD (unsigned dbrType, aitIndex dbrCount, gdd *&pDescRet)
//
// convert to atomic
//
pVal->setDimension(1);
pVal->setBound(0, 0u, dbrCount);
gddBounds bds;
bds.setSize(dbrCount);
bds.setFirst(0u);
pVal->setDimension(1u, &bds);
}
else if (pVal->isAtomic()) {
const gddBounds* pB = pVal->getBounds();
@@ -1879,7 +1894,7 @@ caStatus createDBRDD (unsigned dbrType, aitIndex dbrCount, gdd *&pDescRet)
}
for (dim=0u; dim<(unsigned)pVal->dimension(); dim++) {
if (pB->first()!=0u && pB->size()!=bound) {
if (pB[dim].first()!=0u && pB[dim].size()!=bound) {
if (modAllowed) {
pVal->setBound(dim, 0u, bound);
}
@@ -1889,7 +1904,7 @@ caStatus createDBRDD (unsigned dbrType, aitIndex dbrCount, gdd *&pDescRet)
return S_cas_internal;
}
}
bound = 0u;
bound = 1u;
}
}
else {
+109 -105
View File
@@ -30,6 +30,9 @@
* Modification Log:
* -----------------
* $Log$
* Revision 1.13 1997/06/13 09:16:01 jhill
* connect proto changes
*
* Revision 1.12 1997/04/10 19:34:19 jhill
* API changes
*
@@ -107,15 +110,16 @@
//
// EPICS
//
#include "alarm.h" // EPICS alarm severity/condition
#include "errMdef.h" // EPICS error codes
#include "alarm.h" // EPICS alarm severity/condition
#include "errMdef.h" // EPICS error codes
#include "gdd.h" // EPICS data descriptors
#include "shareLib.h" // EPICS compiler specific sharable lib keywords
//
// This eliminates a warning resulting from passing *this
// to a base class during derived class construction.
//
#if defined(WIN32)
#if defined(_WIN32)
# pragma warning (disable:4355)
#endif
@@ -125,7 +129,7 @@ typedef aitUint32 caStatus;
/*
* ===========================================================
* for internal use by the server library
* (and potentially returned to the server application)
* (and potentially returned to the server tool)
* ===========================================================
*/
#define S_cas_success 0
@@ -157,8 +161,7 @@ typedef aitUint32 caStatus;
#define S_cas_validRequest (M_cas | 27) /*valid request*/
#define S_cas_tooManyEvents (M_cas | 28) /*maximum simult event types exceeded*/
#define S_cas_noInterface (M_cas | 29) /*server isnt attached to a network*/
#define S_cas_badBounds (M_cas | 30) /*server tool changed bounds on request*/
/*
* ===========================================================
* returned by the application (to the server library)
@@ -176,7 +179,7 @@ typedef aitUint32 caStatus;
#define S_casApp_undefined (M_casApp | 9) /*undefined value*/
#define S_casApp_postponeAsyncIO (M_casApp | 10) /*postpone asynchronous IO*/
#include <caNetAddr.h>
#include "caNetAddr.h"
//
// pv exist test return
@@ -188,7 +191,8 @@ typedef aitUint32 caStatus;
//
enum pvExistReturnEnum {pverExistsHere, pverDoesNotExistHere,
pverAsyncCompletion};
class pvExistReturn {
class epicsShareClass pvExistReturn {
public:
//
// most server tools will use this
@@ -226,7 +230,7 @@ private:
class casPV;
class pvCreateReturn {
class epicsShareClass pvCreateReturn {
public:
pvCreateReturn(caStatus statIn)
{ this->pPV = NULL; this->stat = statIn; }
@@ -287,30 +291,30 @@ private:
//
caServerI *pCAS;
public:
caServer (unsigned pvCountEstimate=1024u);
virtual ~caServer();
epicsShareFunc caServer (unsigned pvCountEstimate=1024u);
epicsShareFunc virtual ~caServer();
//caStatus enableClients ();
//caStatus disableClients ();
void setDebugLevel (unsigned level);
unsigned getDebugLevel ();
epicsShareFunc void setDebugLevel (unsigned level);
epicsShareFunc unsigned getDebugLevel ();
casEventMask registerEvent (const char *pName);
epicsShareFunc casEventMask registerEvent (const char *pName);
//
//
// show()
//
virtual void show (unsigned level) const;
//
epicsShareFunc virtual void show (unsigned level) const;
//
//
// pvExistTest()
//
// The request is allowed to complete asynchronously
// (see Asynchronous IO Classes below).
//
// The server tool is encouraged to accept multiple PV name
// aliases for the same PV here.
// The server tool is encouraged to accept multiple PV name
// aliases for the same PV here.
//
// example return from this procedure:
// return pverExistsHere; // server has PV
@@ -322,12 +326,12 @@ public:
// The client library will retry the request at some time
// in the future.
//
virtual pvExistReturn pvExistTest (const casCtx &ctx,
const char *pPVAliasName);
epicsShareFunc virtual pvExistReturn pvExistTest (const casCtx &ctx,
const char *pPVAliasName);
//
// createPV() is called _every_ time that a PV is attached to
// by a client. The name supplied here may be a PV canonical
//
// createPV() is called _every_ time that a PV is attached to
// by a client. The name supplied here may be a PV canonical
// (base) name or it may instead be a PV alias name.
//
// The request is allowed to complete asynchronously
@@ -356,8 +360,8 @@ public:
// asynchronous IO operation (create or exist) completes
// against the server.
//
virtual pvCreateReturn createPV (const casCtx &ctx,
const char *pPVAliasName);
epicsShareFunc virtual pvCreateReturn createPV (const casCtx &ctx,
const char *pPVAliasName);
//
// common event masks
@@ -398,47 +402,47 @@ public:
//
class casPV : private casPVI {
public:
casPV (caServer &cas);
epicsShareFunc casPV (caServer &cas);
virtual ~casPV ();
epicsShareFunc virtual ~casPV ();
//
// This is called for each PV in the server if
// caServer::show() is called and the level is high
// enough
//
virtual void show (unsigned level) const;
epicsShareFunc virtual void show (unsigned level) const;
//
// Called by the server libary each time that it wishes to
// subscribe for PV change notification from the server
//
// Called by the server libary each time that it wishes to
// subscribe for PV change notification from the server
// tool via postEvent() below.
//
virtual caStatus interestRegister ();
epicsShareFunc virtual caStatus interestRegister ();
//
// called by the server library each time that it wishes to
// remove its subscription for PV value change events
// from the server tool via caServerPostEvents()
//
virtual void interestDelete ();
//
// called by the server library each time that it wishes to
// remove its subscription for PV value change events
// from the server tool via caServerPostEvents()
//
epicsShareFunc virtual void interestDelete ();
//
// called by the server library immediately before initiating
// a transaction (PV state must not be modified during a
// transaction)
//
//
// called by the server library immediately before initiating
// a transaction (PV state must not be modified during a
// transaction)
//
// HINT: their may be many read/write operations performed within
// a single transaction if a large array is being transferred
//
virtual caStatus beginTransaction ();
epicsShareFunc virtual caStatus beginTransaction ();
//
// called by the server library immediately after completing
// a tranaction (PV state modification may resume after the
// transaction completes)
//
virtual void endTransaction ();
//
// called by the server library immediately after completing
// a tranaction (PV state modification may resume after the
// transaction completes)
//
epicsShareFunc virtual void endTransaction ();
//
// read
@@ -457,7 +461,7 @@ public:
// asynchronous IO operation (read or write) completes
// against the PV.
//
virtual caStatus read (const casCtx &ctx, gdd &prototype);
epicsShareFunc virtual caStatus read (const casCtx &ctx, gdd &prototype);
//
// write
@@ -471,35 +475,35 @@ public:
// asynchronous IO operation (read or write) completes
// against the PV.
//
virtual caStatus write (const casCtx &ctx, gdd &value);
epicsShareFunc virtual caStatus write (const casCtx &ctx, gdd &value);
//
// chCreate() is called each time that a PV is attached to
// by a client. The server tool may choose not to
//
// chCreate() is called each time that a PV is attached to
// by a client. The server tool may choose not to
// implement this routine (in which case the channel
// will be created by the server). If the server tool
// implements this function then it must create a casChannel object
// (or a derived class) each time that this routine is called
//
virtual casChannel *createChannel (const casCtx &ctx,
// (or a derived class) each time that this routine is called
//
epicsShareFunc virtual casChannel *createChannel (const casCtx &ctx,
const char * const pUserName, const char * const pHostName);
//
// destroy() is called
//
// destroy() is called
// 1) each time that a PV transitions from
// a situation where clients are attached to a situation
// where no clients are attached.
// 2) once for all PVs that exist when the server is deleted
//
// the default (base) "destroy()" executes "delete this"
//
virtual void destroy ();
//
epicsShareFunc virtual void destroy ();
//
// tbe best type for clients to use when accessing the
// value of the PV
//
virtual aitEnum bestExternalType () const;
epicsShareFunc virtual aitEnum bestExternalType () const;
//
// Returns the maximum bounding box for all present and
@@ -543,13 +547,13 @@ public:
// set to one then the bound on the second dimension
// are being fetched...
//
virtual unsigned maxDimension() const; // return zero if scaler
virtual aitIndex maxBound (unsigned dimension) const;
epicsShareFunc virtual unsigned maxDimension() const; // return zero if scaler
epicsShareFunc virtual aitIndex maxBound (unsigned dimension) const;
//
// Server tool calls this function to post a PV event.
//
void postEvent (const casEventMask &select, gdd &event);
//
// Server tool calls this function to post a PV event.
//
epicsShareFunc void postEvent (const casEventMask &select, gdd &event);
//
// peek at the pv name
@@ -558,7 +562,7 @@ public:
// this routine should return the canonical (base)
// name for the PV
//
virtual const char *getName() const = 0;
epicsShareFunc virtual const char *getName() const = 0;
//
// Find the server associated with this PV
@@ -569,7 +573,7 @@ public:
// for virtual casPV::destroy()
// ***************
//
caServer *getCAS() const;
epicsShareFunc caServer *getCAS() const;
//
// only used when caStrmClient converts between
@@ -596,48 +600,48 @@ public:
//
class casChannel : private casPVListChan {
public:
casChannel(const casCtx &ctx);
virtual ~casChannel();
epicsShareFunc casChannel(const casCtx &ctx);
epicsShareFunc virtual ~casChannel();
//
// Called when the user name and the host name are changed
// for a live connection.
//
virtual void setOwner(const char * const pUserName,
const char * const pHostName);
epicsShareFunc virtual void setOwner(const char * const pUserName,
const char * const pHostName);
//
// the following are encouraged to change during an channel's
// lifetime
//
virtual aitBool readAccess () const;
virtual aitBool writeAccess () const;
epicsShareFunc virtual aitBool readAccess () const;
epicsShareFunc virtual aitBool writeAccess () const;
// return true to hint that the opi should ask the operator
// for confirmation prior writing to this PV
virtual aitBool confirmationRequested () const;
epicsShareFunc virtual aitBool confirmationRequested () const;
//
// This is called for each channel in the server if
// caServer::show() is called and the level is high
// enough
//
virtual void show(unsigned level) const;
epicsShareFunc virtual void show(unsigned level) const;
//
// destroy() is called when
//
// destroy() is called when
// 1) there is a client initiated channel delete
// 2) there is a server tool initiaed PV delete
// 3) there is a server tool initiated server delete
//
//
// the casChannel::destroy() executes a "delete this"
//
virtual void destroy();
epicsShareFunc virtual void destroy();
//
// server tool calls this to indicate change in access
// rights has occurred
//
void postAccessRightsEvent();
epicsShareFunc void postAccessRightsEvent();
//
// Find the PV associated with this channel
@@ -648,7 +652,7 @@ public:
// for virtual casChannel::destroy()
// ***************
//
casPV *getPV();
epicsShareFunc casPV *getPV();
//
// only used when casStrmClient converts between
@@ -710,7 +714,7 @@ public:
//
// force virtual destructor
//
virtual ~casAsyncIO();
epicsShareFunc virtual ~casAsyncIO();
//
// called by the server lib after the response message
@@ -719,7 +723,7 @@ public:
//
// default destroy executes a "delete this".
//
virtual void destroy();
epicsShareFunc virtual void destroy();
};
//
@@ -741,20 +745,20 @@ public:
//
// casAsyncReadIO()
//
casAsyncReadIO(const casCtx &ctx) :
epicsShareFunc casAsyncReadIO(const casCtx &ctx) :
casAsyncRdIOI(ctx, *this) {}
//
// force virtual destructor
//
virtual ~casAsyncReadIO();
epicsShareFunc virtual ~casAsyncReadIO();
//
// place notification of IO completion on the event queue
// (this function does not delete the casAsyncIO object).
// Only the first call to this function has any effect.
//
caStatus postIOCompletion(caStatus completionStatusIn, gdd &valueRead)
epicsShareFunc caStatus postIOCompletion(caStatus completionStatusIn, gdd &valueRead)
{
return this->casAsyncRdIOI::postIOCompletion (
completionStatusIn, valueRead);
@@ -767,7 +771,7 @@ public:
// into a server
// ***************
//
caServer *getCAS() const
epicsShareFunc caServer *getCAS() const
{
return this->casAsyncRdIOI::getCAS();
}
@@ -793,20 +797,20 @@ public:
//
// casAsyncWriteIO()
//
casAsyncWriteIO(const casCtx &ctx) :
epicsShareFunc casAsyncWriteIO(const casCtx &ctx) :
casAsyncWtIOI(ctx, *this) {}
//
// force virtual destructor
//
virtual ~casAsyncWriteIO();
epicsShareFunc virtual ~casAsyncWriteIO();
//
// place notification of IO completion on the event queue
// (this function does not delete the casAsyncIO object).
// Only the first call to this function has any effect.
//
caStatus postIOCompletion(caStatus completionStatusIn)
epicsShareFunc caStatus postIOCompletion(caStatus completionStatusIn)
{
return this->casAsyncWtIOI::postIOCompletion (completionStatusIn);
}
@@ -818,7 +822,7 @@ public:
// into a server
// ***************
//
caServer *getCAS() const
epicsShareFunc caServer *getCAS() const
{
return this->casAsyncWtIOI::getCAS();
}
@@ -833,20 +837,20 @@ public:
//
// casAsyncPVExistIO()
//
casAsyncPVExistIO(const casCtx &ctx) :
epicsShareFunc casAsyncPVExistIO(const casCtx &ctx) :
casAsyncExIOI(ctx, *this) {}
//
// force virtual destructor
//
virtual ~casAsyncPVExistIO();
epicsShareFunc virtual ~casAsyncPVExistIO();
//
// place notification of IO completion on the event queue
// (this function does not delete the casAsyncIO object).
// Only the first call to this function has any effect.
//
caStatus postIOCompletion(const pvExistReturn retValIn)
epicsShareFunc caStatus postIOCompletion(const pvExistReturn retValIn)
{
return this->casAsyncExIOI::postIOCompletion (retValIn);
}
@@ -858,7 +862,7 @@ public:
// into a server
// ***************
//
caServer *getCAS() const
epicsShareFunc caServer *getCAS() const
{
return this->casAsyncExIOI::getCAS();
}
@@ -873,20 +877,20 @@ public:
//
// casAsyncPVCreateIO()
//
casAsyncPVCreateIO(const casCtx &ctx) :
epicsShareFunc casAsyncPVCreateIO(const casCtx &ctx) :
casAsyncPVCIOI(ctx, *this) {}
//
// force virtual destructor
//
virtual ~casAsyncPVCreateIO();
epicsShareFunc virtual ~casAsyncPVCreateIO();
//
// place notification of IO completion on the event queue
// (this function does not delete the casAsyncIO object).
// Only the first call to this function has any effect.
//
caStatus postIOCompletion(const pvCreateReturn &retValIn)
epicsShareFunc caStatus postIOCompletion(const pvCreateReturn &retValIn)
{
return this->casAsyncPVCIOI::postIOCompletion (retValIn);
}
@@ -898,7 +902,7 @@ public:
// into a server
// ***************
//
caServer *getCAS() const
epicsShareFunc caServer *getCAS() const
{
return this->casAsyncPVCreateIO::getCAS();
}
+192 -173
View File
@@ -29,6 +29,9 @@
*
* History
* $Log$
* Revision 1.18 1997/06/30 22:54:30 jhill
* use %p with pointers
*
* Revision 1.17 1997/06/13 09:16:06 jhill
* connect proto changes
*
@@ -88,23 +91,39 @@
//
#include <stdio.h>
#if defined(epicsExportSharedSymbols)
#error suspect that libCom, ca, and gdd were not imported
#endif
//
// EPICS
// (some of these are included from casdef.h but
// are included first here so that they are included
// once only before epicsExportSharedSymbols is defined)
//
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "epicsAssert.h"
#include "osiTime.h"
#include "alarm.h" // EPICS alarm severity/condition
#include "errMdef.h" // EPICS error codes
#include "gdd.h" // EPICS data descriptors
#include "resourceLib.h"
//
// CA
//
#include "caCommonDef.h"
#include "caerr.h"
#include "casdef.h"
#include "osiTime.h"
#if defined(epicsExportSharedSymbols)
#error suspect that libCom, ca, and gdd were not imported
#endif
//
// CAS
//
#define epicsExportSharedSymbols
#include "casdef.h" // sets proper def for shareLib.h defines
#include "osiMutexCAS.h" // NOOP on single threaded OS
void casVerifyFunc(const char *pFile, unsigned line, const char *pExp);
void serverToolDebugFunc(const char *pFile, unsigned line, const char *pComment);
@@ -508,82 +527,82 @@ class casClient;
typedef caStatus (casClient::*pCASMsgHandler) ();
class casClient : public casCoreClient {
public:
casClient (caServerI &, inBuf &, outBuf &);
casClient (caServerI &, inBuf &, outBuf &);
caStatus init(); //constructor does not return status
virtual ~casClient ();
virtual ~casClient ();
void show(unsigned level) const;
//
// send error response to a message
//
caStatus sendErr(const caHdr *, const int reportedStatus,
const char *pFormat, ...);
//
// send error response to a message
//
caStatus sendErr(const caHdr *, const int reportedStatus,
const char *pFormat, ...);
unsigned getMinorVersion() const {return this->minor_version_number;}
//
// find the channel associated with a resource id
//
inline casChannelI *resIdToChannel(const caResId &id);
//
// find the channel associated with a resource id
//
casChannelI *resIdToChannel(const caResId &id);
virtual void clientHostName (char *pBuf,
unsigned bufSize) const = 0;
virtual void clientHostName (char *pBuf,
unsigned bufSize) const = 0;
protected:
unsigned minor_version_number;
unsigned minor_version_number;
osiTime elapsedAtLastSend;
osiTime elapsedAtLastRecv;
caStatus processMsg();
caStatus processMsg();
//
//
//
caStatus sendErrWithEpicsStatus(const caHdr *pMsg,
caStatus epicsStatus, caStatus clientStatus);
//
//
//
caStatus sendErrWithEpicsStatus(const caHdr *pMsg,
caStatus epicsStatus, caStatus clientStatus);
//
// logBadIdWithFileAndLineno()
//
//
// logBadIdWithFileAndLineno()
//
# define logBadId(MP, DP) \
this->logBadIdWithFileAndLineno(MP, DP, __FILE__, __LINE__)
caStatus logBadIdWithFileAndLineno(const caHdr *mp,
const void *dp, const char *pFileName,
caStatus logBadIdWithFileAndLineno(const caHdr *mp,
const void *dp, const char *pFileName,
const unsigned lineno);
private:
inBuf &inBufRef;
outBuf &outBufRef;
//
// dump message to stderr
//
void dumpMsg(const caHdr *mp, const void *dp);
//
// dump message to stderr
//
void dumpMsg(const caHdr *mp, const void *dp);
//
// one function for each CA request type
//
caStatus uknownMessageAction ();
caStatus ignoreMsgAction ();
caStatus noopAction ();
virtual caStatus eventAddAction ();
virtual caStatus eventCancelAction ();
virtual caStatus readAction ();
virtual caStatus readNotifyAction ();
virtual caStatus writeAction ();
virtual caStatus searchAction ();
virtual caStatus eventsOffAction ();
virtual caStatus eventsOnAction ();
virtual caStatus readSyncAction ();
virtual caStatus clearChannelAction ();
virtual caStatus claimChannelAction ();
virtual caStatus writeNotifyAction ();
virtual caStatus clientNameAction ();
virtual caStatus hostNameAction ();
virtual caStatus echoAction ();
//
// one function for each CA request type
//
caStatus uknownMessageAction ();
caStatus ignoreMsgAction ();
caStatus noopAction ();
virtual caStatus eventAddAction ();
virtual caStatus eventCancelAction ();
virtual caStatus readAction ();
virtual caStatus readNotifyAction ();
virtual caStatus writeAction ();
virtual caStatus searchAction ();
virtual caStatus eventsOffAction ();
virtual caStatus eventsOnAction ();
virtual caStatus readSyncAction ();
virtual caStatus clearChannelAction ();
virtual caStatus claimChannelAction ();
virtual caStatus writeNotifyAction ();
virtual caStatus clientNameAction ();
virtual caStatus hostNameAction ();
virtual caStatus echoAction ();
//
// obtain the user name and host from the derived class
@@ -591,9 +610,9 @@ private:
virtual const char *hostName() const;
virtual const char *userName() const;
//
// static members
//
//
// static members
//
static void loadProtoJumpTable();
static pCASMsgHandler msgHandlers[CA_PROTO_LAST_CMMD+1u];
static int msgHandlersInit;
@@ -607,11 +626,11 @@ private:
class casStrmClient : public inBuf, public outBuf, public casClient,
public tsDLNode<casStrmClient> {
public:
casStrmClient (caServerI &cas);
casStrmClient (caServerI &cas);
caStatus init(); //constructor does not return status
~casStrmClient();
~casStrmClient();
void show (unsigned level) const;
void show (unsigned level) const;
//
// installChannel()
@@ -623,26 +642,26 @@ public:
//
void removeChannel(casChannelI &chan);
//
// one function for each CA request type that has
// asynchronous completion
//
virtual caStatus createChanResponse(const caHdr &, const pvCreateReturn &);
caStatus readResponse(casChannelI *pChan, const caHdr &msg,
gdd *pDesc, const caStatus status);
caStatus readNotifyResponse(casChannelI *pChan, const caHdr &msg,
gdd *pDesc, const caStatus status);
caStatus writeResponse(casChannelI *pChan, const caHdr &msg,
const caStatus status);
caStatus writeNotifyResponse(casChannelI *pChan, const caHdr &msg,
const caStatus status);
caStatus monitorResponse(casChannelI *pChan, const caHdr &msg,
//
// one function for each CA request type that has
// asynchronous completion
//
virtual caStatus createChanResponse(const caHdr &, const pvCreateReturn &);
caStatus readResponse(casChannelI *pChan, const caHdr &msg,
gdd *pDesc, const caStatus status);
caStatus readNotifyResponse(casChannelI *pChan, const caHdr &msg,
gdd *pDesc, const caStatus status);
caStatus writeResponse(casChannelI *pChan, const caHdr &msg,
const caStatus status);
caStatus writeNotifyResponse(casChannelI *pChan, const caHdr &msg,
const caStatus status);
caStatus monitorResponse(casChannelI *pChan, const caHdr &msg,
gdd *pDesc, const caStatus status);
//
//
//
caStatus noReadAccessEvent(casClientMon *);
//
//
//
caStatus noReadAccessEvent(casClientMon *);
//
// obtain the user name and host
@@ -654,41 +673,41 @@ public:
unsigned getDebugLevel() const;
private:
tsDLList<casChannelI> chanList;
char *pUserName;
char *pHostName;
tsDLList<casChannelI> chanList;
char *pUserName;
char *pHostName;
//
// createChannel()
//
caStatus createChannel (const char *pName);
//
// createChannel()
//
caStatus createChannel (const char *pName);
//
// verify read/write requests
//
caStatus verifyRequest (casChannelI *&pChan);
//
// verify read/write requests
//
caStatus verifyRequest (casChannelI *&pChan);
//
// one function for each CA request type
//
caStatus eventAddAction ();
caStatus eventCancelAction ();
caStatus readAction ();
caStatus readNotifyAction ();
caStatus writeAction ();
caStatus eventsOffAction ();
caStatus eventsOnAction ();
caStatus readSyncAction ();
caStatus clearChannelAction ();
caStatus claimChannelAction ();
caStatus writeNotifyAction ();
caStatus clientNameAction ();
caStatus hostNameAction ();
//
// one function for each CA request type
//
caStatus eventAddAction ();
caStatus eventCancelAction ();
caStatus readAction ();
caStatus readNotifyAction ();
caStatus writeAction ();
caStatus eventsOffAction ();
caStatus eventsOnAction ();
caStatus readSyncAction ();
caStatus clearChannelAction ();
caStatus claimChannelAction ();
caStatus writeNotifyAction ();
caStatus clientNameAction ();
caStatus hostNameAction ();
//
// accessRightsResponse()
//
caStatus accessRightsResponse (casChannelI *pciu);
//
// accessRightsResponse()
//
caStatus accessRightsResponse (casChannelI *pciu);
//
// these prepare the gdd based on what is in the ca hdr
@@ -696,22 +715,22 @@ private:
caStatus read (gdd *&pDesc);
caStatus write ();
//
// channelCreateFailed()
//
caStatus channelCreateFailed (const caHdr *mp, caStatus createStatus);
//
// channelCreateFailed()
//
caStatus channelCreateFailed (const caHdr *mp, caStatus createStatus);
caStatus writeArrayData();
caStatus writeScalarData();
caStatus writeString();
//
// io independent send/recv
//
xSendStatus xSend (char *pBuf, bufSizeT nBytesAvailableToSend,
bufSizeT nBytesNeedToBeSent, bufSizeT &nBytesSent);
xRecvStatus xRecv (char *pBuf, bufSizeT nBytesToRecv,
bufSizeT &nByesRecv);
//
// io independent send/recv
//
xSendStatus xSend (char *pBuf, bufSizeT nBytesAvailableToSend,
bufSizeT nBytesNeedToBeSent, bufSizeT &nBytesSent);
xRecvStatus xRecv (char *pBuf, bufSizeT nBytesToRecv,
bufSizeT &nByesRecv);
virtual xBlockingStatus blockingState() const = 0;
virtual xSendStatus osdSend (const char *pBuf, bufSizeT nBytesReq,
bufSizeT &nBytesActual) = 0;
@@ -727,11 +746,11 @@ class casDGIntfIO;
//
class casDGClient : public dgInBuf, public dgOutBuf, public casClient {
public:
casDGClient (caServerI &serverIn);
casDGClient (caServerI &serverIn);
caStatus init(); //constructor does not return status
void show (unsigned level) const;
void show (unsigned level) const;
//
// only for use with DG io
@@ -757,17 +776,17 @@ private:
void ioBlockedSignal(); // dummy
//
// one function for each CA request type
//
caStatus searchAction ();
//
// one function for each CA request type
//
caStatus searchAction ();
//
// searchFailResponse()
//
caStatus searchFailResponse(const caHdr *pMsg);
//
// searchFailResponse()
//
caStatus searchFailResponse(const caHdr *pMsg);
caStatus searchResponse(const caHdr &, const pvExistReturn &);
caStatus searchResponse(const caHdr &, const pvExistReturn &);
caStatus asyncSearchResponse(
casDGIntfIO &outMsgIO, const caNetAddr &outAddr,
@@ -779,7 +798,7 @@ private:
//
// IO depen
//
xRecvStatus xDGRecv (char *pBuf, bufSizeT nBytesToRecv,
xRecvStatus xDGRecv (char *pBuf, bufSizeT nBytesToRecv,
bufSizeT &nByesRecv, caNetAddr &sender);
xSendStatus xDGSend (char *pBuf, bufSizeT nBytesNeedToBeSent,
bufSizeT &nBytesSent, const caNetAddr &recipient);
@@ -790,16 +809,16 @@ private:
// casEventMaskEntry
//
class casEventMaskEntry : public tsSLNode<casEventMaskEntry>,
public casEventMask, public stringId {
public casEventMask, public stringId {
public:
casEventMaskEntry (casEventRegistry &regIn,
casEventMask maskIn, const char *pName);
virtual ~casEventMaskEntry();
void show (unsigned level) const;
casEventMaskEntry (casEventRegistry &regIn,
casEventMask maskIn, const char *pName);
virtual ~casEventMaskEntry();
void show (unsigned level) const;
virtual void destroy();
private:
casEventRegistry &reg;
casEventRegistry &reg;
};
//
@@ -808,26 +827,26 @@ private:
class casEventRegistry : private resTable <casEventMaskEntry, stringId> {
friend class casEventMaskEntry;
public:
casEventRegistry(osiMutex &mutexIn) :
casEventRegistry(osiMutex &mutexIn) :
mutex(mutexIn), allocator(0), hasBeenInitialized(0) {}
int init();
~casEventRegistry()
{
this->destroyAllEntries();
}
~casEventRegistry()
{
this->destroyAllEntries();
}
casEventMask registerEvent (const char *pName);
void show (unsigned level) const;
casEventMask registerEvent (const char *pName);
void show (unsigned level) const;
private:
osiMutex &mutex;
unsigned allocator;
unsigned char hasBeenInitialized;
casEventMask maskAllocator();
unsigned allocator;
unsigned char hasBeenInitialized;
casEventMask maskAllocator();
};
#include "casIOD.h" // IO dependent
@@ -851,31 +870,31 @@ public:
caStatus init(); //constructor does not return status
~caServerI();
//
// find the channel associated with a resource id
//
inline casChannelI *resIdToChannel(const caResId &id);
//
// find the channel associated with a resource id
//
inline casChannelI *resIdToChannel(const caResId &id);
//
// find the PV associated with a resource id
//
casPVI *resIdToPV(const caResId &id);
//
// find the PV associated with a resource id
//
casPVI *resIdToPV(const caResId &id);
//
// find the client monitor associated with a resource id
//
//
// find the client monitor associated with a resource id
//
casClientMon *resIdToClientMon(const caResId &idIn);
casDGClient &castClient() {return this->dgClient;}
casDGClient &castClient() {return this->dgClient;}
void installClient(casStrmClient *pClient);
void removeClient(casStrmClient *pClient);
//
// is there space for a new channel
//
aitBool roomForNewChannel() const;
//
// is there space for a new channel
//
aitBool roomForNewChannel() const;
//
// send beacon and advance beacon timer
@@ -885,7 +904,7 @@ public:
unsigned getDebugLevel() const { return debugLevel; }
inline void setDebugLevel(unsigned debugLevelIn);
osiTime getBeaconPeriod() const { return this->beaconPeriod; }
osiTime getBeaconPeriod() const { return this->beaconPeriod; }
void show(unsigned level) const;
@@ -900,7 +919,7 @@ public:
//
// call virtual function in the interface class
//
inline caServer * operator -> ();
inline caServer * operator -> ();
void connectCB(casIntfOS &);
@@ -909,18 +928,18 @@ public:
caStatus addAddr(const caNetAddr &addr, int autoBeaconAddr,
int addConfigAddr);
private:
void advanceBeaconPeriod();
void advanceBeaconPeriod();
casDGOS dgClient;
casDGOS dgClient;
//casCtx ctx;
tsDLList<casStrmClient> clientList;
tsDLList<casIntfOS> intfList;
osiTime beaconPeriod;
osiTime beaconPeriod;
caServer &adapter;
unsigned debugLevel;
unsigned debugLevel;
// the estimated number of proces variables default = 1024u
const unsigned pvCountEstimate;
// the estimated number of proces variables default = 1024u
const unsigned pvCountEstimate;
unsigned char haveBeenInitialized;
};
+3 -1
View File
@@ -6,6 +6,9 @@
*
*
* $Log$
* Revision 1.3 1997/06/30 22:54:33 jhill
* use %p with pointers
*
* Revision 1.2 1997/04/10 19:34:30 jhill
* API changes
*
@@ -28,7 +31,6 @@
// CA server
//
#include "server.h"
#include "casClientIL.h"
class casDGEvWakeup : public osiTimer {
public:
+28 -21
View File
@@ -7,6 +7,9 @@
// Some BSD calls have crept in here
//
// $Log$
// Revision 1.3 1997/06/13 09:16:10 jhill
// connect proto changes
//
// Revision 1.2 1997/04/10 19:34:31 jhill
// API changes
//
@@ -27,8 +30,12 @@
#ifndef includeCASOSDH
#define includeCASOSDH
#undef epicsExportSharedSymbols
#include "osiTimer.h"
#include "fdManager.h"
#define epicsExportSharedSymbols
#include "shareLib.h" // redefine share lib defines
class caServerI;
class caServerOS;
@@ -113,18 +120,18 @@ class casStreamOS : public casStreamIO {
friend class casStreamEvWakeup;
friend class casStreamIOWakeup;
public:
casStreamOS(caServerI &, const ioArgsToNewStreamIO &ioArgs);
casStreamOS(caServerI &, const ioArgsToNewStreamIO &ioArgs);
caStatus init();
~casStreamOS();
//
// process any incomming messages
//
casProcCond processInput();
caStatus start();
//
// process any incomming messages
//
casProcCond processInput();
caStatus start();
void recvCB();
void sendCB();
void recvCB();
void sendCB();
void sendBlockSignal();
@@ -140,13 +147,13 @@ private:
casStreamEvWakeup *pEvWk;
casStreamIOWakeup *pIOWk;
unsigned sendBlocked:1;
//
//
//
inline void armSend ();
inline void armRecv ();
inline void disarmSend();
inline void disarmRecv();
//
//
//
inline void armSend ();
inline void armRecv ();
inline void disarmSend();
inline void disarmRecv();
};
class casDGEvWakeup;
@@ -157,13 +164,13 @@ class casDGEvWakeup;
class casDGOS : public casDGIO {
friend class casDGEvWakeup;
public:
casDGOS(caServerI &cas);
casDGOS(caServerI &cas);
~casDGOS();
//
// process any incomming messages
//
casProcCond processInput();
//
// process any incomming messages
//
casProcCond processInput();
void sendBlockSignal() {}
@@ -172,7 +179,7 @@ public:
void show(unsigned level) const;
caStatus start();
caStatus start();
private:
casDGEvWakeup *pEvWk;
};
+3 -1
View File
@@ -4,6 +4,9 @@
//
//
// $Log$
// Revision 1.6 1997/06/30 22:54:34 jhill
// use %p with pointers
//
// Revision 1.5 1997/04/10 19:34:32 jhill
// API changes
//
@@ -33,7 +36,6 @@
// CA server
//
#include "server.h"
#include "casClientIL.h" // casClient inline func
#include "inBufIL.h" // inBuf inline func
#include "outBufIL.h" // outBuf inline func