Commit 949d3c03 authored by Claes Sjöfors's avatar Claes Sjöfors

Project pwrdemo added

parent c812a38e
......@@ -11,4 +11,5 @@ adm/
pwre_db
.vscode/
.nfs*
project/pwrdemo/bld
*.db
# Ignore editor journal files
*~
*#*
# Ignore databases
*.db
*.db.lock
*.db/*
# Other temporary files
*.gc
*.gjl
*.o
plc_*_0999_*
*.a
pwrp_cnf_*.dat
ld_appl_*.txt
ld_boot_*.dat
ld_node_*.dat
*.dbs
*.wb_load.*
*.wb_dmp.*
plc_*.opt_template
plc_v*.dat
*.log
*.bck
initdir.pwr_com
initvol.pwr_com
src/db/rt_eventlog_info.txt
bld/common/web/*.png
bld/common/web/*.pwg
bld/common/web/*.flw
bld/common/web/xtt_help_*.html
bld/common/web/*.jar
bld/x86_linux/exe/*.png
bld/x86_linux/exe/*.pwg
bld/x86_64_linux/exe/*.png
bld/x86_64_linux/exe/*.pwg
bld/arm_linux/exe/*.png
bld/arm_linux/exe/*.pwg
bld/x86_64_macos/exe/*.png
bld/x86_64_macos/exe/*.pwg
include $(pwre_dir_symbols)
ifndef variables_mk
include $(pwre_croot)/src/tools/bld/src/variables.mk
endif
ifndef rules_mk
include $(pwre_croot)/src/tools/bld/src/rules.mk
endif
all : init copy lib exe | silent
init :
copy :
lib :
exe : build_project | silent
clean : clean_project
realclean : clean
silent :
@ :
build_project :
@ $(pwre_croot)/project/pwrdemo/build_from_git.sh
clean_project:
@ echo "Cleaing project"
@ if [ -e $(pwre_croot)/project/pwrdemo/bld ]; then rm $(pwre_croot)/project/pwrdemo/bld; fi
@ if [ -e $(pwre_croot)/project/pwrdemo/src/db/volpwrdemo.db ]; then rm -r $(pwre_croot)/project/pwrdemo/src/db/volpwrdemo.db; fi
@ if [ -e $(release_root)/project/pwrdemo/bld ]; then rm -r $(release_root)/project/pwrdemo/bld; fi
#!/bin/bash
#
# Build pwrdemo from git clone
#
nodename=`eval uname -n`
unamestr=`eval uname`
onamestr=`eval uname -o`
machine=`eval uname -m`
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
opsys=256
elif [ $unamestr == "FreeBSD" ]; then
os="os_freebsd"
hw="hw_x86_64"
opsys=1024
elif [ $unamestr == "OpenBSD" ]; then
os="os_openbsd"
hw="hw_x86_64"
opsys=2048
elif [ $onamestr == "Cygwin" ]; then
os="os_cygwin"
hw="hw_x86"
opsys=4096
else
if [ $machine == "x86_64" ]; then
machine="x86_64"
opsys=128
elif [ ${machine:0:3} == "arm" ]; then
machine="arm"
opsys=512
else
machine="x86"
opsys=64
fi
os="os_linux"
hw="hw_"$machine
fi
platform=${hw:3}_${os:3}
export pwrp_root=$pwre_croot/project/pwrdemo
broot=$pwre_broot/$os/$hw/bld/project/pwrdemo/bld
if [ ! -e $broot ]; then
mkdir -p $broot
fi
if [ ! -e $pwrp_root/bld ]; then
ln -s $broot $pwrp_root/bld
fi
export pwrp_exe=$pwrp_root/bld/$platform/exe
export pwrp_lib=$pwrp_root/bld/$platform/lib
export pwrp_obj=$pwrp_root/bld/$platform/obj
export pwrp_lis=$pwrp_root/bld/$platform/lis
export pwrp_inc=$pwrp_root/bld/common/inc
export pwrp_load=$pwrp_root/bld/common/load
export pwrp_tmp=$pwrp_root/bld/common/tmp
export pwrp_web=$pwrp_root/bld/common/web
echo "*"
echo "* Create directories"
echo "*"
if [ ! -e $pwrp_obj ]; then
mkdir -p $pwrp_obj
fi
if [ ! -e $pwrp_exe ]; then
mkdir -p $pwrp_exe
fi
if [ ! -e $pwrp_lib ]; then
mkdir -p $pwrp_lib
fi
if [ ! -e $pwrp_lis ]; then
mkdir -p $pwrp_lis
fi
if [ ! -e $pwrp_load ]; then
mkdir -p $pwrp_load
fi
if [ ! -e $pwrp_inc ]; then
mkdir -p $pwrp_inc
fi
if [ ! -e $pwrp_lis ]; then
mkdir -p $pwrp_lis
fi
if [ ! -e $pwrp_tmp ]; then
mkdir -p $pwrp_tmp
fi
if [ ! -e $pwrp_web ]; then
mkdir -p $pwrp_web
fi
echo "*"
echo "* Configure adm"
echo "*"
export pwra_db=$pwre_broot/$os/$hw/bld/project/adm/db
if [ ! -e $pwra_db ]; then
mkdir -p $pwra_db
fi
echo "pwra_db $pwra_db"
cp $pwre_croot/src/tools/pkg/deb/adm/* $pwra_db/
echo "VolPwrDemo 0.254.254.200 pwrdemo" >> $pwra_db/pwr_volumelist.dat
echo "%base V0.0.0 $pwre_broot" > $pwra_db/pwr_projectlist.dat
echo "pwrdemo V0.0.0 $pwrp_root Demo-pwrdemo \"\"" >> $pwra_db/pwr_projectlist.dat
source $pwra_db/pwr_setup.sh
source $pwra_db/pwra_env.sh set project pwrdemo
echo "*"
echo "* Set nodename $nodename, opsys $opsys"
echo "*"
cat > initdir.pwr_com <<EOF
set attr/name=Bus999-DemoNode/attr=NodeName/value="$nodename"/noconf
set attr/name=Bus999-DemoNode/attr=OperatingSystem/value="$opsys"/noconf
save
exit
EOF
wb_cmd @initdir
echo "*"
echo "* Load volpwrdemo"
echo "*"
wb_cmd wb load/nofocode/load=\"$pwrp_db/volpwrdemo.wb_dmp\"/out=\"$pwrp_db/volpwrdemo.lis\"
echo "*"
echo "* Set opsys $opsys"
echo "*"
cat > initvol.pwr_com <<EOF
set attr/name=VolPwrDemo:/attr=OperatingSystem/value="$opsys"/noconf
save
exit
EOF
wb_cmd -v volpwrdemo @initvol
wb_cmd -v volpwrdemo build node DemoNode /force
exit
echo "*"
echo "* Compile"
echo "*"
wb_cmd -v volpwrdemo compile/all
echo "*"
echo "* Build volume"
echo "*"
wb_cmd -v volpwrdemo create load
echo "*"
echo "* Build node"
echo "*"
wb_cmd create boot/all
exit
echo "*"
echo "* Copy pwg files"
echo "*"
cp $pwrp_pop/*.pwg $pwrp_exe/
cp $pwrp_pop/*.pwg $pwrp_web/
# Objects in level and temp control
cp $pwr_exe/pwr_c_abb_acs800_1.pwg $pwrp_web/
cp $pwr_exe/pwr_c_abb_acs800fanaggr.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basecircuitbreaker.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basecontactor.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basecvalve.pwg $pwrp_web/
cp $pwr_exe/pwr_c_baselevelsensor.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basemvalve1.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basemvalve.pwg $pwrp_web/
cp $pwr_exe/pwr_c_baseoverloadrelay.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basepressuresensor.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basepressureswitch.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basepumpaggr.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basesafetyswitch.pwg $pwrp_web/
cp $pwr_exe/pwr_c_basetempsensor.pwg $pwrp_web/
cp $pwr_exe/pwr_c_compmodepid.pwg $pwrp_web/
cp $pwr_exe/pwr_c_comppid.pwg $pwrp_web/
cp $pwr_exe/pwr_c_mode.pwg $pwrp_web/
cp $pwr_exe/pwr_c_pid.pwg $pwrp_web/
echo "*"
echo "* Copy image files"
echo "*"
cp $pwrp_pop/*.png $pwrp_exe/
cp $pwrp_pop/*.png $pwrp_web/
echo "*"
echo "* Copy trace files"
echo "*"
cp $pwrp_load/*.flw $pwrp_web/
echo "*"
echo "* Copy jar files"
echo "*"
cp $pwr_lib/pwr_rt_client.jar $pwrp_web/
cp $pwr_lib/pwr_jop.jar $pwrp_web/
cp $pwr_lib/pwr_jopg.jar $pwrp_web/
cp $pwr_load/../web/* $pwrp_web/
export pwra_db=$pwre_broot/$os/$hw/bld/project/adm/db
source $pwra_db/pwr_setup.sh
source $pwra_db/pwra_env.sh set project pwrdemo
# Ignore editor journal files
*~
*#*
# Ignore databases
t.*
*.t
*.out
*.db
*.db.*
*.db.lock
*.db/*
# Other temporary files
*.gc
*.gjl
*.o
plc_*_[0-9][0-9]]0-9][0-9]_*
*.a
pwrp_cnf_*.dat
ld_appl_*.txt
ld_boot_*.dat
ld_node_*.dat
*.dbs
*.wb_dmp
*.wb_load.*
*.wb_dmp.*
plc_*.opt_template
plc_v*.dat
*.log
*.bck
initdir.pwr_com
initvol.pwr_com
db/rt_eventlog_info.txt
/* Filename: /data0/pwrp/pwrdemo41/common/inc/ra_plc_user.h */
#include "pwr_profibusclasses.h"
#include "pwr_basecomponentclasses.h"
#include "pwr_abbclasses.h"
#include "pwr_othermanufacturerclasses.h"
#include "pwr_inorclasses.h"
#include "pwr_siemensclasses.h"
#include "pwr_miscellaneousclasses.h"
#include "misc.h"
This diff is collapsed.
! Generated by wb_print_wbl 17-MAR-2020 16:58:29.18
! Volume directory
! Version V5.7.1
Volume directory $DirectoryVolume 254.254.254.253
Body SysBody 05-MAR-2008 11:22:55.46
Attr NextOix = "_X13"
EndBody
Object System $System 2 17-JAN-2006 17:43:09.50
Body SysBody 05-MAR-2008 11:22:55.46
Attr SystemName = "pwrdemo"
Attr SystemGroup = "Common"
EndBody
EndObject
Object Bus999 BusConfig 3 11-MAY-2006 15:40:05.54
Body RtBody 05-MAR-2008 11:22:55.46
Attr BusNumber = 999
EndBody
Object DemoNode NodeConfig 10 11-MAY-2006 15:40:05.54
Body RtBody 17-MAR-2020 16:58:29.15
Attr NodeName = "aristotle"
Attr OperatingSystem = 128
Attr Address = "127.0.0.1"
EndBody
Object VolPwrDemo RootVolumeLoad 11 11-MAY-2006 15:40:05.54
Body RtBody 05-MAR-2008 11:22:55.46
EndBody
EndObject
Object BuildOpt BuildOptions 18 21-NOV-2017 10:24:17.37
Body RtBody 21-NOV-2017 10:24:39.50
Attr PlcProcess = "Plc"
Attr SystemModules = 16
EndBody
EndObject
Object Distribute Distribute 12 11-MAY-2006 15:40:05.54
Body DevBody 05-MAR-2008 11:22:55.46
EndBody
EndObject
EndObject
EndObject
Object Build BuildConfig 14 03-FEB-2017 15:14:34.90
Body DevBody 03-FEB-2017 15:14:31.33
EndBody
Object pop BuildDirectory 16 03-FEB-2017 15:16:25.51
Body DevBody 03-FEB-2017 15:16:47.60
Attr Directory = "$pwrp_pop"
EndBody
Object pwg_exe BuildCopy 15 03-FEB-2017 17:03:59.87
Body DevBody 03-FEB-2017 15:17:00.86
Attr Source = "*.pwg"
Attr Target = "$pwrp_exe/"
EndBody
EndObject
Object pwg_web BuildCopy 17 03-FEB-2017 17:03:44.51
Body DevBody 03-FEB-2017 17:03:48.76
Attr Source = "*.pwg"
Attr Target = "$pwrp_web/"
EndBody
EndObject
EndObject
Object appl BuildDirectory 19 17-MAR-2020 15:50:47.01
Body DevBody 17-MAR-2020 15:53:26.76
Attr Options = 1
Attr Directory = "$pwrp_appl"
EndBody
Object ra_plc_user_h BuildCopy 20 17-MAR-2020 15:51:40.44
Body DevBody 17-MAR-2020 15:52:33.82
Attr Source = "ra_plc_user.h"
Attr Target = "$pwrp_inc/"
EndBody
EndObject
EndObject
Object pwr_exe BuildDirectory 21 17-MAR-2020 16:29:34.33
Body DevBody 17-MAR-2020 16:29:38.54
Attr Directory = "$pwr_exe"
EndBody
Object pwr_logga BuildCopy 22 17-MAR-2020 16:29:57.00
Body DevBody 17-MAR-2020 16:30:07.43
Attr Source = "pwr_logga.png"
Attr Target = "$pwrp_web/"
EndBody
EndObject
EndObject
EndObject
Object VolPwrDemo RootVolumeConfig 7 23-JAN-2006 11:16:03.17
Body RtBody 05-MAR-2008 11:22:55.46
EndBody
EndObject
EndVolume
#! /bin/bash
#
# Local setup
# Printer command for plc documents
#export pwr_foe_gre_print="lpr -P lp1"
export PWR_BUS_ID=999
if [ -e "/data0/pwrp/tellus/login/sysinfo.txt" ]; then
echo "-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_"
echo "Welcome to"
echo "`$pwr_exe/pwrp_env.sh show project`"
echo ""
cat $pwrp_login/sysinfo.txt
echo "-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_"
fi
Revision history
2006-05-11 cs Project created
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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