Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
56eee90a
Commit
56eee90a
authored
5 years ago
by
Jean-Claude BAU
Browse files
Options
Downloads
Patches
Plain Diff
Improve behavior when link up->down->up not detected.
- update PPSi submodule - Adapt the display of wr_mon to PPSi changes
parent
4ca6e473
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/ppsi
+1
-1
1 addition, 1 deletion
userspace/ppsi
userspace/tools/wr_mon.c
+19
-4
19 additions, 4 deletions
userspace/tools/wr_mon.c
with
20 additions
and
5 deletions
ppsi
@
420da467
Compare
043af2b4
...
420da467
Subproject commit
043af2b4d68575034da03b302936cd5c459fb6b8
Subproject commit
420da467c4edbc76e830aca7a8b4b43be8e6ffdd
This diff is collapsed.
Click to expand it.
userspace/tools/wr_mon.c
+
19
−
4
View file @
56eee90a
...
...
@@ -229,6 +229,21 @@ static char *prot_detection_state_name[]={
/* prototypes */
int
read_instances
(
void
);
static
inline
int
extensionStateColor
(
struct
pp_instance
*
ppi
)
{
if
(
ppi
->
protocol_extension
==
PPSI_EXT_NONE
)
{
return
C_GREEN
;
/* No extension */
}
switch
(
ppi
->
extState
)
{
case
PP_EXSTATE_ACTIVE
:
return
C_GREEN
;
case
PP_EXSTATE_PTP
:
return
C_WHITE
;
case
PP_EXSTATE_DISABLE
:
default:
return
C_RED
;
}
}
char
*
getStateAsString
(
char
*
p
[],
int
index
)
{
int
i
,
len
;
char
*
errMsg
=
"?????????????????????"
;
...
...
@@ -765,7 +780,7 @@ void show_ports(int hal_alive, int ppsi_alive)
}
else
{
term_cprintf
(
C_WHITE
,
"?"
);
}
color
=
ppi
->
protocol_extension
!=
PPSI_EXT_NONE
&&
!
ppi
->
ext_enabled
?
C_RED
:
C_WHITE
;
color
=
extensionStateColor
(
ppi
)
;
term_cprintf
(
color
,
"-%c"
,
pe_info
->
short_ext_name
);
nvlans
=
ppi
->
nvlans
;
...
...
@@ -812,15 +827,15 @@ void show_servo(struct inst_servo_t *servo, int alive)
char
buf
[
128
];
wrh_servo_t
*
l1e_servo
;
int
proto_extension
=
servo
->
ppi
->
ext
_enabled
?
servo
->
ppi
->
protocol_extension
:
PPSI_EXT_NONE
;
int
proto_extension
=
servo
->
ppi
->
ext
State
!=
PP_EXSTATE_DISABLE
?
servo
->
ppi
->
protocol_extension
:
PPSI_EXT_NONE
;
struct
proto_ext_info_t
*
pe_info
=
IS_PROTO_EXT_INFO_AVAILABLE
(
proto_extension
)
?
&
proto_ext_info
[
proto_extension
]
:
&
proto_ext_info
[
0
]
;
wr_servo
=
(
servo
->
ppi
->
protocol_extension
==
PPSI_EXT_WR
&&
servo
->
ppi
->
ext
_enabled
)
?
wr_servo
=
(
servo
->
ppi
->
protocol_extension
==
PPSI_EXT_WR
&&
servo
->
ppi
->
ext
State
==
PP_EXSTATE_ACTIVE
)
?
(
wrh_servo_t
*
)
servo
->
servo_ext_snapshot
:
NULL
;
if
(
wr_servo
)
{
wr_servo_ext
=
&
((
struct
wr_data
*
)
wr_servo
)
->
servo_ext
;
}
l1e_servo
=
(
servo
->
ppi
->
protocol_extension
==
PPSI_EXT_L1S
&&
servo
->
ppi
->
ext
_enabled
)
?
l1e_servo
=
(
servo
->
ppi
->
protocol_extension
==
PPSI_EXT_L1S
&&
servo
->
ppi
->
ext
State
==
PP_EXSTATE_ACTIVE
)
?
(
wrh_servo_t
*
)
servo
->
servo_ext_snapshot
:
NULL
;
if
(
mode
==
SHOW_GUI
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment