Commit 716e7c69 authored by Claes Sjofors's avatar Claes Sjofors

Ge dynamic, suppor for local min and max attributes for Bar, Trend and Slider. Type graphs updated

parent 4313988b
......@@ -29,20 +29,20 @@
100 20
135 20
101 20
102 34
103 -88
104 3.31865
136 3.31865
102 121
103 -93
104 3.711
136 3.711
105 100
106 3
107 -14
107 -17
108 48.5
109 1
110 18.55
111 0.499999
116 2
116 19
117 0
118 194
118 154
119 112
120 1
121 Claes context
......@@ -2228,8 +2228,8 @@ pwr_exe:
3702
19
1904
1900 12.0079
1901 10.464
1900 12.008
1901 10.4641
1902 13.9064
1903 1.97116
1908 582
......@@ -2510,8 +2510,8 @@ pwr_exe:
23
2300 $object##Float32
2301
2302
2303
2302 $local.PresMinLimit##Float32
2303 $local.PresMaxLimit##Float32
2304
2305
2306 $local.HoldTrend##Boolean
......@@ -2641,8 +2641,8 @@ pwr_exe:
103 2
22
2200 $object##Float32
2201
2202
2201 $local.PresMinLimit##Float32
2202 $local.PresMaxLimit##Float32
99
99
99
......@@ -2860,6 +2860,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -2870,6 +2872,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3007,6 +3010,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3017,6 +3022,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3326,6 +3332,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 4
......@@ -3336,6 +3344,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3744,8 +3753,8 @@ pwr_exe:
103 2
60
6000 $object##Float32
6001
6002
6001 $local.PresMinLimit##Float32
6002 $local.PresMaxLimit##Float32
6003 !$local.SliderEnable##Boolean
6004
99
......@@ -3886,6 +3895,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3896,6 +3907,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......
......@@ -29,22 +29,22 @@
100 20
135 20
101 20
102 20
102 185
103 -63
104 3.31865
136 3.31865
104 3.711
136 3.711
105 100
106 3
107 -10
107 -11
108 48.5
109 1
110 18.55
111 0.499999
116 0
116 31
117 0
118 192
118 166
119 112
120 0
120 1
121 Claes context
122 0
126 0.5
......@@ -2228,8 +2228,8 @@ pwr_exe:
3702
19
1904
1900 12.0079
1901 10.464
1900 12.008
1901 10.4641
1902 13.9064
1903 1.97116
1908 582
......@@ -2510,8 +2510,8 @@ pwr_exe:
23
2300 $object##Int32
2301
2302
2303
2302 $local.PresMinLimit##Float32
2303 $local.PresMaxLimit##Float32
2304
2305
2306 $local.HoldTrend##Boolean
......@@ -2641,8 +2641,8 @@ pwr_exe:
103 2
22
2200 $object##Int32
2201
2202
2201 $local.PresMinLimit##Float32
2202 $local.PresMaxLimit##Float32
99
99
99
......@@ -2652,7 +2652,7 @@ pwr_exe:
3702
19
1904 O312
1900 45.8425
1900 45.8426
1901 44.2358
1902 13.9061
1903 1.97844
......@@ -2860,6 +2860,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -2870,6 +2872,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3007,6 +3010,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3017,6 +3022,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3326,6 +3332,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 4
......@@ -3336,6 +3344,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3744,8 +3753,8 @@ pwr_exe:
103 2
60
6000 $object##Int32
6001
6002
6001 $local.PresMinLimit##Float32
6002 $local.PresMaxLimit##Float32
6003 !$local.SliderEnable##Boolean
6004
99
......@@ -3886,6 +3895,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3896,6 +3907,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......
......@@ -29,20 +29,20 @@
100 20
135 20
101 20
102 17
103 -63
104 3.31865
136 3.31865
102 208
103 -68
104 3.711
136 3.711
105 100
106 2
107 -10
106 3
107 -12
108 48.5
109 1
110 18.55
111 0.499999
116 0
116 35
117 0
118 192
118 170
119 112
120 0
121 Claes context
......@@ -2228,8 +2228,8 @@ pwr_exe:
3702
19
1904
1900 12.0079
1901 10.464
1900 12.008
1901 10.4641
1902 13.9064
1903 1.97116
1908 582
......@@ -2510,8 +2510,8 @@ pwr_exe:
23
2300 $object##UInt32
2301
2302
2303
2302 $local.PresMinLimit##Float32
2303 $local.PresMaxLimit##Float32
2304
2305
2306 $local.HoldTrend##Boolean
......@@ -2641,8 +2641,8 @@ pwr_exe:
103 2
22
2200 $object##UInt32
2201
2202
2201 $local.PresMinLimit##Float32
2202 $local.PresMaxLimit##Float32
99
99
99
......@@ -2860,6 +2860,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -2870,6 +2872,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3007,6 +3010,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3017,6 +3022,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3326,6 +3332,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 4
......@@ -3336,6 +3344,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......@@ -3744,8 +3753,8 @@ pwr_exe:
103 2
60
6000 $object##Int32
6001
6002
6001 $local.PresMinLimit##Float32
6002 $local.PresMaxLimit##Float32
6003 !$local.SliderEnable##Boolean
6004
99
......@@ -3886,6 +3895,8 @@ pwr_exe:
1202 1
1203 1
1204 0
1205
1206 0
99
13
1302 0
......@@ -3896,6 +3907,7 @@ pwr_exe:
1307
1308
1309 0
1310 0
99
99
99
......
......@@ -7863,6 +7863,7 @@ int GeBar::connect( grow_tObject object, glow_sTraceData *trace_data)
pwr_tAName parsed_name;
int sts;
int inverted;
graph_eDatabase m_db;
size = 4;
p = 0;
......@@ -7889,21 +7890,37 @@ int GeBar::connect( grow_tObject object, glow_sTraceData *trace_data)
}
min_value_p = 0;
dyn->parse_attr_name( minvalue_attr, parsed_name,
&inverted, &attr_type, &attr_size);
m_db = dyn->parse_attr_name( minvalue_attr, parsed_name,
&inverted, &attr_type, &attr_size);
if ( strcmp(parsed_name, "") != 0 &&
attr_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value_p,
&min_value_subid, attr_size, object);
switch ( m_db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value_p,
&min_value_subid, attr_size, object);
break;
case graph_eDatabase_Local:
min_value_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
default:
;
}
}
max_value_p = 0;
dyn->parse_attr_name( maxvalue_attr, parsed_name,
m_db = dyn->parse_attr_name( maxvalue_attr, parsed_name,
&inverted, &attr_type, &attr_size);
if ( strcmp(parsed_name, "") != 0 &&
attr_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value_p,
&max_value_subid, attr_size, object);
switch ( m_db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value_p,
&max_value_subid, attr_size, object);
break;
case graph_eDatabase_Local:
max_value_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
default:
;
}
}
trace_data->p = &pdummy;
......@@ -7917,14 +7934,14 @@ int GeBar::disconnect( grow_tObject object)
gdh_UnrefObjectInfo( subid);
p = 0;
if ( min_value_p) {
if ( min_value_p && cdh_SubidIsNotNull(min_value_subid))
gdh_UnrefObjectInfo( min_value_subid);
min_value_p = 0;
}
if ( max_value_p) {
min_value_p = 0;
if ( max_value_p && cdh_SubidIsNotNull(max_value_subid))
gdh_UnrefObjectInfo( max_value_subid);
max_value_p = 0;
}
max_value_p = 0;
return 1;
}
......@@ -8142,6 +8159,7 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
int sts;
int inverted;
int attr_cnt = 0;
graph_eDatabase db;
size1 = 4;
p1 = 0;
......@@ -8196,20 +8214,36 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
trend_hold = 0;
min_value1_p = 0;
dyn->parse_attr_name( minvalue_attr1, parsed_name,
db = dyn->parse_attr_name( minvalue_attr1, parsed_name,
&inverted, &attr_type, &attr_size);
if ( strcmp(parsed_name, "") != 0 &&
attr_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value1_p,
&min_value_subid1, attr_size, object);
switch ( db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value1_p,
&min_value_subid1, attr_size, object);
break;
case graph_eDatabase_Local:
min_value1_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
default:
;
}
}
max_value1_p = 0;
dyn->parse_attr_name( maxvalue_attr1, parsed_name,
db = dyn->parse_attr_name( maxvalue_attr1, parsed_name,
&inverted, &attr_type, &attr_size);
if ( strcmp(parsed_name, "") != 0 &&
attr_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value1_p,
&max_value_subid1, attr_size, object);
switch ( db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value1_p,
&max_value_subid1, attr_size, object);
break;
case graph_eDatabase_Local:
max_value1_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, attr_type);
default:
;
}
}
min_value2_p = 0;
dyn->parse_attr_name( minvalue_attr2, parsed_name,
......@@ -8283,14 +8317,14 @@ int GeTrend::disconnect( grow_tObject object)
if ( p2 && db2 == graph_eDatabase_Gdh)
gdh_UnrefObjectInfo( subid2);
p2 = 0;
if ( min_value1_p) {
if ( min_value1_p && cdh_SubidIsNotNull(min_value_subid1))
gdh_UnrefObjectInfo( min_value_subid1);
min_value1_p = 0;
}
if ( max_value1_p) {
min_value1_p = 0;
if ( max_value1_p && cdh_SubidIsNotNull(max_value_subid1))
gdh_UnrefObjectInfo( max_value_subid1);
max_value1_p = 0;
}
max_value1_p = 0;
if ( min_value2_p) {
gdh_UnrefObjectInfo( min_value_subid2);
min_value2_p = 0;
......@@ -8299,14 +8333,14 @@ int GeTrend::disconnect( grow_tObject object)
gdh_UnrefObjectInfo( max_value_subid2);
max_value2_p = 0;
}
if ( hold_p && hold_db == graph_eDatabase_Gdh) {
if ( hold_p && hold_db == graph_eDatabase_Gdh)
gdh_UnrefObjectInfo( hold_subid);
hold_p = 0;
}
if ( timerange_p && timerange_db == graph_eDatabase_Gdh) {
hold_p = 0;
if ( timerange_p && timerange_db == graph_eDatabase_Gdh)
gdh_UnrefObjectInfo( timerange_subid);
timerange_p = 0;
}
timerange_p = 0;
return 1;
}
......@@ -11096,11 +11130,11 @@ int GeAxis::connect( grow_tObject object, glow_sTraceData *trace_data)
int GeAxis::disconnect( grow_tObject object)
{
if ( min_value_p || imin_value_p) {
if ((min_value_p || imin_value_p) && cdh_SubidIsNotNull( min_value_subid)) {
gdh_UnrefObjectInfo( min_value_subid);
min_value_p = 0;
}
if ( max_value_p || imax_value_p) {
if ((max_value_p || imax_value_p) && cdh_SubidIsNotNull( max_value_subid)) {
gdh_UnrefObjectInfo( max_value_subid);
max_value_p = 0;
}
......@@ -15484,6 +15518,7 @@ int GeSlider::connect( grow_tObject object, glow_sTraceData *trace_data)
pwr_tAName parsed_name;
int sts;
int a_type, a_size;
graph_eDatabase m_db;
size = 4;
p = 0;
......@@ -15559,21 +15594,37 @@ int GeSlider::connect( grow_tObject object, glow_sTraceData *trace_data)
}
min_value_p = 0;
dyn->parse_attr_name( minvalue_attr, parsed_name,
m_db = dyn->parse_attr_name( minvalue_attr, parsed_name,
&inverted, &a_type, &a_size);
if ( strcmp(parsed_name, "") != 0 &&
a_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value_p,
&min_value_subid, a_size, object);
switch ( m_db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&min_value_p,
&min_value_subid, a_size, object);
break;
case graph_eDatabase_Local:
min_value_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, a_type);
default:
;
}
}
max_value_p = 0;
dyn->parse_attr_name( maxvalue_attr, parsed_name,
m_db = dyn->parse_attr_name( maxvalue_attr, parsed_name,
&inverted, &a_type, &a_size);
if ( strcmp(parsed_name, "") != 0 &&
a_type == pwr_eType_Float32) {
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value_p,
&max_value_subid, a_size, object);
switch ( m_db) {
case graph_eDatabase_Gdh:
sts = dyn->graph->ref_object_info( dyn->cycle, parsed_name, (void **)&max_value_p,
&max_value_subid, a_size, object);
break;
case graph_eDatabase_Local:
max_value_p = (pwr_tFloat32 *) dyn->graph->localdb_ref_or_create( parsed_name, a_type);
default:
;
}
}
insensitive_p = 0;
......@@ -15601,18 +15652,18 @@ int GeSlider::disconnect( grow_tObject object)
gdh_UnrefObjectInfo( subid);
p = 0;
if ( min_value_p) {
if ( min_value_p && cdh_SubidIsNotNull(min_value_subid))
gdh_UnrefObjectInfo( min_value_subid);
min_value_p = 0;
}
if ( max_value_p) {
min_value_p = 0;
if ( max_value_p && cdh_SubidIsNotNull(max_value_subid))
gdh_UnrefObjectInfo( max_value_subid);
max_value_p = 0;
}
if ( insensitive_p && insensitive_db == graph_eDatabase_Gdh) {
max_value_p = 0;
if ( insensitive_p && insensitive_db == graph_eDatabase_Gdh)
gdh_UnrefObjectInfo( insensitive_subid);
insensitive_p = 0;
}
insensitive_p = 0;
return 1;
}
......
......@@ -2467,12 +2467,14 @@ class GeSlider : public GeDynElem {
GeSlider( GeDyn *e_dyn) :
GeDynElem(e_dyn, ge_mDynType1_No, ge_mDynType2_No, ge_mActionType1_Slider, ge_mActionType2_No, ge_eDynPrio_Slider),
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), insensitive_p(0)
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), min_value_subid(pwr_cNSubid),
max_value_subid(pwr_cNSubid), insensitive_p(0)
{ strcpy( attribute, ""); strcpy( minvalue_attr, ""); strcpy( maxvalue_attr, "");
strcpy( insensitive_attr, ""); strcpy( release_attr, "");}
GeSlider( const GeSlider& x) :
GeDynElem(x.dyn,x.dyn_type1,x.dyn_type2,x.action_type1,x.action_type2,x.prio),
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), insensitive_p(0)
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), min_value_subid(pwr_cNSubid),
max_value_subid(pwr_cNSubid), insensitive_p(0)
{ strcpy( attribute, x.attribute); strcpy( minvalue_attr, x.minvalue_attr);
strcpy( maxvalue_attr, x.maxvalue_attr); strcpy( insensitive_attr, x.insensitive_attr);
strcpy( release_attr, x.release_attr);}
......@@ -2512,11 +2514,13 @@ class GeBar : public GeDynElem {
GeBar( GeDyn *e_dyn) :
GeDynElem(e_dyn, ge_mDynType1_Bar, ge_mDynType2_No, ge_mActionType1_No, ge_mActionType2_No, ge_eDynPrio_Bar),
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0)
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), min_value_subid(pwr_cNSubid),
max_value_subid(pwr_cNSubid)
{ strcpy( attribute, ""); strcpy( minvalue_attr, ""); strcpy( maxvalue_attr, "");}
GeBar( const GeBar& x) :
GeDynElem(x.dyn,x.dyn_type1,x.dyn_type2,x.action_type1,x.action_type2,x.prio),
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0)
min_value_p(0), max_value_p(0), old_min_value(0), old_max_value(0), min_value_subid(pwr_cNSubid),
max_value_subid(pwr_cNSubid)
{ strcpy( attribute, x.attribute); strcpy( minvalue_attr, x.minvalue_attr);
strcpy( maxvalue_attr, x.maxvalue_attr);}
void get_attributes( attr_sItem *attrinfo, int *item_count);
......@@ -2582,7 +2586,8 @@ class GeTrend : public GeDynElem {
GeTrend( GeDyn *e_dyn) :
GeDynElem(e_dyn, ge_mDynType1_Trend, ge_mDynType2_No, ge_mActionType1_No, ge_mActionType2_No, ge_eDynPrio_Trend),
min_value1_p(0), max_value1_p(0), old_min_value1(0), old_max_value1(0),
min_value1_p(0), max_value1_p(0), old_min_value1(0), old_max_value1(0),
min_value_subid1(pwr_cNSubid), max_value_subid1(pwr_cNSubid),
min_value2_p(0), max_value2_p(0), old_min_value2(0), old_max_value2(0),
hold_p(0), timerange_p(0), old_timerange(0)
{ strcpy( attribute1, ""); strcpy( attribute2, "");
......@@ -3162,12 +3167,13 @@ class GeAxis : public GeDynElem {
GeDynElem(e_dyn, ge_mDynType1_No, ge_mDynType2_Axis, ge_mActionType1_No, ge_mActionType2_No, ge_eDynPrio_Axis),
min_value(0), max_value(100), keep_settings(0), imin_value(0), imax_value(0), min_value_p(0),
max_value_p(0), imin_value_p(0),
imax_value_p(0), attr_type(0)
imax_value_p(0), min_value_subid(pwr_cNSubid), max_value_subid(pwr_cNSubid), attr_type(0)
{ strcpy( minvalue_attr, ""); strcpy( maxvalue_attr, "");}
GeAxis( const GeAxis& x) :
GeDynElem(x.dyn,x.dyn_type1,x.dyn_type2,x.action_type1,x.action_type2,x.prio),
min_value(x.min_value),max_value(x.max_value), keep_settings(x.keep_settings),
min_value_p(0), max_value_p(0), imin_value_p(0), imax_value_p(0)
min_value_p(0), max_value_p(0), imin_value_p(0), imax_value_p(0),
min_value_subid(pwr_cNSubid), max_value_subid(pwr_cNSubid)
{ strcpy( minvalue_attr, x.minvalue_attr); strcpy( maxvalue_attr, x.maxvalue_attr); }
void get_attributes( attr_sItem *attrinfo, int *item_count);
void save( ofstream& fp);
......
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