Commit 3e9bdee9 authored by claes's avatar claes

Removed error log on disabled signals

parent 001b36d1
/*
* Proview $Id: rt_trend.c,v 1.8 2005-10-21 16:11:22 claes Exp $
* Proview $Id: rt_trend.c,v 1.9 2005-12-20 11:54:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -71,6 +71,7 @@ static pwr_tStatus InitTrendList();
static void CloseTrendList();
static pwr_tBoolean IsValidType(pwr_eTix Type);
static void StoreData();
static int IsDisabled( pwr_tAttrRef *aaref);
int main (int argc, char **argv)
......@@ -272,6 +273,9 @@ InitTrendList (
sts = gdh_DLRefObjectInfoAttrref((pwr_sAttrRef *)&Trend->DataName,
(pwr_tAddress *)&Trend->DataPointer, &Trend->DataSubId);
if (EVEN(sts)) {
if ( sts == GDH__RTDBNULL && IsDisabled( &Trend->DataName))
continue;
errh_Error("Couldn't get direct link to %s's attribute DataName\n%m", Name, sts);
gdh_UnrefObjectInfo(LstNode->DsTrendSubId);
free(LstNode);
......@@ -418,3 +422,30 @@ StoreData (
Trend->NextMultiple--;
}
}
/* Check if signal is disabled */
/* aaref points to ActualValue */
static int IsDisabled( pwr_tAttrRef *aaref)
{
pwr_tDisableAttr disabled;
pwr_tAName name;
pwr_tAttrRef oaref;
pwr_tStatus sts;
char *s;
sts = gdh_AttrrefToName( aaref, name, sizeof(name), cdh_mNName);
if ( EVEN(sts)) return 0;
if ( (s = strrchr( name, '.')))
*s = 0;
else
return 0;
sts = gdh_NameToAttrref( pwr_cNObjid, name, &oaref);
if ( EVEN(sts)) return 0;
sts = gdh_ArefDisabled( &oaref, &disabled);
if ( ODD(sts) && disabled)
return 1;
return 0;
}
/*
* Proview $Id: rt_plc_dirlink.c,v 1.3 2005-09-01 14:57:56 claes Exp $
* Proview $Id: rt_plc_dirlink.c,v 1.4 2005-12-20 11:54:52 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -288,7 +288,12 @@ plc_rtdbref (
sts = plc_RefObjidAttr(local_object, class, la->AttrRef, la, aname);
if (EVEN(sts)) {
errh_Error("plc_RefObjidAttr(%s), %m", cdh_ObjidToString(NULL, la->AttrRef.Objid, 0), sts);
pwr_tDisableAttr disabled;
pwr_tStatus sts1;
sts1 = gdh_ArefDisabled( &la->AttrRef, &disabled);
if ( EVEN(sts1) || !disabled)
errh_Error("plc_RefObjidAttr(%s), %m", cdh_ObjidToString(NULL, la->AttrRef.Objid, 0), sts);
GUARD_DL( la->Pointer, la->Size );
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment