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
d415a21f
Commit
d415a21f
authored
Aug 23, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possibility to choose displayed curve in fastcurve object
parent
96cc33ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
4 deletions
+43
-4
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+36
-2
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+7
-2
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
d415a21f
...
@@ -8742,6 +8742,16 @@ void GeFastCurve::get_attributes( attr_sItem *attrinfo, int *item_count)
...
@@ -8742,6 +8742,16 @@ void GeFastCurve::get_attributes( attr_sItem *attrinfo, int *item_count)
attrinfo
[
i
].
type
=
glow_eType_String
;
attrinfo
[
i
].
type
=
glow_eType_String
;
attrinfo
[
i
++
].
size
=
sizeof
(
fast_object
);
attrinfo
[
i
++
].
size
=
sizeof
(
fast_object
);
strcpy
(
attrinfo
[
i
].
name
,
"FastCurve.CurveIndex1"
);
attrinfo
[
i
].
value
=
&
curve_index1
;
attrinfo
[
i
].
type
=
glow_eType_Int
;
attrinfo
[
i
++
].
size
=
sizeof
(
curve_index1
);
strcpy
(
attrinfo
[
i
].
name
,
"FastCurve.CurveIndex2"
);
attrinfo
[
i
].
value
=
&
curve_index2
;
attrinfo
[
i
].
type
=
glow_eType_Int
;
attrinfo
[
i
++
].
size
=
sizeof
(
curve_index2
);
*
item_count
=
i
;
*
item_count
=
i
;
}
}
...
@@ -8769,6 +8779,8 @@ void GeFastCurve::save( ofstream& fp)
...
@@ -8769,6 +8779,8 @@ void GeFastCurve::save( ofstream& fp)
{
{
fp
<<
int
(
ge_eSave_FastCurve
)
<<
endl
;
fp
<<
int
(
ge_eSave_FastCurve
)
<<
endl
;
fp
<<
int
(
ge_eSave_FastCurve_fast_object
)
<<
FSPACE
<<
fast_object
<<
endl
;
fp
<<
int
(
ge_eSave_FastCurve_fast_object
)
<<
FSPACE
<<
fast_object
<<
endl
;
fp
<<
int
(
ge_eSave_FastCurve_curve_index1
)
<<
FSPACE
<<
curve_index1
<<
endl
;
fp
<<
int
(
ge_eSave_FastCurve_curve_index2
)
<<
FSPACE
<<
curve_index2
<<
endl
;
fp
<<
int
(
ge_eSave_End
)
<<
endl
;
fp
<<
int
(
ge_eSave_End
)
<<
endl
;
}
}
...
@@ -8787,6 +8799,8 @@ void GeFastCurve::open( ifstream& fp)
...
@@ -8787,6 +8799,8 @@ void GeFastCurve::open( ifstream& fp)
fp
.
get
();
fp
.
get
();
fp
.
getline
(
fast_object
,
sizeof
(
fast_object
));
fp
.
getline
(
fast_object
,
sizeof
(
fast_object
));
break
;
break
;
case
ge_eSave_FastCurve_curve_index1
:
fp
>>
curve_index1
;
break
;
case
ge_eSave_FastCurve_curve_index2
:
fp
>>
curve_index2
;
break
;
case
ge_eSave_End
:
end_found
=
1
;
break
;
case
ge_eSave_End
:
end_found
=
1
;
break
;
default:
default:
cout
<<
"GeFastCurve:open syntax error"
<<
endl
;
cout
<<
"GeFastCurve:open syntax error"
<<
endl
;
...
@@ -8839,8 +8853,28 @@ int GeFastCurve::connect( grow_tObject object, glow_sTraceData *trace_data)
...
@@ -8839,8 +8853,28 @@ int GeFastCurve::connect( grow_tObject object, glow_sTraceData *trace_data)
memcpy
(
&
time_buff
,
&
fp
.
TimeBuffer
,
sizeof
(
time_buff
));
memcpy
(
&
time_buff
,
&
fp
.
TimeBuffer
,
sizeof
(
time_buff
));
fast_cnt
=
0
;
fast_cnt
=
0
;
for
(
i
=
0
;
i
<
FAST_CURVES
;
i
++
)
{
if
(
curve_index1
==
0
&&
curve_index2
==
0
)
{
if
(
fp
.
CurveValid
[
i
])
{
for
(
i
=
0
;
i
<
FAST_CURVES
;
i
++
)
{
if
(
fp
.
CurveValid
[
i
])
{
memcpy
(
&
buff
[
fast_cnt
],
&
fp
.
Buffers
[
i
],
sizeof
(
buff
[
0
]));
type
[
fast_cnt
]
=
(
pwr_eType
)
fp
.
AttributeType
[
i
];
fast_idx
[
i
]
=
fast_cnt
+
1
;
curve_idx
[
fast_cnt
+
1
]
=
i
;
fast_cnt
++
;
}
}
}
else
{
if
(
curve_index1
>=
0
&&
curve_index1
<
FAST_CURVES
&&
fp
.
CurveValid
[
curve_index1
])
{
i
=
curve_index1
;
memcpy
(
&
buff
[
fast_cnt
],
&
fp
.
Buffers
[
i
],
sizeof
(
buff
[
0
]));
type
[
fast_cnt
]
=
(
pwr_eType
)
fp
.
AttributeType
[
i
];
fast_idx
[
i
]
=
fast_cnt
+
1
;
curve_idx
[
fast_cnt
+
1
]
=
i
;
fast_cnt
++
;
}
if
(
curve_index2
>=
1
&&
curve_index2
<
FAST_CURVES
&&
fp
.
CurveValid
[
curve_index2
])
{
i
=
curve_index2
;
memcpy
(
&
buff
[
fast_cnt
],
&
fp
.
Buffers
[
i
],
sizeof
(
buff
[
0
]));
memcpy
(
&
buff
[
fast_cnt
],
&
fp
.
Buffers
[
i
],
sizeof
(
buff
[
0
]));
type
[
fast_cnt
]
=
(
pwr_eType
)
fp
.
AttributeType
[
i
];
type
[
fast_cnt
]
=
(
pwr_eType
)
fp
.
AttributeType
[
i
];
fast_idx
[
i
]
=
fast_cnt
+
1
;
fast_idx
[
i
]
=
fast_cnt
+
1
;
...
...
xtt/lib/ge/src/ge_dyn.h
View file @
d415a21f
...
@@ -327,6 +327,8 @@ extern "C" {
...
@@ -327,6 +327,8 @@ extern "C" {
ge_eSave_FillLevel_min_value
=
2703
,
ge_eSave_FillLevel_min_value
=
2703
,
ge_eSave_FillLevel_max_value
=
2704
,
ge_eSave_FillLevel_max_value
=
2704
,
ge_eSave_FastCurve_fast_object
=
2800
,
ge_eSave_FastCurve_fast_object
=
2800
,
ge_eSave_FastCurve_curve_index1
=
2801
,
ge_eSave_FastCurve_curve_index2
=
2802
,
ge_eSave_AnalogText_super
=
2900
,
ge_eSave_AnalogText_super
=
2900
,
ge_eSave_Table_attribute1
=
3000
,
ge_eSave_Table_attribute1
=
3000
,
ge_eSave_Table_format1
=
3001
,
ge_eSave_Table_format1
=
3001
,
...
@@ -1889,6 +1891,8 @@ class GeTrend : public GeDynElem {
...
@@ -1889,6 +1891,8 @@ class GeTrend : public GeDynElem {
class
GeFastCurve
:
public
GeDynElem
{
class
GeFastCurve
:
public
GeDynElem
{
public:
public:
char
fast_object
[
120
];
char
fast_object
[
120
];
int
curve_index1
;
int
curve_index2
;
pwr_tBoolean
*
new_p
;
//!< Pointer to New attribute, which indicates new curve data.
pwr_tBoolean
*
new_p
;
//!< Pointer to New attribute, which indicates new curve data.
pwr_tRefId
subid
;
//!< Subid of New attribute in DsFastCurve.
pwr_tRefId
subid
;
//!< Subid of New attribute in DsFastCurve.
...
@@ -1909,10 +1913,11 @@ class GeFastCurve : public GeDynElem {
...
@@ -1909,10 +1913,11 @@ class GeFastCurve : public GeDynElem {
GeFastCurve
(
GeDyn
*
e_dyn
)
:
GeFastCurve
(
GeDyn
*
e_dyn
)
:
GeDynElem
(
e_dyn
,
ge_mDynType_FastCurve
,
(
ge_mActionType
)
0
,
GeDynElem
(
e_dyn
,
ge_mDynType_FastCurve
,
(
ge_mActionType
)
0
,
ge_eDynPrio_FastCurve
)
ge_eDynPrio_FastCurve
)
,
curve_index1
(
0
),
curve_index2
(
0
)
{
strcpy
(
fast_object
,
""
);}
{
strcpy
(
fast_object
,
""
);}
GeFastCurve
(
const
GeFastCurve
&
x
)
:
GeFastCurve
(
const
GeFastCurve
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type
,
x
.
action_type
,
x
.
prio
)
GeDynElem
(
x
.
dyn
,
x
.
dyn_type
,
x
.
action_type
,
x
.
prio
),
curve_index1
(
x
.
curve_index1
),
curve_index2
(
x
.
curve_index2
)
{
strcpy
(
fast_object
,
x
.
fast_object
);}
{
strcpy
(
fast_object
,
x
.
fast_object
);}
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
void
save
(
ofstream
&
fp
);
void
save
(
ofstream
&
fp
);
...
...
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