Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
1fc99797
Commit
1fc99797
authored
Apr 20, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
b8c1bdd9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
206 additions
and
184 deletions
+206
-184
java/jpwr/rt/src/Errh.java
java/jpwr/rt/src/Errh.java
+0
-1
src/doc/man/sv_se/uppgr40.pdf
src/doc/man/sv_se/uppgr40.pdf
+0
-0
src/exp/com/src/os_linux/reload.sh
src/exp/com/src/os_linux/reload.sh
+86
-161
src/exp/com/src/os_linux/upgrade.sh
src/exp/com/src/os_linux/upgrade.sh
+112
-20
src/jpwr/rt/src/Errh.java
src/jpwr/rt/src/Errh.java
+0
-1
src/lib/rt/src/rt_aproc.h
src/lib/rt/src/rt_aproc.h
+8
-1
No files found.
java/jpwr/rt/src/Errh.java
View file @
1fc99797
...
...
@@ -25,7 +25,6 @@ public class Errh {
private
static
boolean
initDone
=
false
;
public
Errh
(
String
programName
,
int
anix
)
{
if
(
!
initDone
)
{
init
(
programName
,
anix
);
initDone
=
true
;
...
...
src/doc/man/sv_se/uppgr40.pdf
View file @
1fc99797
No preview for this file type
src/exp/com/src/os_linux/reload.sh
View file @
1fc99797
...
...
@@ -13,29 +13,37 @@ let reload__loaddb=4
let
pass__continue
=
1
let
pass__execute
=
2
reload_c
reatestruct
()
reload_c
lassvolumes
()
{
reload_checkpass
"c
reatestruct
"
$start_pass
reload_checkpass
"c
lassvolumes
"
$start_pass
if
[
$pass_status
-ne
$pass__execute
]
;
then
reload_status
=
$reload__success
return
fi
reload_continue
"Pass create structfiles"
reload_continue
"Pass create structfiles
and loadfiles for classvolumes
"
fname
=
"
$pwrp_db
/userclasses.wb_load"
if
[
-e
$fname
]
;
then
echo
"-- Creating structfile for
$fname
"
co_convert
-sv
-d
$pwrp_inc
$fname
list
=
`
eval ls
-1d
$pwrp_db
/
*
.wb_load
`
for
file
in
$list
;
do
volume
=
`
eval grep
pwr_eClass_ClassVolume
$file
|
awk
'{ print $2 }'
`
volumelow
=
`
eval grep
pwr_eClass_ClassVolume
$file
|
awk
'{ print tolower($2) }'
`
if
[
"
$volume
"
!=
""
]
;
then
echo
"-- Creating structfile and loadfile for
$volume
"
if
co_convert
-sv
-d
$pwrp_inc
$file
then
reload_status
=
$reload__success
else
reload_status
=
$reload__userclasses
return
fi
for
cdb
in
$databases
;
do
if
[
$cdb
!=
"dbdirectory"
]
;
then
fname
=
"
$pwrp_db
/
$cdb
/userclasses.wb_load"
if
[
-e
$fname
]
;
then
echo
"-- Creating structfile for
$fname
"
co_convert
-sv
-d
$pwrp_inc
$fname
if
wb_cmd create snapshot/file
=
\"
$file
\"
/out
=
\"
$pwrp_load
/
$volumelow
.dbs
\"
then
reload_status
=
$reload__success
else
reload_status
=
$reload__userclasses
return
fi
fi
done
...
...
@@ -51,145 +59,52 @@ reload_dumpdb()
reload_continue
"Pass dump database"
for
cdb
in
$databases
;
do
echo
"Dumping database
$cdb
"
source
pwrp_env.sh setdb
$cdb
# Rename old dumpfiles
dmpfiles
=
`
eval ls
-1
$pwrp_db
/
*
.wb_dmp
`
for
dmpfile
in
$dmpfiles
;
do
reload_save_file
$dmpfile
done
if
[
$cdb
!=
"dbdirectory"
]
;
then
#Store versions of classvolumes
wb_cmd @
$pwr_exe
/reload_vol_versions
$cdb
fi
for
cdb
in
$databases
;
do
dump_file
=
$pwrp_db
/
$cdb
.wb_dmp
reload_save_file
$dump_file
wb_cmd wb dump/out
=
\"
$dump_file
\"
echo
"Dumping volume
$cdb
in
$dump_file
"
wb_cmd
-v
$cdb
wb dump/out
=
\"
$dump_file
\"
done
}
reload_
templat
edb
()
reload_
renam
edb
()
{
reload_checkpass
"
templat
edb"
$start_pass
reload_checkpass
"
renam
edb"
$start_pass
if
[
$pass_status
-ne
$pass__execute
]
;
then
reload_status
=
$reload__success
return
fi
reload_continue
"Pass copy
template
database"
reload_continue
"Pass copy
rename old
database"
for
cdb
in
$databases
;
do
echo
"-- Copy template database to
$cdb
"
source
pwrp_env.sh copy template
$cdb
noconfirm
reload_save_file
$pwrp_db
/
$cdb
.db
done
}
reload_
userclasses
()
reload_
dirvolume
()
{
reload_checkpass
"userclasses"
$start_pass
if
[
$pass_status
-ne
$pass__execute
]
;
then
reload_status
=
$reload__success
return
fi
reload_continue
"Pass load userclasses"
for
cdb
in
$databases
;
do
if
[
$cdb
!=
"dbdirectory"
]
;
then
source
pwrp_env.sh setdb
$cdb
# Load usertypes
fname
=
"
$pwrp_db
/
$cdb
/usertypes.wb_load"
list_file
=
"
$pwrp_db
/"
$cdb
"_usertypes.lis"
if
[
-e
$fname
]
;
then
echo
"-- Loading usertypes in
$cdb
$fname
"
if
wb_cmd wb load/load
=
\"
$fname
\"
/out
=
\"
$list_file
\"
then
reload_status
=
$reload__success
else
reload_status
=
$reload__usertypes
cat
$list_file
return
fi
else
fname
=
"
$pwrp_db
/usertypes.wb_load"
list_file
=
"
$pwrp_db
/"
$cdb
"_usertypes.lis"
if
[
-e
$fname
]
;
then
echo
"-- Loading usertypes in
$cdb
$fname
"
if
wb_cmd wb load/load
=
\"
$fname
\"
/out
=
\"
$list_file
\"
then
reload_status
=
$reload__success
else
reload_status
=
$reload__usertypes
cat
$list_file
return
fi
fi
fi
# Load userclasses
fname
=
"
$pwrp_db
/
$cdb
/userclasses.wb_load"
list_file
=
"
$pwrp_db
/"
$cdb
"_userclasses.lis"
if
[
-e
$fname
]
;
then
echo
"-- Loading userclasses in
$cdb
$fname
"
if
wb_cmd wb load/load
=
\"
$fname
\"
/out
=
\"
$list_file
\"
then
reload_status
=
$reload__success
else
reload_status
=
$reload__userclasses
cat
$list_file
return
fi
else
fname
=
"
$pwrp_db
/userclasses.wb_load"
list_file
=
"
$pwrp_db
/"
$cdb
"_userclasses.lis"
if
[
-e
$fname
]
;
then
echo
"-- Loading userclasses in
$cdb
$fname
"
if
wb_cmd wb load/load
=
\"
$fname
\"
/out
=
\"
$list_file
\"
then
reload_status
=
$reload__success
else
reload_status
=
$reload__userclasses
cat
$list_file
if
[
-e
"
$pwrp_db
/directory.db"
]
;
then
return
fi
fi
fi
fi
done
}
reload_settemplate
()
{
reload_checkpass
"settemplate"
$start_pass
reload_checkpass
"dirvolume"
$start_pass
if
[
$pass_status
-ne
$pass__execute
]
;
then
reload_status
=
$reload__success
return
fi
reload_continue
"Pass set template values"
fname
=
"
$pwrp_db
/set_template.pwr_com"
if
[
-e
$fname
]
;
then
for
cdb
in
$databases
;
do
if
[
$cdb
!=
"dbdirectory"
]
;
then
source
pwrp_env.sh setdb
$cdb
reload_continue
"Pass dirvolume"
echo
"-- Setting template values in
$cdb
$fname
"
if
wb_cmd @
$fname
then
reload_status
=
$reload__success
else
reload_status
=
$reload__settemplate
return
fi
fi
done
else
echo
"-- No set_template file found"
reload_status
=
$reload__success
fi
wb_cmd create volume/directory
wb_cmd wb load /load
=
\"
$pwrp_db
/directory.wb_dmp
\"
}
reload_loaddb
()
...
...
@@ -202,27 +117,34 @@ reload_loaddb()
reload_continue
"Pass load database"
for
cdb
in
$databases
;
do
echo
"-- Loading database
$cdb
"
source
pwrp_env.sh setdb
$cdb
if
[
$cdb
!=
"dbdirectory"
]
;
then
#Restore versions of classvolumes
if
[
-e
$pwrp_db
/reload_vol_versions_
$cdb
.pwr_com
]
;
then
wb_cmd @
$pwrp_db
/reload_vol_versions_
$cdb
if
[
-z
"
$1
"
]
;
then
tmp
=
`
eval ls
-1
$pwrp_db
/
*
.wb_dmp
`
databases
=
""
for
db
in
$tmp
;
do
db
=
${
db
##/*/
}
db
=
"
${
db
%.*
}
"
if
[
"
$db
"
!=
"directory"
]
;
then
databases
=
"
$databases
$db
"
fi
done
else
databases
=
$@
fi
for
cdb
in
$databases
;
do
if
[
$cdb
!=
"directory"
]
;
then
echo
"-- Loading volume
$cdb
"
dump_file
=
$pwrp_db
/
$cdb
.wb_dmp
list_file
=
$pwrp_db
/
$cdb
.lis
if
wb_cmd wb load/load
=
\"
$dump_file
\"
/out
=
\"
$list_file
\"
/ignore
if
wb_cmd wb load/load
=
\"
$dump_file
\"
/out
=
\"
$list_file
\"
then
reload_status
=
$reload__success
else
cat
$list_file
reload_status
=
$reload__loaddb
fi
fi
done
}
...
...
@@ -383,14 +305,10 @@ usage()
Pass
createstruct Create structfiles
dumpdb Dump database to textfile
\$
pwrp_load/'dbid'.wb_dmp
templatedb Replace the database with a template database
userclasses Load userclasses.wb_load (and usertypes.wb_load)
reload will first the load_files in
\$
pwrp_db/'dbid'/
and then in
\$
pwrp_db/
settemplate Set template values.
\$
pwrp_db/set_template.pwr_com is
executed
classvolumes Create structfiles and loadfiles for classvolumes
dumpdb Dump database to textfile
\$
pwrp_db/'volume'.wb_dmp
renamedb Rename the old database database
dirvolume Load directory volume
loaddb Load the dump into the new database
compile Compile all plcprograms in the database
removeload Remove old loadfiles.
...
...
@@ -400,7 +318,7 @@ usage()
EOF
}
if
[
$1
=
"help"
]
||
[
$1
=
"-h"
]
;
then
if
[
"
$1
"
=
"help"
]
||
[
"
$1
"
=
"-h"
]
;
then
usage
exit
fi
...
...
@@ -411,8 +329,15 @@ let check_status=0
let
go
=
0
if
[
-z
"
$1
"
]
;
then
databases
=
`
eval source
pwrp_env.sh show db
-a
`
databases
=
$databases
" dbdirectory"
tmp
=
`
eval ls
-1d
$pwrp_db
/
*
.db
`
databases
=
""
for
db
in
$tmp
;
do
db
=
${
db
##/*/
}
db
=
"
${
db
%.*
}
"
if
[
"
$db
"
!=
"rt_eventlog"
]
;
then
databases
=
"
$databases
$db
"
fi
done
else
databases
=
$@
fi
...
...
@@ -420,17 +345,17 @@ fi
usage
echo
""
echo
"-- Reloading
databas
e
$databases
"
echo
"-- Reloading
volum
e
$databases
"
echo
""
passes
=
"
createstruct dumpdb templatedb userclasses settemplat
e loaddb compile removeload createload createboot"
passes
=
"
dumpdb classvolumes renamedb dirvolum
e loaddb compile removeload createload createboot"
echo
"Pass:
$passes
"
echo
""
echo
-n
"Enter start pass [
createstruct
] > "
echo
-n
"Enter start pass [
dumpdb
] > "
read
start_pass
if
[
-z
$start_pass
]
;
then
start_pass
=
"
createstruct
"
start_pass
=
"
dumpdb
"
fi
for
cpass
in
$passes
;
do
...
...
src/exp/com/src/os_linux/upgrade.sh
View file @
1fc99797
...
...
@@ -35,6 +35,61 @@ reload_dumpdb()
source
$v34_root
/os_linux/hw_x86/exp/exe/pwrp_env.sh setdb
$cdb
export
pwr_inc
=
$pwrb_root
/os_linux/hw_x86/exp/inc
# Create a script that removes NoderVersion and $Orphanage objects
tmpfile
=
$pwrp_tmp
/del.sh
cat
>
$tmpfile
<<-
EOF
main()
string v;
string class;
string node;
string name;
verify(0);
v = GetVolumeList();
while( v != "")
class = GetVolumeClass( v);
if ( class != "
\$
ClassVolume")
set volume/volume='v'
node = GetNodeObject();
if ( node == "")
v = GetNextVolume( v);
continue;
endif
name = node + "-NodeVersion";
class = GetObjectClass( name);
if ( class != "")
delete object/name='name'/noconfirm
endif
name = node + "-
\$
Orphanage";
class = GetObjectClass( name);
if ( class != "")
delete object/name='name'/noconfirm
endif
name = "System-SystemVersion";
class = GetObjectClass( name);
if ( class != "")
delete object/name='name'/noconfirm
endif
name = "System-BootVersion";
class = GetObjectClass( name);
if ( class != "")
delete object/name='name'/noconfirm
endif
save
endif
v = GetNextVolume( v);
endwhile
endmain
EOF
chmod
a+x
$tmpfile
$v34_root
/os_linux/hw_x86/exp/exe/wb_cmd @
$tmpfile
# Create a script that dumps each volume
tmpfile
=
$pwrp_tmp
/dump.sh
cat
>
$tmpfile
<<-
EOF
...
...
@@ -69,7 +124,12 @@ reload_userclasses()
return
fi
reload_continue
"Pass load userclasses"
echo
""
echo
"The classvolume should be defined in one file only: userclasses.wb_load !"
echo
""
reload_continue
"Pass create loadfiles for userclasses"
# Load userclasses
fname
=
"
$pwrp_db
/userclasses.wb_load"
...
...
@@ -80,6 +140,8 @@ reload_userclasses()
if
wb_cmd create snapshot/file
=
\"
$fname
\"
/out
=
\"
$pwrp_load
/
$volume
.dbs
\"
then
reload_status
=
$reload__success
echo
"-- Renaming userclasses.wb_load to
$volume
.wb_load"
mv
$fname
$pwrp_db
/
$volume
.wb_load
else
reload_status
=
$reload__userclasses
return
...
...
@@ -108,6 +170,7 @@ reload_dirvolume()
l1
=
"Volume
$volume
\$
DirectoryVolume"
l2
=
"Volume Directory
\$
DirectoryVolume"
sed
's/ '
$volume
' / Directory /'
$dmpfile
>
$pwrp_db
/directory.wb_dmp
wb_cmd create volume/directory
wb_cmd wb load /load
=
\"
$pwrp_db
/directory.wb_dmp
\"
mv
$dmpfile
$dmpfile
"_old"
mv
$pwrp_db
/directory.wb_dmp
$pwrp_db
/directory.wb_dmp_old
...
...
@@ -308,7 +371,17 @@ reload_compile()
reload_continue
"Pass compile plcprograms"
wb_cmd compile /all
list
=
`
eval ls
-1d
$pwrp_db
/
*
.db
`
for
file
in
$list
;
do
file
=
${
file
##/*/
}
file
=
${
file
%%.*
}
if
[
$file
!=
"directory"
]
&&
[
$file
!=
"rt_eventlog"
]
;
then
wb_cmd
-v
$file
compile /all
fi
done
# wb_cmd compile /all
reload_status
=
$reload__success
}
...
...
@@ -342,7 +415,17 @@ reload_createload()
echo
"-- Removing old loadfiles"
rm
$pwrp_load
/ld_vol
*
.dat
wb_cmd create load/all
list
=
`
eval ls
-1d
$pwrp_db
/
*
.db
`
for
file
in
$list
;
do
file
=
${
file
##/*/
}
file
=
${
file
%%.*
}
if
[
$file
!=
"directory"
]
&&
[
$file
!=
"rt_eventlog"
]
;
then
wb_cmd
-v
$file
create load/volume
=
$file
fi
done
# wb_cmd create load/all
reload_status
=
$reload__success
}
...
...
@@ -354,6 +437,10 @@ reload_createboot()
return
fi
echo
""
echo
"Before this pass you should compile the modules included by ra_plc_user."
echo
""
reload_continue
"Pass create bootfiles"
echo
"-- Creating bootfiles for all nodes"
...
...
@@ -369,14 +456,21 @@ reload_convertge()
return
fi
echo
""
echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo
"! !"
echo
"! Note ! This pass should not be executed when upgrading from V3.9 !!"
echo
"! !"
echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
reload_continue
"Pass convert ge graphs"
# Create a script that dumps each volume
tmpfile
=
$pwrp_tmp
/convertv40.ge_com
cat
>
$tmpfile
<<
EOF
function int process( string graph)
open 'graph'
printf( "Converting %s...
\n
", graph);
open 'graph'
convert v40
save
endfunction
...
...
@@ -472,20 +566,14 @@ usage()
{
cat
<<
EOF
upgrade.sh Upgrade from V3.3 to V3.4.
The upgrade procedure will be done in three steps:
- Create project on linux (Pass 1)
- Execute upgrade.com on V3.3
- Continue with pass copyfile
upgrade.sh Upgrade from V3.4 or V3.9 to V4.0.
Arguments Project name.
Pass
dumpdb Dump database to textfile
\$
pwrp_db/'volume'.wb_dmp
userclasses
Load
userclasses.wb_load
userclasses
Create loadfiles and rename
userclasses.wb_load
dirvolume Create directory volume.
cnvdirvolume Convert the directory volume.
cnvdump Convert dumpfiles.
...
...
@@ -508,12 +596,12 @@ let reload_status=$reload__success
let
check_status
=
0
let
go
=
0
if
[
-z
"
$1
"
]
;
then
usage
exit
fi
#
if [ -z "$1" ]; then
#
usage
#
exit
#
fi
project
=
$
1
project
=
$
{
pwrp_root
##/*/
}
usage
...
...
@@ -522,7 +610,7 @@ echo "-- Upgrade $project"
echo
""
export
pwr_inc
=
$v34_root
/os_linux/hw_x86/exp/inc
echo
$pwr_inc
#
echo $pwr_inc
databases
=
`
eval source
$v34_root
/os_linux/hw_x86/exp/exe/pwrp_env.sh show db
-a
`
databases
=
$databases
" dbdirectory"
export
pwr_inc
=
$pwrb_root
/os_linux/hw_x86/exp/inc
...
...
@@ -546,9 +634,13 @@ for cpass in $passes; do
done
echo
""
echo
"-- The
reload
is now accomplished."
echo
"-- The
upgrade procedure
is now accomplished."
echo
" Please remove the dumpfiles:
\$
pwrp_db/*.wb_dmp*"
echo
" when you are satisfied with the reload."
echo
" when you are satisfied with the upgrade."
echo
""
echo
"-- Remaining tasks:"
echo
" Build the applications"
echo
" Create packages from the distributor"
echo
""
reload_exit
...
...
src/jpwr/rt/src/Errh.java
View file @
1fc99797
...
...
@@ -25,7 +25,6 @@ public class Errh {
private
static
boolean
initDone
=
false
;
public
Errh
(
String
programName
,
int
anix
)
{
if
(
!
initDone
)
{
init
(
programName
,
anix
);
initDone
=
true
;
...
...
src/lib/rt/src/rt_aproc.h
View file @
1fc99797
...
...
@@ -8,13 +8,20 @@
. */
#if defined __cplusplus
extern
"C"
{
#endif
#include "pwr.h"
#include "rt_errh.h"
pwr_tStatus
aproc_RegisterObject
(
pwr_tOid
);
pwr_tStatus
aproc_TimeStamp
();
#if defined __cplusplus
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment