Commit 7ea93e2d authored by root's avatar root

Project pwrtest01 added

parent a52affb5
......@@ -12,6 +12,11 @@ pwre_db
.vscode/
.nfs*
project/pwrdemo/bld
project/pwrdemo/src/login/initdir.pwr_com
project/pwrdemo/src/login/initvol.pwr_com
project/pwrtest01/bld
project/pwrtest01/src/login/initdir.pwr_com
project/pwrtest01/src/login/initvol.pwr_com
*.db
*.db.lock
*.gjl
......
......@@ -34,4 +34,4 @@ 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
@ if [ -e $(release_root)/bld/project/pwrdemo/bld ]; then rm -r $(release_root)/bld/project/pwrdemo/bld; fi
#! RevisionManager 0
#! Current -1
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/pwrtest01/build_from_git.sh
clean_project:
@ echo "Cleaing project"
@ if [ -e $(pwre_croot)/project/pwrtest01/bld ]; then rm $(pwre_croot)/project/pwrtest01/bld; fi
@ if [ -e $(pwre_croot)/project/pwrtest01/src/db/volpwrtest01.db ]; then rm -r $(pwre_croot)/project/pwrtest01/src/db/volpwrtest01.db; fi
echo $(release_root)
ls $(release_root)/bld/project/pwrtest01/bld
@ if [ -e $(release_root)/bld/project/pwrtest01/bld ]; then rm -r $(release_root)/bld/project/pwrtest01/bld; fi
#!/bin/bash
#
# Build pwrtest01 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/pwrtest01
broot=$pwre_broot/$os/$hw/bld/project/pwrtest01/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 "* Create directories"
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 "* Configure adm"
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 "VolPwrTest01 0.254.254.201 pwrtest01" >> $pwra_db/pwr_volumelist.dat
echo "%base V0.0.0 $pwre_broot" > $pwra_db/pwr_projectlist.dat
echo "pwrtest01 V0.0.0 $pwrp_root Test-pwrtest01 \"\"" >> $pwra_db/pwr_projectlist.dat
source $pwra_db/pwr_setup.sh
source $pwra_db/pwra_env.sh set project pwrtest01
echo "* Set nodename $nodename, opsys $opsys"
cat > initdir.pwr_com <<EOF
set attr/name=Bus999-PwrTest01/attr=NodeName/value="$nodename"/noconf
set attr/name=Bus999-PwrTest01/attr=OperatingSystem/value="$opsys"/noconf
save
exit
EOF
wb_cmd @initdir
echo "* Load volpwrtest01"
wb_cmd wb load/nofocode/load=\"$pwrp_db/volpwrtest01.wb_dmp\"/out=\"$pwrp_db/volpwrtest01.lis\"
echo "* Set opsys $opsys"
cat > initvol.pwr_com <<EOF
set attr/name=VolPwrTest01:/attr=OperatingSystem/value="$opsys"/noconf
save
exit
EOF
wb_cmd -v volpwrtest01 @initvol
wb_cmd -v volpwrtest01 build node PwrTest01 /force
echo "* Bulid package"
wb_cmd distr/node=aristotle/package
exit
echo "* Compile"
wb_cmd -v volpwrtest01 compile/all
echo "* Build volume"
wb_cmd -v volpwrtest01 create load
echo "* Build node"
wb_cmd create boot/all
exit
echo "* Copy pwg files"
cp $pwrp_pop/*.pwg $pwrp_exe/
cp $pwrp_pop/*.pwg $pwrp_web/
# Objects in level and temp control
echo "* Copy image files"
cp $pwrp_pop/*.png $pwrp_exe/
cp $pwrp_pop/*.png $pwrp_web/
echo "* Copy trace files"
cp $pwrp_load/*.flw $pwrp_web/
echo "* Copy jar files"
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/
# 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
my : demo_all
include $(pwr_exe)/pwrp_rules.mk
demo_modules = $(pwrp_exe)/ra_status
demo_all : $(demo_modules)
$(pwrp_exe)/ra_status : $(pwrp_appl)/ra_status.c
@ echo "Building ra_status"
@ g++ -g -o $(target) $(source) -I$(pwr_inc) -L$(pwr_lib) -lpwr_rt -lpwr_co -lpwr_msg_dummy -lrpcsvc -lpthread -lm -lrt
/* 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"
/*
Print current project status
*/
#include <stdio.h>
#include "pwr.h"
#include "rt_gdh.h"
int main()
{
pwr_tStatus sts, system_sts;
sts = gdh_Init("ra_status");
if (EVEN(sts)) {
printf("E pwrtest01 status, gdh_Init error status: %u\n", sts);
exit(0);
}
sts = gdh_GetObjectInfo("Nodes-PwrTest01.SystemStatus", &system_sts,
sizeof(system_sts));
if (EVEN(sts)) {
printf("E pwrtest01 status, gdh_GetObjectInfo error status: %u\n", sts);
exit(0);
}
if (ODD(system_sts))
printf("I pwrtest01 status success: %u\n", system_sts);
else
printf("E pwrtest01 status error: %u\n", system_sts);
}
#
# Helpfile for PwrTest01
#
<topic> index
<image> pwr_logga.png
<h1>Welcome to the Proview Test System
</topic>
! Generated by wb_print_wbl 20-MAR-2020 14:54:59.38
! 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 20-MAR-2020 11:55:16.96
Attr SystemName = "pwrtest01"
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 PwrTest01 NodeConfig 10 20-MAR-2020 12:28:03.32
Body RtBody 20-MAR-2020 14:54:59.35
Attr NodeName = "aristotle"
Attr OperatingSystem = 128
Attr Address = "127.0.0.1"
EndBody
Object VolPwrTest01 RootVolumeLoad 11 20-MAR-2020 11:55:52.13
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
Object ra_status ApplDistribute 24 20-MAR-2020 14:54:21.96
Body DevBody 20-MAR-2020 14:54:29.46
Attr Source = "$pwrp_exe/ra_status"
EndBody
EndObject
EndObject
EndObject
EndObject
Object Build BuildConfig 14 03-FEB-2017 15:14:34.90
Body DevBody 03-FEB-2017 15:14:31.33
Attr VersionManager = 0
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
Object ra_status BuildMake 23 19-MAR-2020 17:02:17.98
Body DevBody 19-MAR-2020 17:02:24.03
Attr Makefile = "makefile"
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 VolPwrTest01 RootVolumeConfig 7 20-MAR-2020 12:00:10.43
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
2020-03-20 cs Project created
#!/bin/bash
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
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 pwrtest01
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