review cleanup

This commit is contained in:
Michael Davidsaver
2021-03-08 21:17:03 -08:00
parent f69b938401
commit 3f4432b7bd
5 changed files with 28 additions and 40 deletions

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,

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,

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 .

View File

@@ -16,6 +16,8 @@ The following filters are available in this release:
=item * L<Decimation|/"Decimation Filter dec">
=item * L<UTag|/"UTag Filter utag">
=back
=head2 Using Filters
@@ -287,3 +289,24 @@ once every minute:
=cut
registrar(utagInitialize)
=head3 UTag Filter C<"utag">
This filter applies a test UTAG&M==V to the value taken from the UTAG record field
and drops those updates which evaluate as false.
=head4 Parameters
=over
=item Mask C<"M">
Bit mask.
=item Value C<"V">
Required value.
=back
=cut

View File

@@ -748,12 +748,6 @@ static long lnkCalc_getAlarmMsg(const struct link *plink, epicsEnum16 *status,
return 0;
}
static long lnkCalc_getAlarm(const struct link *plink, epicsEnum16 *status,
epicsEnum16 *severity)
{
return lnkCalc_getAlarmMsg(plink, status, severity, NULL, 0u);
}
static long lnkCalc_getTimestampTag(const struct link *plink, epicsTimeStamp *pstamp, epicsUTag *ptag)
{
calc_link *clink = CONTAINER(plink->value.json.jlink,
@@ -769,11 +763,6 @@ static long lnkCalc_getTimestampTag(const struct link *plink, epicsTimeStamp *ps
return -1;
}
static long lnkCalc_getTimestamp(const struct link *plink, epicsTimeStamp *pstamp)
{
return lnkCalc_getTimestampTag(plink, pstamp, NULL);
}
static long doLocked(struct link *plink, dbLinkUserCallback rtn, void *priv)
{
return rtn(plink, priv);
@@ -790,7 +779,7 @@ static lset lnkCalc_lset = {
lnkCalc_getValue,
NULL, NULL, NULL,
lnkCalc_getPrecision, lnkCalc_getUnits,
lnkCalc_getAlarm, lnkCalc_getTimestamp,
NULL, NULL,
lnkCalc_putValue, NULL,
NULL, doLocked,
lnkCalc_getAlarmMsg,