added dbGetNelements and dbIsLinkConnected
This commit is contained in:
@@ -404,7 +404,35 @@ int dbGetFieldIndex(struct dbAddr *paddr)
|
||||
return(((struct dbFldDes *)paddr->pfldDes)->indRecordType);
|
||||
}
|
||||
|
||||
long dbGetNelements(struct link *plink,long *nelements)
|
||||
{
|
||||
switch(plink->type) {
|
||||
case CONSTANT:
|
||||
*nelements = 0;
|
||||
return(0);
|
||||
case DB_LINK: {
|
||||
DBADDR *paddr = (DBADDR *)plink->value.pv_link.pvt;
|
||||
*nelements = paddr->no_elements;
|
||||
return(0);
|
||||
}
|
||||
case CA_LINK:
|
||||
return(dbCaGetNelements(plink,nelements));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
int dbIsLinkConnected(struct link *plink)
|
||||
{
|
||||
switch(plink->type) {
|
||||
case DB_LINK: return(TRUE);
|
||||
case CA_LINK: return(dbCaIsLinkConnected(plink));
|
||||
default: break;
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a record if its scan field is passive.
|
||||
* Will notify if processing is complete by callback.
|
||||
|
||||
@@ -270,6 +270,8 @@ struct dbr_alDouble {DBRalDouble};
|
||||
struct rset *dbGetRset(struct dbAddr *paddr);
|
||||
int dbIsValueField(struct dbFldDes *pdbFldDes);
|
||||
int dbGetFieldIndex(struct dbAddr *paddr);
|
||||
long dbGetNelements(struct link *plink,long *nelements);
|
||||
int dbIsLinkConnected(struct link *plink);
|
||||
long dbScanLink(struct dbCommon *pfrom, struct dbCommon *pto);
|
||||
long dbScanPassive(struct dbCommon *pfrom,struct dbCommon *pto);
|
||||
long dbProcess(struct dbCommon *precord);
|
||||
|
||||
Reference in New Issue
Block a user