Commit 4acf065b authored by Marcus Nordenberg's avatar Marcus Nordenberg

Merge branch 'set-attribute-ignore-missing-feature'

parents dd4ccca3 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) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
/*
* 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.
**/
......@@ -46,18 +46,18 @@ extern "C" {
#endif
typedef struct utl_s_objidlist {
pwr_tObjid objid;
struct utl_s_objidlist *next;
} utl_t_objidlist;
pwr_tObjid objid;
struct utl_s_objidlist *next;
} utl_t_objidlist;
typedef struct {
pwr_tString40 volume_name;
pwr_tVolumeId volume_id;
pwr_tString40 p1;
pwr_tString40 p2;
pwr_tString40 p3;
pwr_tString40 p4;
} utl_t_volumelist;
pwr_tString40 volume_name;
pwr_tVolumeId volume_id;
pwr_tString40 p1;
pwr_tString40 p2;
pwr_tString40 p3;
pwr_tString40 p4;
} utl_t_volumelist;
void utl_objidlist_free (
......@@ -73,7 +73,7 @@ int utl_objidlist_insert (
void *dum3
);
int utl_toupper (
int utl_toupper (
char *str_upper,
char *str
);
......@@ -132,7 +132,7 @@ int utl_show_object (
char *filename
);
int utl_set_object_parameter (
int utl_set_object_parameter (
ldh_tSesContext ldhses,
char *hiername,
char *classname,
......@@ -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 (
......@@ -182,13 +183,13 @@ int utl_show_connection (
char *filename
);
int utl_link (
int utl_link (
ldh_tSesContext ldhses,
char *nodename,
int debug
);
int utl_compile (
int utl_compile (
ldh_tSesContext ldhses,
ldh_tWBContext ldhwb,
char *plcname,
......@@ -201,14 +202,14 @@ int utl_compile (
char *volumes
);
int utl_crossref_object (
int utl_crossref_object (
ldh_tSesContext ldhses,
char *objectname,
int terminal,
char *filename
);
int utl_crossref_hier_class_name (
int utl_crossref_hier_class_name (
ldh_tSesContext ldhses,
char *hiername,
char *classname,
......@@ -303,7 +304,7 @@ int utl_create_object (
int before
);
int utl_move_object (
int utl_move_object (
ldh_tSesContext ldhses,
char *source_name,
char *destination_name,
......@@ -314,7 +315,7 @@ int utl_move_object (
int before
);
int utl_copy_objects (
int utl_copy_objects (
ldh_tSesContext ldhses,
char *source_name,
char *destination_name,
......@@ -332,7 +333,7 @@ int utl_move_window (
char *destination_name
);
int utl_connect (
int utl_connect (
ldh_tSesContext ldhses,
char *object_name,
char *connect_name,
......@@ -368,7 +369,7 @@ int utl_delete_volume (
int log
);
int utl_export_object (
int utl_export_object (
ldh_tSesContext ldhses,
char *name,
char *prefix,
......@@ -378,10 +379,10 @@ int utl_export_object (
int append
);
int utl_realloc_s(
char **list_ptr,
int count,
int size,
int utl_realloc_s(
char **list_ptr,
int count,
int size,
int *alloc
);
......@@ -402,8 +403,8 @@ int utl_create_bootfile (
);
int utl_set_template(
ldh_tSesContext ldhses,
int utl_set_template(
ldh_tSesContext ldhses,
int signalobjectsegments,
int showsigchancon,
int sigchanconsegments,
......@@ -427,23 +428,23 @@ pwr_tStatus utl_get_module_time (
);
pwr_tStatus utl_read_line( char *line,
int maxsize,
FILE *file,
int *line_count);
int maxsize,
FILE *file,
int *line_count);
pwr_tStatus utl_create_volume(
ldh_tWBContext ldhwb,
char *volumename,
char *volumeclass_str,
char *volumeid_str);
pwr_tStatus utl_create_volume(
ldh_tWBContext ldhwb,
char *volumename,
char *volumeclass_str,
char *volumeid_str);
pwr_tStatus utl_show_volumes(
pwr_tStatus utl_show_volumes(
ldh_tSesContext ldhses,
int allvolumes
);
int utl_revert (
int utl_revert (
ldh_tSesContext ldhses,
int confirm
);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment