Commit 9b56a2ac authored by claes's avatar claes

*** empty log message ***

parent 5eccd5f1
......@@ -124,6 +124,9 @@ SObject NMps:Class
!
! 8 When the cell is reseted by the ResetObject, the dataobject is also
! removed from the database rtdb.
!
! 16 Backup. The cell and data objects in the cell, is backed up by
! the nmps backup process.
!*/
Object Function $Intern 4
Body SysBody
......
......@@ -116,6 +116,9 @@ SObject NMps:Class
!
! 8 When the cell is reseted by the ResetObject, the dataobject is also
! removed from the database rtdb.
!
! 16 Backup. The cell and data objects in the cell, is backed up by
! the nmps backup process.
!*/
Object Function $Intern 4
Body SysBody
......
......@@ -38,6 +38,7 @@ clean_gif := $(patsubst %.gif,clean_%.gif,$(gif_sources))
$(doc_dir)/orm/%.gif : %.gif
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
@ $(cp) $(cpflags) $(source) $(doc_dir)/help
.PHONY : all init copy lib exe clean realclean \
$(clean_gif)
......
......@@ -27,6 +27,16 @@
This module contains routines for the Queue Communication.
*/
/*! \defgroup Time Time functions
\ingroup PRM
This module contains utilites for time management.
*/
......
......@@ -5,9 +5,11 @@ HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
SOURCE_BROWSER = YES
INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
$(pwre_sroot)/lib/co/src/co_time.h \
$(pwre_sroot)/lib/rt/src/rt_gdh.h \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.h \
$(pwre_sroot)/lib/rt/src/rt_qcom.h \
$(pwre_sroot)/lib/co/src/co_time.c \
$(pwre_sroot)/lib/rt/src/rt_gdh.c \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.c \
$(pwre_sroot)/lib/rt/src/rt_qcom.c
......
......@@ -10,6 +10,7 @@
<tr><td><a href="dguide.pdf" target="right">Designer's Guide</a></td></tr>
<tr><td><a href="prm_f.html" target="_top">Programmer's Referens Manual</a></td></tr>
<tr><td><a href="qcom.pdf" target="right">QCOM Reference Guide</a></td></tr>
<tr><td><a href="help_f.html" target="right">Help</a></td></tr>
</table>
<br>
......@@ -22,6 +23,7 @@
<hr>
<table id="mainmenu" border="1" cellspacing="0" width="100%">
<tr><td><a href="download_f.html" target="right">Download</a></td></tr>
<tr><td><a href="dev_index.html" target="_top">Developer's Site</a></td></tr>
</table>
<br>
......
......@@ -7,6 +7,9 @@
<br>
<hr>
<a href="orm_intro.html" target="_self"><font size=4>Introduction</font></a>
<!-- ******* SystemClasses **********-->
<hr>
<table id="mainmenu" border="1" cellspacing="0" width="100%">
......
......@@ -6,7 +6,7 @@
<frameset rows="90,*" frameborder="0">
<frame name="I1" frameborder="0" noresize scrolling="no" src="orm_h.html"></frame>
<frame name="I2" frameborder="0" noresize scrolling="no" src="orm.html"></frame>
<frame name="I2" frameborder="0" src="orm.html"></frame>
</frameset>
</html>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<body id="mainmenu">
<h2 id="mainmenu">Dokumentation</h2><br>
<table id="mainmenu" border="1" cellspacing="0" width="100%">
<tr><td><a href="../orm_f.html" target="_top">Objekt Handbok</a></td></tr>
<tr><td><a href="../orm_f.html" target="_top">Objekt Handbok</a> <a href="pwrb_xtthelp_f.html" target="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[svenska]</a></td></tr>
<tr><td><a href="../dguide.pdf" target="right">Designer's Guide</a></td></tr>
<tr><td><a href="../prm_f.html" target="_top">Programmer's Referens Manual</a></td></tr>
<tr><td><a href="dd_ge.pdf" target="right">Ge</a></td></tr>
......@@ -24,6 +24,7 @@
<tr><td><a href="remote.pdf" target="right">Remote</a></td></tr>
<tr><td><a href="profibus.pdf" target="right">Profibus</a></td></tr>
<tr><td><a href="rd_ssabobjects.pdf" target="right">SSAB I/O</a></td></tr>
<tr><td><a href="../help_f.html" target="right">Hjlp</a></td></tr>
</table>
<br>
......@@ -35,6 +36,7 @@
<a href="mailto:postmaster@proview.se">skicka meddelande</a>
<hr>
<table id="mainmenu" border="1" cellspacing="0" width="100%">
<tr><td><a href="../download_f.html" target="right">Download</a></td></tr>
<tr><td><a href="../dev_index.html" target="_top">Developer's Site</a></td></tr>
</table>
<br>
......
......@@ -92,7 +92,7 @@ void *wnav_help_insert_cb( void *ctx, navh_eItemType item_type, char *text1,
else {
if ( in_table) {
// Close table (keep if empty line)
if ( !( strcmp( text1, "") == 0 &&
if ( !( text1 && strcmp( text1, "") == 0 &&
(item_type == navh_eItemType_Help ||
item_type == navh_eItemType_HelpBold))) {
xh->fp << "</TABLE>" << endl;
......
......@@ -282,7 +282,7 @@ readSectVolRef (
pwr_dStatus(sts, status, INI__SUCCESS);
#if 0
#if 1
if (fseek(cp->dbs.f, cp->sect.offset, SEEK_SET) != 0)
pwr_Return(NO, sts, errno_GetStatus());
......@@ -1028,20 +1028,26 @@ ini_ReadBootFile (
cp->group[0] = '\0';
n = sscanf(s, "%s", cp->group);
break;
case 3: /* Find PLC version. */
case 3: { /* Find PLC version. */
char *t;
i++;
#if 1
n = sscanf(s, "%s %s %d", vname, vids, &cp->node.plcVersion);
#else
n = sscanf(s, "%s %d", vids, &cp->node.plcVersion);
#endif
n = sscanf(s, "%s %s", vname, vids);
if (n < 2) {
errh_LogError(&cp->log, "Bootfile corrupt, error in plc data");
cp->errors++;
continue;
}
if (n < 3) {
errh_LogError(&cp->log, "Found no PLC version");
t = strrchr( vname, '_');
n = sscanf(t+1, "%d", &cp->node.plcVersion);
if (n < 1) {
errh_LogError(&cp->log, "Bootfile corrupt, error in plc data");
cp->errors++;
continue;
}
if (!cp->flags.b.plcfile) {
#if defined OS_LYNX || defined OS_LINUX
sprintf(cp->plcfile.name, dbs_cNamePlc, "", cp->nodename, cp->busid, cp->node.plcVersion);
......@@ -1066,6 +1072,7 @@ ini_ReadBootFile (
cdh_ToLower(cp->plcfile.name, cp->plcfile.name);
errh_LogInfo(&cp->log, "This node vill run PLC file: %s", cp->plcfile.name);
break;
}
case 4: /* Find root volume. */
i++;
n = sscanf(s, "%s %s", vname, vids);
......
......@@ -245,7 +245,11 @@ sancAdd (
pool_sQlink *nl;
if (first) {
#ifdef OS_LINUX
cycle = 1 * sysconf(_SC_CLK_TCK);
#else
cycle = 1 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->sanc_add_int);
first = 0;
}
......@@ -286,7 +290,11 @@ sancExpired (
pool_sQlink *nl;
if (first) {
#ifdef OS_LINUX
cycle = 60 * sysconf(_SC_CLK_TCK);
#else
cycle = 60 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->sanc_exp_int);
first = 0;
}
......@@ -328,7 +336,11 @@ sansCheck (
pool_sQlink *nl;
if (first) {
#ifdef OS_LINUX
cycle = 2 * sysconf(_SC_CLK_TCK);
#else
cycle = 2 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->sans_chk_int);
first = 0;
}
......@@ -370,7 +382,11 @@ subcCheck (
static pwr_tBoolean first = 1;
if (first) {
#ifdef OS_LINUX
cycle = 3 * sysconf(_SC_CLK_TCK);
#else
cycle = 3 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->subc_chk_int);
first = 0;
}
......@@ -426,7 +442,11 @@ cacheTrim (
static pwr_tBoolean first = 1;
if (first) {
#ifdef OS_LINUX
cycle = 1 * sysconf(_SC_CLK_TCK);
#else
cycle = 1 * CLK_TCK;
#endif
setInterval(&cycle, gdbroot->db->cache_trim_int);
first = 0;
}
......@@ -554,7 +574,12 @@ msToClock (
{
time_tClock c;
#ifdef OS_LINUX
c = ms * sysconf(_SC_CLK_TCK) / 1000;
#else
c = ms * CLK_TCK / 1000;
#endif
if (ic != NULL) *ic = c;
......@@ -610,7 +635,12 @@ setInterval (
if (i == 0)
return;
#ifdef OS_LINUX
*c = i * sysconf(_SC_CLK_TCK) / 1000;
#else
*c = i * CLK_TCK / 1000;
#endif
}
......
......@@ -7,9 +7,10 @@ pkg_install_func ()
exit 1
fi
pkg=`eval locate $1`
pkg_remove_func "force"
pkg=/home/pwrp/$1
echo "-- Installing package $1"
cd /tmp
if ! tar -xzf $pkg pkg_unpack.sh; then
......
......@@ -550,12 +550,6 @@ pwrc_create_func()
# Printer command for plc documents
#export pwr_foe_gre_print="lpr -P lp1"
# Mysql server node
#node=`uname -n`
#if [ $node != "newton" ]; then
# export pwrp_mysql_server="newton"
#fi
if [ -e "$pwrp_login/sysinfo.txt" ]; then
echo "-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_"
echo "Welcome to"
......@@ -591,9 +585,14 @@ EOF
return
fi
pwrc_set_func "project" $pname
if [ $pwrc_status -ne $pwrc__success ]; then
return
fi
# Create an empty directory database
echo "Creating directory database"
pwrc_copy_func template -p $pname dbdirectory noconfirm
wb_cmd create volume/name=\"directory\"/class=\$DirectoryVolume/ident=254.254.254.253
return
fi
......@@ -685,14 +684,7 @@ pwrc_delete_func()
if [ -z $confirm ] || [ $confirm != "noconfirm" ]; then
echo "Delete project will"
echo " remove '$2' from the project list"
echo " delete all databases in project '$2':"
i=0
while [ "${db_array[$i]}" != "" ]; do
echo " database: '${db_array[$i]}'"
i=$i+1
done
echo " delete all databases in project '$2'"
echo " delete all files in $proot"
echo "Do you want do continue ? [y/n] "
read REPLY
......@@ -722,19 +714,6 @@ pwrc_delete_func()
return
fi
# Delete the databases
i=0
while [ "${db_array[$i]}" != "" ]; do
if mysqladmin -f $mysql_socket drop ${db_array[$i]}
then
echo "Database '${db_array[$i]}' deleted"
else
echo "Error: Error from mysqladmin $mysql_socket drop ${db_array[$i]}"
fi
i=$i+1
done
fi
pwrc_prlist_delete $2
......@@ -858,9 +837,9 @@ pwrc_set_func()
return
fi
cmd="base"
cmd="baseroot"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
# Command is "set base"
# Command is "set baseroot"
baseroot=$2
baseroot=${baseroot%/}
if [ ! -e "$baseroot" ]; then
......@@ -1276,83 +1255,6 @@ pwrc_copy_func()
return
fi
if [ $1 = "template" ]; then
# Command is "copy template"
if [ $2 == "-p" ]; then
projectname=$3
shift 2
else
pwrc_get_projectname
fi
db=$2
confirm=$3
# This can only be done on mysql server
if [ ! -z "$pwrp_mysql_server" ]; then
node="`eval uname -n`"
if [ $node != $pwrp_mysql_server ]; then
echo "Error: current host is not mysql server ($pwrp_mysql_server)"
pwrc_status=$pwrc__notmysqlsrv
return
fi
fi
if [ -z $db ]; then
echo "Syntax error: enter database, or 'dbdirectory' for directory database"
pwrc_status=$pwrc__syntax
return
fi
# Get location for mysql database
datadir=`eval mysqladmin $mysql_socket variables| grep datadir | awk '{ print $4 }'`
datadir=${datadir%/}
if [ -z $datadir ]; then
echo "Error: Can't get database directory from mysql"
pwrc_status=$pwrc__datadir
return
fi
if [ "$db" = "dbdirectory" ]; then
dbname=$projectname"_"$pwr_dbversion
else
dbname=$projectname"_"$db"_"$pwr_dbversion
fi
if [ -z $confirm ] || [ $confirm != "noconfirm" ]; then
echo "Do you want to copy a template database to $dbname ? [y/n] "
read REPLY
if [ -z $REPLY ] || [ $REPLY != "y" ]; then
return
fi
fi
# Create database directory
if [ ! -e $datadir/$dbname ]; then
echo "Creating new database '$dbname'"
mysqladmin $mysql_socket create $dbname
fi
# if [ ! -e $datadir/wb_template_$pwr_dbversion ]; then
# echo "Can't find template database"
# pwrc_status=$pwrc__notemplatedb
# return
# fi
# Copy template database
if wb_cp $datadir/wb_template_$pwr_dbversion/ $datadir/$dbname/
then
echo "Template database copied to '"${dbname%"_"$pwr_dbversion}"'"
pwrc_status=$pwrc__success
else
pwrc_status=$pwrc__mysqldbcopy
return
fi
return
fi
cmd="project"
if [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
# Command is "copy project"
......@@ -1381,35 +1283,6 @@ pwrc_copy_func()
to_phier="-"
fi
# Check that mysqladmin is alive
ver=`eval mysqladmin $mysql_socket --version`
if [ -z "$ver" ]; then
echo "Unable to find mysqladmin"
pwrc_status=$pwrc_mysql
return
fi
# This can only be done on mysql server
if [ ! -z "$pwrp_mysql_server" ]; then
node="`eval uname -n`"
if [ $node != $pwrp_mysql_server ]; then
echo "Error: current host is not mysql server ($pwrp_mysql_server)"
pwrc_status=$pwrc__notmysqlsrv
return
fi
fi
# Get location for mysql database
datadir=`eval mysqladmin $mysql_socket variables| grep datadir | awk '{ print $4 }'`
datadir=${datadir%/}
if [ -z $datadir ]; then
echo "Error: Can't get database directory from mysql"
pwrc_status=$pwrc__datadir
return
fi
# Load project list
pwrc_prlist_read
if [ $pwrc_status -ne $pwrc__success ]; then
......@@ -1459,40 +1332,12 @@ pwrc_copy_func()
from_proot=${root_array[$pwrc_current_index]}
# Get databases in from-project
pwrc_dblist_read $from_pname $from_proot
# Check that the databases can be found and that the new doesn't exist
i=0
while [ "${db_array[$i]}" != "" ]; do
if [ ! -e $datadir/${db_array[$i]} ]; then
echo "Error: Can't find database ${db_array[$i]}"
pwrc_status=$pwrc__nodb
return
fi
dbname=$to_pname${db_array[$i]#$from_pname}
if [ -e $datadir/$dbname ]; then
echo "Error: Database '$dbname' already exist"
pwrc_status=pwrc__dbalrexist
return
fi
i=$i+1
done
# Confirmation
if [ -z $confirm ] || [ $confirm != "noconfirm" ]; then
echo "Copy project will"
echo " add '$to_pname' to the project list"
echo " copy directory tree '$from_proot' to '$to_proot'"
echo " copy all databases in project '$from_pname':"
i=0
while [ "${db_array[$i]}" != "" ]; do
echo " database: '${db_array[$i]}'"
i=$i+1
done
echo "Do you want do continue ? [y/n] "
read REPLY
......@@ -1511,29 +1356,6 @@ pwrc_copy_func()
return
fi
#Copy databases
i=0
while [ "${db_array[$i]}" != "" ]; do
dbname=$to_pname${db_array[$i]#$from_pname}
if mysqladmin $mysql_socket create $dbname
then
echo "Database '$dbname' created"
else
echo "Error: mysqladmin error"
pwrc_status=$pwrc__dbcreate
return
fi
if wb_cp $datadir/${db_array[$i]}/ $datadir/$dbname/
then
echo "Database $datadir/${db_array[$i]} copied"
else
pwrc_status=pwrc__mysqldbcopy
return
fi
i=$i+1
done
# Add new project into project list
pwrc_prlist_add dummy $to_pname ${base_array[pwrc_current_index]} $to_proot $to_phier ${desc_array[pwrc_current_index]} "(Copy of $from_pname)"
pwrc_prlist_write
......@@ -1549,59 +1371,10 @@ pwrc_copy_func()
pwrc_setdb_func()
{
if [ "$1" == "dbdirectory" ]; then
db=""
else
db=$1
fi
# Command is "setdb"
pwrc_get_projectname
if [ -z "$pwrp_root" ]; then
echo "No project is set"
pwrc_status=$pwrc__projnotset
return
fi
if [ -z $db ]; then
# Set directory db
if [ ! -z "$pwrp_mysql_server" ]; then
node="`eval uname -n`"
if [ $node = $pwrp_mysql_server ]; then
export PWRP_DB=:$projectname"_"$pwr_dbversion
else
export PWRP_DB=$pwrp_mysql_server:$projectname"_"$pwr_dbversion
fi
else
export PWRP_DB=:$projectname"_"$pwr_dbversion
fi
else
# Database is supplied
if [ ! -z "$pwrp_mysql_server" ]; then
node="`eval uname -n`"
if [ $node = $pwrp_mysql_server ]; then
export PWRP_DB=:$projectname"_"$db"_"$pwr_dbversion
else
export PWRP_DB=$pwrp_mysql_server:$projectname"_"$db"_"$pwr_dbversion
fi
else
export PWRP_DB=:$projectname"_"$db"_"$pwr_dbversion
fi
fi
echo "Database set to $db ($PWRP_DB)"
echo "setdb is obsolete"
pwrc_status=$pwrc__success
}
pwrc_mysql_func()
{
mysql $mysql_socket $1
}
pwrc_help_func()
{
cat << EOF
......@@ -1611,14 +1384,11 @@ pwrp_env.sh - Utilities for pwr project environment
help - Display help
create project 'name' - Create at new project
set project 'name' - Setup environment to a project
set base 'root' - Setup environment to proview base distribution
set baseroot 'root' - Setup environment to proview base distribution
set db ['db'] - Set database. If db ommitted, directory db is set.
show project - Show current project
show projects - Show all projects
show base - Show current base root
show db - Show current database
show db 'database' - Check that database exist
copy template 'db' - Copy a template database to database 'db'
EOF
}
......@@ -1633,7 +1403,6 @@ pwrc_parse ()
platform="x86_linux"
os="os_linux"
hw="hw_x86"
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......@@ -1692,11 +1461,6 @@ pwrc_parse ()
shift
pwrc_setdb_func $@
return $pwrc_status
fi
if [ $1 = "mysql" ]; then
shift
pwrc_mysql_func $@
return
else
echo "Unknown command"
fi
......
......@@ -12,190 +12,52 @@ let reload__loaddb=4
let pass__continue=1
let pass__execute=2
v34_root="/data1/pwr/x3-4b/rls_dbg"
reload_createproject()
{
reload_checkpass "createproject" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
cat << EOF
You should now create the project in wb_adm.
Login in wb_adm and activate 'Create project' from
the menu.
EOF
reload_continue "Pass create project"
wb_adm
source pwrp_env.sh set project $project
}
reload_copyfile()
reload_dumpdb()
{
# Dump V3.4b databases, one wbload file per volume
reload_checkpass "copyfile" $start_pass
reload_checkpass "dumpdb" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
echo "*********************************************************************"
echo ""
echo "Before this pass upgrade.com on VMS should be executed !"
echo ""
echo "**********************************************************************"
reload_continue "Pass dump database"
reload_continue "Pass copy files"
rm $pwrp_db/*.wb_dmp
if [ -e $pwrp_tmp/upgrade_files.sh ]; then
source $pwrp_tmp/upgrade_files.sh
else
echo ""
echo "Files copied from VMS host is missing on \$pwrp_tmp"
echo ""
fi
for cdb in $databases; do
echo "Dumping database $cdb"
}
export pwr_inc=$v34_root/os_linux/hw_x86/exp/inc
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
reload_createdbs()
{
reload_checkpass "createdbs" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
cat > $pwrp_tmp/rename_dbid.pwr_com << EOF
! Script to change dbid in dbconfig objects to lowercase
!
main()
string name;
string value;
string attr;
# Create a script that dumps each volume
tmpfile=$pwrp_tmp/dump.sh
cat > $tmpfile <<-EOF
main()
string v;
string class;
int sts;
string volume;
verify(0);
volume = GetVolumeList();
while ( volume != "")
class = GetVolumeClass( volume);
if ( class == "\$DirectoryVolume")
break;
string outfile;
v = GetVolumeList();
while( v != "")
class = GetVolumeClass( v);
if ( class != "\$ClassVolume")
outfile = "$pwrp_db/" + v + ".wb_dmp";
outfile = tolower( outfile);
printf( "-- Dump volume %s to %s\n", v, outfile);
wb dump/v40/volume='v'/out="'outfile'"
endif
volume = GetNextVolume( volume);
v = GetNextVolume( v);
endwhile
if ( volume == "")
exit(0);
endif
set volume/volume='volume'
name = GetRootList();
while ( name != "")
class = GetObjectClass( name);
if ( class == "DbConfig")
attr = name + ".Id";
value = GetAttribute( attr, sts);
if ( sts)
value = tolower( value);
set attr/name='name'/attr=Id/value="'value'"/noconfirm
endif
endif
if ( class == "NodeConfig")
attr = name + ".NodeName";
value = GetAttribute( attr, sts);
if ( sts)
value = tolower( value);
set attr/name='name'/attr=NodeName/value="'value'"/noconfirm
endif
attr = name + ".BootNode";
value = GetAttribute( attr, sts);
if ( sts)
value = tolower( value);
set attr/name='name'/attr=BootNode/value="'value'"/noconfirm
endif
endif
if ( class == "\$System")
attr = name + ".SystemName";
value = GetAttribute( attr, sts);
if ( sts)
value = tolower( value);
set attr/name='name'/attr=SystemName/value="'value'"/noconfirm
endif
endif
name = GetNextSibling(name);
endwhile
save
endmain
endmain
EOF
wb_cmd @$pwrp_tmp/rename_dbid.pwr_com
cat << EOF
You should now enter the project volume, and check that the
volume is loaded correctly.
You should then set edit mode, and save.
This operation will create the databases that are configured in
the project volume.
EOF
reload_continue "Pass create databases"
source pwrp_env.sh setdb
wb sysansv sysansv
}
reload_dumpdb()
{
reload_checkpass "dumpdb" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
reload_continue "Pass dump database"
for cdb in $databases; do
echo "Dumping database $cdb"
source pwrp_env.sh setdb $cdb
if [ $cdb != "dbdirectory" ]; then
#Store versions of classvolumes
wb_cmd @$pwr_exe/reload_vol_versions $cdb
fi
dump_file=$pwrp_db/$cdb.wb_dmp
reload_save_file $dump_file
wb_cmd wb dump/out=\"$dump_file\"
done
}
reload_templatedb()
{
reload_checkpass "templatedb" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
reload_continue "Pass copy template database"
for cdb in $databases; do
echo "-- Copy template database to $cdb"
source pwrp_env.sh copy template $cdb noconfirm
chmod a+x $tmpfile
$v34_root/os_linux/hw_x86/exp/exe/wb_cmd @$tmpfile
done
}
......@@ -209,182 +71,150 @@ reload_userclasses()
reload_continue "Pass load userclasses"
databases=`eval source pwrp_env.sh show db -a`
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\"
echo "-- Loading userclasses $fname"
volume=`eval grep pwr_eClass_ClassVolume $fname | awk '{ print tolower($2) }'`
if wb_cmd create snapshot/file=\"$fname\"/out=\"$pwrp_load/$volume.dbs\"
then
reload_status=$reload__success
else
reload_status=$reload__userclasses
cat $list_file
return
fi
fi
fi
fi
done
}
reload_settemplate()
reload_dirvolume()
{
reload_checkpass "settemplate" $start_pass
reload_checkpass "dirvolume" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
cat << EOF
The set_template file should be converted from a VMS-command file
to a pwrc script.
Remove all VMS rows, beginning with $, and save the file.
nedit will be started so you can do this.
Then the file will be executed.
EOF
reload_continue "Pass set template values"
reload_continue "Pass dirvolume"
nedit $pwrp_db/set_template.pwr_com
databases=`eval source pwrp_env.sh show db -a`
dmpfiles=`eval ls $pwrp_db/*.wb_dmp`
echo $dmpfiles
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
echo "-- Setting template values in $cdb $fname"
if wb_cmd @$fname
then
reload_status=$reload__success
for dmpfile in $dmpfiles; do
volume=`eval grep DirectoryVolume $dmpfile | awk '{ print $2 }'`
if [ ! -z "$volume" ]; then
echo "Volume: $volume"
#mv $dmpfile $pwrp_db/directory.wb_dmp
l1="Volume $volume \$DirectoryVolume"
l2="Volume Directory \$DirectoryVolume"
sed 's/ '$volume' / Directory /' $dmpfile > $pwrp_db/directory.wb_dmp
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
break
else
reload_status=$reload__settemplate
return
fi
db=""
fi
done
else
echo "-- No set_template file found"
reload_status=$reload__success
fi
}
reload_loaddb()
reload_cnvdirvolume()
{
reload_checkpass "loaddb" $start_pass
reload_checkpass "cnvdirvolume" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
reload_continue "Pass load database"
reload_continue "Pass cnvdirvolume"
databases=`eval source pwrp_env.sh show db -a`
# Create a script that dumps each volume
tmpfile=$pwrp_tmp/cnvdirvolume.sh
cat > $tmpfile << EOF
main
string object;
string class;
string child;
string sibling;
for cdb in $databases; do
echo "-- Loading database $cdb"
set volume/volume=Directory
source pwrp_env.sh setdb $cdb
! verify(1);
object = GetRootList();
while ( object != "")
class = GetObjectClass( object);
if ( class == "DbConfig")
child = GetChild( object);
while ( child != "")
sibling = GetNextSibling( child);
move object/source='child'/dest='object'/after
child = sibling;
endwhile
sibling = GetNextSibling( object);
delete object/noconf/nolog/name='object'
object = sibling;
else
object = GetNextSibling( object);
endif
endwhile
save
endmain
EOF
chmod a+x $tmpfile
wb_cmd @$tmpfile
}
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
fi
fi
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
then
reload_createvolumes()
{
reload_checkpass "createvolumes" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
reload_continue "Pass create volumes"
dmpfiles=`eval ls $pwrp_db/*.wb_dmp`
echo $dmpfiles
for dmpfile in $dmpfiles; do
file=${dmpfile##/*/}
db="${file%.*}.db"
if [ $db = "wb.db" ]; then
db=""
else
cat $list_file
reload_status=$reload__loaddb
wb_cmd wb load /load=\"$dmpfile\"
fi
done
}
reload_convertdb()
reload_localwb()
{
reload_checkpass "convertdb" $start_pass
reload_checkpass "localwb" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
reload_continue "Pass convert database"
reload_continue "Pass create localWb volume"
databases=`eval source pwrp_env.sh show db -a`
for cdb in $databases; do
echo "-- Loading database $cdb"
cat << EOF >> $pwrp_db/wb.wb_load
!
! localWB volume
! This volume contains template objects and local listdescriptors.
!
Volume localWb pwr_eClass_WorkBenchVolume 254.254.254.252
EndVolume
source pwrp_env.sh setdb $cdb
EOF
wb_drive_convert
done
sed 's/SObject wb:/SObject localWb:/' $pwrp_db/wb.wb_dmp >> $pwrp_db/wb.wb_load
}
reload_loaddirectorydb()
reload_loaddb()
{
reload_checkpass "loaddirectorydb" $start_pass
reload_checkpass "loaddb" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
......@@ -392,13 +222,12 @@ reload_loaddirectorydb()
reload_continue "Pass load database"
databases="dbdirectory"
databases=`eval source pwrp_env.sh show db -a`
for cdb in $databases; do
echo "-- Loading database $cdb"
source pwrp_env.sh setdb $cdb
wb_cmd delete volume/name=ProjectVolume/noconf
if [ $cdb != "dbdirectory" ]; then
#Restore versions of classvolumes
......@@ -413,7 +242,8 @@ reload_loaddirectorydb()
then
reload_status=$reload__success
else
reload_status=$reload__success
cat $list_file
reload_status=$reload__loaddb
fi
done
}
......@@ -428,16 +258,7 @@ reload_compile()
reload_continue "Pass compile plcprograms"
databases=`eval source pwrp_env.sh show db -a`
for cdb in $databases; do
if [ $cdb != "dbdirectory" ]; then
source pwrp_env.sh setdb $cdb
echo "-- Compiling database $cdb"
wb_cmd compile/allvolumes
fi
done
wb_cmd compile /all
reload_status=$reload__success
}
......@@ -471,16 +292,7 @@ reload_createload()
echo "-- Removing old loadfiles"
rm $pwrp_load/ld_vol*.dat
databases=`eval source pwrp_env.sh show db -a`
for cdb in $databases; do
if [ $cdb != "dbdirectory" ]; then
source pwrp_env.sh setdb $cdb
echo "-- Creating loadfiles for database $cdb"
wb_cmd create load/class/all
fi
done
wb_cmd create load/all
reload_status=$reload__success
}
......@@ -499,6 +311,44 @@ reload_createboot()
reload_status=$reload__success
}
reload_convertge()
{
reload_checkpass "convertge" $start_pass
if [ $pass_status -ne $pass__execute ]; then
reload_status=$reload__success
return
fi
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);
convert v40
save
endfunction
main()
EOF
list=`eval ls -1 $pwrp_pop/*.pwg`
for file in $list; do
file=${file##/*/}
file=${file%%.*}
echo "process( \"$file\");" >> $tmpfile
done
echo "exit" >> $tmpfile
echo "endmain" >> $tmpfile
chmod a+x $tmpfile
wb_ge @$tmpfile
reload_status=$reload__success
}
reload_exit()
{
source pwrp_env.sh setdb
......@@ -578,27 +428,22 @@ usage()
- Create project on linux (Pass 1)
- Execute upgrade.com on V3.3
- Contiue with pass copyfile
- Continue with pass copyfile
Arguments Project name.
Pass
createproject Create project on linux
copyfile Distribute files copied from V3.3
loaddirectorydb Load the project volume into the directory db.
createdbs Create configured databases.
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
loaddb Load the dump into the new database
convertdb Convert some classes (Document classes)
dumpdb Dump database to textfile \$pwrp_db/'volume'.wb_dmp
userclasses Load userclasses.wb_load
dirvolume Create directory volume.
cnvdirvolume Convert the directory volume.
createvolumes Create configured databases.
localwb Create LocalWb volume for lists and template objects.
compile Compile all plcprograms in the database
createload Create new loadfiles.
createboot Create bootfiles for all nodes in the project.
convertge Convert ge graphs.
EOF
}
......@@ -625,14 +470,20 @@ echo ""
echo "-- Upgrade $project"
echo ""
passes="createproject copyfile loaddirectorydb createdbs userclasses settemplate loaddb convertdb compile createload createboot"
export pwr_inc=$v34_root/os_linux/hw_x86/exp/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
passes="dumpdb userclasses dirvolume cnvdirvolume createvolumes localwb compile createload createboot convertge"
echo "Pass: $passes"
echo ""
echo -n "Enter start pass [createproject] > "
echo -n "Enter start pass [dumpdb] > "
read start_pass
if [ -z $start_pass ]; then
start_pass="createproject"
start_pass="dumpdb"
fi
for cpass in $passes; do
......
......@@ -51,12 +51,12 @@ wb_adm_create_func ()
return $pwrc_status
fi
source pwrp_env.sh set project $pname
if [ $pwrc_status -ne 0 ]; then
return $pwrc_status
fi
#source pwrp_env.sh set project $pname
#if [ $pwrc_status -ne 0 ]; then
# return $pwrc_status
#fi
wb_cmd create volume/name=\"ProjectVolume\"/ident=254.254.254.253/class=\$DirectoryVolume
#wb_cmd create volume/name=\"directory\"/ident=254.254.254.253/class=\$DirectoryVolume
fi
}
......
......@@ -4,13 +4,6 @@
username=$1
password=$2
database=$3
volume=$4
if [ -z "$database" ]; then
source pwrp_env.sh setdb
else
source pwrp_env.sh setdb $database
fi
volume=$3
wb $username $password $volume
......@@ -54,10 +54,12 @@ realclean : clean $(clean_obj)
$(exe_dir)/xtt_help.dat : xtt_help.dat
@ echo "Copying xtt_help.dat"
@ $(cp) $(cpflags) $(source) $(target)
@ co_convert -t -d $(pwr_doc)/help $(source)
$(exe_dir)/sv_se/pwrb_xtthelp.dat : ../../pwrb_xtthelp.dat_sv_se
@ echo "Copying pwrb_xtthelp.dat sv_se"
@ $(cp) $(cpflags) $(source) $(target)
@ co_convert -t -d $(pwr_doc)/sv_se $(source)
$(clean_obj) : clean_%.o : %.c
......
......@@ -760,7 +760,7 @@ Engelsk text<link> ASup, "", $pwr_exe/pwrb_xtthelp.dat
Larmvervakning av analog storhet ( Analog Supervisory ).
<h1>Beskrivning
<image>orm_asup_fo.gif
vervakar analog storhet i godtyckligt objekt med avseende p ver eller
underskridande av vervakningsgrns. High anger om det r ver eller
underskridande som utgr storhetens larmlge.
......
......@@ -51,6 +51,7 @@
%# define load_cNameRttCrrObj "rtt_crro_%3.3d_%3.3d_%3.3d_%3.3d.dat"
%# define load_cNameRttCrrCode "rtt_crrc_%3.3d_%3.3d_%3.3d_%3.3d.dat"
%# define load_cNameRttPlc "rtt_plc_%3.3d_%3.3d_%3.3d_%3.3d.dat"
%# define load_cNamePkg "pwrp_pkg_%s_%04d.tgz"
%#endif
%
%
......
......@@ -276,6 +276,7 @@ static types_sEnumElement mask_Distribute_Components[] = {
{ 512 , "FlowFiles"},
{ 1024 , "RHostsFile"},
{ 2048 , "WebFiles"},
{ 4096 , "PwrpStop"},
{ 0, ""}};
static types_sEnum enum_types[] = {
......
......@@ -9,3 +9,4 @@ plcversion <plc version file corrupt> /error
syntax <syntax error> /error
nodename <node does not exist> /error
filecrp <file is corrupt> /error
noloadfile <file is no load file> /error
\ No newline at end of file
......@@ -214,6 +214,7 @@ sub build_all ()
_build("lib", "dtt", "all");
_build("exp", "rt", "all");
_build("exe", "rt*", "all");
_build("exe", "jpwr*", "all");
_build("exp", "ge", "all");
_build("mmi", "*", "copy");
_build("jpwr", "rt", "all");
......@@ -349,6 +350,7 @@ sub create()
create_dir($newdir . "/doc/sv_se");
create_dir($newdir . "/doc/prm");
create_dir($newdir . "/doc/orm");
create_dir($newdir . "/doc/help");
$newdir = $root . "/tmp";
create_dir($newdir);
......
......@@ -124,6 +124,9 @@ SObject NMps:Class
!
! 8 When the cell is reseted by the ResetObject, the dataobject is also
! removed from the database rtdb.
!
! 16 Backup. The cell and data objects in the cell, is backed up by
! the nmps backup process.
!*/
Object Function $Intern 4
Body SysBody
......
......@@ -116,6 +116,9 @@ SObject NMps:Class
!
! 8 When the cell is reseted by the ResetObject, the dataobject is also
! removed from the database rtdb.
!
! 16 Backup. The cell and data objects in the cell, is backed up by
! the nmps backup process.
!*/
Object Function $Intern 4
Body SysBody
......
......@@ -117,9 +117,16 @@ static int cmd_attach_volume_cb(
cmd->volctx,
ldh_eAccess_ReadWrite,
ldh_eUtility_Pwr);
if ( EVEN(sts)) {
// Try read access
sts = ldh_OpenSession( &cmd->ldhses,
cmd->volctx,
ldh_eAccess_ReadOnly,
ldh_eUtility_Pwr);
if ( EVEN(sts)) return sts;
}
cmd->wnav->volume_attached( cmd->ldhses, pop);
cmd->wnav->volume_attached( cmd->wbctx, cmd->ldhses, pop);
return 1;
}
......@@ -164,23 +171,25 @@ static void cmd_save_cb( void *ctx)
Cmd *cmd = (Cmd *) ctx;
int sts;
if ( !cmd->ldhses)
{
if ( !cmd->ldhses) {
cmd->wnav->message( 'E', "Cmd is not attached to a volume");
return;
}
sts = ldh_SaveSession( cmd->ldhses);
if ( EVEN(sts))
{
if ( EVEN(sts)) {
cmd->wnav->message( 'E', wnav_get_message( sts));
return;
}
if ( cmd->wb_type == wb_eType_Directory)
{
ldh_sVolumeInfo info;
pwr_tCid volcid;
ldh_GetVolumeInfo( ldh_SessionToVol( cmd->ldhses), &info);
ldh_GetVolumeClass( cmd->wbctx, info.Volume, &volcid);
if ( volcid == pwr_eClass_DirectoryVolume) {
sts = lfu_SaveDirectoryVolume( cmd->ldhses, 0);
if ( EVEN(sts))
{
if ( EVEN(sts)) {
cmd->wnav->message( 'E', "Syntax error");
return;
}
......
......@@ -30,9 +30,9 @@ int main( int argc, char *argv[])
wb_vrepdbs *vdbs = new wb_vrepdbs(erep, argv[1]);
vdbs->load();
wb_dbs dbs(vdbs);
dbs.setFileName("lasse.dbs");
dbs.importVolume(*vdbs);
// wb_dbs dbs(vdbs);
// dbs.setFileName("lasse.dbs");
// dbs.importVolume(*vdbs);
//wb_orepdbs *op = (wb_orepdbs *)vdbs->object(&sts);
......
......@@ -75,10 +75,12 @@ realclean : clean $(clean_h) $(clean_c) $(clean_dat)
$(exe_dir)/wtt_help.dat : wtt_help.dat
@ echo "Copying wtt_help.dat"
@ $(cp) $(cpflags) $(source) $(target)
@ co_convert -t -d $(pwr_doc)/help $(source)
$(exe_dir)/ge_help.dat : ge_help.dat
@ echo "Copying ge_help.dat"
@ $(cp) $(cpflags) $(source) $(target)
@ co_convert -t -d $(pwr_doc)/help $(source)
$(exe_dir)/pwr_wb_palette.cnf : ../../pwr_wb_palette.cnf
@ echo "Copying pwr_wb_palette.cnf"
......
......@@ -235,6 +235,7 @@ topobjects ProjectNavigatorW1
class ClassVolumeConfig
class SubVolumeConfig
class WbEnvironment
class DbConfig
}
topobjects ProjectNavigatorW2
......@@ -263,15 +264,14 @@ palette ProjectNavigatorPalette
{
class ApplDistribute
class ClassVolumeLoad
class Distribute
class FriendNodeConfig
class GraphDistribute
class NodeConfig
class $NodeHier
class RootVolumeLoad
class SharedVolumeLoad
class SubVolumeLoad
class $System
class SystemDistribute
}
}
......
......@@ -7,6 +7,6 @@ link = $(ldxx) $(linkflags) $(domap) -o $(export_exe) \
-lpwr_ge -lpwr_rt -lpwr_co -lpwr_flow -lpwr_glow \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt
-ldb-4.0 -lrpcsvc -lpthread -lm -lrt
endif
......@@ -851,6 +851,7 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
static int reglist_num = (sizeof reglist / sizeof reglist[0]);
char opplace_str[80] = "";
int opplace_found = 0;
pwr_tObjid op_objid;
hot_xtt = this;
......@@ -864,11 +865,29 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
for ( i = 1; i < argc; i++) {
if ( strcmp( argv[i], "-l") == 0 && i + 1 < argc)
Lng::set( argv[i+1]);
else if ( strcmp( argv[i], "-u") == 0 && i + 1 < argc) {
char oname[80];
strcpy( opplace_str, argv[i+1]);
sts = gdh_GetClassList( pwr_cClass_OpPlace, &op_objid);
while (ODD(sts)) {
sts = gdh_ObjidToName( op_objid, oname, sizeof(oname), cdh_mName_object);
if (ODD(sts) && cdh_NoCaseStrcmp( oname, opplace_str) == 0) {
sts = gdh_ObjidToName( op_objid, opplace_str, sizeof(opplace_str), cdh_mNName);
opplace_found = 1;
break;
}
}
if ( !opplace_found) {
printf("** Unable to find opplace\n");
exit(sts);
}
}
}
if ( argc >= 2 && strncmp( argv[1], "-", 1) != 0)
if ( !opplace_found && argc >= 2 && strncmp( argv[1], "-", 1) != 0)
{
pwr_tObjid op_objid;
pwr_tClassId op_class;
// First argument is opplace object
......@@ -884,8 +903,7 @@ Xtt::Xtt( int argc, char *argv[], int *return_sts) :
sts = gdh_GetObjectClass( op_objid, &op_class);
if ( EVEN(sts)) exit( sts);
if ( op_class != pwr_cClass_OpPlace)
{
if ( op_class != pwr_cClass_OpPlace) {
printf("** Error in opplace object class\n");
exit(sts);
}
......
......@@ -90,11 +90,25 @@ int main( int argc, char *argv[])
XtManageChild(mainwindow);
if ( argc > 1)
{
printf( "Argc: %d\n", argc);
if ( argc > 1) {
printf( "Arg: %s\n", argv[1]);
if ( argv[1][0] == '@') {
// Execute script
void *gectx;
pwr_tStatus sts;
gectx = ge_new( NULL, mainwindow, 0, 1, NULL);
sts = ge_command( gectx, argv[1]);
if ( EVEN(sts))
ge_message( gectx, sts);
}
else {
// Open graph
strcpy( graph_name, argv[1]);
ge_new( NULL, mainwindow, 0, 1, graph_name);
}
}
else
ge_new( NULL, mainwindow, 0, 1, NULL);
......
......@@ -2542,6 +2542,18 @@ int ge_generate_web( ldh_tSesContext ldhses)
return Graph::generate_web( ldhses);
}
int ge_command( void *ge_ctx, char *cmd)
{
ge_tCtx gectx = (ge_tCtx) ge_ctx;
return gectx->graph->command( cmd);
}
void ge_message( void *ge_ctx, pwr_tStatus sts)
{
ge_tCtx gectx = (ge_tCtx) ge_ctx;
gectx->graph->message( sts);
}
void ge_del( void *ge_ctx)
{
ge_tCtx gectx = (ge_tCtx) ge_ctx;
......@@ -2907,3 +2919,9 @@ void *ge_new( void *parent_ctx,
}
......@@ -24,6 +24,8 @@ void ge_open( void *ge_ctx, char *name);
void ge_save( void *ge_ctx, char *name);
void ge_clear( void *ge_ctx);
int ge_generate_web( ldh_tSesContext ldhses);
int ge_command( void *ge_ctx, char *cmd);
void ge_message( void *ge_ctx, pwr_tStatus sts);
#if defined __cplusplus
}
......
......@@ -2029,6 +2029,9 @@ int GeInvisible::disconnect( grow_tObject object)
int GeInvisible::scan( grow_tObject object)
{
if ( !p)
return 1;
if ( !first_scan) {
if ( old_value == *p) {
// No change since last time
......@@ -5885,6 +5888,9 @@ int GeRadioButton::disconnect( grow_tObject object)
int GeRadioButton::scan( grow_tObject object)
{
if ( !p)
return 1;
if ( !first_scan) {
if ( old_value == *p) {
// No change since last time
......
......@@ -998,7 +998,7 @@ class GeValueInput : public GeDynElem {
{}
GeValueInput( const GeValueInput& x) :
GeDynElem(x.dyn,x.dyn_type,x.action_type,x.prio), min_value(x.min_value),
max_value(x.max_value)
max_value(x.max_value), clear(x.clear), popup(x.popup)
{}
void get_attributes( attr_sItem *attrinfo, int *item_count);
void save( ofstream& fp);
......
......@@ -39,6 +39,7 @@ extern "C" {
extern "C" {
#include "co_mrm_util.h"
#include "co_msg.h"
#include "flow_x.h"
}
#include "co_lng.h"
......@@ -106,6 +107,14 @@ static int graph_get_current_colors_cb( void *g, glow_eDrawType *fill_color,
static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event);
void Graph::message( pwr_tStatus sts)
{
char msg[80];
msg_GetMsg( sts, msg, sizeof(msg));
message('I', msg);
}
void Graph::message( char sev, char *text)
{
(message_cb)( parent_ctx, sev, text);
......
......@@ -471,6 +471,12 @@ class Graph {
*/
void message( char sev, char *text);
//! Print a status message
/*!
\param sts Status code.
*/
void message( pwr_tStatus sts);
int grow_pop();
int grow_push();
int grow_push_all();
......
......@@ -2478,13 +2478,15 @@ int Graph::command( char* input_str)
int sts, sym_sts;
char symbol_value[80];
dcli_toupper( input_str, input_str);
sts = dcli_replace_symbol( input_str, command, sizeof(command));
if ( EVEN(sts)) return sts;
if ( input_str[0] == '@')
{
/* Read command file */
char *s;
if ( (s = strchr( input_str, ' ')))
dcli_toupper( s, s);
sts = dcli_replace_symbol( input_str, command, sizeof(command));
if ( EVEN(sts)) return sts;
sts = readcmdfile( &command[1]);
if ( sts == DCLI__NOFILE)
{
......@@ -2495,6 +2497,10 @@ int Graph::command( char* input_str)
return DCLI__SUCCESS;
}
dcli_toupper( input_str, input_str);
sts = dcli_replace_symbol( input_str, command, sizeof(command));
if ( EVEN(sts)) return sts;
sts = dcli_cli( (dcli_tCmdTable *)&graph_command_table, command, (void *) this, 0);
if ( sts == DCLI__COM_NODEF)
{
......
......@@ -759,8 +759,6 @@ void GrowBar::convert( glow_eConvert version)
GrowRect::convert( version);
bar_drawtype = GlowColor::convert( version, bar_drawtype);
bar_bordercolor = GlowColor::convert( version, bar_bordercolor);
original_fill_drawtype = GlowColor::convert( version, original_fill_drawtype);
fill_drawtype = GlowColor::convert( version, fill_drawtype);
break;
}
......
......@@ -1949,7 +1949,10 @@ void GrowNode::convert( glow_eConvert version)
original_border_drawtype = GlowColor::convert( version, original_border_drawtype);
original_fill_drawtype = GlowColor::convert( version, original_fill_drawtype);
fill_drawtype = GlowColor::convert( version, fill_drawtype);
if ( trace.attr_type == 3 || trace.attr_type == 4 || trace.attr_type == 12) {
if ( trace.attr_type == 3 || trace.attr_type == 4 || trace.attr_type == 12 ||
trace.attr_type == 1010 || trace.attr_type == 1011 || trace.attr_type == 1012 ||
trace.attr_type == 1013 || trace.attr_type == 1014 || trace.attr_type == 1015 ||
trace.attr_type == 1016 || trace.attr_type == 1021 || trace.attr_type == 1023) {
if ( (glow_eDrawTone) trace.color == glow_eDrawTone_YellowGreen)
(glow_eDrawTone) trace.color = glow_eDrawTone_Yellow;
if ( (glow_eDrawTone) trace.color2 == glow_eDrawTone_YellowGreen)
......
......@@ -834,7 +834,7 @@ void Hist::get_hist_list()
printf(" Fel vid skapande av databashandtag avslutar\n");
return;
}
if((ret = dataBaseP->open(dataBaseP, 0, dbName, NULL, DATABASETYPE, DB_RDONLY, 0)) != 0)
if((ret = dataBaseP->open(dataBaseP, dbName, NULL, DATABASETYPE, DB_RDONLY, 0)) != 0)
{
/*error opening/creating db send the mess to errh, then exit*/
printf("error db_open: %s\n", db_strerror(ret));
......
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