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
5415f099
Commit
5415f099
authored
Sep 11, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc compile error for reference to disabled signal (not in template code)
parent
3c0ae261
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
wb/lib/wb/src/wb_gcg.cpp
wb/lib/wb/src/wb_gcg.cpp
+45
-0
No files found.
wb/lib/wb/src/wb_gcg.cpp
View file @
5415f099
...
@@ -572,6 +572,9 @@ static int gcg_check_attrref(
...
@@ -572,6 +572,9 @@ static int gcg_check_attrref(
vldh_t_node
node
,
vldh_t_node
node
,
const
char
*
attr
);
const
char
*
attr
);
static
int
gcg_is_in_focode
(
gcg_ctx
gcgctx
,
vldh_t_node
node
);
/*_Methods defined for this module_______________________________________*/
/*_Methods defined for this module_______________________________________*/
...
@@ -6534,6 +6537,7 @@ int gcg_comp_m8( gcg_ctx gcgctx, vldh_t_node node)
...
@@ -6534,6 +6537,7 @@ int gcg_comp_m8( gcg_ctx gcgctx, vldh_t_node node)
pwr_sAttrRef
*
attrref_ptr
;
pwr_sAttrRef
*
attrref_ptr
;
ldh_tSesContext
ldhses
;
ldh_tSesContext
ldhses
;
pwr_tClassId
cid
;
pwr_tClassId
cid
;
pwr_tDisableAttr
disabled
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
ldhses
=
(
node
->
hn
.
wind
)
->
hw
.
ldhses
;
...
@@ -6566,6 +6570,13 @@ int gcg_comp_m8( gcg_ctx gcgctx, vldh_t_node node)
...
@@ -6566,6 +6570,13 @@ int gcg_comp_m8( gcg_ctx gcgctx, vldh_t_node node)
return
GSX__NEXTNODE
;
return
GSX__NEXTNODE
;
}
}
/* Check if disabled */
if
(
attrref
.
Flags
.
b
.
ObjectAttr
&&
attrref
.
Flags
.
b
.
DisableAttr
)
{
sts
=
ldh_AttributeDisabled
(
ldhses
,
&
attrref
,
&
disabled
);
if
(
ODD
(
sts
)
&&
disabled
&&
!
gcg_is_in_focode
(
gcgctx
,
node
))
gcg_error_msg
(
gcgctx
,
GSX__DISABLED
,
node
);
}
/* Check that the class of the referenced object is correct */
/* Check that the class of the referenced object is correct */
if
(
node
->
ln
.
cid
==
pwr_cClass_GetDi
)
{
if
(
node
->
ln
.
cid
==
pwr_cClass_GetDi
)
{
if
(
cid
!=
pwr_cClass_Di
)
{
if
(
cid
!=
pwr_cClass_Di
)
{
...
@@ -7862,6 +7873,7 @@ int gcg_comp_m11( gcg_ctx gcgctx, vldh_t_node node)
...
@@ -7862,6 +7873,7 @@ int gcg_comp_m11( gcg_ctx gcgctx, vldh_t_node node)
gcg_t_nocondef
nocondef
[
2
];
gcg_t_nocondef
nocondef
[
2
];
unsigned
long
nocontype
[
2
];
unsigned
long
nocontype
[
2
];
char
*
name
;
char
*
name
;
pwr_tDisableAttr
disabled
;
nocondef
[
1
].
bo
=
1
;
nocondef
[
1
].
bo
=
1
;
nocontype
[
1
]
=
GCG_BOOLEAN
;
nocontype
[
1
]
=
GCG_BOOLEAN
;
...
@@ -8032,6 +8044,13 @@ int gcg_comp_m11( gcg_ctx gcgctx, vldh_t_node node)
...
@@ -8032,6 +8044,13 @@ int gcg_comp_m11( gcg_ctx gcgctx, vldh_t_node node)
}
}
free
(
nocondef_ptr
);
free
(
nocondef_ptr
);
/* Check if disabled */
if
(
refattrref
.
Flags
.
b
.
ObjectAttr
&&
refattrref
.
Flags
.
b
.
DisableAttr
)
{
sts
=
ldh_AttributeDisabled
(
ldhses
,
&
refattrref
,
&
disabled
);
if
(
ODD
(
sts
)
&&
disabled
&&
!
gcg_is_in_focode
(
gcgctx
,
node
))
gcg_error_msg
(
gcgctx
,
GSX__DISABLED
,
node
);
}
if
(
cid
==
pwr_cClass_Sv
||
if
(
cid
==
pwr_cClass_Sv
||
cid
==
pwr_cClass_ATv
||
cid
==
pwr_cClass_ATv
||
cid
==
pwr_cClass_DTv
)
{
cid
==
pwr_cClass_DTv
)
{
...
@@ -16066,5 +16085,31 @@ static int gcg_check_attrref( gcg_ctx gcgctx, vldh_t_node node, const char *attr
...
@@ -16066,5 +16085,31 @@ static int gcg_check_attrref( gcg_ctx gcgctx, vldh_t_node node, const char *attr
return
GSX__SUCCESS
;
return
GSX__SUCCESS
;
}
}
static
int
gcg_is_in_focode
(
gcg_ctx
gcgctx
,
vldh_t_node
node
)
{
pwr_tStatus
sts
;
pwr_tOid
parent
;
pwr_tCid
cid
;
pwr_tClassId
bodyclass
;
pwr_sGraphPlcNode
*
graphbody
;
int
size
;
sts
=
ldh_GetParent
(
gcgctx
->
ldhses
,
node
->
ln
.
oid
,
&
parent
);
while
(
ODD
(
sts
))
{
sts
=
ldh_GetObjectClass
(
gcgctx
->
ldhses
,
parent
,
&
cid
);
if
(
EVEN
(
sts
))
return
0
;
if
(
cid
==
pwr_cClass_plc
)
break
;
sts
=
ldh_GetClassBody
(
gcgctx
->
ldhses
,
cid
,
"GraphPlcNode"
,
&
bodyclass
,
(
char
**
)
&
graphbody
,
&
size
);
if
(
ODD
(
sts
)
&&
graphbody
->
compmethod
==
58
)
return
1
;
sts
=
ldh_GetParent
(
gcgctx
->
ldhses
,
parent
,
&
parent
);
}
return
0
;
}
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