Commit 5c45bcff authored by claes's avatar claes

Login as Proview user required, login and show user command added

parent 62ac2af5
/* /*
* Proview $Id: rt_rtt_functions.h,v 1.2 2005-09-01 14:57:56 claes Exp $ * Proview $Id: rt_rtt_functions.h,v 1.3 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
/* Module rs_rtt_menu.c */ /* Module rs_rtt_menu.c */
int rtt_gdh_init( void); int rtt_gdh_init( void);
int rtt_initialize( char *login, int rtt_initialize( char *username,
char *password,
char *commandfile, char *commandfile,
char *mainmenu_title); char *mainmenu_title);
...@@ -393,6 +394,8 @@ char *rtt_pwr_dir( char *dir); ...@@ -393,6 +394,8 @@ char *rtt_pwr_dir( char *dir);
int rtt_ctx_push( menu_ctx ctx); int rtt_ctx_push( menu_ctx ctx);
int rtt_ctx_pop(); int rtt_ctx_pop();
menu_ctx rtt_current_ctx(); menu_ctx rtt_current_ctx();
int rtt_logon_pict( unsigned long *chn,
unsigned long *priv);
/* Module rs_rtt_crr.c */ /* Module rs_rtt_crr.c */
......
/* /*
* Proview $Id: rt_rtt_global.h,v 1.4 2005-11-22 12:20:19 claes Exp $ * Proview $Id: rt_rtt_global.h,v 1.5 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -49,6 +49,7 @@ extern rtt_t_db rtt_appl_db[]; ...@@ -49,6 +49,7 @@ extern rtt_t_db rtt_appl_db[];
extern rtt_t_db rtt_rttsys_db[]; extern rtt_t_db rtt_rttsys_db[];
extern char rtt_time[80]; extern char rtt_time[80];
extern unsigned long rtt_priv; extern unsigned long rtt_priv;
extern char rtt_user[40];
extern char rtt_ConfigureObject[80]; extern char rtt_ConfigureObject[80];
extern pwr_tObjid rtt_UserObject; extern pwr_tObjid rtt_UserObject;
extern char rtt_DefaultVMSNode[80]; extern char rtt_DefaultVMSNode[80];
...@@ -125,6 +126,7 @@ unsigned long rtt_chn[4]; ...@@ -125,6 +126,7 @@ unsigned long rtt_chn[4];
rtt_t_recall *rtt_recallbuff; rtt_t_recall *rtt_recallbuff;
rtt_t_recall *rtt_value_recallbuff; rtt_t_recall *rtt_value_recallbuff;
unsigned long rtt_priv; unsigned long rtt_priv;
char rtt_user[40] = "";
char rtt_time[80]; char rtt_time[80];
char rtt_hw[20]; char rtt_hw[20];
char rtt_platform[20]; char rtt_platform[20];
......
/* /*
* Proview $Id: rt_rtt_helptext.h,v 1.3 2005-09-01 14:57:56 claes Exp $ * Proview $Id: rt_rtt_helptext.h,v 1.4 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -96,6 +96,7 @@ exit\n\ ...@@ -96,6 +96,7 @@ exit\n\
learn start/file=\n\ learn start/file=\n\
learn stop\n\ learn stop\n\
logging...\n\ logging...\n\
login\n\
help\n\ help\n\
page\n\ page\n\
plcscan /on /off /hierarchy= /all\n\ plcscan /on /off /hierarchy= /all\n\
...@@ -134,6 +135,7 @@ show signals\n\ ...@@ -134,6 +135,7 @@ show signals\n\
show system\n\ show system\n\
show subcli\n\ show subcli\n\
show subsrv\n\ show subsrv\n\
show user\n\
show device\n\ show device\n\
store /file= /collect\n\ store /file= /collect\n\
top\n\ top\n\
...@@ -187,6 +189,7 @@ pwr_rtt> show clock\n\ ...@@ -187,6 +189,7 @@ pwr_rtt> show clock\n\
pwr_rtt> show alarm\n\ pwr_rtt> show alarm\n\
pwr_rtt> show event\n\ pwr_rtt> show event\n\
pwr_rtt> show symbol\n\ pwr_rtt> show symbol\n\
pwr_rtt> show user\n\
"}, "},
#ifdef OS_ELN #ifdef OS_ELN
{1, "SHOW SYSTEM","", {1, "SHOW SYSTEM","",
...@@ -492,6 +495,11 @@ Show the value of a symbol or show all the defined symbols.\n\n\ ...@@ -492,6 +495,11 @@ Show the value of a symbol or show all the defined symbols.\n\n\
pwr_rtt> show symbol 'symbol_name'\n\ pwr_rtt> show symbol 'symbol_name'\n\
pwr_rtt> show symbol [/all]\n\ pwr_rtt> show symbol [/all]\n\
"}, "},
{1, "SHOW USER","",
"\
Show the current user with name and privileges.\n\n\
pwr_rtt> show user\n\
"},
{1, "MONITOR GRAFCET","", {1, "MONITOR GRAFCET","",
"\ "\
Display the active steps and orders of a grafcet sequence.\n\n\ Display the active steps and orders of a grafcet sequence.\n\n\
...@@ -785,6 +793,15 @@ pwr_rtt> logging show /entry=\n\ ...@@ -785,6 +793,15 @@ pwr_rtt> logging show /entry=\n\
pwr_rtt> logging store [/entry=]/file=\n\ pwr_rtt> logging store [/entry=]/file=\n\
pwr_rtt> logging store /all/file=\n\ pwr_rtt> logging store /all/file=\n\
"}, "},
{1, "LOGIN",
"",
"\
Login as a Proview user with username and password.\n\
The login command will open the login frame which promps for\n\
username and password.\n\
\n\
pwr_rtt> login\n\
"},
{1, "SET","", {1, "SET","",
"\ "\
List of set commands:\n\n\ List of set commands:\n\n\
......
This diff is collapsed.
/* /*
* Proview $Id: rt_rtt_menu.h,v 1.4 2005-09-06 14:17:56 claes Exp $ * Proview $Id: rt_rtt_menu.h,v 1.5 2008-06-24 07:39:57 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -364,43 +364,40 @@ unsigned int rtt_exception( void *signalP, void *mechanismP); \ ...@@ -364,43 +364,40 @@ unsigned int rtt_exception( void *signalP, void *mechanismP); \
int main(int argc, char *argv[]) \ int main(int argc, char *argv[]) \
{ \ { \
int sts, i; \ int sts, i; \
char login[20]; \ char username[40]; \
char password[40]; \
char commandfile[80]; \ char commandfile[80]; \
\ \
VAXC$ESTABLISH( rtt_exception); \ VAXC$ESTABLISH( rtt_exception); \
rtt_args = argc - 1; \ rtt_args = argc - 1; \
for ( i = 0; i < rtt_args; i++) \ for ( i = 0; i < rtt_args; i++) { \
{ \
if ( i >= (int)(sizeof(rtt_arg)/sizeof(rtt_arg[0]))) \ if ( i >= (int)(sizeof(rtt_arg)/sizeof(rtt_arg[0]))) \
break; \ break; \
strncpy( rtt_arg[i], argv[i+1], sizeof(rtt_arg[i]));\ strncpy( rtt_arg[i], argv[i+1], sizeof(rtt_arg[i]));\
rtt_toupper( rtt_arg[i], rtt_arg[i]); \ rtt_toupper( rtt_arg[i], rtt_arg[i]); \
} \ } \
if ( argc >= 2 ) \ if ( argc >= 3 ) { \
{ \ strcpy( username, argv[1]); \
strcpy( login, argv[1]); \ rtt_toupper( username, username); \
rtt_toupper( login, login); \ strcpy( password, argv[2]); \
if ( argc >= 3 ) \ if ( argc >= 4 ) { \
{ \ strcpy( commandfile, argv[3]); \
strcpy( commandfile, argv[2]); \ if (argc >= 5) { \
if (argc >= 4) \ strcpy(rtt_ConfigureObject,argv[4]); \
{ \ if (argc >= 6) { \
strcpy(rtt_ConfigureObject,argv[3]); \ strcpy( mainmenu_title, argv[5]); \
if (argc >= 5) \
{ \
strcpy( mainmenu_title, argv[4]); \
} \ } \
} \ } \
} \ } \
else \ else \
strcpy( commandfile, ""); \ strcpy( commandfile, ""); \
} \ } \
else \ else { \
{ \ strcpy( username, ""); \
strcpy( login, ""); \ strcpy( password, ""); \
strcpy( commandfile, ""); \ strcpy( commandfile, ""); \
} \ } \
sts = rtt_initialize( login, commandfile, mainmenu_title); \ sts = rtt_initialize( username, password, commandfile, mainmenu_title); \
sts = rtt_menu_new( 0, pwr_cNObjid, &mainmenu_ptr, rtt_mainmenu_title,\ sts = rtt_menu_new( 0, pwr_cNObjid, &mainmenu_ptr, rtt_mainmenu_title,\
0, RTT_MENUTYPE_STAT); \ 0, RTT_MENUTYPE_STAT); \
rtt_error_msg(sts); \ rtt_error_msg(sts); \
......
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