Commit 82438c22 authored by Claes Sjofors's avatar Claes Sjofors

Xtt open graph, base classgraphs first search for on , then on...

Xtt open graph, base classgraphs first search for on , then on /data0/x5-5-0/rls/os_linux/hw_x86/xtt/exe
parent 4d409e6b
...@@ -10477,6 +10477,9 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil ...@@ -10477,6 +10477,9 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil
pwr_tFileName found_file, fname, file_str; pwr_tFileName found_file, fname, file_str;
pwr_tAName aname; pwr_tAName aname;
pwr_tEnum graph_conf; pwr_tEnum graph_conf;
int i;
int is_baseclass = 0;
int found = 0;
sts = gdh_NameToAttrref( pwr_cNObjid, instance_str, &aref); sts = gdh_NameToAttrref( pwr_cNObjid, instance_str, &aref);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
...@@ -10492,6 +10495,7 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil ...@@ -10492,6 +10495,7 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil
if ( cdh_CidToVid(cid) < cdh_cUserClassVolMin || if ( cdh_CidToVid(cid) < cdh_cUserClassVolMin ||
(cdh_CidToVid(cid) >= cdh_cManufactClassVolMin && (cdh_CidToVid(cid) >= cdh_cManufactClassVolMin &&
cdh_CidToVid(cid) <= cdh_cManufactClassVolMax)) { cdh_CidToVid(cid) <= cdh_cManufactClassVolMax)) {
is_baseclass = 1;
if ( cname[0] == '$') if ( cname[0] == '$')
sprintf( file_str, "pwr_c_%s", &cname[1]); sprintf( file_str, "pwr_c_%s", &cname[1]);
else else
...@@ -10500,37 +10504,42 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil ...@@ -10500,37 +10504,42 @@ pwr_tStatus XNav::get_instance_classgraph( char *instance_str, pwr_tFileName fil
else else
strcpy( file_str, cname); strcpy( file_str, cname);
// Get base class graphs on $pwr_exe // Get base class graphs on $pwrp_exe or $pwr_exe
cdh_ToLower( fname, file_str); for ( i = 0; i < 2; i++) {
if ( (cdh_NoCaseStrncmp( fname, "pwr_c_", 6) == 0 || cdh_ToLower( fname, file_str);
cdh_NoCaseStrncmp( fname, "pwr_c_", 6) == 0)) { if ( is_baseclass && i == 1) {
strcpy( fname, "$pwr_exe/"); strcpy( fname, "$pwr_exe/");
strcat( fname, file_str); strcat( fname, file_str);
strcpy( file_str, fname); }
} else {
else { strcpy( fname, "$pwrp_exe/");
strcpy( fname, "$pwrp_exe/"); strcat( fname, file_str);
strcat( fname, file_str); }
strcpy( file_str, fname);
}
// Add any GraphConfiguration to filename // Add any GraphConfiguration to filename
strcpy( aname, instance_str); strcpy( aname, instance_str);
strcat( aname, ".GraphConfiguration"); strcat( aname, ".GraphConfiguration");
sts = gdh_GetObjectInfo( aname, &graph_conf, sizeof(graph_conf)); sts = gdh_GetObjectInfo( aname, &graph_conf, sizeof(graph_conf));
if ( ODD(sts)) { if ( ODD(sts)) {
if ( graph_conf != 0) { if ( graph_conf != 0) {
char gc[12]; char gc[12];
sprintf( gc, "%d", graph_conf); sprintf( gc, "%d", graph_conf);
strcat( fname, gc); strcat( fname, gc);
}
} }
strcpy( file_str, fname);
}
strcat( fname, ".pwg"); strcat( fname, ".pwg");
sts = dcli_search_file( fname, found_file, DCLI_DIR_SEARCH_INIT); sts = dcli_search_file( fname, found_file, DCLI_DIR_SEARCH_INIT);
dcli_search_file( fname, found_file, DCLI_DIR_SEARCH_END); dcli_search_file( fname, found_file, DCLI_DIR_SEARCH_END);
if ( ODD(sts)) break; if ( ODD(sts)) {
found = 1;
break;
}
if ( !is_baseclass)
break;
}
if ( found)
break;
sts = gdh_GetSuperClass( cid, &cid, aref.Objid); sts = gdh_GetSuperClass( cid, &cid, aref.Objid);
} }
...@@ -10711,4 +10720,4 @@ static int xnav_replace_node_str( char *out, char *object_str) ...@@ -10711,4 +10720,4 @@ static int xnav_replace_node_str( char *out, char *object_str)
if ( out != object_str) if ( out != object_str)
strcpy( out, object_str); strcpy( out, object_str);
return 0; return 0;
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment