diff --git a/src/cas/example/simple/exChannel.cc b/src/cas/example/simple/exChannel.cc index 68e56055a..d5b0485e0 100644 --- a/src/cas/example/simple/exChannel.cc +++ b/src/cas/example/simple/exChannel.cc @@ -5,3 +5,28 @@ #include "exServer.h" +// +// exChannel::setOwner () +// +void exChannel::setOwner(const char * const pUserName, + const char * const pHostName) +{ +} + +// +// exChannel::readAccess () +// +aitBool exChannel::readAccess () const +{ + return aitTrue; +} + +// +// exChannel::writeAccess () +// +aitBool exChannel::writeAccess () const +{ + return aitTrue; +} + + diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index d0f5cdc0e..16b55180b 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -428,3 +428,15 @@ caStatus exPV::read (const casCtx &, gdd &protoIn) return this->ft.read (*this, protoIn); } +// +// exPV::createChannel() +// +// for access control - optional +// +casChannel *exPV::createChannel (const casCtx &ctx, + const char * const pUserName, const char * const pHostName) +{ + return new exChannel (ctx); +} + + diff --git a/src/cas/example/simple/exServer.h b/src/cas/example/simple/exServer.h index e5b6cc6d7..94f15c466 100644 --- a/src/cas/example/simple/exServer.h +++ b/src/cas/example/simple/exServer.h @@ -14,6 +14,9 @@ // | // exAsyncPV // +// casChannel +// | +// exChannel // @@ -236,6 +239,12 @@ public: static void initFT(); + // + // for access control - optional + // + casChannel *createChannel (const casCtx &ctx, + const char * const pUserName, const char * const pHostName); + protected: smartGDDPointer pValue; exScanTimer *pScanTimer; @@ -385,29 +394,13 @@ private: // class exChannel : public casChannel{ public: - exChannel(const casCtx &ctxIn) : casChannel(ctxIn) {} + exChannel(const casCtx &ctxIn) : casChannel(ctxIn) {} - //void setOwner(const char *pUserName, const char *pHostName){}; + virtual void setOwner(const char * const pUserName, + const char * const pHostName); - // - // called when the first client begins to monitor the PV - // - caStatus interestRegister () - { - return S_cas_success; - } - - // - // called when the last client stops monitoring the PV - // - void interestDelete () {} - - // - // the following are encouraged to change during an channel's - // lifetime - // - aitBool readAccess () const {return aitTrue;}; - aitBool writeAccess () const {return aitTrue;}; + virtual aitBool readAccess () const; + virtual aitBool writeAccess () const; private: }; diff --git a/src/cas/generic/casInternal.h b/src/cas/generic/casInternal.h index 7287d0bbd..91a7c3db7 100644 --- a/src/cas/generic/casInternal.h +++ b/src/cas/generic/casInternal.h @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.17 1998/10/23 00:28:20 jhill + * fixed HP-UX warnings + * * Revision 1.16 1998/07/08 15:38:05 jhill * fixed lost monitors during flow control problem * @@ -472,7 +475,7 @@ public: inline void postEvent (const casEventMask &select, gdd &event); - virtual casResType resourceType() const; + epicsShareFunc virtual casResType resourceType() const; virtual void show (unsigned level) const; @@ -490,7 +493,7 @@ public: // // access rights event call back // - caStatus cbFunc(casEventSys &); + epicsShareFunc caStatus cbFunc(casEventSys &); inline void postAccessRightsEvent(); protected: