review cleanup

This commit is contained in:
Michael Davidsaver
2021-04-05 10:31:25 -07:00
parent f69b938401
commit 3f4432b7bd
5 changed files with 28 additions and 40 deletions
+1 -12
View File
@@ -353,12 +353,6 @@ static long dbDbGetAlarmMsg(const struct link *plink, epicsEnum16 *status,
return 0;
}
static long dbDbGetAlarm(const struct link *plink, epicsEnum16 *status,
epicsEnum16 *severity)
{
return dbDbGetAlarmMsg(plink, status, severity, NULL, 0u);
}
static long dbDbGetTimeStampTag(const struct link *plink, epicsTimeStamp *pstamp, epicsUTag *ptag)
{
dbChannel *chan = linkChannel(plink);
@@ -369,11 +363,6 @@ static long dbDbGetTimeStampTag(const struct link *plink, epicsTimeStamp *pstamp
return 0;
}
static long dbDbGetTimeStamp(const struct link *plink, epicsTimeStamp *pstamp)
{
return dbDbGetTimeStampTag(plink, pstamp, NULL);
}
static long dbDbPutValue(struct link *plink, short dbrType,
const void *pbuffer, long nRequest)
{
@@ -418,7 +407,7 @@ static lset dbDb_lset = {
dbDbGetValue,
dbDbGetControlLimits, dbDbGetGraphicLimits, dbDbGetAlarmLimits,
dbDbGetPrecision, dbDbGetUnits,
dbDbGetAlarm, dbDbGetTimeStamp,
NULL, NULL,
dbDbPutValue, NULL,
dbDbScanFwdLink, doLocked,
dbDbGetAlarmMsg,
+2 -13
View File
@@ -316,19 +316,8 @@ long dbTryGetLink(struct link *plink, short dbrType, void *pbuffer,
static
void setLinkAlarm(struct link* plink)
{
struct dbCommon *precord = plink->precord;
dbRecordType *rdes = precord->rdes;
const char* amsg = NULL;
short i;
for(i=0; i<rdes->no_links; i++) {
dbFldDes *fdes = rdes->papFldDes[rdes->link_ind[i]];
if((char*)plink - (char*)precord == fdes->offset) {
amsg = fdes->name;
}
}
recGblSetSevrMsg(precord, LINK_ALARM, INVALID_ALARM, "field %s", amsg);
recGblSetSevrMsg(plink->precord, LINK_ALARM, INVALID_ALARM,
"field %s", dbLinkFieldName(plink));
}
long dbGetLink(struct link *plink, short dbrType, void *pbuffer,
+1 -3
View File
@@ -282,8 +282,6 @@ typedef struct lset {
* @param status where to put the alarm status (or NULL)
* @param severity where to put the severity (or NULL)
* @returns status value
*
* @note Link types which provide getAlarm should also provided getAlarmMsg().
*/
long (*getAlarm)(const struct link *plink, epicsEnum16 *status,
epicsEnum16 *severity);
@@ -368,7 +366,7 @@ typedef struct lset {
*
* Equivalent of getAlarm() and also copy out alarm message string.
* The msgbuf argument may be NULL and/or msgbuflen==0, in which case
* the call must be the same as a call to getAlarm().
* the effect must be the same as a call to getAlarm().
*
* Implementations must write a trailing nil to msgbuf whenever
* @code msgbuf!=NULL && msgbuflen>0 @endcode .