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
4acf065b
Commit
4acf065b
authored
May 29, 2018
by
Marcus Nordenberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'set-attribute-ignore-missing-feature'
parents
dd4ccca3
815e0c1c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9102 additions
and
9088 deletions
+9102
-9088
wb/lib/wb/src/wb_uted.cpp
wb/lib/wb/src/wb_uted.cpp
+46
-45
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_uted.cpp
View file @
4acf065b
...
@@ -167,6 +167,7 @@ uted_sCommand WUted::commands[ UTED_MAX_COMMANDS ] = {
...
@@ -167,6 +167,7 @@ uted_sCommand WUted::commands[ UTED_MAX_COMMANDS ] = {
{
"Attribute"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Attribute"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Value"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Value"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Noconfirm"
,
0
,
0
,
0
,
1
,
UTED_QUAL_QUAL
},
{
"Noconfirm"
,
0
,
0
,
0
,
1
,
UTED_QUAL_QUAL
},
{
"IgnoreMissing"
,
0
,
0
,
0
,
1
,
UTED_QUAL_QUAL
},
{
"Log"
,
0
,
0
,
0
,
1
,
UTED_QUAL_QUAL
},
{
"Log"
,
0
,
0
,
0
,
1
,
UTED_QUAL_QUAL
},
{
"Output"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Output"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
""
,}}},
{
""
,}}},
...
...
wb/lib/wb/src/wb_utl.cpp
View file @
4acf065b
...
@@ -153,6 +153,7 @@ typedef struct {
...
@@ -153,6 +153,7 @@ typedef struct {
FILE
*
output_file
;
FILE
*
output_file
;
int
terminal
;
int
terminal
;
int
confirm
;
int
confirm
;
int
ignore_missing
;
int
log
;
int
log
;
int
append
;
int
append
;
int
page
;
int
page
;
...
@@ -3313,7 +3314,8 @@ int utl_set_object_parameter (
...
@@ -3313,7 +3314,8 @@ int utl_set_object_parameter (
int
terminal
,
int
terminal
,
const
char
*
filename
,
const
char
*
filename
,
int
confirm
,
int
confirm
,
int
log
int
log
,
int
ignore_missing
)
)
{
{
utl_ctx
utlctx
;
utl_ctx
utlctx
;
...
@@ -3416,6 +3418,7 @@ int utl_set_object_parameter (
...
@@ -3416,6 +3418,7 @@ int utl_set_object_parameter (
}
}
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utlctx
->
confirm
=
confirm
;
utlctx
->
confirm
=
confirm
;
utlctx
->
ignore_missing
=
ignore_missing
;
utlctx
->
log
=
log
;
utlctx
->
log
=
log
;
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
...
@@ -3444,6 +3447,7 @@ int utl_set_object_parameter (
...
@@ -3444,6 +3447,7 @@ int utl_set_object_parameter (
/* Open file */
/* Open file */
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utl_ctx_new
(
&
utlctx
,
ldhses
,
""
,
UTL_PORTRAIT
);
utlctx
->
confirm
=
confirm
;
utlctx
->
confirm
=
confirm
;
utlctx
->
ignore_missing
=
ignore_missing
;
utlctx
->
log
=
log
;
utlctx
->
log
=
log
;
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
sts
=
u_open
(
utlctx
,
filename
,
terminal
,
0
);
if
(
EVEN
(
sts
))
if
(
EVEN
(
sts
))
...
@@ -5676,7 +5680,8 @@ static int utl_set_parameter (
...
@@ -5676,7 +5680,8 @@ static int utl_set_parameter (
sts
=
ldh_NameToAttrRef
(
ldhses
,
aname
,
&
aref
);
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
);
sts
=
ldh_AttrRefToName
(
ldhses
,
&
aref
,
cdh_mNName
,
&
np
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
...
@@ -5991,7 +5996,12 @@ static int utl_set_parameter (
...
@@ -5991,7 +5996,12 @@ static int utl_set_parameter (
/* Set the parameter */
/* Set the parameter */
sts
=
ldh_WriteAttribute
(
ldhses
,
&
aref
,
object_par
,
parsize
);
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 */
/* Specific updates for grafcet orders */
sts
=
vldh_object_update_spec
(
ldhses
,
objid
);
sts
=
vldh_object_update_spec
(
ldhses
,
objid
);
...
...
wb/lib/wb/src/wb_utl_api.h
View file @
4acf065b
...
@@ -142,7 +142,8 @@ int utl_set_object_parameter (
...
@@ -142,7 +142,8 @@ int utl_set_object_parameter (
int
terminal
,
int
terminal
,
const
char
*
filename
,
const
char
*
filename
,
int
confirm
,
int
confirm
,
int
log
int
log
,
int
ignore_missing
=
0
);
);
int
utl_show_obj_hier_class_name
(
int
utl_show_obj_hier_class_name
(
...
...
wb/lib/wb/src/wb_wnav_command.cpp
View file @
4acf065b
...
@@ -407,7 +407,7 @@ dcli_tCmdTable wnav_command_table[] = {
...
@@ -407,7 +407,7 @@ dcli_tCmdTable wnav_command_table[] = {
"/CLASS"
,
"/HIERARCHY"
,
"/NAME"
,
"/ATTRIBUTE"
,
"/CLASS"
,
"/HIERARCHY"
,
"/NAME"
,
"/ATTRIBUTE"
,
"/SIGNALOBJECTSEG"
,
"/SIGCHANCONSEG"
,
"/SIGNALOBJECTSEG"
,
"/SIGCHANCONSEG"
,
"/SHOSIGCHANCON"
,
"/SHODETECTTEXT"
,
"/VOLUMENAME"
,
"/SHOSIGCHANCON"
,
"/SHODETECTTEXT"
,
"/VOLUMENAME"
,
"/VALUE"
,
"/SOURCE"
,
"/MODAL
"
,
""
}
"/VALUE"
,
"/SOURCE"
,
"/MODAL"
,
"/IGNOREMISSING
"
,
""
}
},
},
{
{
"SETUP"
,
"SETUP"
,
...
@@ -1558,6 +1558,7 @@ static int wnav_set_func( void *client_data,
...
@@ -1558,6 +1558,7 @@ static int wnav_set_func( void *client_data,
int
sts_class
,
sts_hier
,
sts_name
;
int
sts_class
,
sts_hier
,
sts_name
;
pwr_tStatus
sts
;
pwr_tStatus
sts
;
int
confirm
;
int
confirm
;
int
ignore_missing
;
int
log
;
int
log
;
if
(
!
wnav
->
editmode
)
if
(
!
wnav
->
editmode
)
...
@@ -1578,6 +1579,7 @@ static int wnav_set_func( void *client_data,
...
@@ -1578,6 +1579,7 @@ static int wnav_set_func( void *client_data,
}
}
confirm
=
EVEN
(
dcli_get_qualifier
(
"/NOCONFIRM"
,
0
,
0
));
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
));
log
=
ODD
(
dcli_get_qualifier
(
"/LOG"
,
0
,
0
));
if
((
sts_class
=
ODD
(
dcli_get_qualifier
(
"/CLASS"
,
classstr
,
sizeof
(
classstr
)))))
if
((
sts_class
=
ODD
(
dcli_get_qualifier
(
"/CLASS"
,
classstr
,
sizeof
(
classstr
)))))
...
@@ -1606,7 +1608,7 @@ static int wnav_set_func( void *client_data,
...
@@ -1606,7 +1608,7 @@ static int wnav_set_func( void *client_data,
{
{
sts
=
utl_set_object_parameter
sts
=
utl_set_object_parameter
(
wnav
->
ldhses
,
hierstr_p
,
classstr_p
,
namestr_p
,
parameterstr
,
(
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
))
if
(
EVEN
(
sts
))
wnav
->
message
(
' '
,
wnav_get_message
(
sts
));
wnav
->
message
(
' '
,
wnav_get_message
(
sts
));
return
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