Commit 6f804dc5 authored by Claes Sjofors's avatar Claes Sjofors

Runtime monitor: new helpfile and Reset button

parent 83b906d9
<topic> index
Runtime Monitor
The Runtime Monitor is a window to start and stop the Proview runtime environment.
<h1> Start Runtime
<image> rtmon_fig2.png
The runtime environment is started by pressing the 'Start Runtime' button.
When the runtime has started the gray 'Down' label changes to a green 'Running' label.
If the runtime doesn't start, press the 'Reset Runtime' to remove any remaining
shared resources or processes, and then press 'Start Runtime' again.
<h1> Stop Runtime
<image> rtmon_fig1.png
Stop the runtime environment by pressing the 'Stop Runtime' button.
If the runtime is not stopping, activate the 'Reset Runtime' also.
While the 'Stop Runtime' politely asks the runtime processes to terminate, the
'Reset Runtime' brutally kills them.
<h1>Start operator window
When Proview is running, the operator window can be started from the menu,
File/Start Operator Environment. If several operator places are configured
in the system, a operator place is choosen from a list, and the operator
window for this operator is viewed.
There is also an icon in the toolbar to open the operator window.
<image> rtmon_fig4.png
<image> rtmon_fig6.png
<h1> Start Runtime Navigator
The runtime navigator, xtt, is started from 'File/Start Runtime Navigator' in the menu,
or from the corresponding icon in the toolbar.
<image> rtmon_fig7.png
<h1>System status
In the lower part of the window, the status of the runtime environment is shown.
When runtime is stopped, the status is 'Connection down to server', and the normal
status when runtime is started is 'Proview running'.
The SystemStatus map can be opened to show the individual status of the system
and application processes.
<image> rtmon_fig3.png
If an error status is recieved, the 'Running' label is colored red. By opening
the SystemStatus map, you can se which process is causing the error status.
<image> rtmon_fig5.png
The status is fetched from statusserver, which has to be configured in the started
Proview system.
<h1> Start Runtime Monitor
The runtime monitor can be started
- from the the prompt in a terminal window with the command 'pwr_rtmon'.
- from the Configurator tools menu.
- from the File menu in the Status Monitor.
</topic>
\ No newline at end of file
......@@ -221,6 +221,7 @@ copy : $(export_pdf) $(export_pdf_en_us) $(export_pdf_sv_se) \
$(export_gif_exe) $(export_gif_en_us) $(export_gif_sv_se) \
$(export_png_exe) $(export_png_en_us) $(export_png_sv_se) \
$(exe_dir)/en_us/wtt_help.dat $(exe_dir)/sv_se/wtt_help.dat \
$(exe_dir)/en_us/rtmon_help.dat \
$(exe_dir)/en_us/man_dg.dat $(exe_dir)/sv_se/man_dg.dat \
$(doc_dir)/en_us/man_dg_index.html $(doc_dir)/sv_se/man_dg_index.html \
$(doc_dir)/en_us/man_dg.pdf $(doc_dir)/sv_se/man_dg.pdf \
......@@ -265,11 +266,14 @@ $(exe_dir)/en_us/wtt_help.dat : $(pwre_sroot)/doc/man/en_us/wtt_help.dat
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/sv_se/wtt_help.dat : $(pwre_sroot)/doc/man/sv_se/wtt_help.dat
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/en_us/rtmon_help.dat : $(pwre_sroot)/doc/man/en_us/rtmon_help.dat
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/en_us/man_dg.dat : $(pwre_sroot)/doc/man/en_us/man_dg.dat
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
......
......@@ -25,6 +25,7 @@
#include "pwr.h"
#include "co_rtmon_gtk.h"
#include "co_xhelp_gtk.h"
static void usage()
{
......@@ -33,6 +34,7 @@ static void usage()
static void rtmon_help_cb( void *ctx, const char *topic)
{
CoXHelp::dhelp( "index", "", navh_eHelpFile_Other, "$pwr_lang/rtmon_help.dat", 0);
}
static void rtmon_close_cb( void *ctx)
......@@ -59,6 +61,10 @@ int main( int argc, char *argv[])
gtk_init( &argc, &argv);
// Create help window
CoXHelp *xhelp = new CoXHelpGtk( 0, 0, xhelp_eUtility_Xtt, &sts);
CoXHelp::set_default( xhelp);
RtMon *rtmon = new RtMonGtk( NULL, NULL, "Runtime Monitor", display, &sts);
rtmon->help_cb = rtmon_help_cb;
rtmon->close_cb = rtmon_close_cb;
......
......@@ -69,7 +69,7 @@ RtMonGtk::RtMonGtk( void *rtmon_parent_ctx,
strcat( title, rtmon_name);
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", 330,
"default-height", 340,
"default-width", 480,
"title", title,
NULL);
......@@ -97,8 +97,8 @@ RtMonGtk::RtMonGtk( void *rtmon_parent_ctx,
gtk_widget_add_accelerator( file_close, "activate", accel_g,
'w', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget *file_reset = gtk_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("_Reset Runtime"));
g_signal_connect(file_reset, "activate", G_CALLBACK(activate_reset), this);
// GtkWidget *file_reset = gtk_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("_Reset Runtime"));
// g_signal_connect(file_reset, "activate", G_CALLBACK(activate_reset), this);
file_xtt = gtk_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("_Start Runtime Navigator"));
g_signal_connect(file_xtt, "activate", G_CALLBACK(activate_xtt), this);
......@@ -107,7 +107,7 @@ RtMonGtk::RtMonGtk( void *rtmon_parent_ctx,
g_signal_connect(file_op, "activate", G_CALLBACK(activate_op), this);
GtkMenu *file_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_reset);
// gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_reset);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_xtt);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_op);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_close);
......@@ -242,6 +242,12 @@ RtMonGtk::RtMonGtk( void *rtmon_parent_ctx,
g_signal_connect( bbox_stop, "clicked",
G_CALLBACK(activate_stop), this);
lbox_reset = gtk_button_new_with_label( "Reset Runtime");
gtk_widget_set_size_request( lbox_reset, 170, 25);
g_object_set( lbox_reset, "can-focus", FALSE, NULL);
g_signal_connect( lbox_reset, "clicked",
G_CALLBACK(activate_reset), this);
bbox_label = gtk_label_new( "Down");
bbox_label_eb = gtk_event_box_new();
gtk_container_add( GTK_CONTAINER(bbox_label_eb), bbox_label);
......@@ -256,7 +262,9 @@ RtMonGtk::RtMonGtk( void *rtmon_parent_ctx,
gtk_box_pack_end( GTK_BOX(bbox), bbox_stop, FALSE, FALSE, 5);
GtkWidget *lbox = gtk_vbox_new( FALSE, 0);
g_object_set( lbox, "spacing", 33, NULL);
gtk_box_pack_start( GTK_BOX(lbox), bbox_label_fr, FALSE, FALSE, 5);
gtk_box_pack_end( GTK_BOX(lbox), lbox_reset, FALSE, FALSE, 5);
GtkWidget *bbox_vbox = gtk_hbox_new( FALSE, 0);
gtk_box_pack_start( GTK_BOX(bbox_vbox), bbox_image, FALSE, FALSE, 30);
......
......@@ -45,6 +45,7 @@ class RtMonGtk : public RtMon {
GtkWidget *bbox_start;
GtkWidget *bbox_restart;
GtkWidget *bbox_stop;
GtkWidget *lbox_reset;
GtkWidget *bbox_image;
GtkWidget *bbox_image_gray;
GtkWidget *tools_xtt;
......
......@@ -63,7 +63,7 @@ RtMon::~RtMon()
void RtMon::activate_help()
{
if ( help_cb)
(help_cb)( parent_ctx, "runtime monitor");
(help_cb)( parent_ctx, "index /helpfile=\"$pwr_lang/rtmon_help.dat\"");
}
void RtMon::activate_start()
......@@ -100,12 +100,26 @@ void RtMon::stop_ok_cb( void *ctx, void *data)
}
void RtMon::activate_reset()
{
char nodename[40];
char text[80] = "Do you want to reset Runtime Environment on ";
pwr_tStatus sts;
syi_NodeName( &sts, nodename, sizeof(nodename));
strcat( text, nodename);
wow->DisplayQuestion( this, "Reset Runtime", text, reset_ok_cb, 0, 0);
}
void RtMon::reset_ok_cb( void *ctx, void *data)
{
char cmd[] = ". pwr_stop.sh";
system( cmd);
}
void RtMon::activate_xtt()
{
pwr_tCmd cmd;
......
......@@ -66,6 +66,7 @@ class RtMon {
void activate_xtt();
void activate_op();
static void stop_ok_cb( void *ctx, void *data);
static void reset_ok_cb( void *ctx, void *data);
};
#endif
......
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