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
ce6377a8
Commit
ce6377a8
authored
Jan 24, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remtrans table exited is remnode has other child than remtrans
parent
e4b135f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
84 deletions
+88
-84
xtt/lib/xtt/src/xtt_xnav_tables.cpp
xtt/lib/xtt/src/xtt_xnav_tables.cpp
+88
-84
No files found.
xtt/lib/xtt/src/xtt_xnav_tables.cpp
View file @
ce6377a8
/*
* Proview $Id: xtt_xnav_tables.cpp,v 1.1
4 2007-01-04 08:22:47
claes Exp $
* Proview $Id: xtt_xnav_tables.cpp,v 1.1
5 2007-01-24 12:45:23
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1421,6 +1421,7 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid)
pwr_sAttrRef
attrref
;
pwr_sClass_RemTrans
*
object_ptr
;
pwr_tOName
namebuf
;
pwr_tCid
cid
;
brow_pop
();
brow_SetNodraw
(
brow
->
ctx
);
...
...
@@ -1441,108 +1442,111 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid)
sts
=
gdh_GetClassList
(
pwr_cClass_RemTrans
,
&
objid
);
else
sts
=
gdh_GetChild
(
remnode_objid
,
&
objid
);
while
(
ODD
(
sts
))
{
memset
(
&
attrref
,
0
,
sizeof
(
attrref
));
attrref
.
Objid
=
objid
;
sts
=
gdh_DLRefObjectInfoAttrref
(
&
attrref
,
(
pwr_tAddress
*
)
&
object_ptr
,
&
subid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToName
(
objid
,
object_name
,
sizeof
(
object_name
),
cdh_mName_volumeStrict
);
while
(
ODD
(
sts
))
{
sts
=
gdh_GetObjectClass
(
objid
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem_cnt
=
0
;
if
(
cid
==
pwr_cClass_RemTrans
)
{
memset
(
&
attrref
,
0
,
sizeof
(
attrref
));
attrref
.
Objid
=
objid
;
sts
=
gdh_DLRefObjectInfoAttrref
(
&
attrref
,
(
pwr_tAddress
*
)
&
object_ptr
,
&
subid
);
if
(
EVEN
(
sts
))
return
sts
;
// Object name
xnav_cut_segments
(
namebuf
,
object_name
,
1
);
sts
=
gdh_ObjidToName
(
objid
,
object_name
,
sizeof
(
object_name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
namebuf
);
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
t
.
elem_cnt
=
0
;
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_Empty
;
// Object name
xnav_cut_segments
(
namebuf
,
object_name
,
1
);
// DataValid
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".DataValid"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
namebuf
);
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
DataValid
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%2d"
);
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_Empty
;
// Direction
switch
(
object_ptr
->
Direction
)
{
case
1
:
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"Rcv"
);
break
;
case
2
:
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"Snd"
);
break
;
}
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
// DataValid
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".DataValid"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
// TransCount
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".TransCount"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
DataValid
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%2d"
);
// Direction
switch
(
object_ptr
->
Direction
)
{
case
1
:
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"Rcv"
);
break
;
case
2
:
strcpy
(
t
.
elem
[
t
.
elem_cnt
].
fix_str
,
"Snd"
);
break
;
}
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_FixStr
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
TransCount
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%2d"
);
// TransCount
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".TransCount"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
// TransTime
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".TransTime"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
TransCount
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%2d"
);
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
TransTime
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
""
);
// TransTime
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".TransTime"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_Empty
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
TransTime
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
""
);
// ErrCount
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".ErrCount"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem
[
t
.
elem_cnt
++
].
type_id
=
xnav_eType_Empty
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
ErrCount
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%8d"
);
// ErrCount
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".ErrCount"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
// LastSts
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".LastSts"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
ErrCount
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%8d"
);
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
LastSts
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%8d"
);
// LastSts
strcpy
(
attr_name
,
object_name
);
strcat
(
attr_name
,
".LastSts"
);
sts
=
gdh_GetAttributeCharacteristics
(
attr_name
,
&
attrtype
,
&
attrsize
,
&
attroffs
,
&
attrelem
);
if
(
EVEN
(
sts
))
return
sts
;
ts
.
subid
[
0
]
=
subid
;
ts
.
subid_cnt
=
1
;
new
ItemRemTrans
(
brow
,
this
,
objid
,
&
t
,
&
ts
,
-
1
,
0
,
0
,
0
,
NULL
,
flow_eDest_IntoLast
);
t
.
elem
[
t
.
elem_cnt
].
value_p
=
&
object_ptr
->
LastSts
;
t
.
elem
[
t
.
elem_cnt
].
type_id
=
attrtype
;
t
.
elem
[
t
.
elem_cnt
].
size
=
attrsize
;
strcpy
(
t
.
elem
[
t
.
elem_cnt
++
].
format
,
"%8d"
);
ts
.
subid
[
0
]
=
subid
;
ts
.
subid_cnt
=
1
;
new
ItemRemTrans
(
brow
,
this
,
objid
,
&
t
,
&
ts
,
-
1
,
0
,
0
,
0
,
NULL
,
flow_eDest_IntoLast
);
}
if
(
cdh_ObjidIsNull
(
remnode_objid
))
sts
=
gdh_GetNextObject
(
objid
,
&
objid
);
else
...
...
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