Commit ce6377a8 authored by claes's avatar claes

Remtrans table exited is remnode has other child than remtrans

parent e4b135f5
/* /*
* Proview $Id: xtt_xnav_tables.cpp,v 1.14 2007-01-04 08:22:47 claes Exp $ * Proview $Id: xtt_xnav_tables.cpp,v 1.15 2007-01-24 12:45:23 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -1421,6 +1421,7 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid) ...@@ -1421,6 +1421,7 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid)
pwr_sAttrRef attrref; pwr_sAttrRef attrref;
pwr_sClass_RemTrans *object_ptr; pwr_sClass_RemTrans *object_ptr;
pwr_tOName namebuf; pwr_tOName namebuf;
pwr_tCid cid;
brow_pop(); brow_pop();
brow_SetNodraw( brow->ctx); brow_SetNodraw( brow->ctx);
...@@ -1441,108 +1442,111 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid) ...@@ -1441,108 +1442,111 @@ int XNav::show_remtrans( pwr_tObjid remnode_objid)
sts = gdh_GetClassList ( pwr_cClass_RemTrans, &objid); sts = gdh_GetClassList ( pwr_cClass_RemTrans, &objid);
else else
sts = gdh_GetChild( remnode_objid, &objid); sts = gdh_GetChild( remnode_objid, &objid);
while ( ODD(sts)) while ( ODD(sts)) {
{ sts = gdh_GetObjectClass( objid, &cid);
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);
if ( EVEN(sts)) return sts; 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 sts = gdh_ObjidToName ( objid, object_name,
xnav_cut_segments( namebuf, object_name, 1); sizeof(object_name), cdh_mName_volumeStrict);
if ( EVEN(sts)) return sts;
strcpy( t.elem[t.elem_cnt].fix_str, namebuf); t.elem_cnt = 0;
t.elem[t.elem_cnt++].type_id = xnav_eType_FixStr;
t.elem[t.elem_cnt++].type_id = xnav_eType_Empty; // Object name
xnav_cut_segments( namebuf, object_name, 1);
// DataValid strcpy( t.elem[t.elem_cnt].fix_str, namebuf);
strcpy( attr_name, object_name); t.elem[t.elem_cnt++].type_id = xnav_eType_FixStr;
strcat( attr_name, ".DataValid");
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 = xnav_eType_Empty;
t.elem[t.elem_cnt].type_id = attrtype;
t.elem[t.elem_cnt].size = attrsize;
strcpy( t.elem[t.elem_cnt++].format, "%2d");
// Direction // DataValid
switch( object_ptr->Direction) strcpy( attr_name, object_name);
{ strcat( attr_name, ".DataValid");
case 1: sts = gdh_GetAttributeCharacteristics ( attr_name,
strcpy( t.elem[t.elem_cnt].fix_str, "Rcv"); &attrtype, &attrsize, &attroffs, &attrelem);
break; if ( EVEN(sts)) return sts;
case 2:
strcpy( t.elem[t.elem_cnt].fix_str, "Snd");
break;
}
t.elem[t.elem_cnt++].type_id = xnav_eType_FixStr;
// TransCount t.elem[t.elem_cnt].value_p = &object_ptr->DataValid;
strcpy( attr_name, object_name); t.elem[t.elem_cnt].type_id = attrtype;
strcat( attr_name, ".TransCount"); t.elem[t.elem_cnt].size = attrsize;
sts = gdh_GetAttributeCharacteristics ( attr_name, strcpy( t.elem[t.elem_cnt++].format, "%2d");
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts; // 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; // TransCount
t.elem[t.elem_cnt].type_id = attrtype; strcpy( attr_name, object_name);
t.elem[t.elem_cnt].size = attrsize; strcat( attr_name, ".TransCount");
strcpy( t.elem[t.elem_cnt++].format, "%2d"); sts = gdh_GetAttributeCharacteristics ( attr_name,
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts;
// TransTime t.elem[t.elem_cnt].value_p = &object_ptr->TransCount;
strcpy( attr_name, object_name); t.elem[t.elem_cnt].type_id = attrtype;
strcat( attr_name, ".TransTime"); t.elem[t.elem_cnt].size = attrsize;
sts = gdh_GetAttributeCharacteristics ( attr_name, strcpy( t.elem[t.elem_cnt++].format, "%2d");
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts;
t.elem[t.elem_cnt].value_p = &object_ptr->TransTime; // TransTime
t.elem[t.elem_cnt].type_id = attrtype; strcpy( attr_name, object_name);
t.elem[t.elem_cnt].size = attrsize; strcat( attr_name, ".TransTime");
strcpy( t.elem[t.elem_cnt++].format, ""); 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 t.elem[t.elem_cnt++].type_id = xnav_eType_Empty;
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].value_p = &object_ptr->ErrCount; // ErrCount
t.elem[t.elem_cnt].type_id = attrtype; strcpy( attr_name, object_name);
t.elem[t.elem_cnt].size = attrsize; strcat( attr_name, ".ErrCount");
strcpy( t.elem[t.elem_cnt++].format, "%8d"); sts = gdh_GetAttributeCharacteristics ( attr_name,
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts;
// LastSts t.elem[t.elem_cnt].value_p = &object_ptr->ErrCount;
strcpy( attr_name, object_name); t.elem[t.elem_cnt].type_id = attrtype;
strcat( attr_name, ".LastSts"); t.elem[t.elem_cnt].size = attrsize;
sts = gdh_GetAttributeCharacteristics ( attr_name, strcpy( t.elem[t.elem_cnt++].format, "%8d");
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts;
t.elem[t.elem_cnt].value_p = &object_ptr->LastSts; // LastSts
t.elem[t.elem_cnt].type_id = attrtype; strcpy( attr_name, object_name);
t.elem[t.elem_cnt].size = attrsize; strcat( attr_name, ".LastSts");
strcpy( t.elem[t.elem_cnt++].format, "%8d"); sts = gdh_GetAttributeCharacteristics ( attr_name,
&attrtype, &attrsize, &attroffs, &attrelem);
if ( EVEN(sts)) return sts;
ts.subid[0] = subid; t.elem[t.elem_cnt].value_p = &object_ptr->LastSts;
ts.subid_cnt = 1; t.elem[t.elem_cnt].type_id = attrtype;
new ItemRemTrans( brow, this, objid, &t, &ts, -1, 0, 0, 0, NULL, t.elem[t.elem_cnt].size = attrsize;
flow_eDest_IntoLast); 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)) if ( cdh_ObjidIsNull( remnode_objid))
sts = gdh_GetNextObject( objid, &objid); sts = gdh_GetNextObject( objid, &objid);
else else
......
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