Commit 1d3cdc79 authored by Claes Sjofors's avatar Claes Sjofors

New configuration of operator window, and new menu

parent 18f9fbbf
wb/mmi/wb/src/wtt_ge.png

520 Bytes | W: | H:

wb/mmi/wb/src/wtt_ge.png

431 Bytes | W: | H:

wb/mmi/wb/src/wtt_ge.png
wb/mmi/wb/src/wtt_ge.png
wb/mmi/wb/src/wtt_ge.png
wb/mmi/wb/src/wtt_ge.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -555,8 +555,6 @@ int main( int argc, char *argv[]) ...@@ -555,8 +555,6 @@ int main( int argc, char *argv[])
{ {
int sts; int sts;
gtk_init( &argc, &argv);
setlocale( LC_TIME, "en_US"); setlocale( LC_TIME, "en_US");
new XttGtk( argc, argv, &sts); new XttGtk( argc, argv, &sts);
...@@ -585,7 +583,7 @@ static void destroy_event( GtkWidget *w, gpointer data) ...@@ -585,7 +583,7 @@ static void destroy_event( GtkWidget *w, gpointer data)
} }
XttGtk::XttGtk( int argc, char *argv[], int *return_sts) : XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
Xtt( argc, argv, return_sts) Xtt( &argc, &argv, return_sts)
{ {
const int window_width = 400; const int window_width = 400;
const int window_height = 700; const int window_height = 700;
...@@ -594,6 +592,8 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) : ...@@ -594,6 +592,8 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
char title[120] = "Xtt "; char title[120] = "Xtt ";
char nodename[80]; char nodename[80];
gtk_init( &argc, &argv);
syi_NodeName( &sts, nodename, sizeof(nodename)); syi_NodeName( &sts, nodename, sizeof(nodename));
if ( ODD(sts)) if ( ODD(sts))
strcat( title, nodename); strcat( title, nodename);
......
...@@ -67,7 +67,7 @@ class Xtt { ...@@ -67,7 +67,7 @@ class Xtt {
int op_close_button; int op_close_button;
int no_advanceduser; int no_advanceduser;
Xtt( int argc, char *argv[], int *return_sts); Xtt( int *argc, char **argv[], int *return_sts);
virtual ~Xtt() {} virtual ~Xtt() {}
virtual void message( char severity, const char *msg) {} virtual void message( char severity, const char *msg) {}
virtual void open_input_dialog( const char *text, const char *title, virtual void open_input_dialog( const char *text, const char *title,
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "co_time.h" #include "co_time.h"
#include "co_dcli.h" #include "co_dcli.h"
#include "co_lng.h" #include "co_lng.h"
#include "co_syi.h"
#include "flow.h" #include "flow.h"
#include "flow_browctx.h" #include "flow_browctx.h"
#include "flow_browapi.h" #include "flow_browapi.h"
...@@ -453,7 +454,7 @@ void Xtt::activate_help_proview() ...@@ -453,7 +454,7 @@ void Xtt::activate_help_proview()
CoXHelp::dhelp( "version", "", navh_eHelpFile_Other, "$pwr_exe/xtt_version_help.dat", 0); CoXHelp::dhelp( "version", "", navh_eHelpFile_Other, "$pwr_exe/xtt_version_help.dat", 0);
} }
Xtt::Xtt( int argc, char *argv[], int *return_sts) : Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
root_item(0), input_open(0), command_open(0), india_ok_cb(0), queid(qcom_cNQid), quiet(0), attach_audio(0), select_opplace(0), op_close_button(0), no_advanceduser(0) root_item(0), input_open(0), command_open(0), india_ok_cb(0), queid(qcom_cNQid), quiet(0), attach_audio(0), select_opplace(0), op_close_button(0), no_advanceduser(0)
{ {
pwr_tStatus sts; pwr_tStatus sts;
...@@ -462,6 +463,9 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) : ...@@ -462,6 +463,9 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
pwr_tObjid op_objid; pwr_tObjid op_objid;
qcom_sQattr qAttr; qcom_sQattr qAttr;
qcom_sQid qini; qcom_sQid qini;
char language[20] = "";
static char display[80];
static char display_opt[20] = "--display";
strcpy( opplace_str, ""); strcpy( opplace_str, "");
hot_xtt = this; hot_xtt = this;
...@@ -493,25 +497,23 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) : ...@@ -493,25 +497,23 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
} }
// Set language // Set language
for ( i = 1; i < argc; i++) { for ( i = 1; i < *argc; i++) {
if ( strcmp( argv[i], "-l") == 0 && i + 1 < argc) if ( strcmp( (*argv)[i], "-l") == 0 && i + 1 < *argc)
Lng::set( argv[i+1]); strncpy( language, (*argv)[i+1], sizeof(language));
else if ( strcmp( argv[i], "-q") == 0) { else if ( strcmp( (*argv)[i], "-q") == 0)
CoWow::HideWarranty();
quiet = 1; quiet = 1;
} else if ( strcmp( (*argv)[i], "-a") == 0)
else if ( strcmp( argv[i], "-a") == 0)
attach_audio = 1; attach_audio = 1;
else if ( strcmp( argv[i], "-s") == 0) else if ( strcmp( (*argv)[i], "-s") == 0)
select_opplace = 1; select_opplace = 1;
else if ( strcmp( argv[i], "-c") == 0) else if ( strcmp( (*argv)[i], "-c") == 0)
op_close_button = 1; op_close_button = 1;
else if ( strcmp( argv[i], "-d") == 0) else if ( strcmp( (*argv)[i], "-d") == 0)
no_advanceduser = 1; no_advanceduser = 1;
else if ( strcmp( argv[i], "-u") == 0 && i + 1 < argc) { else if ( strcmp( (*argv)[i], "-u") == 0 && i + 1 < *argc) {
char oname[80]; char oname[80];
strcpy( opplace_str, argv[i+1]); strcpy( opplace_str, (*argv)[i+1]);
sts = gdh_GetClassList( pwr_cClass_OpPlace, &op_objid); sts = gdh_GetClassList( pwr_cClass_OpPlace, &op_objid);
while (ODD(sts)) { while (ODD(sts)) {
...@@ -530,11 +532,11 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) : ...@@ -530,11 +532,11 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
} }
} }
if ( !opplace_found && argc >= 2 && strncmp( argv[1], "-", 1) != 0) { if ( !opplace_found && *argc >= 2 && strncmp( (*argv)[1], "-", 1) != 0) {
pwr_tClassId op_class; pwr_tClassId op_class;
// First argument is opplace object // First argument is opplace object
strcpy( opplace_str, argv[1]); strcpy( opplace_str, (*argv)[1]);
sts = gdh_NameToObjid( opplace_str, &op_objid); sts = gdh_NameToObjid( opplace_str, &op_objid);
if ( EVEN(sts)) { if ( EVEN(sts)) {
...@@ -552,6 +554,82 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) : ...@@ -552,6 +554,82 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
opplace_found = 1; opplace_found = 1;
} }
else {
// Look for default opplace
pwr_tOid oid;
pwr_tOName name;
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts);
sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( ODD(sts) && cdh_NoCaseStrcmp( name, "opdefault") == 0) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mNName);
if ( EVEN(sts)) exit(sts);
strcpy( opplace_str, name);
opplace_found = 1;
break;
}
}
}
if ( opplace_found) {
pwr_sClass_OpPlace *opp;
char opsys_user[40];
sts = gdh_NameToPointer( opplace_str, (void **)&opp);
if ( EVEN(sts)) exit(sts);
if ( strcmp( opp->DedicatedOpsysUser, "") != 0) {
sts = syi_UserName( opsys_user, sizeof(opsys_user));
if ( EVEN(sts)) exit(sts);
if ( strcmp( opp->DedicatedOpsysUser, opsys_user) != 0) {
printf( "Operator place is dedicated for another user\n");
exit(0);
}
}
if ( strcmp( language, "") == 0) {
switch ( opp->Language) {
case pwr_eLanguageEnum_Swedish:
strcpy( language, "sv_se");
break;
case pwr_eLanguageEnum_German:
strcpy( language, "de_de");
break;
case pwr_eLanguageEnum_French:
strcpy( language, "fr_fr");
break;
default:
strcpy( language, "");
}
}
if ( strcmp( opp->Display, "") != 0) {
strncpy( display, opp->Display, sizeof(display));
char **argv1 = (char **)calloc( *argc + 3, sizeof(*argv1));
for ( int i = 0; i < *argc; i++)
argv1[i] = (*argv)[i];
argv1[*argc] = display_opt;
argv1[*argc+1] = display;
argv1[*argc+2] = 0;
(*argc) += 2;
*argv = argv1;
}
if ( opp->OpWindLayout & pwr_mOpWindLayoutMask_HideLicenceWindow)
quiet = 1;
if ( opp->AttachAudio)
attach_audio = 1;
}
if ( quiet)
CoWow::HideWarranty();
if ( strcmp( language, "") != 0)
Lng::set( language);
} }
void Xtt::opplace_selected_cb( void *ctx, char *text) void Xtt::opplace_selected_cb( void *ctx, char *text)
......
...@@ -58,7 +58,7 @@ CLogGtk::CLogGtk( void *clog_parent_ctx, ...@@ -58,7 +58,7 @@ CLogGtk::CLogGtk( void *clog_parent_ctx,
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW, toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", 800, "default-height", 800,
"default-width", 1000, "default-width", 1000,
"title", clog_name, "title", CoWowGtk::translate_utf8(clog_name),
NULL); NULL);
g_signal_connect( toplevel, "delete_event", G_CALLBACK(delete_event), this); g_signal_connect( toplevel, "delete_event", G_CALLBACK(delete_event), this);
...@@ -156,7 +156,7 @@ CLogGtk::CLogGtk( void *clog_parent_ctx, ...@@ -156,7 +156,7 @@ CLogGtk::CLogGtk( void *clog_parent_ctx,
// Menu Help // Menu Help
GtkWidget *help_help = gtk_image_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_Help on ConsoleLog")); GtkWidget *help_help = gtk_image_menu_item_new_with_mnemonic(CoWowGtk::translate_utf8("_Help on System Messages"));
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(help_help), gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(help_help),
gtk_image_new_from_stock( "gtk-help", GTK_ICON_SIZE_MENU)); gtk_image_new_from_stock( "gtk-help", GTK_ICON_SIZE_MENU));
g_signal_connect(help_help, "activate", G_CALLBACK(activate_help), this); g_signal_connect(help_help, "activate", G_CALLBACK(activate_help), this);
......
...@@ -81,13 +81,14 @@ EvGtk::EvGtk( void *ev_parent_ctx, ...@@ -81,13 +81,14 @@ EvGtk::EvGtk( void *ev_parent_ctx,
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status) : pwr_tStatus *status) :
Ev( ev_parent_ctx, eve_name, ala_name, blk_name, ev_user, display_ala, display_eve, Ev( ev_parent_ctx, eve_name, ala_name, blk_name, ev_user, display_ala, display_eve,
display_blk, display_return, display_ack, ev_beep, status), display_blk, display_return, display_ack, ev_beep, ev_pop_mask, status),
parent_wid(ev_parent_wid), parent_wid_eve(NULL), parent_wid_ala(NULL) parent_wid(ev_parent_wid), parent_wid_eve(NULL), parent_wid_ala(NULL)
{ {
pwr_tStatus sts; pwr_tStatus sts;
pwr_sClass_User *userobject_ptr; pwr_sClass_OpPlace *userobject_ptr;
const int eve_width = 700; const int eve_width = 700;
const int eve_height = 600; const int eve_height = 600;
const int ala_width = 700; const int ala_width = 700;
......
...@@ -41,6 +41,7 @@ class EvGtk : public Ev { ...@@ -41,6 +41,7 @@ class EvGtk : public Ev {
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status); pwr_tStatus *status);
~EvGtk(); ~EvGtk();
......
...@@ -27,6 +27,7 @@ typedef void *Widget; ...@@ -27,6 +27,7 @@ typedef void *Widget;
#include "glow.h" #include "glow.h"
#include "xtt_xnav.h"
#include "rt_gdh.h" #include "rt_gdh.h"
#include "rt_gdh_msg.h" #include "rt_gdh_msg.h"
#include "co_cdh.h" #include "co_cdh.h"
...@@ -39,7 +40,6 @@ typedef void *Widget; ...@@ -39,7 +40,6 @@ typedef void *Widget;
#include "co_lng.h" #include "co_lng.h"
#include "xtt_ge_gtk.h" #include "xtt_ge_gtk.h"
#include "ge_graph_gtk.h" #include "ge_graph_gtk.h"
#include "xtt_xnav.h"
gboolean XttGeGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data) gboolean XttGeGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data)
{ {
......
This diff is collapsed.
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
# include "co_wow_gtk.h" # include "co_wow_gtk.h"
#endif #endif
#include <vector>
class OpCmd {
public:
GtkWidget *w;
pwr_tCmd cmd;
OpCmd( GtkWidget *widget, const char *command) : w(widget)
{ strncpy( cmd, command, sizeof(cmd));}
};
class OpGtk : public Op { class OpGtk : public Op {
public: public:
OpGtk( void *op_parent_ctx, OpGtk( void *op_parent_ctx,
...@@ -51,20 +62,24 @@ class OpGtk : public Op { ...@@ -51,20 +62,24 @@ class OpGtk : public Op {
GtkWidget *balarm_ebox; GtkWidget *balarm_ebox;
GtkWidget *balarm_mark; GtkWidget *balarm_mark;
GtkWidget *appl_form; GtkWidget *appl_form;
GtkWidget *eventlog_button;
GtkWidget *help_button;
GtkWidget *decr_button; GtkWidget *decr_button;
GtkWidget *tools_close; GtkWidget *tools_close;
GtkWidget *funcbox[5];
GtkMenuBar *menu_bar;
int a_height; int a_height;
int a_exist[5]; int a_exist[5];
int a_active[5]; int a_active[5];
int text_size; int text_size;
CoWowFocusTimerGtk poptimer; CoWowFocusTimerGtk poptimer;
vector<OpCmd> cmd_vect;
void map(); void map();
int configure( char *opplace_str); int configure( char *opplace_str);
void update_alarm_info(); void update_alarm_info();
void add_close_button(); void add_close_button();
int get_cmd( GtkWidget *w, char *cmd);
int create_menu_item( const char *name, int pixmap, int append, const char *cmd);
int delete_menu_item( const char *name);
static void activate_exit( GtkWidget *w, gpointer data); static void activate_exit( GtkWidget *w, gpointer data);
static void activate_aalarm_ack( GtkWidget *w, gpointer data); static void activate_aalarm_ack( GtkWidget *w, gpointer data);
...@@ -76,9 +91,20 @@ class OpGtk : public Op { ...@@ -76,9 +91,20 @@ class OpGtk : public Op {
static void activate_alarmlist( GtkWidget *w, gpointer data); static void activate_alarmlist( GtkWidget *w, gpointer data);
static void activate_eventlist( GtkWidget *w, gpointer data); static void activate_eventlist( GtkWidget *w, gpointer data);
static void activate_eventlog( GtkWidget *w, gpointer data); static void activate_eventlog( GtkWidget *w, gpointer data);
static void activate_blocklist( GtkWidget *w, gpointer data);
static void activate_navigator( GtkWidget *w, gpointer data); static void activate_navigator( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data); static void activate_help( GtkWidget *w, gpointer data);
static void activate_help_overview( GtkWidget *w, gpointer data); static void activate_help_overview( GtkWidget *w, gpointer data);
static void activate_help_opwin( GtkWidget *w, gpointer data);
static void activate_help_proview( GtkWidget *w, gpointer data);
static void activate_trend( GtkWidget *w, gpointer data);
static void activate_fast( GtkWidget *w, gpointer data);
static void activate_history( GtkWidget *w, gpointer data);
static void activate_switch_user( GtkWidget *w, gpointer data);
static void activate_show_user( GtkWidget *w, gpointer data);
static void activate_logout( GtkWidget *w, gpointer data);
static void activate_cmd_menu_item( GtkWidget *w, gpointer data);
static void activate_graph( GtkWidget *w, gpointer data);
static void activate_appl1( GtkWidget *w, gpointer data); static void activate_appl1( GtkWidget *w, gpointer data);
static void activate_appl2( GtkWidget *w, gpointer data); static void activate_appl2( GtkWidget *w, gpointer data);
static void activate_appl3( GtkWidget *w, gpointer data); static void activate_appl3( GtkWidget *w, gpointer data);
...@@ -94,6 +120,16 @@ class OpGtk : public Op { ...@@ -94,6 +120,16 @@ class OpGtk : public Op {
static void activate_appl13( GtkWidget *w, gpointer data); static void activate_appl13( GtkWidget *w, gpointer data);
static void activate_appl14( GtkWidget *w, gpointer data); static void activate_appl14( GtkWidget *w, gpointer data);
static void activate_appl15( GtkWidget *w, gpointer data); static void activate_appl15( GtkWidget *w, gpointer data);
static void activate_appl16( GtkWidget *w, gpointer data);
static void activate_appl17( GtkWidget *w, gpointer data);
static void activate_appl18( GtkWidget *w, gpointer data);
static void activate_appl19( GtkWidget *w, gpointer data);
static void activate_appl20( GtkWidget *w, gpointer data);
static void activate_appl21( GtkWidget *w, gpointer data);
static void activate_appl22( GtkWidget *w, gpointer data);
static void activate_appl23( GtkWidget *w, gpointer data);
static void activate_appl24( GtkWidget *w, gpointer data);
static void activate_appl25( GtkWidget *w, gpointer data);
}; };
#endif #endif
...@@ -189,11 +189,11 @@ XCrr *XNavGtk::xcrr_new( pwr_tAttrRef *arp, int advanced_user, pwr_tStatus *sts) ...@@ -189,11 +189,11 @@ XCrr *XNavGtk::xcrr_new( pwr_tAttrRef *arp, int advanced_user, pwr_tStatus *sts)
Ev *XNavGtk::ev_new( char *eve_name, char *ala_name, char *blk_name, Ev *XNavGtk::ev_new( char *eve_name, char *ala_name, char *blk_name,
pwr_tObjid ev_user, int display_ala, int display_eve, pwr_tObjid ev_user, int display_ala, int display_eve,
int display_blk, int display_return, int display_ack, int display_blk, int display_return, int display_ack,
int ev_beep, pwr_tStatus *status) int ev_beep, pwr_tMask ev_pop_mask, pwr_tStatus *status)
{ {
return new EvGtk( this, parent_wid, eve_name, ala_name, blk_name, return new EvGtk( this, parent_wid, eve_name, ala_name, blk_name,
ev_user, display_ala, display_eve, display_blk, ev_user, display_ala, display_eve, display_blk,
display_return, display_ack, ev_beep, status); display_return, display_ack, ev_beep, ev_pop_mask, status);
} }
Hist *XNavGtk::hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts) Hist *XNavGtk::hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts)
......
...@@ -51,7 +51,7 @@ class XNavGtk : public XNav { ...@@ -51,7 +51,7 @@ class XNavGtk : public XNav {
Ev *ev_new( char *eve_name, char *ala_name, char *blk_name, Ev *ev_new( char *eve_name, char *ala_name, char *blk_name,
pwr_tObjid ev_user, int display_ala, int display_eve, pwr_tObjid ev_user, int display_ala, int display_eve,
int display_blk, int display_return, int display_ack, int display_blk, int display_return, int display_ack,
int ev_beep, pwr_tStatus *status); int ev_beep, pwr_tMask ev_pop_mask, pwr_tStatus *status);
Hist *hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts); Hist *hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts);
Block *block_new( pwr_tAttrRef *arp, char *name, unsigned int priv, Block *block_new( pwr_tAttrRef *arp, char *name, unsigned int priv,
pwr_tStatus *sts); pwr_tStatus *sts);
......
...@@ -60,9 +60,10 @@ EvMotif::EvMotif( void *ev_parent_ctx, ...@@ -60,9 +60,10 @@ EvMotif::EvMotif( void *ev_parent_ctx,
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status) : pwr_tStatus *status) :
Ev( ev_parent_ctx, eve_name, ala_name, blk_name, ev_user, display_ala, display_eve, Ev( ev_parent_ctx, eve_name, ala_name, blk_name, ev_user, display_ala, display_eve,
display_blk, display_return, display_ack, ev_beep, status), display_blk, display_return, display_ack, ev_beep, ev_pop_mask, status),
parent_wid(ev_parent_wid), parent_wid_eve(NULL), parent_wid_ala(NULL) parent_wid(ev_parent_wid), parent_wid_eve(NULL), parent_wid_ala(NULL)
{ {
char uid_filename[120] = {"xtt_eve.uid"}; char uid_filename[120] = {"xtt_eve.uid"};
......
...@@ -45,6 +45,7 @@ class EvMotif : public Ev { ...@@ -45,6 +45,7 @@ class EvMotif : public Ev {
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status); pwr_tStatus *status);
~EvMotif(); ~EvMotif();
......
...@@ -421,9 +421,7 @@ int OpMotif::configure( char *opplace_str) ...@@ -421,9 +421,7 @@ int OpMotif::configure( char *opplace_str)
int sts; int sts;
int i; int i;
pwr_tObjid opplace; pwr_tObjid opplace;
pwr_tObjid user;
pwr_sClass_OpPlace *opplace_p; pwr_sClass_OpPlace *opplace_p;
pwr_sClass_User *user_p;
pwr_sAttrRef attrref; pwr_sAttrRef attrref;
XmFontList fontlist; XmFontList fontlist;
XmFontListEntry entry; XmFontListEntry entry;
...@@ -434,24 +432,9 @@ int OpMotif::configure( char *opplace_str) ...@@ -434,24 +432,9 @@ int OpMotif::configure( char *opplace_str)
sts = gdh_ObjidToPointer( opplace, (void **) &opplace_p); sts = gdh_ObjidToPointer( opplace, (void **) &opplace_p);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
// Fix if ( opplace_p->StartJavaProcess)
if ( strncmp( opplace_p->OpWinProgram, "Jop", 3) == 0)
start_jop = 1; start_jop = 1;
// Find matching user object
sts = gdh_GetClassList( pwr_cClass_User, &user);
while ( ODD (sts))
{
sts = gdh_ObjidToPointer( user, (void **) &user_p);
if ( EVEN(sts)) return sts;
if ( user_p->OpNumber == opplace_p->OpNumber)
break;
sts = gdh_GetNextObject( user, &user);
}
if ( EVEN(sts)) return sts;
// Load font // Load font
entry = XmFontListEntryCreate( (char*) "tag1", XmFONT_IS_FONT, entry = XmFontListEntryCreate( (char*) "tag1", XmFONT_IS_FONT,
XLoadQueryFont( flow_Display(appl_form), XLoadQueryFont( flow_Display(appl_form),
...@@ -460,10 +443,7 @@ int OpMotif::configure( char *opplace_str) ...@@ -460,10 +443,7 @@ int OpMotif::configure( char *opplace_str)
XtFree( (char *)entry); XtFree( (char *)entry);
// Examine Graph objects // Examine Graph objects
button_cnt = user_p->NoFastAvail; for ( i = 0; i < 15; i++)
if ( button_cnt > 15)
button_cnt = 15;
for ( i = 0; i < button_cnt; i++)
{ {
if ( i >= 15) if ( i >= 15)
break; break;
...@@ -471,19 +451,28 @@ int OpMotif::configure( char *opplace_str) ...@@ -471,19 +451,28 @@ int OpMotif::configure( char *opplace_str)
sts = gdh_ClassAttrToAttrref( pwr_cClass_XttGraph, ".ButtonText", &attrref); sts = gdh_ClassAttrToAttrref( pwr_cClass_XttGraph, ".ButtonText", &attrref);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
attrref = cdh_ArefAdd( &user_p->FastAvail[i], &attrref); if ( cdh_ObjidIsNotNull( opplace_p->FastAvail[i].Objid)) {
attrref = cdh_ArefAdd( &opplace_p->FastAvail[i], &attrref);
sts = gdh_GetObjectInfoAttrref( &attrref, (void *)button_title[i], sts = gdh_GetObjectInfoAttrref( &attrref, (void *)button_title[i],
sizeof(button_title[0])); sizeof(button_title[0]));
if ( EVEN(sts)) if ( ODD(sts))
strcpy( button_title[i], "");
button_aref[i] = attrref.Objid; button_aref[i] = attrref.Objid;
else
button_aref[i] = pwr_cNOid;
}
else
button_aref[i] = pwr_cNOid;
} }
// Create the application buttons // Create the application buttons
for ( i = 0; i < button_cnt; i++) for ( i = 0; i < button_cnt; i++)
{ {
Widget b[15]; Widget b[15];
if ( cdh_ObjidIsNull( button_aref[i]))
continue;
switch ( i) switch ( i)
{ {
case 0: case 0:
......
...@@ -53,13 +53,14 @@ Ev::Ev( void *ev_parent_ctx, ...@@ -53,13 +53,14 @@ Ev::Ev( void *ev_parent_ctx,
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status) : pwr_tStatus *status) :
parent_ctx(ev_parent_ctx), parent_ctx(ev_parent_ctx),
user(ev_user), eve_display_ack(display_ack), user(ev_user), eve_display_ack(display_ack),
eve_display_return(display_return), eve_display_return(display_return),
start_trace_cb(NULL), display_in_xnav_cb(NULL), update_info_cb(NULL), start_trace_cb(NULL), display_in_xnav_cb(NULL), update_info_cb(NULL),
help_cb(NULL), popup_menu_cb(0), sound_cb(0), eve(NULL), ala(NULL), help_cb(NULL), popup_menu_cb(0), sound_cb(0), eve(NULL), ala(NULL),
connected(0), ala_displayed(0), eve_displayed(0), beep(ev_beep) connected(0), ala_displayed(0), eve_displayed(0), beep(ev_beep), pop_mask(ev_pop_mask)
{ {
} }
...@@ -309,8 +310,7 @@ void Ev::create_aliaslist( void *up) ...@@ -309,8 +310,7 @@ void Ev::create_aliaslist( void *up)
int i, j; int i, j;
int alias_size; int alias_size;
ev_sAlias dum; ev_sAlias dum;
pwr_sClass_User *userp = (pwr_sClass_User *)up; pwr_sClass_OpPlace *userp = (pwr_sClass_OpPlace *)up;
int listsize = MIN( sizeof(userp->SelectList)/sizeof(userp->SelectList[0]), int listsize = MIN( sizeof(userp->SelectList)/sizeof(userp->SelectList[0]),
sizeof(alias_list)/sizeof(alias_list[0])); sizeof(alias_list)/sizeof(alias_list[0]));
...@@ -398,9 +398,31 @@ pwr_tStatus Ev::mh_alarm_bc( mh_sMessage *MsgP) ...@@ -398,9 +398,31 @@ pwr_tStatus Ev::mh_alarm_bc( mh_sMessage *MsgP)
ev->ala->event_alarm( MsgP); ev->ala->event_alarm( MsgP);
if ( ev->update_info_cb) if ( ev->update_info_cb)
ev->update_info_cb( ev->parent_ctx); ev->update_info_cb( ev->parent_ctx);
if ( ev->pop_cb) if ( ev->pop_cb) {
ev->pop_cb( ev->parent_ctx); int pop = 0;
switch ( ((mh_sMsgInfo *)MsgP)->EventPrio) {
case mh_eEventPrio_A:
if ( ev->pop_mask & pwr_mOpWindPopMask_Aalarm)
pop = 1;
break;
case mh_eEventPrio_B:
if ( ev->pop_mask & pwr_mOpWindPopMask_Balarm)
pop = 1;
break;
case mh_eEventPrio_C:
if ( ev->pop_mask & pwr_mOpWindPopMask_Calarm)
pop = 1;
break;
case mh_eEventPrio_D:
if ( ev->pop_mask & pwr_mOpWindPopMask_Dalarm)
pop = 1;
break;
default: ;
}
if ( pop)
ev->pop_cb( ev->parent_ctx);
}
return 1; return 1;
} }
...@@ -427,6 +449,9 @@ pwr_tStatus Ev::mh_info_bc( mh_sMessage *MsgP) ...@@ -427,6 +449,9 @@ pwr_tStatus Ev::mh_info_bc( mh_sMessage *MsgP)
ev->ala->event_info( MsgP); ev->ala->event_info( MsgP);
if ( ev->update_info_cb) if ( ev->update_info_cb)
ev->update_info_cb( ev->parent_ctx); ev->update_info_cb( ev->parent_ctx);
if ( ev->pop_mask & pwr_mOpWindPopMask_InfoMsg)
ev->pop_cb( ev->parent_ctx);
return 1; return 1;
} }
......
...@@ -51,6 +51,7 @@ class Ev { ...@@ -51,6 +51,7 @@ class Ev {
int display_return, int display_return,
int display_ack, int display_ack,
int ev_beep, int ev_beep,
pwr_tMask ev_pop_mask,
pwr_tStatus *status); pwr_tStatus *status);
virtual ~Ev(); virtual ~Ev();
...@@ -81,6 +82,7 @@ class Ev { ...@@ -81,6 +82,7 @@ class Ev {
ev_sAlias alias_list[20]; ev_sAlias alias_list[20];
CoWow *wow; CoWow *wow;
static Ev *ev; static Ev *ev;
pwr_tMask pop_mask;
virtual void map_eve() {} virtual void map_eve() {}
virtual void map_ala() {} virtual void map_ala() {}
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "glow.h" #include "glow.h"
#include "xtt_xnav.h"
#include "rt_gdh.h" #include "rt_gdh.h"
#include "rt_gdh_msg.h" #include "rt_gdh_msg.h"
#include "co_cdh.h" #include "co_cdh.h"
...@@ -33,7 +34,6 @@ ...@@ -33,7 +34,6 @@
#include "co_lng.h" #include "co_lng.h"
#include "xtt_ge.h" #include "xtt_ge.h"
#include "ge_graph.h" #include "ge_graph.h"
#include "xtt_xnav.h"
void XttGe::graph_init_cb( void *client_data) void XttGe::graph_init_cb( void *client_data)
{ {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "rt_mh_outunit.h" #include "rt_mh_outunit.h"
#include "co_wow.h" #include "co_wow.h"
#include "co_lng.h" #include "co_lng.h"
#include "co_xhelp.h"
#include "xtt_op.h" #include "xtt_op.h"
#include "rt_xnav_msg.h" #include "rt_xnav_msg.h"
...@@ -131,12 +132,77 @@ void Op::activate_eventlog() ...@@ -131,12 +132,77 @@ void Op::activate_eventlog()
command_cb( parent_ctx, cmd); command_cb( parent_ctx, cmd);
} }
void Op::activate_blocklist()
{
char cmd[20] = "show blocklist";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_trend()
{
char cmd[200] = "show objectlist/class=dstrend/title=\"Trend List\"";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_fast()
{
char cmd[200] = "show objectlist/class=dsfastcurve/title=\"Fast Curve List\"";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_history()
{
char cmd[200] = "show objectlist/class=sevhist/title=\"Process History List\"";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_graph()
{
char cmd[200] = "show objectlist/class=xttgraph/title=\"Process Graphic List\"";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_navigator() void Op::activate_navigator()
{ {
if ( map_cb) if ( map_cb)
map_cb( parent_ctx); map_cb( parent_ctx);
} }
void Op::activate_switch_user()
{
char cmd[200] ="login";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_show_user()
{
char cmd[200] ="show user/window";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_logout()
{
char cmd[200] ="logout /messagewindow";
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_cmd_menu_item( char *cmd)
{
if ( command_cb)
command_cb( parent_ctx, cmd);
}
void Op::activate_help() void Op::activate_help()
{ {
if ( help_cb) if ( help_cb)
...@@ -149,6 +215,16 @@ void Op::activate_help_overview() ...@@ -149,6 +215,16 @@ void Op::activate_help_overview()
help_cb( parent_ctx, "overview"); help_cb( parent_ctx, "overview");
} }
void Op::activate_help_opwin()
{
CoXHelp::dhelp("opg_opwindow", "", navh_eHelpFile_Other, "$pwr_lang/man_opg.dat", 0);
}
void Op::activate_help_proview()
{
CoXHelp::dhelp( "version", "", navh_eHelpFile_Other, "$pwr_exe/xtt_version_help.dat", 0);
}
void Op::jop_command_cb( void *op, char *command) void Op::jop_command_cb( void *op, char *command)
{ {
if ( ((Op *)op)->command_cb) if ( ((Op *)op)->command_cb)
......
...@@ -45,8 +45,8 @@ class Op { ...@@ -45,8 +45,8 @@ class Op {
void *parent_ctx; void *parent_ctx;
unsigned long balarm_prio; unsigned long balarm_prio;
unsigned long balarm_type; unsigned long balarm_type;
char button_title[20][80]; char button_title[25][80];
pwr_tAttrRef button_aref[20]; pwr_tAttrRef button_aref[25];
int button_cnt; int button_cnt;
int start_jop; int start_jop;
Jop *jop; Jop *jop;
...@@ -67,6 +67,8 @@ class Op { ...@@ -67,6 +67,8 @@ class Op {
virtual int configure( char *opplace_str) {return 0;} virtual int configure( char *opplace_str) {return 0;}
virtual void update_alarm_info() {} virtual void update_alarm_info() {}
virtual void add_close_button() {} virtual void add_close_button() {}
virtual int create_menu_item( const char *name, int pixmap, int append, const char *cmd) { return 0;}
virtual int delete_menu_item( const char *name) { return 0;}
void set_jop_qid( int qix) { if ( jop) jop->set_jop_qid( qix);}; void set_jop_qid( int qix) { if ( jop) jop->set_jop_qid( qix);};
void scan(); void scan();
...@@ -78,9 +80,20 @@ class Op { ...@@ -78,9 +80,20 @@ class Op {
void activate_alarmlist(); void activate_alarmlist();
void activate_eventlist(); void activate_eventlist();
void activate_eventlog(); void activate_eventlog();
void activate_blocklist();
void activate_navigator(); void activate_navigator();
void activate_trend();
void activate_fast();
void activate_history();
void activate_graph();
void activate_help(); void activate_help();
void activate_help_overview(); void activate_help_overview();
void activate_help_opwin();
void activate_help_proview();
void activate_switch_user();
void activate_show_user();
void activate_logout();
void activate_cmd_menu_item( char *cmd);
static void jop_command_cb( void *op, char *command); static void jop_command_cb( void *op, char *command);
}; };
......
...@@ -1068,7 +1068,7 @@ XNav::XNav( ...@@ -1068,7 +1068,7 @@ XNav::XNav(
brow_cnt(0), TraceList(NULL), trace_started(0), brow_cnt(0), TraceList(NULL), trace_started(0),
message_cb(NULL), close_cb(NULL), map_cb(NULL), change_value_cb(NULL), message_cb(NULL), close_cb(NULL), map_cb(NULL), change_value_cb(NULL),
set_dimension_cb(NULL), selection_changed_cb(0), ccm_func_registred(0), verify(0), set_dimension_cb(NULL), selection_changed_cb(0), ccm_func_registred(0), verify(0),
menu_tree(NULL), ev(0), op(0), clog(0), closing_down(0), menu_tree(NULL), ev(0), op(0), clog(0), closing_down(0), opplace_p(0),
base_priv(pwr_mPrv_System), priv(pwr_mPrv_System), displayed(0), base_priv(pwr_mPrv_System), priv(pwr_mPrv_System), displayed(0),
current_logging_index(-1), search_last_found(0), search_compiled(0), current_logging_index(-1), search_last_found(0), search_compiled(0),
attach_audio(0), audio(0), op_close_button(xn_op_close_button), cologin(0), scctx(0) attach_audio(0), audio(0), op_close_button(xn_op_close_button), cologin(0), scctx(0)
...@@ -2761,18 +2761,15 @@ int XNav::setup() ...@@ -2761,18 +2761,15 @@ int XNav::setup()
brow_SetNodraw( brow->ctx); brow_SetNodraw( brow->ctx);
new ItemHeader( brow, "Title", "Setup", NULL, flow_eDest_IntoLast); new ItemHeader( brow, "Title", "Setup", NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "ConfigureObject", "setup_configureObject", new ItemLocal( brow, "OpPlace", "setup_opPlace",
pwr_eType_String, sizeof( gbl.ConfigureObject), 0, 0, 1, pwr_eType_String, sizeof( gbl.OpPlace), 0, 0, 1,
(void *) gbl.ConfigureObject, NULL, flow_eDest_IntoLast); (void *) gbl.OpPlace, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "DefaultDirectory", "setup_defaultdirectory", new ItemLocal( brow, "DefaultDirectory", "setup_defaultdirectory",
pwr_eType_String, sizeof( gbl.default_directory), 0, 0, 0, pwr_eType_String, sizeof( gbl.default_directory), 0, 0, 0,
(void *) gbl.default_directory, NULL, flow_eDest_IntoLast); (void *) gbl.default_directory, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "Scantime", "setup_scantime", new ItemLocal( brow, "Scantime", "setup_scantime",
pwr_eType_Float64, sizeof( gbl.scantime), 0.010, 10, 0, pwr_eType_Float64, sizeof( gbl.scantime), 0.010, 10, 0,
(void *) &gbl.scantime, NULL, flow_eDest_IntoLast); (void *) &gbl.scantime, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "AlarmMessage", "setup_alarmmessage",
pwr_eType_Boolean, sizeof( gbl.AlarmMessage), 0, 1, 0,
(void *) &gbl.AlarmMessage, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "AlarmBeep", "setup_alarmbeep", new ItemLocal( brow, "AlarmBeep", "setup_alarmbeep",
pwr_eType_Boolean, sizeof( gbl.AlarmBeep), 0, 1, 0, pwr_eType_Boolean, sizeof( gbl.AlarmBeep), 0, 1, 0,
(void *) &gbl.AlarmBeep, NULL, flow_eDest_IntoLast); (void *) &gbl.AlarmBeep, NULL, flow_eDest_IntoLast);
...@@ -2782,9 +2779,15 @@ int XNav::setup() ...@@ -2782,9 +2779,15 @@ int XNav::setup()
new ItemLocal( brow, "AlarmAck", "setup_alarmack", new ItemLocal( brow, "AlarmAck", "setup_alarmack",
pwr_eType_Boolean, sizeof( gbl.AlarmAck), 0, 1, 0, pwr_eType_Boolean, sizeof( gbl.AlarmAck), 0, 1, 0,
(void *) &gbl.AlarmAck, NULL, flow_eDest_IntoLast); (void *) &gbl.AlarmAck, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "SymbolFilename", "setup_symbolfilename", new ItemLocal( brow, "HideOperatorWindow", "setup_hideopwind",
pwr_eType_String, sizeof(gbl.symbolfilename), 0, 0, 0, pwr_eType_Boolean, sizeof( gbl.hide_opwind), 0, 1, 0,
(void *) gbl.symbolfilename, NULL, flow_eDest_IntoLast); (void *) &gbl.hide_opwind, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "HideStatusBar", "setup_hidestatusbar",
pwr_eType_Boolean, sizeof( gbl.hide_statusbar), 0, 1, 0,
(void *) &gbl.hide_statusbar, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "SetupScript", "setup_setupscript",
pwr_eType_String, sizeof(gbl.setupscript), 0, 0, 0,
(void *) gbl.setupscript, NULL, flow_eDest_IntoLast);
new ItemLocal( brow, "Verify", "setup_verify", new ItemLocal( brow, "Verify", "setup_verify",
pwr_eType_Int32, sizeof( gbl.verify), 0, 1, 0, pwr_eType_Int32, sizeof( gbl.verify), 0, 1, 0,
(void *) &gbl.verify, NULL, flow_eDest_IntoLast); (void *) &gbl.verify, NULL, flow_eDest_IntoLast);
...@@ -2883,132 +2886,44 @@ int XNav::show_logging( int index) ...@@ -2883,132 +2886,44 @@ int XNav::show_logging( int index)
return XNAV__SUCCESS; return XNAV__SUCCESS;
} }
int XNavGbl::symbolfile_exec( void *xnav) int XNavGbl::setupscript_exec( XNav *xnav)
{ {
char cmd[80]; char cmd[80];
if ( strcmp( symbolfilename, "") == 0) if ( strcmp( setupscript, "") == 0)
strcpy( symbolfilename, "$HOME/xtt_setup"); strcpy( setupscript, "$HOME/xtt_setup");
strcpy( cmd, "@"); strcpy( cmd, "@");
strcat( cmd, symbolfilename); strcat( cmd, setupscript);
((XNav *)xnav)->command( cmd); xnav->command( cmd);
return XNAV__SUCCESS; return XNAV__SUCCESS;
} }
int XNavGbl::load_config( void *xnav) int XNavGbl::load_config( XNav *xnav)
{ {
pwr_tClassId classid;
pwr_tObjid objid;
pwr_tObjid node;
pwr_tOName config_name;
pwr_tAName parname;
int found;
int sts; int sts;
char *s;
pwr_tFloat32 float32_val;
if ( ConfigureObject[0]) if ( strcmp( xnav->opplace_name, "") == 0)
{ return 0;
strcpy( config_name, ConfigureObject);
sts = gdh_NameToObjid ( config_name, &objid); strcpy( OpPlace, xnav->opplace_name);
if ( EVEN(sts)) return sts;
} sts = gdh_NameToPointer( xnav->opplace_name, (void **)&xnav->opplace_p);
else
{
/* Try to find a RttConfig object for the node */
sts = gdh_GetNodeObject ( 0, &node);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
/* Look for a RttConfig object as a child to the node object sts = gdh_NameToObjid( xnav->opplace_name, &xnav->gbl.OpObject);
with the name RttConfig */
found = 0;
sts = gdh_GetChild( node, &objid);
while ( ODD(sts))
{
sts = gdh_GetObjectClass( objid, &classid);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
if ( classid == pwr_cClass_RttConfig)
{
sts = gdh_ObjidToName ( objid, config_name, sizeof(config_name), cdh_mNName);
if (EVEN(sts)) return sts;
if ( (s = strrchr( config_name, '-')))
s++;
else
s = config_name;
cdh_ToUpper( s, s);
if ( !strcmp( s, "RTTCONFIG"))
{
found = 1;
break;
}
}
sts = gdh_GetNextSibling ( objid, &objid);
}
if ( found == 0)
return XNAV__OBJNOTFOUND;
sts = gdh_ObjidToName ( objid, config_name, sizeof(config_name), cdh_mNName);
if (EVEN(sts)) return sts;
strcpy( ConfigureObject, config_name); AlarmBeep = xnav->opplace_p->AlarmBell;
} AlarmReturn = (xnav->opplace_p->EventListEvents & pwr_mEventListMask_AlarmReturn) != 0;
AlarmAck = (xnav->opplace_p->EventListEvents & pwr_mEventListMask_AlarmAck) != 0;
/* rtt_UserObject */ hide_opwind = (xnav->opplace_p->OpWindLayout & pwr_mOpWindLayoutMask_HideOperatorWindow) != 0;
strcpy( parname, config_name); hide_statusbar = (xnav->opplace_p->OpWindLayout & pwr_mOpWindLayoutMask_HideStatusBar) != 0;
strcat( parname, ".UserObject"); op_wind_pop = xnav->opplace_p->OpWindPop;
sts = gdh_GetObjectInfo ( parname, &UserObject, sizeof( UserObject)); strcpy( setupscript, xnav->opplace_p->SetupScript);
dcli_trim( setupscript, setupscript);
/* AlarmAutoLoad */
strcpy( parname, config_name);
strcat( parname, ".AlarmAutoLoad");
sts = gdh_GetObjectInfo ( parname, &AlarmAutoLoad,
sizeof( AlarmAutoLoad));
/* AlarmMessage */
strcpy( parname, config_name);
strcat( parname, ".AlarmMessage");
sts = gdh_GetObjectInfo ( parname, &AlarmMessage, sizeof( AlarmMessage));
/* AlarmBeep */
strcpy( parname, config_name);
strcat( parname, ".AlarmBeep");
sts = gdh_GetObjectInfo ( parname, &AlarmBeep, sizeof( AlarmBeep));
/* AlarmReturn */
strcpy( parname, config_name);
strcat( parname, ".AlarmReturn");
sts = gdh_GetObjectInfo ( parname, &AlarmReturn, sizeof( AlarmReturn));
/* AlarmAck */
strcpy( parname, config_name);
strcat( parname, ".AlarmAck");
sts = gdh_GetObjectInfo ( parname, &AlarmAck, sizeof( AlarmAck));
/* DefaultDirectory */
strcpy( parname, config_name);
strcat( parname, ".DefaultDirectory");
sts = gdh_GetObjectInfo ( parname, default_directory,
sizeof( default_directory));
if ( EVEN(sts)) strcpy( default_directory, "");
/* ScanTime */
strcpy( parname, config_name);
strcat( parname, ".ScanTime");
sts = gdh_GetObjectInfo ( parname, &float32_val,
sizeof( float32_val));
if (ODD(sts) && float32_val != 0)
scantime = float32_val;
/* SymbolFileName */
strcpy( parname, config_name);
strcat( parname, ".SymbolFileName");
sts = gdh_GetObjectInfo ( parname, symbolfilename,
sizeof( symbolfilename));
if ( EVEN(sts))
strcpy( symbolfilename, "");
dcli_trim( symbolfilename, symbolfilename);
return XNAV__SUCCESS; return XNAV__SUCCESS;
} }
...@@ -3457,79 +3372,49 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data) ...@@ -3457,79 +3372,49 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data)
brow_CreateSecondaryCtx( xnav->brow_stack[0]->ctx, &secondary_ctx, brow_CreateSecondaryCtx( xnav->brow_stack[0]->ctx, &secondary_ctx,
init_brow_collect_cb, (void *)xnav, flow_eCtxType_Brow); init_brow_collect_cb, (void *)xnav, flow_eCtxType_Brow);
// Execute the symbolfile
xnav->gbl.symbolfile_exec( xnav);
// Start operator window // Start operator window
if ( strcmp( xnav->opplace_name, "") != 0) if ( strcmp( xnav->opplace_name, "") != 0)
{ {
pwr_tCmd cmd; pwr_tCmd cmd;
if ( !xnav->gbl.hide_opwind) {
strcpy( cmd, "open op "); strcpy( cmd, "open op ");
strcat( cmd, xnav->opplace_name); strcat( cmd, xnav->opplace_name);
if ( xnav->op_close_button) if ( xnav->op_close_button ||
!(xnav->opplace_p->OpWindLayout & pwr_mOpWindLayoutMask_HideCloseButton))
strcat( cmd, " /closebutton"); strcat( cmd, " /closebutton");
xnav->command( cmd); xnav->command( cmd);
xnav->load_ev_from_opplace(); xnav->load_ev_from_opplace();
}
xnav->login_from_opplace(); xnav->login_from_opplace();
} }
else else
xnav->login(); xnav->login();
// Execute the setup script
xnav->gbl.setupscript_exec( xnav);
return 1; return 1;
} }
int XNav::load_ev_from_opplace() int XNav::load_ev_from_opplace()
{ {
int user_found = 0;
pwr_sClass_OpPlace *op_p;
pwr_sClass_User *user_p;
pwr_tObjid user_objid;
int sts;
// Find the corresponding User-object
sts = gdh_NameToPointer( opplace_name, (void **) &op_p);
if ( EVEN(sts)) return sts;
sts = gdh_GetClassList( pwr_cClass_User, &user_objid);
while ( ODD(sts))
{
sts = gdh_ObjidToPointer( user_objid, (void **)&user_p);
if ( EVEN(sts)) return sts;
if ( user_p->OpNumber == op_p->OpNumber)
{
user_found = 1;
break;
}
sts = gdh_GetNextObject( user_objid, &user_objid);
}
if ( user_found )
{
char cmd[100]; char cmd[100];
gbl.UserObject = user_objid;
strcpy( cmd, "eventlist load"); strcpy( cmd, "eventlist load");
command( cmd); command( cmd);
return XNAV__SUCCESS; return XNAV__SUCCESS;
}
return 0;
} }
int XNav::login_from_opplace() int XNav::login_from_opplace()
{ {
pwr_sClass_User *user_p;
int sts; int sts;
unsigned int privilege; unsigned int privilege;
char systemgroup[80]; char systemgroup[80];
pwr_sSecurity sec; pwr_sSecurity sec;
char username[80]; char username[80];
sts = gdh_ObjidToPointer( gbl.UserObject, (void **) &user_p);
if ( EVEN(sts)) return sts;
sts = gdh_GetObjectInfo ( "pwrNode-System.SystemGroup", &systemgroup, sts = gdh_GetObjectInfo ( "pwrNode-System.SystemGroup", &systemgroup,
sizeof(systemgroup)); sizeof(systemgroup));
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
...@@ -3541,7 +3426,7 @@ int XNav::login_from_opplace() ...@@ -3541,7 +3426,7 @@ int XNav::login_from_opplace()
if ( ODD(sts) && sec.XttUseOpsysUser) if ( ODD(sts) && sec.XttUseOpsysUser)
syi_UserName( username, sizeof(username)); syi_UserName( username, sizeof(username));
else else
strcpy( username, user_p->UserName); strcpy( username, opplace_p->UserName);
sts = user_GetUserPriv( systemgroup, username, &privilege); sts = user_GetUserPriv( systemgroup, username, &privilege);
if ( EVEN(sts)) { if ( EVEN(sts)) {
......
...@@ -30,6 +30,10 @@ extern "C" { ...@@ -30,6 +30,10 @@ extern "C" {
# include "pwr.h" # include "pwr.h"
#endif #endif
#ifndef pwr_baseclasses_h
#include "pwr_baseclasses.h"
#endif
#ifndef co_regex_h #ifndef co_regex_h
# include "co_regex.h" # include "co_regex.h"
#endif #endif
...@@ -179,6 +183,9 @@ typedef enum { ...@@ -179,6 +183,9 @@ typedef enum {
applist_eType_Fast applist_eType_Fast
} applist_eType; } applist_eType;
class XNav;
class ApplListElem { class ApplListElem {
public: public:
ApplListElem( applist_eType al_type, void *al_ctx, pwr_sAttrRef *al_arp, ApplListElem( applist_eType al_type, void *al_ctx, pwr_sAttrRef *al_arp,
...@@ -211,53 +218,41 @@ class ApplList { ...@@ -211,53 +218,41 @@ class ApplList {
class XNavGbl { class XNavGbl {
public: public:
XNavGbl() : XNavGbl() :
priv(0), UserObject(pwr_cNObjid), AlarmAutoLoad(0), AlarmMessage(0), priv(0), OpObject(pwr_cNObjid),
AlarmBeep(0), AlarmReturn(0), AlarmAck(0), gdh_started(1), AlarmBeep(0), AlarmReturn(0), AlarmAck(0), hide_opwind(0), hide_statusbar(0),
op_wind_pop(0), gdh_started(1),
verify(0), scantime(0.5), signal_test_mode(0), advanced_user(1), show_truedb(0), verify(0), scantime(0.5), signal_test_mode(0), advanced_user(1), show_truedb(0),
show_allattr(0), no_graph_ratio(0) show_allattr(0), no_graph_ratio(0)
{ {
strcpy( version, xnav_cVersion); strcpy( time, ""); strcpy( version, xnav_cVersion); strcpy( time, "");
strcpy( ConfigureObject, ""); strcpy( AlarmLastMessage, ""); strcpy( OpPlace, "");
strcpy( AlarmText1, ""); strcpy( AlarmText2, ""); strcpy( AlarmText3, ""); strcpy( default_directory, "");
strcpy( AlarmText4, ""); strcpy( AlarmText5, ""); strcpy( setupscript, "");
strcpy( platform, ""); strcpy( os, ""); strcpy( hw, "");
strcpy( node, ""); strcpy( sys, ""); strcpy( default_directory, "");
strcpy( symbolfilename, "");
}; };
char version[10]; char version[10];
char time[80]; char time[80];
unsigned long priv; unsigned long priv;
char ConfigureObject[80]; pwr_tOName OpPlace;
pwr_tObjid UserObject; pwr_tObjid OpObject;
int AlarmAutoLoad;
int AlarmMessage;
int AlarmBeep; int AlarmBeep;
int AlarmReturn; int AlarmReturn;
int AlarmAck; int AlarmAck;
int hide_opwind;
int hide_statusbar;
pwr_tMask op_wind_pop;
int gdh_started; int gdh_started;
char AlarmLastMessage[80];
char AlarmText1[80];
char AlarmText2[80];
char AlarmText3[80];
char AlarmText4[80];
char AlarmText5[80];
char platform[20];
char os[20];
char hw[20];
int verify; int verify;
char node[20];
char sys[20];
char default_directory[80]; char default_directory[80];
double scantime; double scantime;
char symbolfilename[80]; pwr_tFileName setupscript;
int signal_test_mode; int signal_test_mode;
int advanced_user; int advanced_user;
int show_truedb; int show_truedb;
int show_allattr; int show_allattr;
int no_graph_ratio; int no_graph_ratio;
int load_config( void *xnav); int load_config( XNav *xnav);
int symbolfile_exec( void *xnav); int setupscript_exec( XNav *xnav);
}; };
class XNav { class XNav {
...@@ -300,6 +295,7 @@ class XNav { ...@@ -300,6 +295,7 @@ class XNav {
CLog *clog; CLog *clog;
int closing_down; int closing_down;
pwr_tOName opplace_name; pwr_tOName opplace_name;
pwr_sClass_OpPlace *opplace_p;
char base_user[80]; char base_user[80];
char user[80]; char user[80];
unsigned int base_priv; unsigned int base_priv;
...@@ -333,7 +329,7 @@ class XNav { ...@@ -333,7 +329,7 @@ class XNav {
virtual Ev *ev_new( char *eve_name, char *ala_name, char *blk_name, virtual Ev *ev_new( char *eve_name, char *ala_name, char *blk_name,
pwr_tObjid ev_user, int display_ala, int display_eve, pwr_tObjid ev_user, int display_ala, int display_eve,
int display_blk, int display_return, int display_ack, int display_blk, int display_return, int display_ack,
int ev_beep, pwr_tStatus *status) { return 0;} int ev_beep, pwr_tMask ev_pop_mask, pwr_tStatus *status) { return 0;}
virtual Hist *hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts) {return 0;} virtual Hist *hist_new( char *title, pwr_tOid oid, pwr_tStatus *sts) {return 0;}
virtual Block *block_new( pwr_tAttrRef *arp, char *name, unsigned int priv, virtual Block *block_new( pwr_tAttrRef *arp, char *name, unsigned int priv,
pwr_tStatus *sts) {return 0;} pwr_tStatus *sts) {return 0;}
......
This diff is collapsed.
...@@ -102,6 +102,7 @@ E 1.1.96 "Eventlog" ...@@ -102,6 +102,7 @@ E 1.1.96 "Eventlog"
E 1.1.97 "Confirm" E 1.1.97 "Confirm"
E 1.1.98 "Search string" E 1.1.98 "Search string"
E 1.1.99 "History" E 1.1.99 "History"
E 1.1.100 " List"
# #
# Logging entry # Logging entry
E 1.2.1 "Active" E 1.2.1 "Active"
...@@ -153,8 +154,8 @@ E 1.8.2 "_Next File" ...@@ -153,8 +154,8 @@ E 1.8.2 "_Next File"
E 1.8.3 "_Previous File" E 1.8.3 "_Previous File"
E 1.8.4 "_Select File" E 1.8.4 "_Select File"
E 1.8.5 "_Filter" E 1.8.5 "_Filter"
E 1.8.6 "Consolelog" E 1.8.6 "System Messages"
E 1.8.7 "_Help on ConsoleLog" E 1.8.7 "_Help on System Messages"
E 1.8.8 "Help on _Selected Message" E 1.8.8 "Help on _Selected Message"
# #
# Eventlog # Eventlog
...@@ -230,6 +231,37 @@ E 1.12.15 "_Mode" ...@@ -230,6 +231,37 @@ E 1.12.15 "_Mode"
E 1.12.16 "On _Trace" E 1.12.16 "On _Trace"
E 1.12.17 "On _PlcPgm" E 1.12.17 "On _PlcPgm"
# #
# Operator Window
E 1.13.1 "Trend List"
E 1.13.2 "Fast Curve List"
E 1.13.3 "Process History List"
E 1.13.4 "Process Graphic List"
E 1.13.5 "Process Graphics"
E 1.13.6 "_OperatorWindow"
E 1.13.7 "_AlarmList"
E 1.13.8 "_EventList"
E 1.13.9 "Event_Log"
E 1.13.10 "_BlockList"
E 1.13.11 "_Alarm"
E 1.13.12 "_Trends"
E 1.13.13 "_Fast"
E 1.13.14 "_Process History"
E 1.13.15 "_Smaller Text"
E 1.13.16 "_Larger Text"
E 1.13.17 "_Navigator"
E 1.13.18 "_Process Graphics"
E 1.13.19 "Larger Text"
E 1.13.20 "Smaller Text"
E 1.13.21 "_Curves"
E 1.13.22 "Trend List"
E 1.13.23 "Fast Curve List"
E 1.13.24 "Process History List"
E 1.13.25 "Process Graphic List"
E 1.13.26 "_User"
E 1.13.27 "S_witch User"
E 1.13.28 "_Show User"
E 1.13.29 "_Return"
#
# Postscript printing # Postscript printing
E 2.1.1 "Contents" E 2.1.1 "Contents"
E 2.1.2 "page" E 2.1.2 "page"
......
xtt/mmi/xtt/src/xtt_down.png

217 Bytes | W: | H:

xtt/mmi/xtt/src/xtt_down.png

196 Bytes | W: | H:

xtt/mmi/xtt/src/xtt_down.png
xtt/mmi/xtt/src/xtt_down.png
xtt/mmi/xtt/src/xtt_down.png
xtt/mmi/xtt/src/xtt_down.png
  • 2-up
  • Swipe
  • Onion skin
xtt/mmi/xtt/src/xtt_navigator.png

414 Bytes | W: | H:

xtt/mmi/xtt/src/xtt_navigator.png

583 Bytes | W: | H:

xtt/mmi/xtt/src/xtt_navigator.png
xtt/mmi/xtt/src/xtt_navigator.png
xtt/mmi/xtt/src/xtt_navigator.png
xtt/mmi/xtt/src/xtt_navigator.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -102,6 +102,7 @@ E 1.1.96 "H ...@@ -102,6 +102,7 @@ E 1.1.96 "H
E 1.1.97 "Verifiera" E 1.1.97 "Verifiera"
E 1.1.98 "Skstrng" E 1.1.98 "Skstrng"
E 1.1.99 "Historik" E 1.1.99 "Historik"
E 1.1.100 " Lista"
# #
# Logging entry # Logging entry
E 1.2.1 "Aktiv" E 1.2.1 "Aktiv"
...@@ -153,8 +154,8 @@ E 1.8.2 "_N ...@@ -153,8 +154,8 @@ E 1.8.2 "_N
E 1.8.3 "_Fregende Fil" E 1.8.3 "_Fregende Fil"
E 1.8.4 "_Vlj Fil" E 1.8.4 "_Vlj Fil"
E 1.8.5 "_Filter" E 1.8.5 "_Filter"
E 1.8.6 "Konsollogg" E 1.8.6 "System Meddelanden"
E 1.8.7 "_Hjlp fr Konsollog" E 1.8.7 "_Hjlp fr System Meddelanden"
E 1.8.8 "_Hjlp fr utvalt meddelande" E 1.8.8 "_Hjlp fr utvalt meddelande"
# #
# Eventlog # Eventlog
...@@ -230,6 +231,37 @@ E 1.12.15 "_Mod" ...@@ -230,6 +231,37 @@ E 1.12.15 "_Mod"
E 1.12.16 "Om _Trace" E 1.12.16 "Om _Trace"
E 1.12.17 "Om _PlcPgm" E 1.12.17 "Om _PlcPgm"
# #
# Operator Window
E 1.13.1 "Trend Lista"
E 1.13.2 "Snabb Lista"
E 1.13.3 "Process Historik Lista"
E 1.13.4 "Process Grafik Lista"
E 1.13.5 "Process Grafik"
E 1.13.6 "_Operatrsfnster"
E 1.13.7 "_Larmlista"
E 1.13.8 "_Hndelselista"
E 1.13.9 "Hndelse_Logg"
E 1.13.10 "_Blockeringslista"
E 1.13.11 "_Larm"
E 1.13.12 "_Trendkurvor"
E 1.13.13 "_Snabbkurvor"
E 1.13.14 "_Process Historik"
E 1.13.15 "_Mindre text"
E 1.13.16 "_Strre text"
E 1.13.17 "_Navigatr"
E 1.13.18 "_Process Grafik"
E 1.13.19 "Strre text"
E 1.13.20 "Mindre text"
E 1.13.21 "_Kurvor"
E 1.13.22 "Trendkurvor"
E 1.13.23 "Snabbkurvor"
E 1.13.24 "Process Historik"
E 1.13.25 "Process Grafik"
E 1.13.26 "_Anvndare"
E 1.13.27 "_Byt Anvndare"
E 1.13.28 "_Visa Anvndare"
E 1.13.29 "_terg"
#
# Postscript printing # Postscript printing
E 2.1.1 "Innehll" E 2.1.1 "Innehll"
E 2.1.2 "sidan" 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