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
cdf8e874
Commit
cdf8e874
authored
Apr 28, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Errorhandling at qcom timeout
parent
21191f32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
61 deletions
+122
-61
xtt/lib/xtt/src/xtt_item.cpp
xtt/lib/xtt/src/xtt_item.cpp
+14
-0
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+49
-25
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+59
-36
No files found.
xtt/lib/xtt/src/xtt_item.cpp
View file @
cdf8e874
...
...
@@ -39,6 +39,7 @@ extern "C" {
#include "co_nav_msg.h"
#include "xtt_localdb.h"
#include "xtt_url.h"
#include "co_error.h"
//
...
...
@@ -70,9 +71,11 @@ ItemObject::ItemObject( XNavBrow *brow, pwr_tObjid item_objid,
type
=
xnav_eItemType_Object
;
sts
=
gdh_ObjidToName
(
objid
,
name
,
sizeof
(
name
),
cdh_mNName
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
if
(
!
is_root
)
{
sts
=
gdh_ObjidToName
(
objid
,
segname
,
sizeof
(
segname
),
cdh_mName_object
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
brow_CreateNode
(
brow
->
ctx
,
segname
,
brow
->
nc_object
,
dest
,
dest_code
,
(
void
*
)
this
,
1
,
&
node
);
...
...
@@ -87,12 +90,16 @@ ItemObject::ItemObject( XNavBrow *brow, pwr_tObjid item_objid,
// Set class annotation
sts
=
gdh_GetObjectClass
(
objid
,
&
classid
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
sts
=
gdh_ObjidToName
(
cdh_ClassIdToObjid
(
classid
),
segname
,
sizeof
(
segname
),
cdh_mName_object
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
brow_SetAnnotation
(
node
,
1
,
segname
,
strlen
(
segname
));
// Set description annotation
sts
=
gdh_ObjidToName
(
objid
,
segname
,
sizeof
(
segname
),
cdh_mNName
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
strcat
(
segname
,
".Description"
);
sts
=
gdh_GetObjectInfo
(
segname
,
descr
,
sizeof
(
descr
));
if
(
ODD
(
sts
))
...
...
@@ -626,6 +633,8 @@ ItemAttr::ItemAttr( XNavBrow *brow, pwr_tObjid item_objid,
{
case
item_eDisplayType_Path
:
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mNName
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
sprintf
(
annot
,
"%s.%s"
,
obj_name
,
attr_name
);
break
;
default:
...
...
@@ -646,6 +655,8 @@ ItemAttr::ItemAttr( XNavBrow *brow, pwr_tObjid item_objid,
}
brow_SetAnnotation
(
node
,
0
,
annot
,
strlen
(
annot
));
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
brow_SetTraceAttr
(
node
,
obj_name
,
attr_name
,
flow_eTraceType_User
);
}
}
...
...
@@ -692,6 +703,7 @@ ItemAttrArrayElem::ItemAttrArrayElem( XNavBrow *brow, pwr_tObjid item_objid,
{
case
item_eDisplayType_Path
:
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mNName
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
strcpy
(
annot
,
obj_name
);
strcat
(
annot
,
"."
);
strcat
(
annot
,
name
);
...
...
@@ -708,6 +720,7 @@ ItemAttrArrayElem::ItemAttrArrayElem( XNavBrow *brow, pwr_tObjid item_objid,
brow_SetAnnotPixmap
(
node
,
0
,
brow
->
pixmap_attrarrayelem
);
brow_SetAnnotation
(
node
,
0
,
annot
,
strlen
(
annot
));
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
brow_SetTraceAttr
(
node
,
obj_name
,
name
,
flow_eTraceType_User
);
}
}
...
...
@@ -951,6 +964,7 @@ ItemCollect::ItemCollect( XNavBrow *brow, pwr_tObjid item_objid, char *attr_name
if
(
!
is_root
)
{
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mNName
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
sts
=
gdh_NameToObjid
(
obj_name
,
&
tst_objid
);
if
(
EVEN
(
sts
))
{
// Try volume name
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
cdf8e874
...
...
@@ -45,6 +45,7 @@ extern "C" {
#include "co_mrm_util.h"
}
#include "co_lng.h"
#include "co_error.h"
#include "xtt_xnav.h"
#include "xtt_item.h"
#include "xtt_menu.h"
...
...
@@ -750,8 +751,8 @@ void XNav::show_crossref()
brow_GetUserData
(
node_list
[
0
],
(
void
**
)
&
item
);
free
(
node_list
);
switch
(
item
->
type
)
{
try
{
switch
(
item
->
type
)
{
case
xnav_eItemType_Object
:
case
xnav_eItemType_Table
:
((
ItemBaseObject
*
)
item
)
->
open_crossref
(
brow
,
this
,
0
,
0
);
...
...
@@ -761,6 +762,12 @@ void XNav::show_crossref()
break
;
default:
message
(
'E'
,
"Can't show crossreferences for this object type"
);
}
}
catch
(
co_error
&
e
)
{
brow_push_all
();
brow_Redraw
(
brow
->
ctx
,
0
);
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
}
...
...
@@ -783,8 +790,8 @@ void XNav::start_trace_selected()
brow_GetUserData
(
node_list
[
0
],
(
void
**
)
&
item
);
free
(
node_list
);
switch
(
item
->
type
)
{
try
{
switch
(
item
->
type
)
{
case
xnav_eItemType_Object
:
((
ItemObject
*
)
item
)
->
open_trace
(
brow
,
this
,
0
,
0
);
break
;
...
...
@@ -796,6 +803,12 @@ void XNav::start_trace_selected()
break
;
default:
message
(
'E'
,
"Can't start trace for this object type"
);
}
}
catch
(
co_error
&
e
)
{
brow_push_all
();
brow_Redraw
(
brow
->
ctx
,
0
);
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
}
...
...
@@ -1575,8 +1588,8 @@ static int xnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
return
1
;
xnav
->
message
(
' '
,
null_str
);
switch
(
event
->
event
)
{
try
{
switch
(
event
->
event
)
{
case
flow_eEvent_Key_Up
:
{
brow_tNode
*
node_list
;
...
...
@@ -2156,6 +2169,12 @@ static int xnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
break
;
default:
;
}
}
catch
(
co_error
&
e
)
{
xnav
->
brow_push_all
();
brow_Redraw
(
xnav
->
brow
->
ctx
,
0
);
xnav
->
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
return
1
;
}
...
...
@@ -2517,28 +2536,33 @@ int XNav::display_object( pwr_tObjid objid, int open)
show_database
();
brow_SetNodraw
(
brow
->
ctx
);
for
(
i
=
parent_cnt
;
i
>
0
;
i
--
)
{
sts
=
find
(
parent_list
[
i
-
1
],
(
void
**
)
&
item
);
try
{
for
(
i
=
parent_cnt
;
i
>
0
;
i
--
)
{
sts
=
find
(
parent_list
[
i
-
1
],
(
void
**
)
&
item
);
if
(
EVEN
(
sts
))
return
sts
;
item
->
open_children
(
brow
,
0
,
0
);
}
sts
=
find
(
objid
,
(
void
**
)
&
item
);
if
(
EVEN
(
sts
))
return
sts
;
item
->
open_children
(
brow
,
0
,
0
);
}
sts
=
find
(
objid
,
(
void
**
)
&
item
);
if
(
EVEN
(
sts
))
return
sts
;
brow_SetInverse
(
item
->
node
,
1
);
brow_SelectInsert
(
brow
->
ctx
,
item
->
node
);
if
(
open
)
{
((
ItemBaseObject
*
)
item
)
->
open_children
(
brow
,
0
,
0
);
}
brow_ResetNodraw
(
brow
->
ctx
);
brow_Redraw
(
brow
->
ctx
,
0
);
brow_SetInverse
(
item
->
node
,
1
);
brow_SelectInsert
(
brow
->
ctx
,
item
->
node
);
if
(
open
)
{
((
ItemBaseObject
*
)
item
)
->
open_children
(
brow
,
0
,
0
);
}
if
(
open
)
brow_CenterObject
(
brow
->
ctx
,
item
->
node
,
0.00
);
else
brow_CenterObject
(
brow
->
ctx
,
item
->
node
,
0.80
);
brow_ResetNodraw
(
brow
->
ctx
);
brow_Redraw
(
brow
->
ctx
,
0
);
if
(
open
)
brow_CenterObject
(
brow
->
ctx
,
item
->
node
,
0.00
);
else
brow_CenterObject
(
brow
->
ctx
,
item
->
node
,
0.80
);
}
catch
(
co_error
&
e
)
{
brow_push_all
();
brow_Redraw
(
brow
->
ctx
,
0
);
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
return
1
;
}
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
cdf8e874
...
...
@@ -48,6 +48,7 @@ extern "C" {
#include "rt_trace.h"
}
#include "co_lng.h"
#include "co_error.h"
#include "xtt_xnav.h"
#include "xtt_ge.h"
#include "xtt_item.h"
...
...
@@ -906,18 +907,26 @@ static int xnav_show_func( void *client_data,
}
newlist
=
ODD
(
dcli_get_qualifier
(
"/NEW"
,
NULL
));
if
(
!
newlist
)
xnav
->
display_object
(
objid
,
1
);
else
{
sts
=
gdh_ObjidToName
(
objid
,
name_str
,
sizeof
(
name_str
),
cdh_mNName
);
xnav
->
brow_pop
();
ItemObject
*
item
=
new
ItemObject
(
xnav
->
brow
,
objid
,
NULL
,
try
{
if
(
!
newlist
)
xnav
->
display_object
(
objid
,
1
);
else
{
sts
=
gdh_ObjidToName
(
objid
,
name_str
,
sizeof
(
name_str
),
cdh_mNName
);
xnav
->
brow_pop
();
ItemObject
*
item
=
new
ItemObject
(
xnav
->
brow
,
objid
,
NULL
,
flow_eDest_IntoLast
,
1
);
new
ItemHeader
(
xnav
->
brow
,
"Title"
,
name_str
,
NULL
,
flow_eDest_IntoLast
);
item
->
open_children
(
xnav
->
brow
,
0
,
0
);
delete
item
;
new
ItemHeader
(
xnav
->
brow
,
"Title"
,
name_str
,
NULL
,
flow_eDest_IntoLast
);
item
->
open_children
(
xnav
->
brow
,
0
,
0
);
delete
item
;
}
}
catch
(
co_error
&
e
)
{
xnav
->
brow_push_all
();
brow_Redraw
(
xnav
->
brow
->
ctx
,
0
);
xnav
->
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
return
XNAV__SUCCESS
;
}
else
if
(
strncmp
(
arg1_str
,
"OBJECT"
,
strlen
(
arg1_str
))
==
0
)
...
...
@@ -1786,15 +1795,22 @@ static int xnav_add_func( void *client_data,
else
object
=
0
;
if
(
object
)
new
ItemObject
(
xnav
->
brow
,
objid
,
NULL
,
flow_eDest_IntoLast
,
0
);
else
if
(
command
)
new
ItemCommand
(
xnav
->
brow
,
text_str
,
NULL
,
flow_eDest_IntoLast
,
command_str
,
0
,
xnav
->
brow
->
pixmap_map
);
try
{
if
(
object
)
new
ItemObject
(
xnav
->
brow
,
objid
,
NULL
,
flow_eDest_IntoLast
,
0
);
else
if
(
command
)
new
ItemCommand
(
xnav
->
brow
,
text_str
,
NULL
,
flow_eDest_IntoLast
,
command_str
,
0
,
xnav
->
brow
->
pixmap_map
);
// else
// new ItemMenu( xnav->brow, text_str, NULL,
// flow_eDest_IntoLast, (xnav_sMenu *) menu->action,
// 0);
}
catch
(
co_error
&
e
)
{
xnav
->
brow_push_all
();
brow_Redraw
(
xnav
->
brow
->
ctx
,
0
);
xnav
->
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
return
XNAV__SUCCESS
;
}
...
...
@@ -4815,33 +4831,40 @@ int XNav::show_par_hier_class_name(
brow_pop
();
}
if
(
single_object
)
{
item
=
new
ItemObject
(
brow
,
objid
,
NULL
,
flow_eDest_IntoLast
,
1
);
item
->
open_attribute
(
brow
,
0
,
0
,
parametername
,
element
);
delete
item
;
// sts = rtt_show_parameter_add( objid, &menulist,
try
{
if
(
single_object
)
{
item
=
new
ItemObject
(
brow
,
objid
,
NULL
,
flow_eDest_IntoLast
,
1
);
item
->
open_attribute
(
brow
,
0
,
0
,
parametername
,
element
);
delete
item
;
//
sts = rtt_show_parameter_add( objid, &menulist,
// parametername, &index, &element, 0);
}
else
{
// sts = rtt_get_objects_hier_class_name( parent_ctx, hierobjid,
}
else
{
//
sts = rtt_get_objects_hier_class_name( parent_ctx, hierobjid,
// classid, name, max_objects, global,
// &rtt_show_parameter_add, (void *) &menulist,
// (void *) parametername, (void *) &index,
// (void *) &element, 0);
// if ( sts == XNAV__MAXCOUNT)
// message('E',"To many object, all objects could not be shown");
// else if ( EVEN (sts)) return sts;
// if ( index)
// sts = rtt_menu_upd_bubblesort( menulist);
// else
// {
// message('E', "No objects found");
// return XNAV__HOLDCOMMAND;
// }
// if ( sts == XNAV__MAXCOUNT)
// message('E',"To many object, all objects could not be shown");
// else if ( EVEN (sts)) return sts;
// if ( index)
// sts = rtt_menu_upd_bubblesort( menulist);
// else
// {
// message('E', "No objects found");
// return XNAV__HOLDCOMMAND;
// }
}
}
catch
(
co_error
&
e
)
{
brow_push_all
();
brow_Redraw
(
brow
->
ctx
,
0
);
message
(
'E'
,
(
char
*
)
e
.
what
().
c_str
());
}
return
XNAV__SUCCESS
;
}
...
...
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