Commit 8f318dbc authored by Claes Sjofors's avatar Claes Sjofors

Wb create cross, simulation and graph options. Also in wb settings

parent a302eef9
......@@ -104,9 +104,9 @@ static pwr_tStatus Configure (
delete ctx->attr;
return 1;
}
ctx->attr->close_cb = xtt_pndevice_close_cb;
ctx->attr->save_cb = xtt_pndevice_save_cb;
ctx->attr->help_cb = xtt_pndevice_help_cb;
ctx->attr->close_cb = pndevice_close_cb;
ctx->attr->save_cb = pndevice_save_cb;
ctx->attr->help_cb = pndevice_help_cb;
if ( ODD(sts))
sts = pndevice_init( ctx);
......
......@@ -9205,7 +9205,10 @@ Command create crossreferencefiles
Create files for displaying crossreferences in xtt and rtt for
the current volume.
<B>wtt> create crossreferencefiles
<B>wtt> create crossreferencefiles [/graph] [/simulation]
/graph <t>Search Ge graphs for cross references.
/simulation <t>Add cross references in simulation objects.
</TOPIC>
<TOPIC> create flowfiles <style> function
......
......@@ -1606,6 +1606,7 @@ set advanceduser<t>Set advanced user <LINK> set advanceduser
set display<t>Set format of display for selected attribute <LINK> set display
set folder <t>Set a folder in a tabbed window. <LINK> set folder
set parameter<t>Set the value of an attribute <LINK> set parameter
set signal <t>Set invert, conversion and test for signals. <LINK> set signal
set subwindow<t>View a graph in a Ge window object. <LINK> set subwindow
set graph <t>Handling of a graph <LINK> set graph
setup <t>Xtt setup <LINK> setup
......@@ -1737,6 +1738,30 @@ Set a folder in a tabbed window object.
/index= <t>index of tab to set. Starting from 0.
</TOPIC>
<TOPIC> set signal <style> function
Command set signal
Set invert, conversion, test and testvalue for a signal.
Conversion can be set on Di, Ii and Ai,
Invert can be set on Di and Do.
Test can be set on Do, Ao and Io.
Testvalue can be set on Do.
<B>xtt> set signal conversion /on [/name=]
<B>xtt> set signal conversion /off [/name=]
<B>xtt> set signal invert /on [/name=]
<B>xtt> set signal invert /off [/name=]
<B>xtt> set signal test /on [/name=]
<B>xtt> set signal test /off [/name=]
<B>xtt> set signal testvalue /on [/name=]
<B>xtt> set signal testvalue /off [/name=]
/name <t>Signal name. If not supplied the currently selected signal is used.
/on <t>Set signal entity on.
/off <t>Set signal entity off.
</TOPIC>
<TOPIC> set subwindow <style> function
Command set subwindow
......
......@@ -9091,7 +9091,10 @@ Kommando create crossreferencefiles
Skapa filer för att visa korsreferenser i xtt och rtt för aktuell volym.
<B>wtt> create crossreferencefiles
<B>wtt> create crossreferencefiles [/graph] [/simulation]
/graph <t>Leta efter korsreferenser i Ge grafer.
/simulation <t>Addera referenser i simuleringsobjekt.
</TOPIC>
<TOPIC> create flowfiles <style> function
......
......@@ -1621,6 +1621,7 @@ set advanceduser<t>S
set display<t>Sätt format for visning av utvalt attribut <LINK> set display
set folder <t>Aktivera en flik i ett flikfönster. <LINK> set folder
set parameter<t>Sätt värdet på ett attribut <LINK> set parameter
set signal <t>Sätt invert, conversion och test på signaler. <LINK> set signal
set subwindow<t>Visa in graf i ett Ge window objekt. <LINK> set subwindow
set graph <t>Hantering av graf. <LINK> set graph
setup <t>Xtt konfigurering <LINK> setup
......@@ -1752,6 +1753,31 @@ Aktivera en flik i ett flikf
/index= <t>Index på filken som ska aktiveras. Indexeringen startar från 0.
</TOPIC>
<TOPIC> set signal <style> function
Command set signal
Sätt invert, conversion, test och testvalue för en signal.
Conversion kan sättas på Di, Ii och Ai,
Invert kan sättas på Di och Do.
Test kan sättas på Do, Ao och Io.
Testvalue kan sättas på Do.
<B>xtt> set signal conversion /on [/name=]
<B>xtt> set signal conversion /off [/name=]
<B>xtt> set signal invert /on [/name=]
<B>xtt> set signal invert /off [/name=]
<B>xtt> set signal test /on [/name=]
<B>xtt> set signal test /off [/name=]
<B>xtt> set signal testvalue /on [/name=]
<B>xtt> set signal testvalue /off [/name=]
/name <t>Signalnamn. Om signalnamnet ej är angivet används den
<t>utvalda signalen.
/on <t>Sätt entitet till.
/off <t>Set entitet från.
</TOPIC>
<TOPIC> set subwindow <style> function
Command set subwindow
......
......@@ -1984,6 +1984,8 @@ void WttGtk::update_options_form()
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_force_w), build_force ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_debug_w), build_debug ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_crossref_w), build_crossref ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_crossrefsim_w), build_crossref_sim ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_crossrefgraph_w), build_crossref_graph ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_manual_w), build_manual ? TRUE : FALSE);
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(build_nocopy_w), build_nocopy ? TRUE : FALSE);
}
......@@ -2008,17 +2010,21 @@ void WttGtk::set_options()
build_force = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_force_w));
build_debug = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_debug_w));
build_crossref = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_crossref_w));
build_crossref_sim = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_crossrefsim_w));
build_crossref_graph = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_crossrefgraph_w));
build_manual = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_manual_w));
build_nocopy = (int) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(build_nocopy_w));
wnav->set_options( enable_comment, show_class, show_alias,
show_descrip, show_objref, show_objxref,
show_attrref, show_attrxref, build_force, build_debug,
build_crossref, build_manual, build_nocopy);
build_crossref, build_crossref_sim, build_crossref_graph,
build_manual, build_nocopy);
wnavnode->set_options( enable_comment, show_class, show_alias,
show_descrip, show_objref, show_objxref,
show_attrref, show_attrxref, build_force, build_debug,
build_crossref, build_manual, build_nocopy);
build_crossref, build_crossref_sim, build_crossref_graph,
build_manual, build_nocopy);
}
......@@ -3084,7 +3090,8 @@ WttGtk::WttGtk(
wnav->get_options( &enable_comment, &show_class, &show_alias,
&show_descrip, &show_objref, &show_objxref,
&show_attrref, &show_attrxref, &build_force, &build_debug,
&build_crossref, &build_manual, &build_nocopy);
&build_crossref, &build_crossref_sim, &build_crossref_graph,
&build_manual, &build_nocopy);
if ( wbctx && volid) {
wnav->volume_attached( wbctx, ldhses, 0);
......@@ -3217,6 +3224,8 @@ void WttGtk::create_options_dialog()
build_force_w = gtk_check_button_new_with_label( "Force");
build_debug_w = gtk_check_button_new_with_label( "Debug");
build_crossref_w = gtk_check_button_new_with_label( "Crossreference");
build_crossrefsim_w = gtk_check_button_new_with_label( " Simulation");
build_crossrefgraph_w = gtk_check_button_new_with_label( " Graph");
build_manual_w = gtk_check_button_new_with_label( "Manual");
build_nocopy_w = gtk_check_button_new_with_label( "Disable Copy");
......@@ -3225,6 +3234,8 @@ void WttGtk::create_options_dialog()
gtk_box_pack_start( GTK_BOX(build_vbox), build_force_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_debug_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_crossref_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_crossrefsim_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_crossrefgraph_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_manual_w, FALSE, FALSE, 7);
gtk_box_pack_start( GTK_BOX(build_vbox), build_nocopy_w, FALSE, FALSE, 7);
......
......@@ -98,6 +98,8 @@ class WttGtk : public Wtt {
GtkWidget *build_force_w;
GtkWidget *build_debug_w;
GtkWidget *build_crossref_w;
GtkWidget *build_crossrefsim_w;
GtkWidget *build_crossrefgraph_w;
GtkWidget *build_manual_w;
GtkWidget *build_nocopy_w;
GtkWidget *menu_save_w;
......
......@@ -40,12 +40,15 @@
class wb_build_opt
{
public:
wb_build_opt() : force(0), debug(0), crossref(0), manual(0), nocopy(0) {}
wb_build_opt() : force(0), debug(0), crossref(0), crossref_sim(0), crossref_graph(0),
manual(0), nocopy(0) {}
int force;
int debug;
int crossref;
int crossref_sim;
int crossref_graph;
int manual;
int nocopy;
};
#endif
\ No newline at end of file
#endif
This diff is collapsed.
......@@ -53,9 +53,9 @@ class wb_crrgen {
public:
wb_crrgen( wb_session *sp);
~wb_crrgen();
void load( pwr_tStatus *sts, int sim = 0);
void load( pwr_tStatus *sts, int sim = 0, int graph = 0);
void write( pwr_tStatus *sts);
void write_code( pwr_tStatus *rsts);
};
#endif
\ No newline at end of file
#endif
......@@ -2314,6 +2314,12 @@ int WNav::setup()
new WItemLocal( this, "Build.CrossReferences", "setup_build_cross",
pwr_eType_Int32, sizeof( gbl.build.crossref), 0, 1,
(void *) &gbl.build.crossref, NULL, flow_eDest_IntoLast);
new WItemLocal( this, "Build.CrossReferences.Graph", "setup_build_cross_graph",
pwr_eType_Int32, sizeof( gbl.build.crossref_graph), 0, 1,
(void *) &gbl.build.crossref_graph, NULL, flow_eDest_IntoLast);
new WItemLocal( this, "Build.CrossReferences.Sim", "setup_build_cross_sim",
pwr_eType_Int32, sizeof( gbl.build.crossref_sim), 0, 1,
(void *) &gbl.build.crossref_sim, NULL, flow_eDest_IntoLast);
new WItemLocal( this, "Build.Manual", "setup_build_manual",
pwr_eType_Int32, sizeof( gbl.build.manual), 0, 1,
(void *) &gbl.build.manual, NULL, flow_eDest_IntoLast);
......@@ -2348,7 +2354,8 @@ int WNavGbl::symbolfile_exec( void *wnav)
void WNav::set_options( int ena_comment, int sh_class, int sh_alias, int sh_descrip,
int sh_objref, int sh_objxref, int sh_attrref, int sh_attrxref,
int bu_force, int bu_debug, int bu_crossref, int bu_manual, int bu_nocopy)
int bu_force, int bu_debug, int bu_crossref, int bu_crossrefsim,
int bu_crossrefgraph, int bu_manual, int bu_nocopy)
{
gbl.enable_comment = ena_comment;
gbl.show_class = sh_class;
......@@ -2361,6 +2368,8 @@ void WNav::set_options( int ena_comment, int sh_class, int sh_alias, int sh_desc
gbl.build.force = bu_force;
gbl.build.debug = bu_debug;
gbl.build.crossref = bu_crossref;
gbl.build.crossref_sim = bu_crossrefsim;
gbl.build.crossref_graph = bu_crossrefgraph;
gbl.build.manual = bu_manual;
gbl.build.nocopy = bu_nocopy;
ldh_refresh( pwr_cNObjid);
......@@ -2368,7 +2377,8 @@ void WNav::set_options( int ena_comment, int sh_class, int sh_alias, int sh_desc
void WNav::get_options( int *ena_comment, int *sh_class, int *sh_alias, int *sh_descrip,
int *sh_objref, int *sh_objxref, int *sh_attrref, int *sh_attrxref,
int *bu_force, int *bu_debug, int *bu_crossref, int *bu_manual, int *bu_nocopy)
int *bu_force, int *bu_debug, int *bu_crossref, int *bu_crossrefsim,
int *bu_crossrefgraph, int *bu_manual, int *bu_nocopy)
{
*ena_comment = gbl.enable_comment;
*sh_class = gbl.show_class;
......@@ -2381,6 +2391,8 @@ void WNav::get_options( int *ena_comment, int *sh_class, int *sh_alias, int *sh_
*bu_force = gbl.build.force;
*bu_debug = gbl.build.debug;
*bu_crossref = gbl.build.crossref;
*bu_crossrefsim = gbl.build.crossref_sim;
*bu_crossrefgraph = gbl.build.crossref_graph;
*bu_manual = gbl.build.manual;
*bu_nocopy = gbl.build.nocopy;
}
......@@ -2450,6 +2462,16 @@ int WNav::save_settnings( ofstream& fp)
else
fp << " set nobuildcrossref /local" << endl;
if ( gbl.build.crossref_sim)
fp << " set buildcrossrefsim /local" << endl;
else
fp << " set nobuildcrossrefsim /local" << endl;
if ( gbl.build.crossref_graph)
fp << " set buildcrossrefgraph /local" << endl;
else
fp << " set nobuildcrossrefgraph /local" << endl;
if ( gbl.build.manual)
fp << " set buildmanual /local" << endl;
else
......@@ -3723,4 +3745,4 @@ char *wnav_get_message( int sts)
static char msg[256];
return msg_GetMsg( sts, msg, sizeof(msg));
}
\ No newline at end of file
}
......@@ -414,10 +414,12 @@ class WNav : public WUtility{
void collapse();
void set_options( int ena_comment, int sh_class, int sh_alias, int sh_descrip,
int sh_objref, int sh_objxref, int sh_attrref, int sh_attrxref,
int bu_force, int bu_debug, int bu_crossref, int bu_manual, int bu_nocopy);
int bu_force, int bu_debug, int bu_crossref, int bu_crossrefsim,
int bu_crossrefgraph, int bu_manual, int bu_nocopy);
void get_options( int *ena_comment, int *sh_class, int *sh_alias, int *sh_descrip,
int *sh_objref, int *sh_objxref, int *sh_attrref, int *sh_attrxref,
int *bu_force, int *bu_debug, int *bu_crossref, int *bu_manual, int *bu_nocopy);
int *bu_force, int *bu_debug, int *bu_crossref, int *bu_crossrefsim,
int *bu_crossrefgraph, int *bu_manual, int *bu_nocopy);
int save_settnings( ofstream& fp);
int node_to_objid( brow_tNode node, pwr_tObjid *objid);
int unselect_objid( pwr_tObjid objid);
......@@ -478,4 +480,4 @@ void wnav_attrvalue_to_string( ldh_tSesContext ldhses, int type_id,
void *value_ptr, char **buff, int *len);
char *wnav_get_message( int sts);
#endif
\ No newline at end of file
#endif
......@@ -314,7 +314,7 @@ dcli_tCmdTable wnav_command_table[] = {
"/NAME", "/IDENTITY", "/FILES", "/OUT", "/IGNORE",
"/DIRECTORY", "/DATABASE", "/SERVER",
"/PLCPGM", "/HIERARCHY", "/FROM_PLCPGM", "/TEMPLATE",
"/SIMULATION", "/RTONLY", "/DEPENDENCY", "/DESCRIPTION", ""}
"/SIMULATION", "/GRAPH", "/RTONLY", "/DEPENDENCY", "/DESCRIPTION", ""}
},
{
"NEW",
......@@ -1328,6 +1328,34 @@ static int wnav_set_func( void *client_data,
else
wnav->gbl.build.crossref = 0;
}
else if ( cdh_NoCaseStrncmp( arg1_str, "BUILDCROSSREFSIM", strlen( arg1_str)) == 0)
{
if ( EVEN( dcli_get_qualifier( "/LOCAL", 0, 0)))
(wnav->gbl_command_cb)( wnav->parent_ctx, "SET BUILDCROSSREFSIM");
else
wnav->gbl.build.crossref_sim = 1;
}
else if ( cdh_NoCaseStrncmp( arg1_str, "NOBUILDCROSSREFSIM", strlen( arg1_str)) == 0)
{
if ( EVEN( dcli_get_qualifier( "/LOCAL", 0, 0)))
(wnav->gbl_command_cb)( wnav->parent_ctx, "SET NOBUILDCROSSREFSIM");
else
wnav->gbl.build.crossref_sim = 0;
}
else if ( cdh_NoCaseStrncmp( arg1_str, "BUILDCROSSREFGRAPH", strlen( arg1_str)) == 0)
{
if ( EVEN( dcli_get_qualifier( "/LOCAL", 0, 0)))
(wnav->gbl_command_cb)( wnav->parent_ctx, "SET BUILDCROSSREFGRAPH");
else
wnav->gbl.build.crossref_graph = 1;
}
else if ( cdh_NoCaseStrncmp( arg1_str, "NOBUILDCROSSREFGRAPH", strlen( arg1_str)) == 0)
{
if ( EVEN( dcli_get_qualifier( "/LOCAL", 0, 0)))
(wnav->gbl_command_cb)( wnav->parent_ctx, "SET NOBUILDCROSSREFGRAPH");
else
wnav->gbl.build.crossref_graph = 0;
}
else if ( cdh_NoCaseStrncmp( arg1_str, "BUILDMANUAL", strlen( arg1_str)) == 0)
{
if ( EVEN( dcli_get_qualifier( "/LOCAL", 0, 0)))
......@@ -4259,10 +4287,11 @@ static int wnav_create_func( void *client_data,
if ( EVEN(sts)) return sts;
int simulate = ODD( dcli_get_qualifier( "/SIMULATION", 0, 0));
int graph = ODD( dcli_get_qualifier( "/GRAPH", 0, 0));
wb_crrgen crrgen( (wb_session *)wnav->ldhses);
crrgen.load( &sts, simulate);
crrgen.load( &sts, simulate, graph);
crrgen.write( &sts);
crrgen.write_code( &sts);
}
......@@ -7825,4 +7854,4 @@ int WNav::check_new_volumename( char *vname)
return WNAV__VOLNAMEEXIST;
else
return WNAV__SUCCESS;
}
\ No newline at end of file
}
......@@ -186,6 +186,8 @@ class Wtt : public WUtility {
int build_force;
int build_debug;
int build_crossref;
int build_crossref_sim;
int build_crossref_graph;
int build_manual;
int build_nocopy;
int wnav_mapped;
......
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