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
15215979
Commit
15215979
authored
Feb 09, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdh_RefObjectInfoList, error status and message for invalid local attributes in Ge graphs
parent
cc36a5c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
src/lib/rt/src/rt_gdh.c
src/lib/rt/src/rt_gdh.c
+7
-3
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+7
-2
No files found.
src/lib/rt/src/rt_gdh.c
View file @
15215979
...
@@ -3115,7 +3115,7 @@ gdh_RefObjectInfoList (
...
@@ -3115,7 +3115,7 @@ gdh_RefObjectInfoList (
If supplied as NULL, it is ignored. */
If supplied as NULL, it is ignored. */
)
)
{
{
pwr_tStatus
sts
=
GDH__SUCCESS
;
pwr_tStatus
sts
,
rsts
=
GDH__SUCCESS
;
pwr_tUInt32
i
;
pwr_tUInt32
i
;
OBJREF_STRUCT
*
objrefp
;
OBJREF_STRUCT
*
objrefp
;
pwr_tSubid
*
subidarr
;
pwr_tSubid
*
subidarr
;
...
@@ -3148,7 +3148,11 @@ gdh_RefObjectInfoList (
...
@@ -3148,7 +3148,11 @@ gdh_RefObjectInfoList (
for
(
i
=
0
;
i
<
n
;
i
++
,
objrefp
++
)
{
for
(
i
=
0
;
i
<
n
;
i
++
,
objrefp
++
)
{
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
objrefp
->
fullname
,
&
aref
);
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
objrefp
->
fullname
,
&
aref
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
dl
=
FALSE
;
gdh_GetObjectLocation
(
aref
.
Objid
,
&
dl
);
if
(
dl
)
{
rsts
=
sts
;
continue
;
}
}
else
{
}
else
{
gdh_GetObjectLocation
(
aref
.
Objid
,
&
dl
);
gdh_GetObjectLocation
(
aref
.
Objid
,
&
dl
);
}
}
...
@@ -3191,7 +3195,7 @@ gdh_RefObjectInfoList (
...
@@ -3191,7 +3195,7 @@ gdh_RefObjectInfoList (
free
(
isattrref
);
free
(
isattrref
);
free
(
object
);
free
(
object
);
return
GDH__SUCCESS
;
return
rsts
;
}
}
/**
/**
...
...
xtt/lib/ge/src/ge_graph.cpp
View file @
15215979
...
@@ -4494,13 +4494,18 @@ int Graph::ref_object_info_all()
...
@@ -4494,13 +4494,18 @@ int Graph::ref_object_info_all()
gdh_SetSubscriptionDefaults
(
dt
,
tmo
);
gdh_SetSubscriptionDefaults
(
dt
,
tmo
);
sts
=
gdh_RefObjectInfoList
(
refcnt
,
oref
,
refid
);
sts
=
gdh_RefObjectInfoList
(
refcnt
,
oref
,
refid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
{
printf
(
"** Link error for local object
\n
"
);
}
refcnt
=
0
;
refcnt
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
reflist
.
size
();
i
++
)
{
for
(
unsigned
int
i
=
0
;
i
<
reflist
.
size
();
i
++
)
{
if
(
reflist
[
i
].
m_cycle
==
cycle
[
j
])
{
if
(
reflist
[
i
].
m_cycle
==
cycle
[
j
])
{
*
reflist
[
i
].
m_data
=
oref
[
refcnt
].
adrs
;
*
reflist
[
i
].
m_data
=
oref
[
refcnt
].
adrs
;
*
reflist
[
i
].
m_id
=
refid
[
refcnt
];
*
reflist
[
i
].
m_id
=
refid
[
refcnt
];
if
(
EVEN
(
sts
)
&&
cdh_RefIdIsNull
(
refid
[
refcnt
]))
printf
(
"** %s
\n
"
,
reflist
[
i
].
m_name
);
refcnt
++
;
refcnt
++
;
}
}
}
}
...
@@ -4908,6 +4913,7 @@ int graph_attr_string_to_value( int type_id, const char *value_str,
...
@@ -4908,6 +4913,7 @@ int graph_attr_string_to_value( int type_id, const char *value_str,
break
;
break
;
}
}
case
pwr_eType_Int32
:
case
pwr_eType_Int32
:
case
pwr_eType_Enum
:
{
{
if
(
sscanf
(
value_str
,
"%d"
,
(
int
*
)
buffer_ptr
)
!=
1
)
if
(
sscanf
(
value_str
,
"%d"
,
(
int
*
)
buffer_ptr
)
!=
1
)
return
GE__INPUT_SYNTAX
;
return
GE__INPUT_SYNTAX
;
...
@@ -4937,7 +4943,6 @@ int graph_attr_string_to_value( int type_id, const char *value_str,
...
@@ -4937,7 +4943,6 @@ int graph_attr_string_to_value( int type_id, const char *value_str,
}
}
case
pwr_eType_UInt32
:
case
pwr_eType_UInt32
:
case
pwr_eType_Mask
:
case
pwr_eType_Mask
:
case
pwr_eType_Enum
:
{
{
if
(
sscanf
(
value_str
,
"%lu"
,
(
unsigned
long
*
)
buffer_ptr
)
!=
1
)
if
(
sscanf
(
value_str
,
"%lu"
,
(
unsigned
long
*
)
buffer_ptr
)
!=
1
)
return
GE__INPUT_SYNTAX
;
return
GE__INPUT_SYNTAX
;
...
...
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