Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
b597a164
Commit
b597a164
authored
Jan 04, 2017
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge, local database added for min and max values in trend, bar, and slider
parent
2801f10d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
28 deletions
+88
-28
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+82
-28
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+6
-0
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
b597a164
...
...
@@ -7925,21 +7925,39 @@ 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
);
min_value_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
,
switch
(
min_value_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
);
break
;
default:
;
}
}
max_value_p
=
0
;
dyn
->
parse_attr_name
(
maxvalue_attr
,
parsed_name
,
&
inverted
,
&
attr_type
,
&
attr_size
);
max_value_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
(
min_value_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
);
break
;
default:
;
}
}
trace_data
->
p
=
&
pdummy
;
...
...
@@ -7953,11 +7971,11 @@ int GeBar::disconnect( grow_tObject object)
gdh_UnrefObjectInfo
(
subid
);
p
=
0
;
if
(
min_value_p
)
{
if
(
min_value_p
&&
min_value_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
min_value_subid
);
min_value_p
=
0
;
}
if
(
max_value_p
)
{
if
(
max_value_p
&&
max_value_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
max_value_subid
);
max_value_p
=
0
;
}
...
...
@@ -8232,20 +8250,38 @@ 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
,
&
inverted
,
&
attr_type
,
&
attr_size
);
min_value1_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
,
switch
(
min_value1_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
);
break
;
default:
;
}
}
max_value1_p
=
0
;
dyn
->
parse_attr_name
(
maxvalue_attr1
,
parsed_name
,
&
inverted
,
&
attr_type
,
&
attr_size
);
max_value1_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
(
max_value1_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
);
break
;
default:
;
}
}
min_value2_p
=
0
;
dyn
->
parse_attr_name
(
minvalue_attr2
,
parsed_name
,
...
...
@@ -8319,11 +8355,11 @@ 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
&&
min_value1_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
min_value_subid1
);
min_value1_p
=
0
;
}
if
(
max_value1_p
)
{
if
(
max_value1_p
&&
max_value1_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
max_value_subid1
);
max_value1_p
=
0
;
}
...
...
@@ -15595,21 +15631,39 @@ int GeSlider::connect( grow_tObject object, glow_sTraceData *trace_data)
}
min_value_p
=
0
;
dyn
->
parse_attr_name
(
minvalue_attr
,
parsed_name
,
&
inverted
,
&
a_type
,
&
a_size
);
min_value_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
(
min_value_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
);
break
;
default:
;
}
}
max_value_p
=
0
;
dyn
->
parse_attr_name
(
maxvalue_attr
,
parsed_name
,
&
inverted
,
&
a_type
,
&
a_size
);
max_value_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
(
max_value_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
);
break
;
default:
;
}
}
insensitive_p
=
0
;
...
...
@@ -15637,11 +15691,11 @@ int GeSlider::disconnect( grow_tObject object)
gdh_UnrefObjectInfo
(
subid
);
p
=
0
;
if
(
min_value_p
)
{
if
(
min_value_p
&&
min_value_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
min_value_subid
);
min_value_p
=
0
;
}
if
(
max_value_p
)
{
if
(
max_value_p
&&
max_value_db
==
graph_eDatabase_Gdh
)
{
gdh_UnrefObjectInfo
(
max_value_subid
);
max_value_p
=
0
;
}
...
...
xtt/lib/ge/src/ge_dyn.h
View file @
b597a164
...
...
@@ -2472,6 +2472,8 @@ class GeSlider : public GeDynElem {
pwr_tFloat32
old_max_value
;
pwr_tSubid
min_value_subid
;
pwr_tSubid
max_value_subid
;
graph_eDatabase
min_value_db
;
graph_eDatabase
max_value_db
;
pwr_tBoolean
*
insensitive_p
;
pwr_tSubid
insensitive_subid
;
int
insensitive_inverted
;
...
...
@@ -2521,6 +2523,8 @@ class GeBar : public GeDynElem {
pwr_tFloat32
old_max_value
;
pwr_tSubid
min_value_subid
;
pwr_tSubid
max_value_subid
;
graph_eDatabase
min_value_db
;
graph_eDatabase
max_value_db
;
GeBar
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_Bar
,
ge_mDynType2_No
,
ge_mActionType1_No
,
ge_mActionType2_No
,
ge_eDynPrio_Bar
),
...
...
@@ -2577,6 +2581,8 @@ class GeTrend : public GeDynElem {
pwr_tSubid
max_value_subid1
;
pwr_tFloat32
*
min_value2_p
;
pwr_tFloat32
*
max_value2_p
;
graph_eDatabase
min_value1_db
;
graph_eDatabase
max_value1_db
;
pwr_tFloat32
old_min_value2
;
pwr_tFloat32
old_max_value2
;
pwr_tSubid
min_value_subid2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment