Commit 7399843f authored by claes's avatar claes

New root volume wizard

parent 57eab979
!** Description: Initial configuration of directory volume
#
# Proview $Id: wb_wiz_rootvolume.pwr_com,v 1.1 2008-10-28 09:46:10 claes Exp $
# Copyright (C) 2005 SSAB Oxelsund AB.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the program, if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# Main script
#
main()
extern string pwr_wizard_title = "Configure Root Volume";
extern int rv_quit = 0;
extern int rv_prev = 0;
extern string rv_error_message;
extern int rv_prstation = 1;
extern int rv_opstation = 0;
extern int rv_standard = 1;
extern int rv_customized = 0;
extern string rv_nodehierroot;
extern string rv_nodename;
extern string rv_opop;
extern string rv_opmaintenance;
extern int rv_server_statusserver = 1;
extern int rv_server_backup = 1;
extern int rv_server_nodelinksup;
extern int rv_server_fast;
extern int rv_server_trend;
extern int rv_server_webhandler = 1;
extern int rv_server_sysmon;
extern int rv_server_histmon;
extern int rv_server_sevserver;
extern int rv_server_opcserver;
extern int rv_server_remh;
extern int rv_server_remlogg;
extern int rv_server_elog;
string volume;
string str1;
string nname;
string oname;
string current_node;
verify(0);
rv_nodehierroot = get_pwr_config( "defaultNodeHierRoot");
rv_opop = get_pwr_config( "defaultOpOp");
rv_opmaintenance = get_pwr_config( "defaultOpMaintenance");
if ( ! EditMode())
MessageDialog("Error", "Enter edit mode before starting wizard");
goto exit_now;
endif
volume = GetCurrentVolume();
if ( volume == "")
MessageDialog("Error", "Can't get current volume, wizard aborted");
goto_exit_now;
endif
str1 = extract( 1, 3, volume);
str1 = toupper( str1);
if ( str1 == "VOL")
rv_nodename = extract( 4, 79, volume);
else
rv_nodename = volume;
endif
OpenGraph( "$pwr_exe/wb_wizard_frame", 0, pwr_wizard_title);
page_1:
# Station type page
SetSubwindow( "wb_wizard_frame", "wizwin", "$pwr_exe/wb_wiz_rootvolume_1", 1);
if ( rv_quit)
goto exit_now;
endif
if ( rv_prstation)
printf( "PrStation configuration\n");
endif
if ( rv_opstation)
printf( "OpStation configuration\n");
endif
page_2:
# Configuration type page
SetSubwindow( "wb_wizard_frame", "wizwin", "$pwr_exe/wb_wiz_rootvolume_2", 1);
if ( rv_quit)
goto exit_now;
endif
if ( rv_prev)
rv_prev = 0;
goto page_1;
endif
if ( rv_standard)
goto page_4;
endif
page_3:
# Customized configuration of Process station
SetSubwindow( "wb_wizard_frame", "wizwin", "$pwr_exe/wb_wiz_rootvolume_3", 1);
if ( rv_quit)
goto exit_now;
endif
if ( rv_prev)
rv_prev = 0;
goto page_2;
endif
page_4:
SetSubwindow( "wb_wizard_frame", "wizwin", "$pwr_exe/wb_wiz_rootvolume_4", 1);
if ( rv_quit)
goto exit_now;
endif
# Create objects
str1 = volume + ":";
set attr/name='str1'/attr=OperatingSystem/value=64/nolog/noconf
if ( rv_nodehierroot != "")
create object/name="'rv_nodehierroot'"/dest=""/class=$NodeHier
create object/name="'rv_nodename'"/dest='rv_nodehierroot'/class=$Node/first
nname = rv_nodehierroot + "-" + rv_nodename;
else
create object/name="'rv_nodename'"/dest=""/class=$Node
nname = rv_nodename;
endif
if ( rv_opop != "")
oname = nname + "-" + "Op";
move object/rename="'rv_opop'"/source='oname'
endif
if ( rv_opmaintenance != "")
oname = nname + "-" + "Maintenance";
move object/rename="'rv_opmaintenance'"/source='oname'
endif
# Create (or delete) server objects
if ( !rv_server_backup)
oname = nname + "-" + "Backup";
delete object/name='oname'/noconf/nolog
endif
if ( !rv_server_statusserver)
oname = nname + "-" + "StatusServer";
delete object/name='oname'/noconf/nolog
endif
if ( !rv_server_webhandler)
oname = nname + "-" + "WebHandler";
delete tree/name='oname'/noconf/nolog
endif
if ( rv_server_nodelinksup)
create object/dest='nname'/name="NodeLinkSup"/last/class=NodeLinkSup
endif
if ( rv_server_fast)
create object/dest='nname'/name="DsFastConf"/last/class=DsFastConf
endif
if ( rv_server_trend)
create object/dest='nname'/name="DsTrendConf"/last/class=DsTrendConf
endif
if ( rv_server_sysmon)
create object/dest='nname'/name="SysMon"/last/class=SysMonConfig
endif
if ( rv_server_histmon)
create object/dest='nname'/name="SevHistMonitor"/last/class=SevHistMonitor
oname = nname + "-SevHistMonitor";
create object/dest='oname'/name="1s"/last/class=SevHistThread
oname = nname + "-SevHistMonitor-1s";
set attr/name='oname'/attr=ScanTime/value=1/nolog/noconf
if ( rv_server_sevserver)
str1 = tolower( rv_nodename);
set attr/name='oname'/attr=ServerNode/value="'str1'"/nolog/noconf
endif
endif
if ( rv_server_sevserver)
create object/dest='nname'/name="SevServer"/last/class=SevServer
endif
if ( rv_server_opcserver)
create object/dest='nname'/name="OpcServer"/last/class=Opc_ServerConfig
endif
if ( rv_server_remh)
create object/dest='nname'/name="Remote"/last/class=RemoteConfig
endif
if ( rv_server_remlogg)
create object/dest='nname'/name="Logg"/last/class=LoggConfig
endif
if ( rv_server_elog)
oname = nname + "-" + "MessageHandler";
set attr/name='oname'/attr=EventLogSize/value=10000/noconf/nolog
endif
if ( rv_opstation)
# Create a dummy plc
#create object/dest=""/name="Op"/after/class=$PlantHier
#create object/dest=Op/name="Dummy"/first/class=PlcPgm
#create object/dest=Op-Dummy/name="W"/first/class=WindowPlc
#set attr/name=Op-Dummy-W/attr=Modified/value="01-JUL-2008 01:00:00"/nolog/noconf
endif
save/quiet
# Build
#noedit
#current_node = get_node_name();
#build node/name='current_node'
exit_now:
CloseGraph("wb_wizard_frame");
delete rv_quit;
delete rv_prev;
delete rv_prstation;
delete rv_opstation;
delete rv_standard;
delete rv_customized;
delete rv_nodehierroot;
delete rv_nodename;
delete rv_opop;
delete rv_opmaintenance;
delete pwr_wizard_title;
delete rv_error_message;
delete rv_server_statusserver;
delete rv_server_backup;
delete rv_server_nodelinksup;
delete rv_server_fast;
delete rv_server_trend;
delete rv_server_webhandler;
delete rv_server_sysmon;
delete rv_server_histmon;
delete rv_server_sevserver;
delete rv_server_opcserver;
delete rv_server_remh;
delete rv_server_remlogg;
delete rv_server_elog;
endmain
1
100 20
135 20
101 20
102 4
103 -68
104 4.07705
136 4.07705
105 100
106 0
107 -13
108 26.9939
109 6.95
110 24.7904
111 1.12159
116 0
117 0
118 139
119 126
120 0
121 Claes context
122 0
126 1
127 1
128 0
129 0.3
130 1.5
131 0.8
132 3
133 2
137 4510
134
22
2200 0
2201 105
2202 wb_wiz_directoryvolume_9
2203 31
2205 0
2204
2206 0
2207
2208
2209 0
2210 0
2211 20
2212 26
2213 4
2214
pwrp_pop:
pwrp_exe:
ssab_exe:
pwr_exe:
2215 0
2236 0
2216 0
2221 0
2237 0
2238 0
2239 0
2240 0
2241 0
2242 0
2217 0
2218 0
2219 0
2220
2230 0
2231 0
2222
2223 1
2224 0.5
2232 0.5
2225 0.5
2226 0
2227
2228 0
2229 0
2233 1
2234 1
2235 0
2243 0
2244
99
123
2
3
300 pwr_smallbutton
301
2
19
1904
1900 2.4
1901 0.2
1902 1.05
1903 0.2
1908 0
1909 102
1910 102
1911 1
1915 1
1913 16
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 0.2
701 0.2
99
503
7
700 2.4
701 1.05
99
99
1912
28
2800 1
2801 0
2802 6.07153e-17
2803 0
2804 1
2805 -2.63678e-16
2806 0
99
99
29
2907
13
1300 1
1301 304
1306 0
1302 2
1305 1
1303
7
700 0.55
701 0.65
99
1304 0
1307 0
99
2908
28
2800 1
2801 0
2802 -0.1
2803 0
2804 1
2805 0.2
2806 0
99
2901 2
99
99
302 0
304 0
303
305 0
306
307
308 0
321 16
309 0
313 0
322 0
323 0
324 0
325 0
326 0
327 0
310 0
311 0
312 JopSmallbutton
314
315 1
316 1
317 0
318 0
319 0
320 0
328 0
329
1
100 1
101 1
102 33619964
103 0
99
99
99
124
2
99
125
2
27
2703 10000
2704 31
2722 10000
2705 31
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 pwr_smallbutton
1002 B1
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 12.7439
1007 7.70004
1008 24.7903
1009 23.6216
1013 12.7439
1014 7.70004
1015 24.7903
1016 23.6216
1003
0
10
0
0
0
0
0
0
0
0
1004
" Quit"
1001
7
700 11.35
701 11.6
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 2.29268
2801 0
2802 7.2415
2803 0
2804 1.375
2805 23.3466
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2721
1
100 1
101 68
102 33619964
103 0
51
5100 $ccm.dv_quit##Boolean
5101 1
5102 1
99
55
5500 release subwindow wb_wizard_frame
99
99
99
27
2703 10000
2704 31
2722 10000
2705 31
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 pwr_smallbutton
1002 B3
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 26.9939
1007 21.95
1008 24.7904
1009 23.6216
1013 26.9939
1014 21.95
1015 24.7904
1016 23.6216
1003
0
16
0
0
0
0
0
0
0
0
1004
" No"
1001
7
700 11.35
701 11.6
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 2.29268
2801 0
2802 21.4915
2803 0
2804 1.375
2805 23.3466
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2721
1
100 1
101 131140
102 33619964
103 0
51
5100 $ccm.dv_nomorereg##Boolean
5101 1
5102 1
99
55
5500 release subwindow wb_wizard_frame
99
66
6600 0
6601
6602
6603 F1
99
99
99
27
2703 10000
2704 31
2722 10000
2705 31
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 pwr_smallbutton
1002 B2
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 19.8939
1007 14.85
1008 24.7904
1009 23.6216
1013 19.8939
1014 14.85
1015 24.7904
1016 23.6216
1003
0
13
0
0
0
0
0
0
0
0
1004
" Yes"
1001
7
700 11.35
701 11.6
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 2.29268
2801 0
2802 14.3915
2803 0
2804 1.375
2805 23.3466
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2721
1
100 1
101 64
102 33619964
103 0
55
5500 release subwindow wb_wizard_frame
99
99
99
30
3004 O101
3000 25.2
3001 11.5
3002 5.67159
3003 4.87159
3008 0
3010 0
3007 0
3006
3005
9
900 4
901 304
904 0
902 Do you want to register another volume
903
7
700 3.75
701 5.4
99
99
3009
28
2800 1
2801 0
2802 7.75
2803 0
2804 1
2805 0.12159
2806 0
99
99
34
3404 O104
3405 pwr_gtk_question.png
3400 9.35
3401 6.95
3402 6.45
3403 4.05
3407 0
3406
3408
28
2800 1
2801 0
2802 5
2803 0
2804 1
2805 -6.3
2806 0
99
3409 1
3410
7
700 1.95
701 10.35
99
3411
7
700 4.35
701 12.75
99
3412 0
3413 0
3414 0
3415 0
99
99
99
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
1
100 20
135 20
101 20
102 47
103 -86
104 4.07705
136 4.07705
105 100
106 9
107 -17
108 29.5792
109 2.8223
110 24.8621
111 1.62936
116 0
117 0
118 139
119 126
120 1
121 Claes context
122 0
126 1
127 1
128 0
129 0.3
130 1.5
131 0.8
132 3
133 2
137 4510
134
22
2200 0
2201 108
2202 wb_wiz_rootvolume_4
2203 31
2205 0
2204
2206 0
2207
2208
2209 0
2210 0
2211 20
2212 26
2213 4
2214
pwrp_pop:
pwrp_exe:
ssab_exe:
pwr_exe:
2215 0
2236 0
2216 0
2221 0
2237 0
2238 0
2239 0
2240 0
2241 0
2242 0
2217 0
2218 0
2219 0
2220
2230 0
2231 0
2222
2223 1
2224 0.5
2232 0.5
2225 0.5
2226 0
2227
2228 0
2229 0
2233 1
2234 1
2235 0
2243 0
2244
99
123
2
3
300 pwr_smallbutton
301
2
19
1904
1900 2.4
1901 0.2
1902 1.05
1903 0.2
1908 0
1909 102
1910 102
1911 1
1915 1
1913 16
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 0.2
701 0.2
99
503
7
700 2.4
701 1.05
99
99
1912
28
2800 1
2801 0
2802 6.07153e-17
2803 0
2804 1
2805 -2.63678e-16
2806 0
99
99
29
2907
13
1300 1
1301 304
1306 0
1302 2
1305 1
1303
7
700 0.55
701 0.65
99
1304 0
1307 0
99
2908
28
2800 1
2801 0
2802 -0.1
2803 0
2804 1
2805 0.2
2806 0
99
2901 2
99
99
302 0
304 0
303
305 0
306
307
308 0
321 16
309 0
313 0
322 0
323 0
324 0
325 0
326 0
327 0
310 0
311 0
312 JopSmallbutton
314
315 1
316 1
317 0
318 0
319 0
320 0
328 0
329
1
100 1
101 1
102 33619964
103 0
99
99
99
124
2
99
125
2
19
1904 O105
1900 29.5792
1901 2.8223
1902 7.22269
1903 1.62936
1908 0
1909 31
1910 31
1911 0
1915 1
1913 0.8
1916 2
1914 1
1918 0
1919 0
1920 0
1917 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 0
502
7
700 4.95
701 2.25
99
503
7
700 27.8
701 4.95
99
99
1912
28
2800 1.17098
2801 0
2802 -2.97405
2803 0
2804 2.07161
2805 -3.03176
2806 0
99
99
27
2703 10000
2704 31
2722 10000
2705 31
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 pwr_smallbutton
1002 O36
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 13.4604
1007 8.41648
1008 24.8121
1009 23.5902
1013 13.4604
1014 8.41648
1015 24.8121
1016 23.5902
1003
0
10
0
0
0
0
0
0
0
0
1004
" Quit"
1001
7
700 11.35
701 11.6
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 2.29268
2801 0
2802 7.95794
2803 0
2804 1.4375
2805 23.3027
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2721
1
100 1
101 68
102 33619964
103 0
51
5100 $ccm.rv_quit##Boolean
5101 1
5102 1
99
55
5500 release subwindow wb_wizard_frame
99
99
99
27
2703 10000
2704 31
2722 10000
2705 31
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 pwr_smallbutton
1002 O37
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 22.9103
1007 17.8664
1008 24.8621
1009 23.6402
1013 22.9103
1014 17.8664
1015 24.8621
1016 23.6402
1003
0
13
0
0
0
0
0
0
0
0
1004
" Next"
1001
7
700 11.35
701 11.6
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 2.29268
2801 0
2802 17.4079
2803 0
2804 1.4375
2805 23.3527
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2721
1
100 1
101 64
102 33619964
103 0
55
5500 release subwindow wb_wizard_frame
99
99
99
30
3004 O106
3000 25.4
3001 8.25
3002 4.8
3003 4
3008 0
3010 0
3007 0
3006
3005
9
900 4
901 304
904 0
902 Press Next to execute and save the configuration.
903
7
700 5.55
701 2.15
99
99
3009
28
2800 1
2801 0
2802 2.7
2803 0
2804 1
2805 2.5
2806 0
99
99
34
3404 O107
3405 pwr_gtk_info.png
3400 6.75
3401 4.35
3402 5.65
3403 3.25
3407 0
3406
3408
28
2800 1
2801 0
2802 -1.2
2803 0
2804 1
2805 -2.1
2806 0
99
3409 1
3410
7
700 5.55
701 5.35
99
3411
7
700 7.95
701 7.75
99
3412 0
3413 0
3414 0
3415 0
99
99
99
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