Commit e5c54682 authored by claes's avatar claes

Trace and ge type graphs for Int32 attributes

parent acf062a8
...@@ -276,6 +276,9 @@ int goen_create_nodetype_m0( ...@@ -276,6 +276,9 @@ int goen_create_nodetype_m0(
if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32) if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Int32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Boolean); flow_eTraceType_Boolean);
......
...@@ -262,6 +262,9 @@ int goen_create_nodetype_m1( ...@@ -262,6 +262,9 @@ int goen_create_nodetype_m1(
if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32) if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Int32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Boolean); flow_eTraceType_Boolean);
......
...@@ -270,6 +270,9 @@ int goen_create_nodetype_m14( ...@@ -270,6 +270,9 @@ int goen_create_nodetype_m14(
if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32) if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Int32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Boolean); flow_eTraceType_Boolean);
......
...@@ -297,6 +297,10 @@ int goen_create_nodetype_m15( ...@@ -297,6 +297,10 @@ int goen_create_nodetype_m15(
flow_SetTraceAttr( cp, NULL, flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName, bodydef[inputs+interns].Par->Output.Info.PgmName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName,
flow_eTraceType_Int32);
else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName, bodydef[inputs+interns].Par->Output.Info.PgmName,
......
...@@ -293,6 +293,9 @@ int goen_create_nodetype_m2( ...@@ -293,6 +293,9 @@ int goen_create_nodetype_m2(
if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32) if (bodydef[i].Par->Output.Info.Type == pwr_eType_Float32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Int32);
else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[i].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, bodydef[i].ParName, flow_SetTraceAttr( cp, NULL, bodydef[i].ParName,
flow_eTraceType_Boolean); flow_eTraceType_Boolean);
......
...@@ -236,6 +236,10 @@ int goen_create_nodetype_m7( ...@@ -236,6 +236,10 @@ int goen_create_nodetype_m7(
flow_SetTraceAttr( cp, NULL, flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName, bodydef[inputs+interns].Par->Output.Info.PgmName,
flow_eTraceType_Float32); flow_eTraceType_Float32);
else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Int32)
flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName,
flow_eTraceType_Int32);
else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Boolean) else if (bodydef[inputs+interns].Par->Output.Info.Type == pwr_eType_Boolean)
flow_SetTraceAttr( cp, NULL, flow_SetTraceAttr( cp, NULL,
bodydef[inputs+interns].Par->Output.Info.PgmName, bodydef[inputs+interns].Par->Output.Info.PgmName,
......
...@@ -4393,6 +4393,15 @@ int gre_set_trace_attributes( gre_ctx grectx) ...@@ -4393,6 +4393,15 @@ int gre_set_trace_attributes( gre_ctx grectx)
case pwr_cClass_cstoai: case pwr_cClass_cstoai:
case pwr_cClass_cstoao: case pwr_cClass_cstoao:
case pwr_cClass_cstoav: case pwr_cClass_cstoav:
case pwr_cClass_GetIi:
case pwr_cClass_GetIo:
case pwr_cClass_GetIv:
case pwr_cClass_stoii:
case pwr_cClass_stoio:
case pwr_cClass_stoiv:
case pwr_cClass_cstoii:
case pwr_cClass_cstoio:
case pwr_cClass_cstoiv:
sts = ldh_GetObjectBodyDef( wind->hw.ldhsession, sts = ldh_GetObjectBodyDef( wind->hw.ldhsession,
(*node_ptr)->ln.classid, "DevBody", 1, (*node_ptr)->ln.classid, "DevBody", 1,
&bodydef, &rows); &bodydef, &rows);
......
...@@ -612,6 +612,9 @@ static void xtt_activate_opengraph( Widget w, Xtt *xtt, XmAnyCallbackStruct *dat ...@@ -612,6 +612,9 @@ static void xtt_activate_opengraph( Widget w, Xtt *xtt, XmAnyCallbackStruct *dat
case pwr_eType_Float32: case pwr_eType_Float32:
sprintf( filename, "pwr_exe:pwr_t_float32.pwg"); sprintf( filename, "pwr_exe:pwr_t_float32.pwg");
break; break;
case pwr_eType_Int32:
sprintf( filename, "pwr_exe:pwr_t_int32.pwg");
break;
case pwr_eType_Boolean: case pwr_eType_Boolean:
sprintf( filename, "pwr_exe:pwr_t_boolean.pwg"); sprintf( filename, "pwr_exe:pwr_t_boolean.pwg");
break; break;
......
This diff is collapsed.
...@@ -44,6 +44,7 @@ typedef struct { ...@@ -44,6 +44,7 @@ typedef struct {
} graph_sObjectFunction; } graph_sObjectFunction;
static int graph_attr_float32( Graph *graph, pwr_sAttrRef *attrref); static int graph_attr_float32( Graph *graph, pwr_sAttrRef *attrref);
static int graph_attr_int32( Graph *graph, pwr_sAttrRef *attrref);
static int graph_attr_boolean( Graph *graph, pwr_sAttrRef *attrref); static int graph_attr_boolean( Graph *graph, pwr_sAttrRef *attrref);
static int graph_object_ix( Graph *graph, pwr_tObjid objid); static int graph_object_ix( Graph *graph, pwr_tObjid objid);
static int graph_object_ax( Graph *graph, pwr_tObjid objid); static int graph_object_ax( Graph *graph, pwr_tObjid objid);
...@@ -199,13 +200,15 @@ int Graph::init_object_graph( int mode) ...@@ -199,13 +200,15 @@ int Graph::init_object_graph( int mode)
sts = gdh_NameToAttrref( pwr_cNObjid, object_name, &attrref); sts = gdh_NameToAttrref( pwr_cNObjid, object_name, &attrref);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
if ( strcmp( classname, "float32") == 0) if ( strcmp( classname, "float32") == 0) {
{
sts = graph_attr_float32( this, &attrref); sts = graph_attr_float32( this, &attrref);
return sts; return sts;
} }
else if ( strcmp( classname, "boolean") == 0) if ( strcmp( classname, "int32") == 0) {
{ sts = graph_attr_int32( this, &attrref);
return sts;
}
else if ( strcmp( classname, "boolean") == 0) {
sts = graph_attr_boolean( this, &attrref); sts = graph_attr_boolean( this, &attrref);
return sts; return sts;
} }
...@@ -269,7 +272,42 @@ static int graph_attr_float32( Graph *graph, pwr_sAttrRef *attrref) ...@@ -269,7 +272,42 @@ static int graph_attr_float32( Graph *graph, pwr_sAttrRef *attrref)
} }
// //
// Attribute graph for Float32 // Attribute graph for Int32
//
typedef struct {
graph_sObjectTrend td;
} graph_sAttrInt32;
static void graph_attr_int32_scan( Graph *graph)
{
graph_sAttrInt32 *od = (graph_sAttrInt32 *)graph->graph_object_data;
graph->trend_scan( &od->td);
}
static void graph_attr_int32_close( Graph *graph)
{
free( graph->graph_object_data);
}
static int graph_attr_int32( Graph *graph, pwr_sAttrRef *attrref)
{
int sts;
graph_sAttrInt32 *od;
od = (graph_sAttrInt32 *) calloc( 1, sizeof(graph_sAttrInt32));
graph->graph_object_data = (void *) od;
graph->graph_object_close = graph_attr_int32_close;
graph->graph_object_scan = graph_attr_int32_scan;
sts = graph->trend_init( &od->td, pwr_cNObjid);
return 1;
}
//
// Attribute graph for Boolean
// //
typedef struct { typedef struct {
......
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