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
d1632950
Commit
d1632950
authored
Apr 28, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SystemStatus calculation changed
parent
acb896c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
src/lib/rt/src/rt_c_node.c
src/lib/rt/src/rt_c_node.c
+22
-9
No files found.
src/lib/rt/src/rt_c_node.c
View file @
d1632950
...
...
@@ -31,8 +31,8 @@ pwrs_Node_Exec (
int
i
;
pwr_tTime
current_time
;
pwr_tDeltaTime
diff
;
int
severity
;
int
system_severity
;
errh_eSeverity
severity
;
errh_eSeverity
system_severity
;
int
new_idx
=
-
1
;
static
float
timeout
[
40
]
=
{
0
,
0
,
0
,
0
,
3
,
5
,
5
,
0
,
60
,
5
,
...
...
@@ -53,13 +53,9 @@ pwrs_Node_Exec (
if
(
!
np
)
return
;
if
(
!
np
->
SystemStatus
)
system_severity
=
-
1
;
else
system_severity
=
np
->
SystemStatus
&
7
;
system_severity
=
errh_Severity
(
np
->
SystemStatus
);
clock_gettime
(
CLOCK_REALTIME
,
&
current_time
);
for
(
i
=
0
;
i
<
sizeof
(
np
->
ProcStatus
)
/
sizeof
(
np
->
ProcStatus
[
0
]);
i
++
)
{
severity
=
np
->
ProcStatus
[
i
]
&
7
;
if
(
np
->
ProcStatus
[
i
]
!=
0
&&
timeout
[
i
]
!=
0
.
0
)
{
time_Adiff
(
&
diff
,
&
current_time
,
&
np
->
ProcTimeStamp
[
i
]);
...
...
@@ -71,8 +67,8 @@ pwrs_Node_Exec (
}
}
severity
=
np
->
ProcStatus
[
i
]
&
7
;
if
(
!
(
np
->
ProcStatus
[
i
]
==
0
||
ODD
(
np
->
ProcStatus
[
i
])
))
{
severity
=
errh_Severity
(
np
->
ProcStatus
[
i
])
;
if
(
np
->
ProcStatus
[
i
]
!=
0
&&
EVEN
(
np
->
ProcStatus
[
i
]
))
{
if
(
severity
>=
system_severity
)
{
new_idx
=
i
;
system_severity
=
severity
;
...
...
@@ -85,3 +81,20 @@ pwrs_Node_Exec (
else
if
(
EVEN
(
np
->
SystemStatus
))
np
->
SystemStatus
=
PWR__RUNNING
;
}
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