Commit 5cf3d519 authored by Claes Sjofors's avatar Claes Sjofors

Show inverted/teston/conversion for channel/signal in xtt (refs #93)

parent fa7ebe71
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#define xnav_bitmap_inverted_10_width 10
#define xnav_bitmap_inverted_10_height 10
static unsigned char xnav_bitmap_inverted_10_bits[] = {
0x00, 0x00, 0xe0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x0f, 0x02, 0x08, 0x02,
0x10, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_12_width 12
#define xnav_bitmap_inverted_12_height 12
static unsigned char xnav_bitmap_inverted_12_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x40, 0x04, 0x20, 0x08, 0x3f, 0x08,
0x20, 0x08, 0x40, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_14_width 14
#define xnav_bitmap_inverted_14_height 14
static unsigned char xnav_bitmap_inverted_14_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x08, 0x40, 0x10, 0x20, 0x20,
0x3f, 0x20, 0x20, 0x20, 0x40, 0x10, 0x80, 0x08, 0x00, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_16_width 16
#define xnav_bitmap_inverted_16_height 16
static unsigned char xnav_bitmap_inverted_16_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x80, 0x31, 0x40, 0x40, 0x40, 0x40,
0x20, 0x80, 0x3f, 0x80, 0x20, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x31,
0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_18_width 18
#define xnav_bitmap_inverted_18_height 18
static unsigned char xnav_bitmap_inverted_18_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
0x00, 0xc6, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x80, 0x00, 0x02,
0xff, 0x00, 0x02, 0x80, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01,
0x00, 0xc6, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_20_width 20
#define xnav_bitmap_inverted_20_height 20
static unsigned char xnav_bitmap_inverted_20_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x06, 0x03,
0x00, 0x01, 0x04, 0x00, 0x01, 0x04, 0x80, 0x00, 0x08, 0x80, 0x00, 0x08,
0xff, 0x00, 0x08, 0x80, 0x00, 0x08, 0x80, 0x00, 0x08, 0x00, 0x01, 0x04,
0x00, 0x01, 0x04, 0x00, 0x06, 0x03, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_24_width 24
#define xnav_bitmap_inverted_24_height 24
static unsigned char xnav_bitmap_inverted_24_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x60, 0x30, 0x00, 0x10, 0x40,
0x00, 0x10, 0x40, 0x00, 0x08, 0x80, 0x00, 0x08, 0x80, 0xff, 0x0f, 0x80,
0x00, 0x08, 0x80, 0x00, 0x08, 0x80, 0x00, 0x10, 0x40, 0x00, 0x10, 0x40,
0x00, 0x60, 0x30, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_inverted_8_width 8
#define xnav_bitmap_inverted_8_height 8
static unsigned char xnav_bitmap_inverted_8_bits[] = {
0x00, 0x70, 0x88, 0x8f, 0x88, 0x70, 0x00, 0x00};
#define xnav_bitmap_offline_10_width 10
#define xnav_bitmap_offline_10_height 10
static unsigned char xnav_bitmap_offline_10_bits[] = {
0xff, 0x01, 0x01, 0x01, 0x45, 0x01, 0x29, 0x01, 0x11, 0x01, 0x29, 0x01,
0x45, 0x01, 0x01, 0x01, 0xff, 0x01, 0x00, 0x00};
#define xnav_bitmap_offline_12_width 12
#define xnav_bitmap_offline_12_height 12
static unsigned char xnav_bitmap_offline_12_bits[] = {
0xff, 0x07, 0x01, 0x04, 0x05, 0x05, 0x89, 0x04, 0x51, 0x04, 0x21, 0x04,
0x51, 0x04, 0x89, 0x04, 0x05, 0x05, 0x01, 0x04, 0xff, 0x07, 0x00, 0x00};
#define xnav_bitmap_offline_14_width 14
#define xnav_bitmap_offline_14_height 14
static unsigned char xnav_bitmap_offline_14_bits[] = {
0xff, 0x1f, 0x01, 0x10, 0x05, 0x14, 0x09, 0x12, 0x11, 0x11, 0xa1, 0x10,
0x41, 0x10, 0xa1, 0x10, 0x11, 0x11, 0x09, 0x12, 0x05, 0x14, 0x01, 0x10,
0xff, 0x1f, 0x00, 0x00};
#define xnav_bitmap_offline_16_width 16
#define xnav_bitmap_offline_16_height 16
static unsigned char xnav_bitmap_offline_16_bits[] = {
0xff, 0x7f, 0x01, 0x40, 0x05, 0x50, 0x09, 0x48, 0x11, 0x44, 0x21, 0x42,
0x41, 0x41, 0x81, 0x40, 0x41, 0x41, 0x21, 0x42, 0x11, 0x44, 0x09, 0x48,
0x05, 0x50, 0x01, 0x40, 0xff, 0x7f, 0x00, 0x00};
#define xnav_bitmap_offline_18_width 18
#define xnav_bitmap_offline_18_height 18
static unsigned char xnav_bitmap_offline_18_bits[] = {
0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x02, 0x80, 0x00, 0x1a, 0xb0, 0x00,
0x32, 0x98, 0x00, 0x62, 0x8c, 0x00, 0xc2, 0x86, 0x00, 0x82, 0x83, 0x00,
0x82, 0x83, 0x00, 0xc2, 0x86, 0x00, 0x62, 0x8c, 0x00, 0x32, 0x98, 0x00,
0x1a, 0xb0, 0x00, 0x02, 0x80, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_offline_20_width 20
#define xnav_bitmap_offline_20_height 20
static unsigned char xnav_bitmap_offline_20_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x04, 0x00, 0x01,
0x34, 0x60, 0x01, 0x64, 0x30, 0x01, 0xc4, 0x18, 0x01, 0x84, 0x0d, 0x01,
0x04, 0x07, 0x01, 0x04, 0x07, 0x01, 0x84, 0x0d, 0x01, 0xc4, 0x18, 0x01,
0x64, 0x30, 0x01, 0x34, 0x60, 0x01, 0x04, 0x00, 0x01, 0xfc, 0xff, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_offline_24_width 24
#define xnav_bitmap_offline_24_height 24
static unsigned char xnav_bitmap_offline_24_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x1f, 0x02, 0x00, 0x10,
0x02, 0x00, 0x10, 0x32, 0x00, 0x13, 0x62, 0x80, 0x11, 0xc2, 0xc0, 0x10,
0x82, 0x61, 0x10, 0x02, 0x33, 0x10, 0x02, 0x1e, 0x10, 0x02, 0x0c, 0x10,
0x02, 0x1e, 0x10, 0x02, 0x33, 0x10, 0x82, 0x61, 0x10, 0xc2, 0xc0, 0x10,
0x62, 0x80, 0x11, 0x32, 0x00, 0x13, 0x02, 0x00, 0x10, 0x02, 0x00, 0x10,
0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_offline_8_width 8
#define xnav_bitmap_offline_8_height 8
static unsigned char xnav_bitmap_offline_8_bits[] = {
0x7f, 0x63, 0x55, 0x49, 0x55, 0x63, 0x7f, 0x00};
#define xnav_bitmap_teston_10_width 10
#define xnav_bitmap_teston_10_height 10
static unsigned char xnav_bitmap_teston_10_bits[] = {
0x00, 0x00, 0xfe, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_12_width 12
#define xnav_bitmap_teston_12_height 12
static unsigned char xnav_bitmap_teston_12_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_14_width 14
#define xnav_bitmap_teston_14_height 14
static unsigned char xnav_bitmap_teston_14_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00,
0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00,
0x40, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_16_width 16
#define xnav_bitmap_teston_16_height 16
static unsigned char xnav_bitmap_teston_16_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0xfe, 0x7f, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00};
#define xnav_bitmap_teston_18_width 18
#define xnav_bitmap_teston_18_height 18
static unsigned char xnav_bitmap_teston_18_bits[] = {
0x00, 0x00, 0x00, 0xfe, 0xff, 0x01, 0xfe, 0xff, 0x01, 0x00, 0x03, 0x00,
0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_20_width 20
#define xnav_bitmap_teston_20_height 20
static unsigned char xnav_bitmap_teston_20_bits[] = {
0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x03,
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00,
0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_24_width 24
#define xnav_bitmap_teston_24_height 24
static unsigned char xnav_bitmap_teston_24_bits[] = {
0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0xfe, 0xff, 0x3f, 0xfe, 0xff, 0x3f,
0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#define xnav_bitmap_teston_8_width 8
#define xnav_bitmap_teston_8_height 8
static unsigned char xnav_bitmap_teston_8_bits[] = {
0x00, 0x3e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00};
...@@ -635,6 +635,12 @@ void brow_SetAnnotPixmap( brow_tNode node, int number, ...@@ -635,6 +635,12 @@ void brow_SetAnnotPixmap( brow_tNode node, int number,
((FlowNode *)node)->set_annot_pixmap( number, pixmap, 0); ((FlowNode *)node)->set_annot_pixmap( number, pixmap, 0);
} }
void brow_GetAnnotPixmap( brow_tNode node, int number,
flow_sAnnotPixmap **pixmap)
{
((FlowNode *)node)->get_annot_pixmap( number, pixmap);
}
void brow_RemoveAnnotPixmap( brow_tNode node, int number) void brow_RemoveAnnotPixmap( brow_tNode node, int number)
{ {
((FlowNode *)node)->remove_annot_pixmap( number); ((FlowNode *)node)->remove_annot_pixmap( number);
......
...@@ -221,6 +221,8 @@ void brow_ResetNodraw( brow_tCtx ctx); ...@@ -221,6 +221,8 @@ void brow_ResetNodraw( brow_tCtx ctx);
void brow_Redraw( brow_tCtx ctx, double y_redraw); void brow_Redraw( brow_tCtx ctx, double y_redraw);
void brow_SetAnnotPixmap( brow_tNode node, int number, void brow_SetAnnotPixmap( brow_tNode node, int number,
flow_sAnnotPixmap *pixmap); flow_sAnnotPixmap *pixmap);
void brow_GetAnnotPixmap( brow_tNode node, int number,
flow_sAnnotPixmap **pixmap);
void brow_RemoveAnnotPixmap( brow_tNode node, int number); void brow_RemoveAnnotPixmap( brow_tNode node, int number);
void brow_AllocAnnotPixmap( brow_tCtx ctx, flow_sPixmapData *pixmap_data, void brow_AllocAnnotPixmap( brow_tCtx ctx, flow_sPixmapData *pixmap_data,
flow_sAnnotPixmap **pixmap); flow_sAnnotPixmap **pixmap);
......
...@@ -722,6 +722,11 @@ void FlowNode::set_annot_pixmap( int num, flow_sAnnotPixmap *pixmap, ...@@ -722,6 +722,11 @@ void FlowNode::set_annot_pixmap( int num, flow_sAnnotPixmap *pixmap,
} }
void FlowNode::get_annot_pixmap( int num, flow_sAnnotPixmap **pixmap)
{
*pixmap = annotpixmapv[num];
}
void FlowNode::remove_annot_pixmap( int num) void FlowNode::remove_annot_pixmap( int num)
{ {
......
...@@ -102,6 +102,7 @@ class FlowNode : public FlowArrayElem { ...@@ -102,6 +102,7 @@ class FlowNode : public FlowArrayElem {
{ *ll_x = x_left; *ll_y = y_low; *ur_x = x_right; *ur_y = y_high;}; { *ll_x = x_left; *ll_y = y_low; *ur_x = x_right; *ur_y = y_high;};
void set_annot_pixmap( int num, flow_sAnnotPixmap *pixmap, void set_annot_pixmap( int num, flow_sAnnotPixmap *pixmap,
int nodraw); int nodraw);
void get_annot_pixmap( int num, flow_sAnnotPixmap **pixmap);
void remove_annot_pixmap( int num); void remove_annot_pixmap( int num);
double x_right; double x_right;
double x_left; double x_left;
......
...@@ -2957,6 +2957,9 @@ int GeInvisible::connect( grow_tObject object, glow_sTraceData *trace_data) ...@@ -2957,6 +2957,9 @@ int GeInvisible::connect( grow_tObject object, glow_sTraceData *trace_data)
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&p, &subid, size); sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&p, &subid, size);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
break; break;
case graph_eDatabase_Local:
p = (pwr_tBoolean *)dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
break;
case graph_eDatabase_Ccm: case graph_eDatabase_Ccm:
sts = dyn->graph->ccm_ref_variable( parsed_name, attr_type, (void **)&p); sts = dyn->graph->ccm_ref_variable( parsed_name, attr_type, (void **)&p);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "co_cdh.h" #include "co_cdh.h"
#include "co_time.h" #include "co_time.h"
#include "pwr_baseclasses.h" #include "pwr_baseclasses.h"
// #include "pwr_basecomponentclasses.h" #include "xtt_ssaboxclasses.h"
#include "rt_gdh.h" #include "rt_gdh.h"
#include "co_dcli.h" #include "co_dcli.h"
#include "ge_msg.h" #include "ge_msg.h"
...@@ -575,6 +575,7 @@ static int graph_object_ix( Graph *graph, pwr_sAttrRef *arp) ...@@ -575,6 +575,7 @@ static int graph_object_ix( Graph *graph, pwr_sAttrRef *arp)
// //
typedef struct { typedef struct {
pwr_tCid cid;
grow_tObject trend_object; grow_tObject trend_object;
grow_tObject hold_button_object; grow_tObject hold_button_object;
float *scan_time_p; float *scan_time_p;
...@@ -582,7 +583,17 @@ typedef struct { ...@@ -582,7 +583,17 @@ typedef struct {
double *data_scan_time_p; double *data_scan_time_p;
int *hold_button_p; int *hold_button_p;
int *hold_p; int *hold_p;
} graph_sObjectDx; pwr_tBoolean *conv_p;
pwr_tBoolean *inv_p;
pwr_tBoolean *test_p;
pwr_tSubid conv_subid;
pwr_tSubid inv_subid;
pwr_tSubid test_subid;
pwr_tBoolean *local_conv_p;
pwr_tBoolean *local_inv_p;
pwr_tBoolean *local_test_p;
pwr_tMask mask;
} graph_sObjectDx;
static void graph_object_dx_scan( Graph *graph) static void graph_object_dx_scan( Graph *graph)
{ {
...@@ -602,11 +613,37 @@ static void graph_object_dx_scan( Graph *graph) ...@@ -602,11 +613,37 @@ static void graph_object_dx_scan( Graph *graph)
if ( od->hold_button_p && od->hold_p) if ( od->hold_button_p && od->hold_p)
*od->hold_p = *od->hold_button_p; *od->hold_p = *od->hold_button_p;
if ( od->mask) {
if ( od->local_conv_p && od->conv_p)
*od->local_conv_p = *od->conv_p & od->mask ? 1 : 0;
if ( od->local_inv_p && od->inv_p)
*od->local_inv_p = *od->inv_p & od->mask ? 1 : 0;
if ( od->local_test_p && od->test_p)
*od->local_test_p = *od->test_p & od->mask ? 1 : 0;
}
else {
if ( od->local_conv_p && od->conv_p)
*od->local_conv_p = *od->conv_p;
if ( od->local_inv_p && od->inv_p)
*od->local_inv_p = *od->inv_p;
if ( od->local_test_p && od->test_p)
*od->local_test_p = *od->test_p;
}
} }
static void graph_object_dx_close( Graph *graph) static void graph_object_dx_close( Graph *graph)
{ {
graph_sObjectDx *od = (graph_sObjectDx *)graph->graph_object_data;
if ( od->local_conv_p && od->conv_p)
gdh_UnrefObjectInfo( od->conv_subid);
if ( od->local_inv_p && od->inv_p)
gdh_UnrefObjectInfo( od->inv_subid);
if ( od->local_conv_p && od->test_p)
gdh_UnrefObjectInfo( od->test_subid);
free( graph->graph_object_data); free( graph->graph_object_data);
} }
...@@ -616,11 +653,17 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp) ...@@ -616,11 +653,17 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp)
graph_sObjectDx *od; graph_sObjectDx *od;
double scan_time; double scan_time;
GeDyn *dyn; GeDyn *dyn;
pwr_tAttrRef aref, chanaref;
pwr_tAName aname;
pwr_tCid card_cid;
od = (graph_sObjectDx *) calloc( 1, sizeof(graph_sObjectDx)); od = (graph_sObjectDx *) calloc( 1, sizeof(graph_sObjectDx));
graph->graph_object_data = (void *) od; graph->graph_object_data = (void *) od;
graph->graph_object_close = graph_object_dx_close; graph->graph_object_close = graph_object_dx_close;
sts = gdh_GetAttrRefTid( arp, &od->cid);
if ( EVEN(sts)) return sts;
// Configure trend // Configure trend
sts = grow_FindObjectByName( graph->grow->ctx, "ActualValueTrend", sts = grow_FindObjectByName( graph->grow->ctx, "ActualValueTrend",
&od->trend_object); &od->trend_object);
...@@ -644,6 +687,150 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp) ...@@ -644,6 +687,150 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp)
od->data_scan_time_p = dyn->ref_trend_scantime(); od->data_scan_time_p = dyn->ref_trend_scantime();
od->hold_p = dyn->ref_trend_hold(); od->hold_p = dyn->ref_trend_hold();
// Get channel object
sts = gdh_ArefANameToAref( arp, "SigChanCon", &aref);
if ( EVEN(sts)) return sts;
sts = gdh_GetObjectInfoAttrref( &aref, &chanaref, sizeof(chanaref));
if ( EVEN(sts)) return sts;
od->local_conv_p = (pwr_tBoolean *) graph->localdb_ref_or_create( "ConversionOn",
pwr_eType_Boolean);
od->local_inv_p = (pwr_tBoolean *) graph->localdb_ref_or_create( "InvertOn",
pwr_eType_Boolean);
od->local_test_p = (pwr_tBoolean *) graph->localdb_ref_or_create( "TestOn",
pwr_eType_Boolean);
// Get card object
if ( chanaref.Flags.b.ObjectAttr) {
sts = gdh_GetObjectClass( chanaref.Objid, &card_cid);
if ( EVEN(sts)) return sts;
}
else
card_cid = 0;
switch ( card_cid) {
case pwr_cClass_Ssab_DI32D: {
pwr_tAName card_name;
unsigned int chan_idx = (chanaref.Offset - pwr_AlignLW(sizeof(pwr_sClass_Ssab_BaseDiCard))) / pwr_AlignLW(sizeof(pwr_sClass_ChanDi));
sts = gdh_ObjidToName( chanaref.Objid, card_name, sizeof(card_name), cdh_mNName);
if ( EVEN(sts)) return sts;
if ( chan_idx < 16) {
strcpy( aname, card_name);
strcat( aname, ".ConvMask1");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->conv_p, &od->conv_subid,
sizeof(pwr_tBoolean), true);
strcpy( aname, card_name);
strcat( aname, ".InvMask1");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->inv_p, &od->inv_subid,
sizeof(pwr_tBoolean), true);
od->mask = 1 << chan_idx;
}
else if ( chan_idx < 32) {
strcpy( aname, card_name);
strcat( aname, ".ConvMask2");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->conv_p, &od->conv_subid,
sizeof(pwr_tBoolean), true);
strcpy( aname, card_name);
strcat( aname, ".InvMask2");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->inv_p, &od->inv_subid,
sizeof(pwr_tBoolean), true);
od->mask = 1 << (chan_idx - 16);
}
else
return 0;
break;
}
case pwr_cClass_Ssab_DO32DKS:
case pwr_cClass_Ssab_DO32DKS_Stall: {
pwr_tAName card_name;
unsigned int chan_idx = (chanaref.Offset - pwr_AlignLW(sizeof(pwr_sClass_Ssab_BaseDoCard))) / pwr_AlignLW(sizeof(pwr_sClass_ChanDo));
sts = gdh_ObjidToName( chanaref.Objid, card_name, sizeof(card_name), cdh_mNName);
if ( EVEN(sts)) return sts;
if ( chan_idx < 16) {
strcpy( aname, card_name);
strcat( aname, ".TestMask1");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->test_p, &od->test_subid,
sizeof(pwr_tBoolean), true);
strcpy( aname, card_name);
strcat( aname, ".InvMask1");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->inv_p, &od->inv_subid,
sizeof(pwr_tBoolean), true);
od->mask = 1 << chan_idx;
}
else if ( chan_idx < 32) {
strcpy( aname, card_name);
strcat( aname, ".TestMask2");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->test_p, &od->test_subid,
sizeof(pwr_tBoolean), true);
strcpy( aname, card_name);
strcat( aname, ".InvMask2");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->inv_p, &od->inv_subid,
sizeof(pwr_tBoolean), true);
od->mask = 1 << (chan_idx - 16);
}
else
return 0;
if ( od->local_conv_p)
*od->local_conv_p = 1;
break;
}
default: {
pwr_tAName chan_name;
sts = gdh_AttrrefToName( &chanaref, chan_name, sizeof(chan_name),
cdh_mNName);
if ( ODD(sts)) {
if ( od->cid == pwr_cClass_Di) {
strcpy( aname, chan_name);
strcat( aname, ".ConversionOn");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->conv_p, &od->conv_subid,
sizeof(pwr_tBoolean), true);
}
strcpy( aname, chan_name);
strcat( aname, ".InvertOn");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->inv_p, &od->inv_subid,
sizeof(pwr_tBoolean), true);
if ( od->cid == pwr_cClass_Do) {
strcpy( aname, chan_name);
strcat( aname, ".TestOn");
graph->ref_object_info( glow_eCycle_Slow, aname, (void **)&od->test_p, &od->test_subid,
sizeof(pwr_tBoolean), true);
if ( od->local_conv_p)
*od->local_conv_p = 1;
}
}
}
}
// Register scan function // Register scan function
graph->graph_object_scan = graph_object_dx_scan; graph->graph_object_scan = graph_object_dx_scan;
return 1; return 1;
......
This diff is collapsed.
...@@ -78,29 +78,30 @@ typedef enum { ...@@ -78,29 +78,30 @@ typedef enum {
xnav_eItemType_AttrObject, xnav_eItemType_AttrObject,
xnav_eItemType_Enum, xnav_eItemType_Enum,
xnav_eItemType_Mask xnav_eItemType_Mask
} xnav_eItemType; } xnav_eItemType;
typedef enum { typedef enum {
item_eDisplayType_Attr, item_eDisplayType_Attr,
item_eDisplayType_Path item_eDisplayType_Path
} item_eDisplayType; } item_eDisplayType;
typedef enum { typedef enum {
item_eFileType_Unknown, item_eFileType_Unknown,
item_eFileType_Script, item_eFileType_Script,
item_eFileType_Graph, item_eFileType_Graph,
item_eFileType_RttLog item_eFileType_RttLog
} item_eFileType; } item_eFileType;
typedef struct { typedef struct {
char title[10][32]; char title[10][32];
int table_cnt; int table_cnt;
} item_sTableHeader; } item_sTableHeader;
typedef struct { typedef struct {
pwr_tSubid subid[8]; pwr_tSubid subid[8];
int subid_cnt; int subid_cnt;
} item_sTableSubid; } item_sTableSubid;
typedef struct { typedef struct {
struct { struct {
...@@ -110,8 +111,9 @@ typedef struct { ...@@ -110,8 +111,9 @@ typedef struct {
void *value_p; void *value_p;
char format[16]; char format[16];
} elem[10]; } elem[10];
void *user;
int elem_cnt; int elem_cnt;
} item_sTable; } item_sTable;
class Item { class Item {
public: public:
......
/* xtt_ssaboxclasses.h */
/* Note !!!. */
/* These classes are copied from pwr_ssaboxclasses.h and has to be */
/* updated when these classes are modified. */
#ifndef xtt_ssaboxclasses_h
#define xtt_ssaboxclasses_h
#ifndef pwr_class_h
#include "pwr_class.h"
#endif
#define pwr_cClass_Ssab_DI32D 4194631736UL
#define pwr_cClass_Ssab_DO32DKS 4194631744UL
#define pwr_cClass_Ssab_DO32DKS_Stall 4194631784UL
#ifndef pwr_cClass_Ssab_BaseDiCard
#define pwr_cClass_Ssab_BaseDiCard 4194631704UL
typedef struct {
pwr_tString80 Description pwr_dAlignLW;
pwr_tString40 DevName pwr_dAlignW;
pwr_tUInt32 ErrorCount pwr_dAlignW;
pwr_tUInt32 ErrorSoftLimit pwr_dAlignW;
pwr_tUInt32 ErrorHardLimit pwr_dAlignW;
pwr_tUInt16 MaxNoOfChannels pwr_dAlignW;
pwr_tUInt32 RegAddress pwr_dAlignW;
pwr_tUInt32 VectAddress pwr_dAlignW;
pwr_tIoProcessMask Process pwr_dAlignW;
pwr_tObjid ThreadObject pwr_dAlignW;
pwr_tURL DataSheet pwr_dAlignW;
pwr_tCardMask1_1 ConvMask1 pwr_dAlignW;
pwr_tCardMask2_1 ConvMask2 pwr_dAlignW;
pwr_tCardMask1_1 InvMask1 pwr_dAlignW;
pwr_tCardMask2_1 InvMask2 pwr_dAlignW;
} pwr_sClass_Ssab_BaseDiCard;
#endif
#ifndef pwr_cClass_Ssab_BaseDoCard
#define pwr_cClass_Ssab_BaseDoCard 4194631712UL
typedef struct {
pwr_tString80 Description pwr_dAlignLW;
pwr_tString40 DevName pwr_dAlignW;
pwr_tUInt32 ErrorCount pwr_dAlignW;
pwr_tUInt32 ErrorSoftLimit pwr_dAlignW;
pwr_tUInt32 ErrorHardLimit pwr_dAlignW;
pwr_tUInt16 MaxNoOfChannels pwr_dAlignW;
pwr_tUInt32 RegAddress pwr_dAlignW;
pwr_tUInt32 VectAddress pwr_dAlignW;
pwr_tIoProcessMask Process pwr_dAlignW;
pwr_tObjid ThreadObject pwr_dAlignW;
pwr_tURL DataSheet pwr_dAlignW;
pwr_tCardMask1_1 InvMask1 pwr_dAlignW;
pwr_tCardMask2_1 InvMask2 pwr_dAlignW;
pwr_tCardMask1_1 TestMask1 pwr_dAlignW;
pwr_tCardMask2_1 TestMask2 pwr_dAlignW;
pwr_tCardMask1_1 TestValue1 pwr_dAlignW;
pwr_tCardMask2_1 TestValue2 pwr_dAlignW;
pwr_tCardMask1_1 FixedOutValue1 pwr_dAlignW;
pwr_tCardMask2_1 FixedOutValue2 pwr_dAlignW;
} pwr_sClass_Ssab_BaseDoCard;
#endif
#endif
...@@ -545,7 +545,8 @@ class XNav { ...@@ -545,7 +545,8 @@ class XNav {
int show_subcli(); int show_subcli();
int show_device(); int show_device();
int show_channels( pwr_tObjid card_objid); int show_channels( pwr_tObjid card_objid);
int show_attr_channels( pwr_tAttrRef *mod_aref); int show_attr_channels( pwr_tAttrRef *mod_aref, void *cardp, pwr_tSubid *card_subid,
pwr_tCid card_cid);
int show_object( pwr_tAttrRef *oarp, brow_tNode node); int show_object( pwr_tAttrRef *oarp, brow_tNode node);
int show_remnode(); int show_remnode();
int show_remtrans( pwr_tObjid remnode_objid); int show_remtrans( pwr_tObjid remnode_objid);
......
This diff is collapsed.
...@@ -94,6 +94,9 @@ class XNavBrow { ...@@ -94,6 +94,9 @@ class XNavBrow {
flow_sAnnotPixmap *pixmap_attrref; flow_sAnnotPixmap *pixmap_attrref;
flow_sAnnotPixmap *pixmap_castattr; flow_sAnnotPixmap *pixmap_castattr;
flow_sAnnotPixmap *pixmap_plcpgm; flow_sAnnotPixmap *pixmap_plcpgm;
flow_sAnnotPixmap *pixmap_inverted;
flow_sAnnotPixmap *pixmap_teston;
flow_sAnnotPixmap *pixmap_offline;
char push_command[200]; char push_command[200];
void free_pixmaps(); void free_pixmaps();
......
This diff is collapsed.
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