Commit 5d0f1cb5 authored by Claes Sjofors's avatar Claes Sjofors

Status Monitor: change node dialog and language support added, and some documentation

parent a7c0bb83
......@@ -120,3 +120,5 @@
090909 cs plc New enumeration type for OpMode in PID mode objects.
090916 cs wbl User and RttConfig merged into OpPlace object. User and RttConfig is now obsolete.
090916 cs linksup SystemStatus attribute in NodeLinkSup object contains system status of supervised node.
091005 cs gdh Bugfix in DetachedVolume. Attaching objects on a remote node didn't work.
091005 cs statusmon Change node dialog and language support added. Some documentation.
\ No newline at end of file
......@@ -69,6 +69,7 @@ Plc Trace <link> opg_trace
Setup script <link> opg_setupfile
Users and Privileges <link> opg_security
Function Keys <link> opg_functionkeys
Status Monitor <link> opg_statusmonitor
Xtt Commands <link> help command
Script <link> script
Index <index>
......@@ -1468,6 +1469,31 @@ A '#' sign in the first position denotes a comment.
</topic>
</chapter>
<chapter>
<topic> opg_statusmonitor
Status Monitor
The Status Monitor is a tool to supervise and handle process- and operator
stations. You add nodes that you want to supervise and the statusmonitor views
status for the node, with color indication and status text.
<image> opg_fig38.png
<b>Fig The Status Monitor
<h1>Add and remove nodes
<image> opg_fig41.png
<b>Fig Adding of a node
<image> opg_fig39.png
<b>Fig Node info
<image> opg_fig40.png
<b>Fig Process status for a node
</topic>
</chapter>
<chapter>
<TOPIC> help command
Xtt commands
......
......@@ -70,6 +70,7 @@ Plc trace <link> opg_trace
Setup-skript <link> opg_setupfile
Användare och privilegier <link> opg_security
Funktionstangenter <link> opg_functionkeys
Status monitorn <link> opg_statusmonitor
Xtt kommandon <link> help command
Script <link> script
Index <index>
......@@ -1457,6 +1458,53 @@ Ett '#' tecken f
</topic>
</chapter>
<chapter>
<topic> opg_statusmonitor
Statusmonitorn
Statusmonitorn är ett verktyg för att övervaka och hantera process- och
operatörs-stationer. Man adderar noder som man vill övervaka och statusmonitorn
visar status for noden i form av en färgmarkering och status-texten.
<image> opg_fig38.png
<b>Fig Status monitorn
<h1>Addera och ta bort noder
En nod adderas till statusmonitorn från File/Add Node i meny, eller från plus-tecknet
i verktygspanelen. En dialog öppnas där nodens namn anges. Man kan även ange en
beskrivning om man vill ha en annan beskrivning än den i nodens node-objekt.
Det är även möjlig att ange ett operatörsplats-objekt på noden, man kan då öppna
denna operatörsplats från menyn eller verkygspanelen. OBS! Ange inte en
operatörsplats som redan är i bruk på en operatörsplats. OpPlace objektet ska vara
av typen 'Underhåll' eller dedicerad för statusmonitorn.
En nod tas bort från statusmonitorn genom att noden väljs ut, och 'File/Remove Node'
aktiveras i menyn.
<image> opg_fig41.png
<b>Fig Addera en nod till monitorn
<h1>Status
Default är det systemstatus som övervakas. Systemstatus är en summastatus för
för processerna i systemet, och berättar hur noden mår ur systemets synvinkel.
I den här moden fungerar statusmonitorn som en övervakning för den systemansvarige.
Man kan även visa applikations-status, dvs en status som sätts av en
applikation i systemet, och som t ex visar status för processen eller för
en anläggningsdel. På det här sättet kan statusmonitorn fungera som en slags
överordnad operatörsplats, där man med hjälp av felstatus indikerar att noden
behöver operatörens uppmärksamhet, och operatören sedan kan gå vidare och öppna
operatörsplatsen på noden, om situation kräver detta.
<image> opg_fig39.png
<b>Fig Info om en nod
<image> opg_fig40.png
<b>Fig Status for processer på noden
</topic>
</chapter>
<chapter>
<TOPIC> help command
Xtt kommandon
......
......@@ -59,7 +59,7 @@ MsgWindowGtk::MsgWindowGtk (
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", window_height,
"default-width", window_width,
"title", msg_name,
"title", CoWowGtk::translate_utf8(msg_name),
NULL);
g_signal_connect( toplevel, "delete_event", G_CALLBACK(delete_event), this);
......@@ -74,33 +74,41 @@ MsgWindowGtk::MsgWindowGtk (
GtkMenuBar *menu_bar = (GtkMenuBar *) g_object_new(GTK_TYPE_MENU_BAR, NULL);
// File Entry
GtkWidget *file_clear = gtk_menu_item_new_with_mnemonic( "C_lear");
GtkWidget *file_clear = gtk_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("C_lear"));
g_signal_connect( file_clear, "activate",
G_CALLBACK(MsgWindowGtk::activate_clear), this);
GtkWidget *file_close = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
GtkWidget *file_close = gtk_image_menu_item_new_with_mnemonic( CoWowGtk::translate_utf8("_Close"));
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(file_close),
gtk_image_new_from_stock( "gtk-close", GTK_ICON_SIZE_MENU));
g_signal_connect(file_close, "activate", G_CALLBACK(MsgWindowGtk::activate_exit), this);
GtkMenu *file_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_clear);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_close);
GtkWidget *file = gtk_menu_item_new_with_mnemonic("_File");
GtkWidget *file = gtk_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_File"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), file);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), GTK_WIDGET(file_menu));
// View menu
GtkWidget *view_zoom_in = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
GtkWidget *view_zoom_in = gtk_image_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("Zoom _In"));
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(view_zoom_in),
gtk_image_new_from_stock( "gtk-zoom-in", GTK_ICON_SIZE_MENU));
g_signal_connect(view_zoom_in, "activate", G_CALLBACK(MsgWindowGtk::activate_zoom_in), this);
gtk_widget_add_accelerator( view_zoom_in, "activate", accel_g,
'i', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget *view_zoom_out = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
GtkWidget *view_zoom_out = gtk_image_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("Zoom _Out"));
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(view_zoom_out),
gtk_image_new_from_stock( "gtk-zoom-out", GTK_ICON_SIZE_MENU));
g_signal_connect(view_zoom_out, "activate", G_CALLBACK(MsgWindowGtk::activate_zoom_out), this);
gtk_widget_add_accelerator( view_zoom_out, "activate", accel_g,
'o', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget *view_zoom_reset = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
GtkWidget *view_zoom_reset = gtk_image_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("Zoom _Reset"));
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(view_zoom_reset),
gtk_image_new_from_stock( "gtk-zoom-100", GTK_ICON_SIZE_MENU));
g_signal_connect(view_zoom_reset, "activate", G_CALLBACK(MsgWindowGtk::activate_zoom_reset), this);
GtkMenu *view_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
......@@ -108,7 +116,7 @@ MsgWindowGtk::MsgWindowGtk (
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_out);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_reset);
GtkWidget *view = gtk_menu_item_new_with_mnemonic("_View");
GtkWidget *view = gtk_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_View"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), view);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), GTK_WIDGET(view_menu));
......
......@@ -45,27 +45,40 @@ class NodelistGtk : public Nodelist {
GtkWidget *form_nodelist;
GtkWidget *nodelistnav_widget;
GdkCursor *clock_cursor;
GtkWidget *india_widget;
GtkWidget *india_label;
GtkWidget *india_label2;
GtkWidget *india_label3;
GtkWidget *india_text;
GtkWidget *india_text2;
GtkWidget *india_text3;
GtkWidget *add_india_widget;
GtkWidget *add_india_label;
GtkWidget *add_india_label2;
GtkWidget *add_india_label3;
GtkWidget *add_india_text;
GtkWidget *add_india_text2;
GtkWidget *add_india_text3;
GtkWidget *mod_india_widget;
GtkWidget *mod_india_label;
GtkWidget *mod_india_label2;
GtkWidget *mod_india_label3;
GtkWidget *mod_india_text;
GtkWidget *mod_india_text2;
GtkWidget *mod_india_text3;
CoWowFocusTimerGtk focustimer;
void pop();
void set_clock_cursor();
void reset_cursor();
void free_cursor();
void create_input_dialog();
void open_input_dialog( const char *text, const char *text2, const char *text3, const char *title,
const char *init_text,
void create_add_input_dialog();
void create_mod_input_dialog();
void open_add_input_dialog( const char *text, const char *text2, const char *text3,
const char *title, const char *init_text,
void (*ok_cb)( Nodelist *, char *, char *, char *));
void open_mod_input_dialog( const char *text, const char *text2, const char *text3,
const char *title, const char *init_text,
const char *init_text2, const char *init_text3,
void (*ok_cb)( Nodelist *, char *, char *, char *));
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
static void activate_exit( GtkWidget*w, gpointer data);
static void activate_add_node( GtkWidget*w, gpointer data);
static void activate_modify_node( GtkWidget*w, gpointer data);
static void activate_remove_node( GtkWidget*w, gpointer data);
static void activate_open_xtt( GtkWidget*w, gpointer data);
static void activate_open_opplace( GtkWidget*w, gpointer data);
......@@ -85,8 +98,10 @@ class NodelistGtk : public Nodelist {
static void activate_zoom_out( GtkWidget*w, gpointer data);
static void activate_zoom_reset( GtkWidget*w, gpointer data);
static void activate_help( GtkWidget*w, gpointer data);
static void activate_india_ok( GtkWidget *w, gpointer data);
static void activate_india_cancel( GtkWidget *w, gpointer data);
static void activate_add_india_ok( GtkWidget *w, gpointer data);
static void activate_add_india_cancel( GtkWidget *w, gpointer data);
static void activate_mod_india_ok( GtkWidget *w, gpointer data);
static void activate_mod_india_cancel( GtkWidget *w, gpointer data);
};
......
......@@ -28,6 +28,7 @@
#include "co_time.h"
#include "rt_gdh.h"
#include "co_syi.h"
#include "co_xhelp.h"
#include "co_lng.h"
#include "co_wow.h"
......@@ -56,8 +57,8 @@ Nodelist::~Nodelist()
void Nodelist::activate_help()
{
if ( help_cb)
(help_cb)( parent_ctx, "consolelog");
CoXHelp::dhelp( "opg_statusmonitor", 0, navh_eHelpFile_Other, "$pwr_lang/man_opg.dat",
true);
}
void Nodelist::find_node_cb( void *ctx, pwr_tOid oid)
......@@ -76,10 +77,39 @@ void Nodelist::add_node_ok( Nodelist *nodelist, char *node_name,
void Nodelist::activate_add_node()
{
open_input_dialog( "Node name", "Description", "Operatorplace", "Add Node", "",
open_add_input_dialog( "Node name", "Description", "Operatorplace", "Add Node", "",
add_node_ok);
}
void Nodelist::mod_node_ok( Nodelist *nodelist, char *node_name,
char *description, char *opplace)
{
nodelist->nodelistnav->set_node_data( node_name, opplace, description);
}
void Nodelist::activate_modify_node()
{
static char node_name[80];
char title[100];
int sts;
pwr_tOName opplace;
char descr[80];
sts = nodelistnav->get_selected_node( node_name);
if ( EVEN(sts)) {
nodelistnav->wow->DisplayError( "Remove Node", "Select a node");
return;
}
sts = nodelistnav->get_selected_opplace( opplace, descr);
if ( EVEN(sts)) return;
sprintf( title, "Modify node %s", node_name);
open_mod_input_dialog( "Node", "Description", "Operatorplace", title, node_name, descr, opplace,
mod_node_ok);
}
void remove_node_ok( void *ctx, void *data)
{
Nodelist *nodelist = (Nodelist *)ctx;
......@@ -166,7 +196,7 @@ void Nodelist::activate_open_opplace()
nodelistnav->wow->DisplayError( "Open Xtt", "Select a node");
return;
}
sts = nodelistnav->get_selected_opplace( opplace);
sts = nodelistnav->get_selected_opplace( opplace, 0);
get_display( display);
statussrv_XttStart( node_name, opplace, "", display, remote_gui);
......
......@@ -48,7 +48,8 @@ class Nodelist {
int nodelist_displayed;
void (*help_cb)( void *, const char *);
void (*close_cb)( void *);
void (*india_ok_cb)( Nodelist *, char *, char *, char *);
void (*add_india_ok_cb)( Nodelist *, char *, char *, char *);
void (*mod_india_ok_cb)( Nodelist *, char *, char *, char *);
CoWow *wow;
MsgWindow *msg_window;
char remote_gui[20];
......@@ -59,13 +60,18 @@ class Nodelist {
virtual void set_clock_cursor() {}
virtual void reset_cursor() {}
virtual void free_cursor() {}
virtual void open_input_dialog( const char *text, const char *text2, const char *text3,
virtual void open_add_input_dialog( const char *text, const char *text2, const char *text3,
const char *title, const char *init_text,
void (*ok_cb)( Nodelist *, char *, char *, char *)) {}
virtual void open_mod_input_dialog( const char *text, const char *text2, const char *text3,
const char *title, const char *init_text,
const char *init_text2, const char *init_text3,
void (*ok_cb)( Nodelist *, char *, char *, char *)) {}
void set_scantime( float scantime) { nodelistnav->scantime = int(scantime * 1000);}
void activate_help();
void activate_add_node();
void activate_modify_node();
void activate_remove_node();
void activate_open_xtt();
void activate_open_opplace();
......@@ -74,6 +80,8 @@ class Nodelist {
static void find_node_cb( void *ctx, pwr_tOid oid);
static void add_node_ok( Nodelist *nodelist, char *node_name, char *description,
char *opplace);
static void mod_node_ok( Nodelist *nodelist, char *node_name, char *description,
char *opplace);
};
#endif
......
......@@ -40,10 +40,30 @@
#include "statussrv_utl.h"
#include "rt_pwr_msg.h"
#include "xnav_bitmap_leaf12.h"
#include "xnav_bitmap_map8.h"
#include "xnav_bitmap_map10.h"
#include "xnav_bitmap_map12.h"
#include "xnav_bitmap_map14.h"
#include "xnav_bitmap_map16.h"
#include "xnav_bitmap_map18.h"
#include "xnav_bitmap_map20.h"
#include "xnav_bitmap_map24.h"
#include "xnav_bitmap_openmap8.h"
#include "xnav_bitmap_openmap10.h"
#include "xnav_bitmap_openmap12.h"
#include "xnav_bitmap_openmap14.h"
#include "xnav_bitmap_openmap16.h"
#include "xnav_bitmap_openmap18.h"
#include "xnav_bitmap_openmap20.h"
#include "xnav_bitmap_openmap24.h"
#include "xnav_bitmap_attr8.h"
#include "xnav_bitmap_attr10.h"
#include "xnav_bitmap_attr12.h"
#include "xnav_bitmap_attr14.h"
#include "xnav_bitmap_attr16.h"
#include "xnav_bitmap_attr18.h"
#include "xnav_bitmap_attr20.h"
#include "xnav_bitmap_attr24.h"
const char NodelistNav::config_file[40] = "$HOME/rt_statusmon.dat";
......@@ -66,39 +86,99 @@ void NodelistNavBrow::allocate_pixmaps()
flow_sPixmapData pixmap_data;
int i;
for ( i = 0; i < 9; i++) {
pixmap_data[i].width =xnav_bitmap_leaf12_width;
pixmap_data[i].height =xnav_bitmap_leaf12_height;
pixmap_data[i].bits = (char *)xnav_bitmap_leaf12_bits;
}
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_leaf);
for ( i = 0; i < 9; i++) {
i = 0;
pixmap_data[i].width =xnav_bitmap_map8_width;
pixmap_data[i].height =xnav_bitmap_map8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map8_bits;
pixmap_data[i].width =xnav_bitmap_map10_width;
pixmap_data[i].height =xnav_bitmap_map10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map10_bits;
pixmap_data[i].width =xnav_bitmap_map12_width;
pixmap_data[i].height =xnav_bitmap_map12_height;
pixmap_data[i].bits = (char *)xnav_bitmap_map12_bits;
}
pixmap_data[i++].bits = (char *)xnav_bitmap_map12_bits;
pixmap_data[i].width =xnav_bitmap_map14_width;
pixmap_data[i].height =xnav_bitmap_map14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map14_bits;
pixmap_data[i].width =xnav_bitmap_map16_width;
pixmap_data[i].height =xnav_bitmap_map16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map16_bits;
pixmap_data[i].width =xnav_bitmap_map18_width;
pixmap_data[i].height =xnav_bitmap_map18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map18_bits;
pixmap_data[i].width =xnav_bitmap_map20_width;
pixmap_data[i].height =xnav_bitmap_map20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map20_bits;
pixmap_data[i].width =xnav_bitmap_map20_width;
pixmap_data[i].height =xnav_bitmap_map20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map20_bits;
pixmap_data[i].width =xnav_bitmap_map24_width;
pixmap_data[i].height =xnav_bitmap_map24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_map);
for ( i = 0; i < 9; i++) {
i = 0;
pixmap_data[i].width =xnav_bitmap_openmap8_width;
pixmap_data[i].height =xnav_bitmap_openmap8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap8_bits;
pixmap_data[i].width =xnav_bitmap_openmap10_width;
pixmap_data[i].height =xnav_bitmap_openmap10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap10_bits;
pixmap_data[i].width =xnav_bitmap_openmap12_width;
pixmap_data[i].height =xnav_bitmap_openmap12_height;
pixmap_data[i].bits = (char *)xnav_bitmap_openmap12_bits;
}
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap12_bits;
pixmap_data[i].width =xnav_bitmap_openmap14_width;
pixmap_data[i].height =xnav_bitmap_openmap14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap14_bits;
pixmap_data[i].width =xnav_bitmap_openmap16_width;
pixmap_data[i].height =xnav_bitmap_openmap16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap16_bits;
pixmap_data[i].width =xnav_bitmap_openmap18_width;
pixmap_data[i].height =xnav_bitmap_openmap18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap18_bits;
pixmap_data[i].width =xnav_bitmap_openmap20_width;
pixmap_data[i].height =xnav_bitmap_openmap20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap20_bits;
pixmap_data[i].width =xnav_bitmap_openmap20_width;
pixmap_data[i].height =xnav_bitmap_openmap20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap20_bits;
pixmap_data[i].width =xnav_bitmap_openmap24_width;
pixmap_data[i].height =xnav_bitmap_openmap24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_openmap);
for ( i = 0; i < 9; i++) {
i = 0;
pixmap_data[i].width =xnav_bitmap_attr8_width;
pixmap_data[i].height =xnav_bitmap_attr8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr8_bits;
pixmap_data[i].width =xnav_bitmap_attr10_width;
pixmap_data[i].height =xnav_bitmap_attr10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr10_bits;
pixmap_data[i].width =xnav_bitmap_attr12_width;
pixmap_data[i].height =xnav_bitmap_attr12_height;
pixmap_data[i].bits = (char *)xnav_bitmap_attr12_bits;
}
pixmap_data[i++].bits = (char *)xnav_bitmap_attr12_bits;
pixmap_data[i].width =xnav_bitmap_attr14_width;
pixmap_data[i].height =xnav_bitmap_attr14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr14_bits;
pixmap_data[i].width =xnav_bitmap_attr16_width;
pixmap_data[i].height =xnav_bitmap_attr16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr16_bits;
pixmap_data[i].width =xnav_bitmap_attr18_width;
pixmap_data[i].height =xnav_bitmap_attr18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr18_bits;
pixmap_data[i].width =xnav_bitmap_attr20_width;
pixmap_data[i].height =xnav_bitmap_attr20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr20_bits;
pixmap_data[i].width =xnav_bitmap_attr20_width;
pixmap_data[i].height =xnav_bitmap_attr20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr20_bits;
pixmap_data[i].width =xnav_bitmap_attr24_width;
pixmap_data[i].height =xnav_bitmap_attr24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_attr24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_attr);
}
//
......@@ -110,8 +190,8 @@ void NodelistNavBrow::create_nodeclasses()
// Create common-class
// Nodeclass for Undefinied message
brow_CreateNodeClass( ctx, "Undef",
// Nodeclass for node
brow_CreateNodeClass( ctx, "Node",
flow_eNodeGroup_Common, &nc_node);
brow_AddAnnotPixmap( nc_node, 0, 0.2, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddFilledRect( nc_node, 1.3, 0.15, 0.4, 0.4, flow_eDrawType_DarkGray);
......@@ -122,7 +202,7 @@ void NodelistNavBrow::create_nodeclasses()
brow_AddAnnot( nc_node, 8, 0.6, 1,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddAnnot( nc_node, 21, 0.6, 2,
brow_AddAnnot( nc_node, 25, 0.6, 2,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddFrame( nc_node, 0, 0, 35, 0.83, flow_eDrawType_LineGray, -1, 1);
......@@ -916,7 +996,7 @@ int NodelistNav::update_nodes()
if ( ODD(sts)) {
if ( strcmp( node_list[i].item->data.Description, response.Description) != 0 &&
view_node_descr == 0)
view_node_descr == 0 && strcmp( node_list[i].item->node_descr, "") == 0)
brow_SetAnnotation( node_list[i].item->node, 1, response.Description,
strlen(response.Description));
......@@ -983,7 +1063,7 @@ int NodelistNav::get_selected_node( char *name)
return 1;
}
int NodelistNav::get_selected_opplace( char *opplace)
int NodelistNav::get_selected_opplace( char *opplace, char *descr)
{
brow_tNode *nodelist;
int node_count;
......@@ -1001,7 +1081,24 @@ int NodelistNav::get_selected_opplace( char *opplace)
for ( int i = 0; i < (int) node_list.size(); i++) {
if ( node_list[i].item == item) {
if ( opplace)
strcpy( opplace, node_list[i].opplace);
if ( descr)
strcpy( descr, node_list[i].description);
return 1;
}
}
return 0;
}
int NodelistNav::set_node_data( char *node_name, char *opplace, char *descr)
{
for ( int i = 0; i < (int) node_list.size(); i++) {
if ( strcmp( node_list[i].node_name, node_name) == 0) {
if ( opplace)
strncpy( node_list[i].opplace, opplace, sizeof(node_list[i].opplace));
if ( descr)
strncpy( node_list[i].description, descr, sizeof(node_list[i].description));
return 1;
}
}
......@@ -1049,8 +1146,8 @@ void NodelistNav::add_node( const char *name, const char *description, const cha
return;
NodelistNode node( name);
strcpy( node.opplace, opplace);
strcpy( node.description, description);
strncpy( node.opplace, opplace, sizeof(node.opplace));
strncpy( node.description, description, sizeof(node.description));
if ( idx == (int)node_list.size())
node_list.push_back( node);
......@@ -1147,7 +1244,7 @@ ItemNode::ItemNode( NodelistNav *item_nodelistnav, const char *item_name, const
dest, dest_code, (void *) this, 1, &node);
brow_SetAnnotation( node, 0, name, strlen(name));
if ( nodelistnav->view_node_descr)
if ( nodelistnav->view_node_descr || strcmp( node_descr, "") != 0)
brow_SetAnnotation( node, 1, node_descr, strlen(node_descr));
else
brow_SetAnnotation( node, 1, data.Description, strlen(data.Description));
......
......@@ -175,7 +175,8 @@ class NodelistNav {
int select_node( int idx);
void remove_node( char *name);
int get_selected_node( char *name);
int get_selected_opplace( char *opplace);
int get_selected_opplace( char *opplace, char *descr);
int set_node_data( char *node_name, char *opplace, char *descr);
void save();
void add_node( const char *name, const char *description, const char *opplace);
void set_msgw_pop( int pop) { msgw_pop = pop;}
......
......@@ -105,7 +105,7 @@ class CoWow {
virtual wow_sModalInputDialog *CreateModalInputDialog( const char *title, const char *text,
const char *button1, const char *button2,
const char *button3, const char *image,
int input_length);
int input_length) { return 0;}
static int HideWarranty();
virtual int DisplayWarranty() { return 0;}
virtual void DisplayLicense() {}
......
......@@ -25,15 +25,19 @@
#include "pwr.h"
#include "co_msgwindow.h"
#include "co_lng.h"
#include "co_xhelp_gtk.h"
#include "co_statusmon_nodelist_gtk.h"
static void usage()
{
printf("\n\
Proview Status Monitor\n\n\
rt_statusmon [-m 'n']\n\n\
rt_statusmon [-m 'n'][-e]\n\n\
-m 'n' Mode display UserStatus 'n', where 1 <= n <= 5.\n\
$HOME/rt_statusmon.dat : file with reqested nodes\n");
-e Show node description from setup file.\n\
-l Language, e.g. en_us, sv_se, de_de.\n\n\
$HOME/rt_statusmon.dat : setup file with requested nodes\n\n");
}
static void statusmon_close( void *ctx)
......@@ -46,6 +50,7 @@ int main( int argc, char *argv[])
int sts;
int mode = nodelist_eMode_SystemStatus;
int view_descr = 0;
char language[20] = "";
if ( argc > 1) {
for ( int i = 1; i < argc; i++) {
......@@ -53,6 +58,10 @@ int main( int argc, char *argv[])
usage();
exit(0);
}
else if ( strcmp( argv[i], "-l") == 0 && i + 1 < argc) {
strncpy( language, argv[i+1], sizeof(language));
Lng::set( language);
}
else if ( strcmp( argv[i], "-m") == 0) {
if ( argc == i) {
usage();
......@@ -82,7 +91,10 @@ int main( int argc, char *argv[])
gtk_init( &argc, &argv);
Nodelist *nl = new NodelistGtk( NULL, NULL, "Status Monitor", mode, view_descr,
CoXHelp *xhelp = new CoXHelpGtk( 0, 0, xhelp_eUtility_Xtt, &sts);
CoXHelp::set_default( xhelp);
Nodelist *nl = new NodelistGtk( 0, 0, "Status Monitor", mode, view_descr,
msgw_ePop_No, &sts);
nl->close_cb = statusmon_close;
nl->set_scantime(3);
......
......@@ -263,6 +263,26 @@ E 1.13.28 "_Show User"
E 1.13.29 "_Return"
E 1.13.30 " on "
#
# Status Monitor
E 1.14.1 "Status Monitor"
E 1.14.2 "_Add Node"
E 1.14.3 "_Modify Node"
E 1.14.4 "_Remove Node"
E 1.14.5 "Open Runtime _Navigator"
E 1.14.6 "_Open Operatorplace"
E 1.14.7 "Open Runtime _Monitor"
E 1.14.8 "_Save Configuration"
E 1.14.9 "_Remote GUI"
E 1.14.10 "Show _Events"
E 1.14.11 "_Pop Events"
E 1.14.12 "Save configuration"
E 1.14.13 "Add node"
E 1.14.14 "Remove node"
E 1.14.15 "Start Runtime Navigator on selected node"
E 1.14.16 "Start Operatorplace on selected node"
E 1.14.17 "Start Runtime Monitor on selected node"
E 1.14.18 "Status Events"
#
# Postscript printing
E 2.1.1 "Contents"
E 2.1.2 "page"
......
......@@ -263,6 +263,26 @@ E 1.13.28 "_Visa Anv
E 1.13.29 "_terg"
E 1.13.30 " p "
#
# Status Monitor
E 1.14.1 "Status Monitor"
E 1.14.2 "_Addera nod"
E 1.14.3 "_ndra nod"
E 1.14.4 "_Ta bort nod"
E 1.14.5 "ppna Runtime _Navigator"
E 1.14.6 "_ppna Operatrsplats"
E 1.14.7 "ppna Runtime _Monitor"
E 1.14.8 "_Spara konfigureringen"
E 1.14.9 "_Fjrr GUI"
E 1.14.10 "_Visa hndelser"
E 1.14.11 "_Pop hndelser"
E 1.14.12 "Spara konfigureringen"
E 1.14.13 "Addera nod"
E 1.14.14 "Ta bort nod"
E 1.14.15 "Starta Runtime Navigatorn fr utvald nod"
E 1.14.16 "Starta Operatrsplats fr utvald nod"
E 1.14.17 "Starta Runtime Monitor fr utvald nod"
E 1.14.18 "Status hndelser"
#
# Postscript printing
E 2.1.1 "Innehll"
E 2.1.2 "sidan"
......
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