Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
c9ae3c1d
Commit
c9ae3c1d
authored
Jan 05, 2021
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/wrpc-dump: add dump_type_wr_role
Signed-off-by:
Adam Wujek
<
adam.wujek@creotech.pl
>
parent
e0d0512b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
dump-info.c
dump-info.c
+1
-1
dump-info.h
include/dump-info.h
+7
-2
wrpc-dump.c
tools/wrpc-dump.c
+22
-0
No files found.
dump-info.c
View file @
c9ae3c1d
...
...
@@ -308,7 +308,7 @@ struct dump_info dump_info[] = {
DUMP_FIELD
(
FixedDelta
,
otherNodeDeltaRx
),
DUMP_FIELD
(
wr_config_Enumeration8
,
wrConfig
),
DUMP_FIELD
(
wr_config_Enumeration8
,
parentWrConfig
),
DUMP_FIELD
(
Enumeration8
,
wrMode
),
DUMP_FIELD
(
wr_role_
Enumeration8
,
wrMode
),
DUMP_FIELD
(
Enumeration8
,
wrPortState
),
#endif
...
...
include/dump-info.h
View file @
c9ae3c1d
...
...
@@ -56,6 +56,9 @@ enum dump_type {
dump_type_ppi_state_Enumeration8
,
dump_type_wr_config
,
dump_type_wr_config_Enumeration8
,
dump_type_wr_role
,
dump_type_wr_role_Enumeration8
,
};
/* because of the sizeof later on, we need these typedefs */
...
...
@@ -73,8 +76,10 @@ typedef int protocol_extension;
typedef
int
timing_mode
;
typedef
int
ppi_state
;
typedef
Enumeration8
ppi_state_Enumeration8
;
typedef
int
wr_config
,
typedef
Enumeration8
wr_config_Enumeration8
typedef
int
wr_config
;
typedef
Enumeration8
wr_config_Enumeration8
;
typedef
int
wr_role
;
typedef
Enumeration8
wr_role_Enumeration8
;
/*
* This is generated with the target compiler, and then linked
...
...
tools/wrpc-dump.c
View file @
c9ae3c1d
...
...
@@ -360,6 +360,28 @@ void dump_one_field(void *addr, struct dump_info *info, char *info_prefix)
print_str
(
char_p
);
printf
(
"
\n
"
);
break
;
case
dump_type_wr_role
:
case
dump_type_wr_role_Enumeration8
:
/* check the size of type, e.g. Boolean is not 8 bits! */
if
(
size
==
1
)
i
=
*
(
uint8_t
*
)
p
;
else
if
(
size
==
2
)
i
=
wrpc_get_16
(
p
);
else
i
=
wrpc_get_l32
(
p
);
switch
(
i
)
{
ENUM_TO_P_IN_CASE
(
WR_ROLE_NONE
,
char_p
);
ENUM_TO_P_IN_CASE
(
WR_MASTER
,
char_p
);
ENUM_TO_P_IN_CASE
(
WR_SLAVE
,
char_p
);
default:
char_p
=
"Unknown"
;
}
printf
(
"%d"
,
i
);
print_str
(
char_p
);
printf
(
"
\n
"
);
break
;
}
}
void
dump_many_fields
(
void
*
addr
,
char
*
name
,
char
*
prefix
)
...
...
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