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
1b2a9854
Commit
1b2a9854
authored
Oct 12, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in attribute name length
parent
b51ca656
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
75 deletions
+124
-75
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+1
-1
wb/lib/wb/src/wb_attrname.cpp
wb/lib/wb/src/wb_attrname.cpp
+3
-3
wb/lib/wb/src/wb_nav.cpp
wb/lib/wb/src/wb_nav.cpp
+1
-1
wb/lib/wb/src/wb_nrep.cpp
wb/lib/wb/src/wb_nrep.cpp
+3
-3
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+112
-67
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+4
-0
No files found.
wb/lib/wb/src/wb_attribute.cpp
View file @
1b2a9854
...
...
@@ -234,7 +234,7 @@ wb_attribute::wb_attribute(const wb_attribute& pa, int idx, const char *aname) :
{
pwr_tCid
cid
;
wb_attrname
n
;
char
attrname
[
120
]
;
pwr_tAName
attrname
;
if
(
!
cdh_tidIsCid
(
pa
.
tid
())
||
pa
.
m_orep
==
0
)
return
;
...
...
wb/lib/wb/src/wb_attrname.cpp
View file @
1b2a9854
...
...
@@ -40,13 +40,13 @@
wb_attrname
::
wb_attrname
(
const
char
*
name
)
{
try
{
char
str
[
80
]
;
pwr_tOName
str
;
if
(
*
name
!=
'.'
)
{
strcpy
(
str
,
"."
);
str
cat
(
str
,
name
);
str
ncat
(
str
,
name
,
sizeof
(
str
)
-
1
);
}
else
str
cpy
(
str
,
name
);
str
ncpy
(
str
,
name
,
sizeof
(
str
)
);
m_nrep
=
new
wb_nrep
(
str
);
m_sts
=
LDH__SUCCESS
;
m_nrep
->
ref
();
...
...
wb/lib/wb/src/wb_nav.cpp
View file @
1b2a9854
...
...
@@ -1788,7 +1788,7 @@ int Nav::get_select( pwr_sAttrRef *attrref, int *is_attr)
brow_tNode
*
node_list
;
int
node_count
;
Item
*
item
;
pwr_t
O
Name
attr_str
;
pwr_t
A
Name
attr_str
;
int
sts
,
size
;
brow_GetSelectedNodes
(
brow_ctx
,
&
node_list
,
&
node_count
);
...
...
wb/lib/wb/src/wb_nrep.cpp
View file @
1b2a9854
...
...
@@ -687,7 +687,7 @@ char *wb_nrep::objectName(const char *n, char *res)
char
*
wb_nrep
::
pathName
(
const
char
*
n
,
char
*
res
)
{
static
char
result
[
80
]
;
static
pwr_tOName
result
;
if
(
num_seg
<=
1
)
{
if
(
res
)
{
...
...
@@ -745,7 +745,7 @@ char *wb_nrep::segmentName(const char *n, int idx, char *res)
char
*
wb_nrep
::
attributeName
(
const
char
*
n
,
int
idx
,
char
*
res
)
{
static
char
result
[
80
]
;
static
pwr_tOName
result
;
if
(
idx
>=
num_attr
||
idx
<
0
)
{
if
(
res
)
{
...
...
@@ -883,7 +883,7 @@ char *wb_nrep::nameName(const char *n, int ntype, char *res)
char
*
wb_nrep
::
unatName
(
const
char
*
name
)
{
static
char
result
[
80
];
static
char
result
[
256
];
const
char
*
s
;
char
*
su
;
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
1b2a9854
...
...
@@ -1710,9 +1710,10 @@ void GeDigLowColor::set_attribute( grow_tObject object, const char *attr_name, i
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
s
printf
(
msg
,
"DigLowTone.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigLowTone.Attribute = %s"
,
attr_name
);
else
sprintf
(
msg
,
"DigLowColor.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigLowColor.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -1728,12 +1729,13 @@ int GeDigLowColor::set_color( grow_tObject object, glow_eDrawType color)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
this
->
color
=
glow_eDrawType
(
color
/
30
);
s
printf
(
msg
,
"DigLowTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigLowTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
}
else
{
this
->
color
=
color
;
s
printf
(
msg
,
"DigLowColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigLowColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
return
1
;
}
...
...
@@ -2016,18 +2018,19 @@ void GeDigColor::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
{
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
s
printf
(
msg
,
"DigTone.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigTone.Attribute = %s"
,
attr_name
);
else
s
printf
(
msg
,
"DigColor.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigColor.Attribute = %s"
,
attr_name
);
}
else
{
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
s
printf
(
msg
,
"DigTone%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigTone%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
else
s
printf
(
msg
,
"DigColor%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigColor%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -2044,19 +2047,20 @@ int GeDigColor::set_color( grow_tObject object, glow_eDrawType color)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
this
->
color
=
glow_eDrawType
(
color
/
30
);
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"DigTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
else
s
printf
(
msg
,
"DigTone%d.Tone = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigTone%d.Tone = %s"
,
GeDyn
::
instance_to_number
(
instance
),
grow_ColorToneToName
(
this
->
color
));
}
else
{
this
->
color
=
color
;
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"DigColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
else
s
printf
(
msg
,
"DigColor%d.Color = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigColor%d.Color = %s"
,
GeDyn
::
instance_to_number
(
instance
),
grow_ColorToName
(
this
->
color
));
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
return
1
;
}
...
...
@@ -2290,7 +2294,8 @@ void GeDigWarning::set_attribute( grow_tObject object, const char *attr_name, in
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"DigWaring.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigWaring.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -2498,7 +2503,8 @@ void GeDigError::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"DigError.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigError.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -2733,7 +2739,8 @@ void GeDigFlash::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"DigFlash.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigFlash.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -2749,12 +2756,13 @@ int GeDigFlash::set_color( grow_tObject object, glow_eDrawType color)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
this
->
color
=
glow_eDrawType
(
color
/
30
);
s
printf
(
msg
,
"DigFlash.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigFlash.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
}
else
{
this
->
color
=
color
;
s
printf
(
msg
,
"DigFlash.Color = %s"
,
grow_ColorToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigFlash.Color = %s"
,
grow_ColorToName
(
this
->
color
));
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
return
1
;
}
...
...
@@ -2979,11 +2987,12 @@ void GeInvisible::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"Invisible.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"Invisible.Attribute = %s"
,
attr_name
);
else
s
printf
(
msg
,
"Invisible%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"Invisible%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -3301,7 +3310,8 @@ void GeDigBorder::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"DigBorder.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigBorder.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -3488,12 +3498,13 @@ void GeDigText::set_attribute( grow_tObject object, const char *attr_name, int *
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
{
s
printf
(
msg
,
"DigText.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigText.Attribute = %s"
,
attr_name
);
}
else
{
s
printf
(
msg
,
"DigText%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigText%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -3709,7 +3720,8 @@ void GeValue::set_attribute( grow_tObject object, const char *attr_name, int *cn
if
(
instance
==
ge_mInstance_1
)
{
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Value.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Value.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -4770,9 +4782,10 @@ void GeAnalogColor::set_attribute( grow_tObject object, const char *attr_name, i
strncpy
(
e
->
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
s
printf
(
msg
,
"AnalogTone.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"AnalogTone.Attribute = %s"
,
attr_name
);
else
sprintf
(
msg
,
"AnalogColor.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"AnalogColor.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -4789,19 +4802,20 @@ int GeAnalogColor::set_color( grow_tObject object, glow_eDrawType color)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
this
->
color
=
glow_eDrawType
(
color
/
30
);
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"AnalogTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"AnalogTone.Tone = %s"
,
grow_ColorToneToName
(
this
->
color
));
else
s
printf
(
msg
,
"AnalogTone%d.Tone = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"AnalogTone%d.Tone = %s"
,
GeDyn
::
instance_to_number
(
instance
),
grow_ColorToneToName
(
this
->
color
));
}
else
{
this
->
color
=
color
;
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"AnalogColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"AnalogColor.Color = %s"
,
grow_ColorToName
(
this
->
color
));
else
s
printf
(
msg
,
"AnalogColor%d.Color = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"AnalogColor%d.Color = %s"
,
GeDyn
::
instance_to_number
(
instance
),
grow_ColorToName
(
this
->
color
));
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
return
1
;
}
...
...
@@ -5099,7 +5113,8 @@ void GeRotate::set_attribute( grow_tObject object, const char *attr_name, int *c
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Rotate.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Rotate.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -5324,14 +5339,16 @@ void GeMove::set_attribute( grow_tObject object, const char *attr_name, int *cnt
char
msg
[
200
];
strncpy
(
move_x_attribute
,
attr_name
,
sizeof
(
move_x_attribute
));
sprintf
(
msg
,
"Move.XAttribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Move.XAttribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
else
if
(
*
cnt
==
1
)
{
char
msg
[
200
];
strncpy
(
move_y_attribute
,
attr_name
,
sizeof
(
move_y_attribute
));
sprintf
(
msg
,
"Move.YAttribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Move.YAttribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
(
*
cnt
)
--
;
}
...
...
@@ -5684,7 +5701,8 @@ void GeAnalogShift::set_attribute( grow_tObject object, const char *attr_name, i
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"AnalogShift.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"AnalogShift.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -5855,7 +5873,8 @@ void GeDigShift::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"DigShift.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"DigShift.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -6010,7 +6029,8 @@ void GeAnimation::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Animation.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Animation.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -6314,7 +6334,8 @@ void GeBar::set_attribute( grow_tObject object, const char *attr_name, int *cnt)
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Bar.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Bar.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -6540,14 +6561,16 @@ void GeTrend::set_attribute( grow_tObject object, const char *attr_name, int *cn
char
msg
[
200
];
strncpy
(
attribute1
,
attr_name
,
sizeof
(
attribute1
));
sprintf
(
msg
,
"Trend.Attribute1 = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Trend.Attribute1 = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
else
if
(
*
cnt
==
1
)
{
char
msg
[
200
];
strncpy
(
attribute2
,
attr_name
,
sizeof
(
attribute2
));
sprintf
(
msg
,
"Trend.YAttribute2 = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Trend.YAttribute2 = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
(
*
cnt
)
--
;
}
...
...
@@ -7009,14 +7032,16 @@ void GeXY_Curve::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
x_attr
,
attr_name
,
sizeof
(
x_attr
));
sprintf
(
msg
,
"XY_Curve.XAttr = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"XY_Curve.XAttr = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
else
if
(
*
cnt
==
1
)
{
char
msg
[
200
];
strncpy
(
y_attr
,
attr_name
,
sizeof
(
y_attr
));
sprintf
(
msg
,
"XY_Curve.YAttr = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"XY_Curve.YAttr = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
(
*
cnt
)
--
;
}
...
...
@@ -7684,7 +7709,8 @@ void GeTable::set_attribute( grow_tObject object, const char *attr_name, int *cn
char
msg
[
200
];
strncpy
(
attribute
[
0
],
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Column1.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Column1.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -8463,9 +8489,10 @@ void GeStatusColor::set_attribute( grow_tObject object, const char *attr_name, i
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
s
printf
(
msg
,
"StatusTone.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"StatusTone.Attribute = %s"
,
attr_name
);
else
sprintf
(
msg
,
"StatusColor.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"StatusColor.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -8481,12 +8508,13 @@ int GeStatusColor::set_color( grow_tObject object, glow_eDrawType color)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
this
->
nostatus_color
=
glow_eDrawType
(
color
/
30
);
s
printf
(
msg
,
"StatusTone.NoStatusTone = %s"
,
grow_ColorToneToName
(
this
->
nostatus_color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"StatusTone.NoStatusTone = %s"
,
grow_ColorToneToName
(
this
->
nostatus_color
));
}
else
{
this
->
nostatus_color
=
color
;
s
printf
(
msg
,
"StatusColor.NoStatusColor = %s"
,
grow_ColorToName
(
this
->
nostatus_color
));
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"StatusColor.NoStatusColor = %s"
,
grow_ColorToName
(
this
->
nostatus_color
));
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
return
1
;
}
...
...
@@ -8714,7 +8742,8 @@ void GeHostObject::set_attribute( grow_tObject object, const char *attr_name, in
if
(
(
s
=
strrchr
(
hostobject
,
'.'
)))
*
s
=
0
;
sprintf
(
msg
,
"HostObject.Object = %s"
,
hostobject
);
snprintf
(
msg
,
sizeof
(
msg
),
"HostObject.Object = %s"
,
hostobject
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -8852,12 +8881,13 @@ void GeDigSound::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
{
s
printf
(
msg
,
"DigSound.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigSound.Attribute = %s"
,
attr_name
);
}
else
{
s
printf
(
msg
,
"DigSound%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigSound%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -9048,7 +9078,8 @@ void GeFillLevel::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"FillLevel.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"FillLevel.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -9338,12 +9369,13 @@ void GeDigCommand::set_attribute( grow_tObject object, const char *attr_name, in
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
{
s
printf
(
msg
,
"DigCommand.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigCommand.Attribute = %s"
,
attr_name
);
}
else
{
s
printf
(
msg
,
"DigCommand%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"DigCommand%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
}
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -9504,7 +9536,8 @@ void GePopupMenu::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
ref_object
,
attr_name
,
sizeof
(
ref_object
));
if
(
(
s
=
strchr
(
ref_object
,
'.'
)))
*
s
=
0
;
sprintf
(
msg
,
"PopupMenu.ReferenceObject = %s"
,
ref_object
);
snprintf
(
msg
,
sizeof
(
msg
),
"PopupMenu.ReferenceObject = %s"
,
ref_object
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -9754,10 +9787,11 @@ void GeSetDig::set_attribute( grow_tObject object, const char *attr_name, int *c
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"SetDig.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"SetDig.Attribute = %s"
,
attr_name
);
else
s
printf
(
msg
,
"SetDig%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"SetDig%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -9962,10 +9996,11 @@ void GeResetDig::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"ResetDig.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"ResetDig.Attribute = %s"
,
attr_name
);
else
s
printf
(
msg
,
"ResetDig%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"ResetDig%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -10128,7 +10163,8 @@ void GeToggleDig::set_attribute( grow_tObject object, const char *attr_name, int
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"ToggleDig.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"ToggleDig.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -10322,7 +10358,8 @@ void GeStoDig::set_attribute( grow_tObject object, const char *attr_name, int *c
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"StoDig.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"StoDig.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -10742,7 +10779,8 @@ void GeIncrAnalog::set_attribute( grow_tObject object, const char *attr_name, in
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"IncrAnalog.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"IncrAnalog.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -10892,7 +10930,8 @@ void GeRadioButton::set_attribute( grow_tObject object, const char *attr_name, i
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"RadioButton.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"RadioButton.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -11349,7 +11388,8 @@ void GeOpenGraph::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
graph_object
,
attr_name
,
sizeof
(
graph_object
));
if
(
(
s
=
strrchr
(
graph_object
,
'.'
)))
*
s
=
0
;
sprintf
(
msg
,
"OpenGraph.GraphObject = %s"
,
graph_object
);
snprintf
(
msg
,
sizeof
(
msg
),
"OpenGraph.GraphObject = %s"
,
graph_object
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -12026,7 +12066,8 @@ void GeSlider::set_attribute( grow_tObject object, const char *attr_name, int *c
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"Slider.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"Slider.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -12525,7 +12566,8 @@ void GeFastCurve::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
fast_object
,
attr_name
,
sizeof
(
fast_object
));
if
(
(
s
=
strchr
(
fast_object
,
'.'
)))
*
s
=
0
;
sprintf
(
msg
,
"FastCurve.FastObject = %s"
,
fast_object
);
snprintf
(
msg
,
sizeof
(
msg
),
"FastCurve.FastObject = %s"
,
fast_object
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -13861,7 +13903,8 @@ void GeOptionMenu::set_attribute( grow_tObject object, const char *attr_name, in
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"OptionMenu.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"OptionMenu.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -14480,7 +14523,8 @@ void GeAnalogText::set_attribute( grow_tObject object, const char *attr_name, in
char
msg
[
200
];
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
sprintf
(
msg
,
"AnalogText.Attribute = %s"
,
attr_name
);
snprintf
(
msg
,
sizeof
(
msg
),
"AnalogText.Attribute = %s"
,
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
@@ -14614,10 +14658,11 @@ void GeSetValue::set_attribute( grow_tObject object, const char *attr_name, int
strncpy
(
attribute
,
attr_name
,
sizeof
(
attribute
));
if
(
instance
==
ge_mInstance_1
)
s
printf
(
msg
,
"SetValue.Attribute = %s"
,
attr_name
);
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"SetValue.Attribute = %s"
,
attr_name
);
else
s
printf
(
msg
,
"SetValue%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
s
nprintf
(
msg
,
sizeof
(
msg
)
,
"SetValue%d.Attribute = %s"
,
GeDyn
::
instance_to_number
(
instance
),
attr_name
);
msg
[
sizeof
(
msg
)
-
1
]
=
0
;
dyn
->
graph
->
message
(
'I'
,
msg
);
}
}
...
...
xtt/lib/ge/src/ge_graph.cpp
View file @
1b2a9854
...
...
@@ -2669,6 +2669,10 @@ static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event)
sprintf
(
name
,
"C%d"
,
grow_IncrNextObjectNameNumber
(
graph
->
grow
->
ctx
));
grow_SetObjectName
(
move_list
[
i
],
name
);
break
;
case
glow_eObjectType_GrowGroup
:
sprintf
(
name
,
"Grp%d_"
,
grow_IncrNextObjectNameNumber
(
graph
->
grow
->
ctx
));
grow_SetObjectName
(
move_list
[
i
],
name
);
break
;
default:
sprintf
(
name
,
"O%d"
,
grow_IncrNextObjectNameNumber
(
graph
->
grow
->
ctx
));
grow_SetObjectName
(
move_list
[
i
],
name
);
...
...
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