Commit 3d9919a1 authored by claes's avatar claes

Type graph for UInt32

parent 78f61156
/* /*
* Proview $Id: xtt_main.cpp,v 1.4 2007-05-16 12:37:39 claes Exp $ * Proview $Id: xtt_main.cpp,v 1.5 2007-11-30 08:18:27 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
...@@ -353,6 +353,9 @@ void Xtt::activate_opengraph() ...@@ -353,6 +353,9 @@ void Xtt::activate_opengraph()
case pwr_eType_Int32: case pwr_eType_Int32:
sprintf( filename, "pwr_exe:pwr_t_int32.pwg"); sprintf( filename, "pwr_exe:pwr_t_int32.pwg");
break; break;
case pwr_eType_UInt32:
sprintf( filename, "pwr_exe:pwr_t_uint32.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.
/* /*
* Proview $Id: ge_graph_object.cpp,v 1.17 2007-09-12 08:56:36 claes Exp $ * Proview $Id: ge_graph_object.cpp,v 1.18 2007-11-30 08:18:27 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
...@@ -44,6 +44,7 @@ typedef struct { ...@@ -44,6 +44,7 @@ typedef struct {
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_int32( Graph *graph, pwr_sAttrRef *attrref);
static int graph_attr_uint32( 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_sAttrRef *attrref); static int graph_object_ix( Graph *graph, pwr_sAttrRef *attrref);
static int graph_object_ax( Graph *graph, pwr_sAttrRef *attrref); static int graph_object_ax( Graph *graph, pwr_sAttrRef *attrref);
...@@ -226,6 +227,10 @@ int Graph::init_object_graph( int mode) ...@@ -226,6 +227,10 @@ int Graph::init_object_graph( int mode)
sts = graph_attr_int32( this, &attrref); sts = graph_attr_int32( this, &attrref);
return sts; return sts;
} }
if ( strcmp( classname, "uint32") == 0) {
sts = graph_attr_uint32( this, &attrref);
return sts;
}
else if ( strcmp( classname, "boolean") == 0) { else if ( strcmp( classname, "boolean") == 0) {
sts = graph_attr_boolean( this, &attrref); sts = graph_attr_boolean( this, &attrref);
return sts; return sts;
...@@ -324,6 +329,41 @@ static int graph_attr_int32( Graph *graph, pwr_sAttrRef *attrref) ...@@ -324,6 +329,41 @@ static int graph_attr_int32( Graph *graph, pwr_sAttrRef *attrref)
return 1; return 1;
} }
//
// Attribute graph for UInt32
//
typedef struct {
graph_sObjectTrend td;
} graph_sAttrUInt32;
static void graph_attr_uint32_scan( Graph *graph)
{
graph_sAttrUInt32 *od = (graph_sAttrUInt32 *)graph->graph_object_data;
graph->trend_scan( &od->td);
}
static void graph_attr_uint32_close( Graph *graph)
{
free( graph->graph_object_data);
}
static int graph_attr_uint32( Graph *graph, pwr_sAttrRef *attrref)
{
int sts;
graph_sAttrUInt32 *od;
od = (graph_sAttrUInt32 *) calloc( 1, sizeof(graph_sAttrUInt32));
graph->graph_object_data = (void *) od;
graph->graph_object_close = graph_attr_uint32_close;
graph->graph_object_scan = graph_attr_uint32_scan;
sts = graph->trend_init( &od->td, 0);
return 1;
}
// //
// Attribute graph for Boolean // Attribute graph for Boolean
// //
......
/* /*
* Proview $Id: xtt_c_object.cpp,v 1.16 2007-01-04 08:22:46 claes Exp $ * Proview $Id: xtt_c_object.cpp,v 1.17 2007-11-30 08:18:27 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
...@@ -1413,6 +1413,12 @@ static pwr_tStatus OpenTypeGraph( xmenu_sMenuCall *ip) ...@@ -1413,6 +1413,12 @@ static pwr_tStatus OpenTypeGraph( xmenu_sMenuCall *ip)
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;
case pwr_eType_Int32:
sprintf( filename, "pwr_exe:pwr_t_int32.pwg");
break;
case pwr_eType_UInt32:
sprintf( filename, "pwr_exe:pwr_t_uint32.pwg");
break;
default: default:
return XNAV__SUCCESS; return XNAV__SUCCESS;
} }
...@@ -1451,6 +1457,8 @@ static pwr_tStatus OpenTypeGraphFilter( xmenu_sMenuCall *ip) ...@@ -1451,6 +1457,8 @@ static pwr_tStatus OpenTypeGraphFilter( xmenu_sMenuCall *ip)
switch ( attr_type) { switch ( attr_type) {
case pwr_eType_Float32: case pwr_eType_Float32:
case pwr_eType_Boolean: case pwr_eType_Boolean:
case pwr_eType_Int32:
case pwr_eType_UInt32:
return XNAV__SUCCESS; return XNAV__SUCCESS;
break; break;
default: default:
......
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