connect proto changes
This commit is contained in:
@@ -86,7 +86,8 @@ caStatus exPV::update(gdd &valueIn)
|
||||
return cas;
|
||||
}
|
||||
|
||||
cur.get (t.tv_sec, t.tv_nsec);
|
||||
t.tv_sec = (time_t) cur.getSecTruncToLong ();
|
||||
t.tv_nsec = cur.getNSecTruncToLong ();
|
||||
this->pValue->setTimeStamp(&t);
|
||||
this->pValue->setStat (epicsAlarmNone);
|
||||
this->pValue->setSevr (epicsSevNone);
|
||||
@@ -242,7 +243,8 @@ inline aitTimeStamp exPV::getTS()
|
||||
}
|
||||
else {
|
||||
osiTime cur(osiTime::getCurrent());
|
||||
cur.get(ts.tv_sec, ts.tv_nsec);
|
||||
ts.tv_sec = (time_t) cur.getSecTruncToLong ();
|
||||
ts.tv_nsec = cur.getNSecTruncToLong ();
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,8 @@ void exServer::installAliasName(pvInfo &info, const char *pAliasName)
|
||||
//
|
||||
// exServer::pvExistTest()
|
||||
//
|
||||
pvExistReturn exServer::pvExistTest(const casCtx& ctxIn, const char *pPVName)
|
||||
pvExistReturn exServer::pvExistTest
|
||||
(const casCtx& ctxIn, const char *pPVName)
|
||||
{
|
||||
//
|
||||
// lifetime of id is shorter than lifetime of pName
|
||||
@@ -185,7 +186,8 @@ pvExistReturn exServer::pvExistTest(const casCtx& ctxIn, const char *pPVName)
|
||||
//
|
||||
// exServer::createPV()
|
||||
//
|
||||
pvCreateReturn exServer::createPV (const casCtx &ctx, const char *pName)
|
||||
pvCreateReturn exServer::createPV
|
||||
(const casCtx &ctx, const char *pName)
|
||||
{
|
||||
//
|
||||
// lifetime of id is shorter than lifetime of pName
|
||||
@@ -196,7 +198,7 @@ pvCreateReturn exServer::createPV (const casCtx &ctx, const char *pName)
|
||||
|
||||
pPVE = this->stringResTbl.lookup(id);
|
||||
if (!pPVE) {
|
||||
return pvCreateReturn(S_casApp_pvNotFound);
|
||||
return S_casApp_pvNotFound;
|
||||
}
|
||||
|
||||
pvInfo &pvi = pPVE->getInfo();
|
||||
@@ -206,17 +208,20 @@ pvCreateReturn exServer::createPV (const casCtx &ctx, const char *pName)
|
||||
//
|
||||
if (pvi.getIOType() == excasIoSync) {
|
||||
pPV = pvi.createPV(*this, aitFalse);
|
||||
if (!pPV) {
|
||||
pvCreateReturn(S_casApp_noMemory);
|
||||
if (pPV) {
|
||||
return *pPV;
|
||||
}
|
||||
return pvCreateReturn(*pPV);
|
||||
else {
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
// Initiate async IO if this is an async PV
|
||||
//
|
||||
else {
|
||||
if (this->simultAsychIOCount>=maxSimultAsyncIO) {
|
||||
return pvCreateReturn(S_casApp_postponeAsyncIO);
|
||||
return S_casApp_postponeAsyncIO;
|
||||
}
|
||||
|
||||
this->simultAsychIOCount++;
|
||||
@@ -224,10 +229,10 @@ pvCreateReturn exServer::createPV (const casCtx &ctx, const char *pName)
|
||||
exAsyncCreateIO *pIO =
|
||||
new exAsyncCreateIO(pvi, *this, ctx);
|
||||
if (pIO) {
|
||||
return pvCreateReturn(S_casApp_asyncCompletion);
|
||||
return S_casApp_asyncCompletion;
|
||||
}
|
||||
else {
|
||||
return pvCreateReturn(S_casApp_noMemory);
|
||||
return S_casApp_noMemory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ public:
|
||||
// for this class
|
||||
//
|
||||
pvInfo (const pvInfo ©In) :
|
||||
scanPeriod(copyIn.scanPeriod), pName(copyIn.pName),
|
||||
hopr(copyIn.hopr), lopr(copyIn.lopr),
|
||||
ioType(copyIn.ioType), elementCount(copyIn.elementCount),
|
||||
pPV(copyIn.pPV)
|
||||
scanPeriod(copyIn.scanPeriod), pName(copyIn.pName),
|
||||
hopr(copyIn.hopr), lopr(copyIn.lopr),
|
||||
ioType(copyIn.ioType), elementCount(copyIn.elementCount),
|
||||
pPV(copyIn.pPV)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ public:
|
||||
const double getHopr () const { return this->hopr; }
|
||||
const double getLopr () const { return this->lopr; }
|
||||
const excasIoType getIOType () const { return this->ioType; }
|
||||
const unsigned getElementCount() const { return this->elementCount; }
|
||||
const unsigned getElementCount() const
|
||||
{ return this->elementCount; }
|
||||
void destroyPV() { this->pPV=NULL; }
|
||||
exPV *createPV (exServer &exCAS, aitBool preCreateFlag);
|
||||
private:
|
||||
@@ -103,7 +104,8 @@ private:
|
||||
//
|
||||
class pvEntry : public stringId, public tsSLNode<pvEntry> {
|
||||
public:
|
||||
pvEntry (pvInfo &infoIn, exServer &casIn, const char *pAliasName) :
|
||||
pvEntry (pvInfo &infoIn, exServer &casIn,
|
||||
const char *pAliasName) :
|
||||
stringId(pAliasName), info(infoIn), cas(casIn)
|
||||
{
|
||||
assert(this->stringId::resourceName()!=NULL);
|
||||
@@ -113,13 +115,8 @@ public:
|
||||
|
||||
pvInfo &getInfo() const { return this->info; }
|
||||
|
||||
void destroy ()
|
||||
{
|
||||
//
|
||||
// always created with new
|
||||
//
|
||||
delete this;
|
||||
}
|
||||
inline void destroy ();
|
||||
|
||||
private:
|
||||
pvInfo &info;
|
||||
exServer &cas;
|
||||
@@ -252,7 +249,8 @@ protected:
|
||||
//
|
||||
class exScalarPV : public exPV {
|
||||
public:
|
||||
exScalarPV (caServer &cas, pvInfo &setup, aitBool preCreateFlag) :
|
||||
exScalarPV (caServer &cas,
|
||||
pvInfo &setup, aitBool preCreateFlag) :
|
||||
exPV (cas, setup, preCreateFlag) {}
|
||||
void scan();
|
||||
private:
|
||||
@@ -264,7 +262,8 @@ private:
|
||||
//
|
||||
class exVectorPV : public exPV {
|
||||
public:
|
||||
exVectorPV (caServer &cas, pvInfo &setup, aitBool preCreateFlag) :
|
||||
exVectorPV (caServer &cas, pvInfo &setup,
|
||||
aitBool preCreateFlag) :
|
||||
exPV (cas, setup, preCreateFlag) {}
|
||||
void scan();
|
||||
|
||||
@@ -302,7 +301,8 @@ public:
|
||||
this->simultAsychIOCount--;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "inconsistent simultAsychIOCount?\n");
|
||||
fprintf(stderr,
|
||||
"simultAsychIOCount underflow?\n");
|
||||
}
|
||||
}
|
||||
private:
|
||||
@@ -561,4 +561,15 @@ inline pvEntry::~pvEntry()
|
||||
{
|
||||
this->cas.removeAliasName(*this);
|
||||
}
|
||||
|
||||
//
|
||||
// pvEntry:: destroy()
|
||||
//
|
||||
inline void pvEntry::destroy ()
|
||||
{
|
||||
//
|
||||
// always created with new
|
||||
//
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user