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
815e0c1c
Commit
815e0c1c
authored
May 29, 2018
by
Marcus Nordenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb: Added option IgnoreMissing to the Wb Utility Editor
parent
b3fb2c15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
45 deletions
+46
-45
wb/lib/wb/src/wb_uted.cpp
wb/lib/wb/src/wb_uted.cpp
+46
-45
No files found.
wb/lib/wb/src/wb_uted.cpp
View file @
815e0c1c
/*
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2018 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
...
...
@@ -27,10 +27,10 @@
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
...
...
@@ -63,7 +63,7 @@
uted_sCommand
WUted
::
commands
[
UTED_MAX_COMMANDS
]
=
{
{
"List Descriptor"
,
UTED_PROC_PWRPLC
,
1
,
3
,
{
/*** QUALIFIER ***** INSERT *** INSERT HIER ** VALUE * TOGGLE *** TYPE ****/
/*** QUALIFIER ***** INSERT *** INSERT HIER ** VALUE * TOGGLE *** TYPE ****/
{
"Descriptor"
,
1
,
UTED_INS_NODE
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Hierarchy"
,
1
,
UTED_INS_PLNO
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Object"
,
1
,
UTED_INS_PLNO
,
1
,
0
,
UTED_QUAL_QUAL
},
...
...
@@ -167,6 +167,7 @@ uted_sCommand WUted::commands[ UTED_MAX_COMMANDS ] = {
{
"Attribute"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
"Value"
,
0
,
0
,
1
,
0
,
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
},
{
"Output"
,
0
,
0
,
1
,
0
,
UTED_QUAL_QUAL
},
{
""
,}}},
...
...
@@ -275,13 +276,13 @@ void WUted::set_editmode( int edit, ldh_tSesContext ldhses)
// Create a new ute window
//
WUted
::
WUted
(
void
*
wu_parent_ctx
,
const
char
*
wu_name
,
const
char
*
wu_iconname
,
ldh_tWBContext
wu_ldhwb
,
ldh_tSesContext
wu_ldhses
,
int
wu_editmode
,
void
(
*
wu_quit_cb
)(
void
*
),
pwr_tStatus
*
status
)
:
const
char
*
wu_name
,
const
char
*
wu_iconname
,
ldh_tWBContext
wu_ldhwb
,
ldh_tSesContext
wu_ldhses
,
int
wu_editmode
,
void
(
*
wu_quit_cb
)(
void
*
),
pwr_tStatus
*
status
)
:
parent_ctx
(
wu_parent_ctx
),
current_index
(
0
),
ldhwb
(
wu_ldhwb
),
ldhses
(
wu_ldhses
),
quit_cb
(
wu_quit_cb
)
{
...
...
@@ -291,7 +292,7 @@ WUted::WUted( void *wu_parent_ctx,
//
// Destroys a ute instance.
// Destroys the widget and frees allocated memory for the
// Destroys the widget and frees allocated memory for the
// context.
//
WUted
::~
WUted
()
...
...
@@ -320,36 +321,36 @@ int WUted::execute( int show)
index
=
current_index
;
command_ptr
=
&
commands
[
index
];
strcpy
(
cmd
,
command_ptr
->
command
);
i
=
0
;
qual_ptr
=
&
commands
[
index
].
qualifier
[
0
];
while
(
qual_ptr
->
qual
[
0
]
!=
0
)
{
if
(
qual_ptr
->
present
)
{
if
(
present_sts
[
i
])
{
if
(
qual_ptr
->
type
==
UTED_QUAL_QUAL
)
{
strcat
(
cmd
,
"/"
);
strcat
(
cmd
,
qual_ptr
->
qual
);
}
else
if
(
qual_ptr
->
type
==
UTED_QUAL_PAR
)
{
strcat
(
cmd
,
" "
);
strcat
(
cmd
,
qual_ptr
->
qual
);
}
if
(
qual_ptr
->
type
==
UTED_QUAL_QUAL
)
{
strcat
(
cmd
,
"/"
);
strcat
(
cmd
,
qual_ptr
->
qual
);
}
else
if
(
qual_ptr
->
type
==
UTED_QUAL_PAR
)
{
strcat
(
cmd
,
" "
);
strcat
(
cmd
,
qual_ptr
->
qual
);
}
}
}
else
{
/* Get the value */
get_value
(
i
,
value
,
sizeof
(
value
));
if
(
value
[
0
]
!=
0
)
{
if
(
qual_ptr
->
type
==
UTED_QUAL_QUAL
)
{
strcat
(
cmd
,
"/"
);
strcat
(
cmd
,
qual_ptr
->
qual
);
strcat
(
cmd
,
"="
);
strcat
(
cmd
,
value
);
}
else
if
(
qual_ptr
->
type
==
UTED_QUAL_PAR
)
{
strcat
(
cmd
,
" "
);
strcat
(
cmd
,
value
);
}
if
(
qual_ptr
->
type
==
UTED_QUAL_QUAL
)
{
strcat
(
cmd
,
"/"
);
strcat
(
cmd
,
qual_ptr
->
qual
);
strcat
(
cmd
,
"="
);
strcat
(
cmd
,
value
);
}
else
if
(
qual_ptr
->
type
==
UTED_QUAL_PAR
)
{
strcat
(
cmd
,
" "
);
strcat
(
cmd
,
value
);
}
}
}
qual_ptr
++
;
...
...
@@ -357,14 +358,14 @@ int WUted::execute( int show)
}
if
(
show
)
{
}
/* Execute something... */
if
(
command_ptr
->
process
==
UTED_PROC_PWRPLC
)
{
if
(
show
)
{
strcpy
(
command
,
"Command: pwr_plc "
);
strcat
(
command
,
cmd
);
message
(
command
);
/* Put in command window */
set_command_window
(
cmd
);
return
FOE__SUCCESS
;
...
...
@@ -374,10 +375,10 @@ int WUted::execute( int show)
strcpy
(
str
,
cmd
);
sts
=
((
Wtt
*
)
parent_ctx
)
->
wnav
->
command
(
str
);
if
(
EVEN
(
sts
))
message_error
(
sts
);
message_error
(
sts
);
else
{
message
(
"Done"
);
BEEP
;
message
(
"Done"
);
BEEP
;
}
}
else
if
(
batch_sts
==
UTED_BATCH_BATCH
)
{
...
...
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