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
03d0fc31
Commit
03d0fc31
authored
Aug 18, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt show device, process names displayed
parent
df00e12e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
19 deletions
+56
-19
xtt/lib/xtt/src/xtt_xnav_tables.cpp
xtt/lib/xtt/src/xtt_xnav_tables.cpp
+56
-19
No files found.
xtt/lib/xtt/src/xtt_xnav_tables.cpp
View file @
03d0fc31
...
@@ -776,6 +776,37 @@ extern "C" void xnav_show_subcli_scan( XNav *xnav)
...
@@ -776,6 +776,37 @@ extern "C" void xnav_show_subcli_scan( XNav *xnav)
brow_Redraw
(
xnav
->
brow
->
ctx
,
0
);
brow_Redraw
(
xnav
->
brow
->
ctx
,
0
);
}
}
void
process_to_name
(
char
*
name
,
pwr_tUInt32
process
)
{
switch
(
process
)
{
case
pwr_mIoProcessMask_Plc
:
strcpy
(
name
,
"Plc"
);
break
;
case
pwr_mIoProcessMask_IoComm
:
strcpy
(
name
,
"IoComm"
);
break
;
case
pwr_mIoProcessMask_Profibus
:
strcpy
(
name
,
"Profibus"
);
break
;
case
pwr_mIoProcessMask_User
:
strcpy
(
name
,
"User"
);
break
;
case
pwr_mIoProcessMask_User2
:
strcpy
(
name
,
"User2"
);
break
;
case
pwr_mIoProcessMask_User3
:
strcpy
(
name
,
"User3"
);
break
;
case
pwr_mIoProcessMask_User4
:
strcpy
(
name
,
"User4"
);
break
;
case
pwr_mIoProcessMask_Powerlink
:
strcpy
(
name
,
"Powerlink"
);
break
;
default:
sprintf
(
name
,
"%4d"
,
process
);
}
}
int
XNav
::
show_device
()
int
XNav
::
show_device
()
{
{
...
@@ -872,18 +903,24 @@ int XNav::show_device()
...
@@ -872,18 +903,24 @@ int XNav::show_device()
sts
=
gdh_GetObjectInfo
(
attr_name
,
sts
=
gdh_GetObjectInfo
(
attr_name
,
(
void
*
)
&
process
,
sizeof
(
process
));
(
void
*
)
&
process
,
sizeof
(
process
));
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
sprintf
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"%4d"
,
process
);
process_to_name
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
process
);
else
else
{
process
=
0
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"-"
);
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"-"
);
}
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
// ThreadObject
// ThreadObject
if
(
!
(
process
&
1
))
{
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"-"
);
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
}
else
{
strcpy
(
attr_name
,
object_name
);
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".ThreadObject"
);
strcat
(
attr_name
,
".ThreadObject"
);
sts
=
gdh_GetObjectInfo
(
attr_name
,
sts
=
gdh_GetObjectInfo
(
attr_name
,
(
void
*
)
&
thread_objid
,
sizeof
(
thread_objid
));
(
void
*
)
&
thread_objid
,
sizeof
(
thread_objid
));
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
{
{
sts
=
gdh_ObjidToName
(
thread_objid
,
namebuf
,
sts
=
gdh_ObjidToName
(
thread_objid
,
namebuf
,
sizeof
(
namebuf
),
cdh_mName_object
);
sizeof
(
namebuf
),
cdh_mName_object
);
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
...
@@ -894,7 +931,7 @@ int XNav::show_device()
...
@@ -894,7 +931,7 @@ int XNav::show_device()
else
else
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"-"
);
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"-"
);
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
}
// RegAddress
// RegAddress
strcpy
(
attr_name
,
object_name
);
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".RegAddress"
);
strcat
(
attr_name
,
".RegAddress"
);
...
...
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