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};
......@@ -630,11 +630,17 @@ void brow_Redraw( brow_tCtx ctx, double y_redraw)
}
void brow_SetAnnotPixmap( brow_tNode node, int number,
flow_sAnnotPixmap *pixmap)
flow_sAnnotPixmap *pixmap)
{
((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)
{
((FlowNode *)node)->remove_annot_pixmap( number);
......
......@@ -220,7 +220,9 @@ void brow_SetNodraw( brow_tCtx ctx);
void brow_ResetNodraw( brow_tCtx ctx);
void brow_Redraw( brow_tCtx ctx, double y_redraw);
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_AllocAnnotPixmap( brow_tCtx ctx, flow_sPixmapData *pixmap_data,
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)
{
......
......@@ -102,6 +102,7 @@ class FlowNode : public FlowArrayElem {
{ *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,
int nodraw);
void get_annot_pixmap( int num, flow_sAnnotPixmap **pixmap);
void remove_annot_pixmap( int num);
double x_right;
double x_left;
......
......@@ -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);
if ( EVEN(sts)) return sts;
break;
case graph_eDatabase_Local:
p = (pwr_tBoolean *)dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
break;
case graph_eDatabase_Ccm:
sts = dyn->graph->ccm_ref_variable( parsed_name, attr_type, (void **)&p);
if ( EVEN(sts)) return sts;
......
......@@ -43,7 +43,7 @@
#include "co_cdh.h"
#include "co_time.h"
#include "pwr_baseclasses.h"
// #include "pwr_basecomponentclasses.h"
#include "xtt_ssaboxclasses.h"
#include "rt_gdh.h"
#include "co_dcli.h"
#include "ge_msg.h"
......@@ -575,14 +575,25 @@ static int graph_object_ix( Graph *graph, pwr_sAttrRef *arp)
//
typedef struct {
grow_tObject trend_object;
grow_tObject hold_button_object;
float *scan_time_p;
float old_scan_time;
double *data_scan_time_p;
int *hold_button_p;
int *hold_p;
} graph_sObjectDx;
pwr_tCid cid;
grow_tObject trend_object;
grow_tObject hold_button_object;
float *scan_time_p;
float old_scan_time;
double *data_scan_time_p;
int *hold_button_p;
int *hold_p;
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)
{
......@@ -602,11 +613,37 @@ static void graph_object_dx_scan( Graph *graph)
if ( od->hold_button_p && od->hold_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)
{
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);
}
......@@ -616,11 +653,17 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp)
graph_sObjectDx *od;
double scan_time;
GeDyn *dyn;
pwr_tAttrRef aref, chanaref;
pwr_tAName aname;
pwr_tCid card_cid;
od = (graph_sObjectDx *) calloc( 1, sizeof(graph_sObjectDx));
graph->graph_object_data = (void *) od;
graph->graph_object_close = graph_object_dx_close;
sts = gdh_GetAttrRefTid( arp, &od->cid);
if ( EVEN(sts)) return sts;
// Configure trend
sts = grow_FindObjectByName( graph->grow->ctx, "ActualValueTrend",
&od->trend_object);
......@@ -644,6 +687,150 @@ static int graph_object_dx( Graph *graph, pwr_sAttrRef *arp)
od->data_scan_time_p = dyn->ref_trend_scantime();
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
graph->graph_object_scan = graph_object_dx_scan;
return 1;
......
This diff is collapsed.
......@@ -51,67 +51,69 @@
#include "rt_xnav_msg.h"
typedef enum {
xnav_eItemType_Object,
xnav_eItemType_Attr,
xnav_eItemType_AttrArray,
xnav_eItemType_AttrArrayElem,
xnav_eItemType_Header,
xnav_eItemType_HeaderLarge,
xnav_eItemType_Text,
xnav_eItemType_Collect,
xnav_eItemType_Plc,
xnav_eItemType_Menu,
xnav_eItemType_Command,
xnav_eItemType_File,
xnav_eItemType_Crossref,
xnav_eItemType_Local,
xnav_eItemType_Table,
xnav_eItemType_TableHeader,
xnav_eItemType_Device,
xnav_eItemType_Channel,
xnav_eItemType_RemNode,
xnav_eItemType_RemTrans,
xnav_eItemType_Help,
xnav_eItemType_HelpBold,
xnav_eItemType_HelpHeader,
xnav_eItemType_ObjectStruct,
xnav_eItemType_AttrObject,
xnav_eItemType_Enum,
xnav_eItemType_Mask
} xnav_eItemType;
xnav_eItemType_Object,
xnav_eItemType_Attr,
xnav_eItemType_AttrArray,
xnav_eItemType_AttrArrayElem,
xnav_eItemType_Header,
xnav_eItemType_HeaderLarge,
xnav_eItemType_Text,
xnav_eItemType_Collect,
xnav_eItemType_Plc,
xnav_eItemType_Menu,
xnav_eItemType_Command,
xnav_eItemType_File,
xnav_eItemType_Crossref,
xnav_eItemType_Local,
xnav_eItemType_Table,
xnav_eItemType_TableHeader,
xnav_eItemType_Device,
xnav_eItemType_Channel,
xnav_eItemType_RemNode,
xnav_eItemType_RemTrans,
xnav_eItemType_Help,
xnav_eItemType_HelpBold,
xnav_eItemType_HelpHeader,
xnav_eItemType_ObjectStruct,
xnav_eItemType_AttrObject,
xnav_eItemType_Enum,
xnav_eItemType_Mask
} xnav_eItemType;
typedef enum {
item_eDisplayType_Attr,
item_eDisplayType_Path
} item_eDisplayType;
item_eDisplayType_Attr,
item_eDisplayType_Path
} item_eDisplayType;
typedef enum {
item_eFileType_Unknown,
item_eFileType_Script,
item_eFileType_Graph,
item_eFileType_RttLog
} item_eFileType;
item_eFileType_Unknown,
item_eFileType_Script,
item_eFileType_Graph,
item_eFileType_RttLog
} item_eFileType;
typedef struct {
char title[10][32];
int table_cnt;
} item_sTableHeader;
char title[10][32];
int table_cnt;
} item_sTableHeader;
typedef struct {
pwr_tSubid subid[8];
int subid_cnt;
} item_sTableSubid;
pwr_tSubid subid[8];
int subid_cnt;
} item_sTableSubid;
typedef struct {
struct {
char fix_str[80];
int type_id;
int size;
void *value_p;
char format[16];
} elem[10];
int elem_cnt;
} item_sTable;
struct {
char fix_str[80];
int type_id;
int size;
void *value_p;
char format[16];
} elem[10];
void *user;
int elem_cnt;
} item_sTable;
class Item {
public:
......
This diff is collapsed.
......@@ -545,7 +545,8 @@ class XNav {
int show_subcli();
int show_device();
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_remnode();
int show_remtrans( pwr_tObjid remnode_objid);
......
This diff is collapsed.
This diff is collapsed.
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