Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3e9bdee9
Commit
3e9bdee9
authored
Dec 20, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed error log on disabled signals
parent
001b36d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
src/exe/rt_trend/src/rt_trend.c
src/exe/rt_trend/src/rt_trend.c
+32
-1
src/lib/rt/src/rt_plc_dirlink.c
src/lib/rt/src/rt_plc_dirlink.c
+7
-2
No files found.
src/exe/rt_trend/src/rt_trend.c
View file @
3e9bdee9
/*
* 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
;
}
src/lib/rt/src/rt_plc_dirlink.c
View file @
3e9bdee9
/*
* 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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment