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
b3fb2c15
Commit
b3fb2c15
authored
May 29, 2018
by
Marcus Nordenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb: Added IgnoreMissing parameter to Set Attribute command
parent
c3200ed1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9056 additions
and
9043 deletions
+9056
-9043
wb/lib/wb/src/wb_utl.cpp
wb/lib/wb/src/wb_utl.cpp
+7822
-7812
wb/lib/wb/src/wb_utl_api.h
wb/lib/wb/src/wb_utl_api.h
+50
-49
wb/lib/wb/src/wb_wnav_command.cpp
wb/lib/wb/src/wb_wnav_command.cpp
+1184
-1182
No files found.
wb/lib/wb/src/wb_utl.cpp
View file @
b3fb2c15
...
...
@@ -153,6 +153,7 @@ typedef struct {
FILE
*
output_file
;
int
terminal
;
int
confirm
;
int
ignore_missing
;
int
log
;
int
append
;
int
page
;
...
...
@@ -3313,7 +3314,8 @@ int utl_set_object_parameter (
int
terminal
,
const
char
*
filename
,
int
confirm
,
int
log
int
log
,
int
ignore_missing
)
{
utl_ctx
utlctx
;
...
...
@@ -3416,6 +3418,7 @@ int utl_set_object_parameter (
}
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utlctx
->
confirm
=
confirm
;
utlctx
->
ignore_missing
=
ignore_missing
;
utlctx
->
log
=
log
;
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
if
(
EVEN
(
sts
))
...
...
@@ -3444,6 +3447,7 @@ int utl_set_object_parameter (
/* Open file */
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utlctx
->
confirm
=
confirm
;
utlctx
->
ignore_missing
=
ignore_missing
;
utlctx
->
log
=
log
;
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
if
(
EVEN
(
sts
))
...
...
@@ -5676,7 +5680,8 @@ static int utl_set_parameter (
sts
=
ldh_NameToAttrRef
(
ldhses
,
aname
,
&
aref
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
)
&&
utlctx
->
ignore_missing
)
return
FOE__SUCCESS
;
//Just ignore this and continue to the next child
else
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_AttrRefToName
(
ldhses
,
&
aref
,
cdh_mNName
,
&
np
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -5991,7 +5996,12 @@ static int utl_set_parameter (
/* Set the parameter */
sts
=
ldh_WriteAttribute
(
ldhses
,
&
aref
,
object_par
,
parsize
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
{
printf
(
"FEL: sts=%d
\n
"
,
sts
);
printf
(
"FEL2: utlctx->ignore_missing=%d
\n
"
,
utlctx
->
ignore_missing
);
}
if
(
EVEN
(
sts
))
return
sts
;
/* Specific updates for grafcet orders */
sts
=
vldh_object_update_spec
(
ldhses
,
objid
);
...
...
wb/lib/wb/src/wb_utl_api.h
View file @
b3fb2c15
...
...
@@ -142,7 +142,8 @@ int utl_set_object_parameter (
int
terminal
,
const
char
*
filename
,
int
confirm
,
int
log
int
log
,
int
ignore_missing
=
0
);
int
utl_show_obj_hier_class_name
(
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
b3fb2c15
...
...
@@ -407,7 +407,7 @@ dcli_tCmdTable wnav_command_table[] = {
"/CLASS"
,
"/HIERARCHY"
,
"/NAME"
,
"/ATTRIBUTE"
,
"/SIGNALOBJECTSEG"
,
"/SIGCHANCONSEG"
,
"/SHOSIGCHANCON"
,
"/SHODETECTTEXT"
,
"/VOLUMENAME"
,
"/VALUE"
,
"/SOURCE"
,
"/MODAL
"
,
""
}
"/VALUE"
,
"/SOURCE"
,
"/MODAL"
,
"/IGNOREMISSING
"
,
""
}
},
{
"SETUP"
,
...
...
@@ -1558,6 +1558,7 @@ static int wnav_set_func( void *client_data,
int
sts_class
,
sts_hier
,
sts_name
;
pwr_tStatus
sts
;
int
confirm
;
int
ignore_missing
;
int
log
;
if
(
!
wnav
->
editmode
)
...
...
@@ -1578,6 +1579,7 @@ static int wnav_set_func( void *client_data,
}
confirm
=
EVEN
(
dcli_get_qualifier
(
"/NOCONFIRM"
,
0
,
0
));
ignore_missing
=
ODD
(
dcli_get_qualifier
(
"/IGNOREMISSING"
,
0
,
0
));
log
=
ODD
(
dcli_get_qualifier
(
"/LOG"
,
0
,
0
));
if
((
sts_class
=
ODD
(
dcli_get_qualifier
(
"/CLASS"
,
classstr
,
sizeof
(
classstr
)))))
...
...
@@ -1606,7 +1608,7 @@ static int wnav_set_func( void *client_data,
{
sts
=
utl_set_object_parameter
(
wnav
->
ldhses
,
hierstr_p
,
classstr_p
,
namestr_p
,
parameterstr
,
valuestr_p
,
termflg
,
file
,
confirm
,
lo
g
);
valuestr_p
,
termflg
,
file
,
confirm
,
log
,
ignore_missin
g
);
if
(
EVEN
(
sts
))
wnav
->
message
(
' '
,
wnav_get_message
(
sts
));
return
sts
;
...
...
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