Commit b9d0d49d authored by Claes Sjofors's avatar Claes Sjofors

Sev node built from 'Build Node'

parent ac582029
......@@ -288,10 +288,12 @@ reload_cnvobjects()
reload_continue "Pass convert objects in loaded database"
for cdb in $databases; do
echo "-- Convert volume $cdb"
wb_cmd -q -v $cdb @$pwr_exe/upgrade_pb.pwr_com
done
# Only directory volume
# for cdb in $databases; do
# echo "-- Convert volume $cdb"
# wb_cmd -q -v $cdb @$pwr_exe/upgrade_pb.pwr_com
# done
wb_cmd -q @$pwr_exe/upgrade_pb.pwr_com
reload_status=$reload__success
}
......@@ -638,6 +640,7 @@ usage()
cnvdump Convert dumpfiles.
renamedb Rename old databases.
loaddb Load databases.
cnvobjects Convert objects.
compile Compile all plcprograms in the database
createload Create new loadfiles.
buildnodes Build all nodes in the project.
......@@ -679,7 +682,7 @@ for db in $tmp; do
fi
done
passes="savedirectory classvolumes cnvdump renamedb loaddb compile createload buildnodes createpackage"
passes="savedirectory classvolumes cnvdump renamedb loaddb cnvobjects compile createload buildnodes createpackage"
#echo "Pass: $passes"
echo ""
echo -n "Enter start pass [savedirectory] > "
......
......@@ -33,104 +33,51 @@
# the source code of Proview (the version used to produce the
# combined work), being distributed under the terms of the GNU
# General Public License plus this exception.
!
!
! Script for upgrading Profinet modules during upgrading from V5.4 to V5.5,
!
! Sets the Slot attribute.
!
function int is_numeric( string s)
string s1;
int ret = 0;
int len;
#
#
# Script for upgrading SevNodeConfig during upgrading from V5.5 to V5.6,
#
s1 = extract( 1, 1, s);
if ( s1 == "0" || s1 == "1" || s1 == "2" || s1 == "3" || s1 == "4" || s1 == "5" || s1 == "6" || s1 == "7" || s1 == "8" || s1 == "9")
ret = 1;
endif
len = strlen(s);
if ( len > 1)
s1 = extract( 2, 1, s);
if ( s1 == "0" || s1 == "1" || s1 == "2" || s1 == "3" || s1 == "4" || s1 == "5" || s1 == "6" || s1 == "7" || s1 == "8" || s1 == "9")
ret = 1;
endif
endif
return ret;
endfunction
# Add a RootVolumeConfig and RootVolumeLoad object and
# set the LoadFiles bit in Distribute.Components.
#
function int set_slot( string mclass)
string name;
string sname;
string snum;
int num;
main()
string sevnode;
string volume;
string attr;
string parent;
string child;
string class;
string sysobj;
int components;
verify(0);
name = GetClassList( mclass);
while ( name != "")
sevnode = GetClassList( "SevNodeConfig");
while ( sevnode != "")
attr = sevnode + ".Volume";
volume = GetAttribute( attr);
sname = CutObjectName( name, 1);
snum = extract( 2, 5, sname);
CreateObject( volume, "RootVolumeLoad", sevnode, 1);
num = is_numeric( snum);
if ( num == 1)
num = snum;
sysobj = GetClassList( "$System");
CreateObject( volume, "RootVolumeConfig", sysobj, 3);
attr = name + ".Slot";
SetAttribute( attr, num);
printf( "%s %d\n", name, num);
else
# Count siblings
parent = GetParent( name);
child = GetChild( parent);
num = 1;
while ( child != "")
if ( child == name)
attr = name + ".Slot";
SetAttribute( attr, num);
printf( "%s %d\n", name, num);
break;
endif
child = GetChild( sevnode);
while ( child != "")
class = GetObjectClass( child);
if ( class == "Distribute")
attr = child + ".Components";
components = GetAttribute( attr);
components = components | 2;
SetAttribute( attr, components);
break;
endif
child = GetNextSibling( child);
endwhile
child = GetNextSibling( child);
num++;
endwhile
endif
name = GetNextObject( name);
sevnode = GetNextObject( sevnode);
endwhile
return 1;
endfunction
main()
set_slot( "PnModule");
set_slot( "BaseFcPPO3PnModule");
set_slot( "ABB_ACS880_PnModule");
set_slot( "Siemens_Di4_PnModule");
set_slot( "Siemens_Di2_PnModule");
set_slot( "Siemens_Do4_PnModule");
set_slot( "Siemens_Do2_PnModule");
set_slot( "Siemens_Di32_PnModule");
set_slot( "Siemens_D16_PnModule");
set_slot( "Siemens_Dx16_PnModule");
set_slot( "Siemens_Di8_PnModule");
set_slot( "Siemens_Do32_PnModule");
set_slot( "Siemens_Do16_PnModule");
set_slot( "Siemens_Do8_PnModule");
set_slot( "Siemens_Ai8_PnModule");
set_slot( "Siemens_Ai4_PnModule");
set_slot( "Siemens_Ai2_PnModule");
set_slot( "Siemens_Ao8_PnModule");
set_slot( "Siemens_Ao4_PnModule");
set_slot( "Sinamics_Tgm1_PnModule");
endmain
save /quiet
endmain
\ No newline at end of file
......@@ -37,7 +37,7 @@
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Version 1.1
! @Group ProjectConfiguration
! @Summary Configures a proview storage environment node.
! The SevNodeConfig object configures a proview storage environment node.
......@@ -49,8 +49,8 @@ SObject pwrb:Class
! The SevNodeConfig object is created in the project volume as a child to
! a BusConfig-object in the node-hierachy.
!
! A root volumes has to be registred for the node. The volume is only used to give
! the node a unique identity, and no database is created for the volume.
! A root volumes has to be registred and configured for the node. The volume
! should contain a SevServer object in the node hierarchy.
!
! @b See also
! @classlink NodeConfig pwrb_nodeconfig.html
......@@ -124,11 +124,12 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! Name of the rootvolume of the node.
! Obsolete since V5.6.0.
!*/
Object Volume $Attribute 7
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
Attr Flags |= PWR_MASK_INVISIBLE
EndBody
EndObject
!/**
......
......@@ -313,7 +313,7 @@ void wb_build::all( int no_export, int no_classvolumes, int no_flowfiles)
m_sts = sumsts;
}
void wb_build::node( char *nodename, void *volumelist, int volumecnt)
void wb_build::node( char *nodename, int nodetype, void *volumelist, int volumecnt)
{
lfu_t_volumelist *vlist = (lfu_t_volumelist *)volumelist;
pwr_tTime vtime;
......@@ -430,7 +430,7 @@ void wb_build::node( char *nodename, void *volumelist, int volumecnt)
if ( opt.force || opt.manual || rebuild) {
m_sts = lfu_create_bootfile( nodename, (lfu_t_volumelist *)volumelist, volumecnt,
m_sts = lfu_create_bootfile( nodename, nodetype, (lfu_t_volumelist *)volumelist, volumecnt,
opt.debug);
if ( ODD(m_sts))
wb_log::log( wlog_eCategory_NodeBuild, nodename, 0);
......
......@@ -56,6 +56,10 @@ typedef enum {
bld_ePass_AfterNode
} bld_ePass;
typedef enum {
bld_eNodeType_Node,
bld_eNodeType_Sev
} bld_eNodeType;
class wb_build : public wb_status
{
......@@ -65,7 +69,7 @@ class wb_build : public wb_status
void classlist( pwr_tCid cid);
void all( int no_export = 0, int no_classvolumes = 0, int no_flowfiles = 0);
void node( char *nodename, void *volumelist, int volumecnt);
void node( char *nodename, int nodetype, void *volumelist, int volumecnt);
void volume();
void rootvolume( pwr_tVid vid);
void classvolume( pwr_tVid vid);
......@@ -92,4 +96,4 @@ class wb_build : public wb_status
pwr_tOid m_hierarchy;
};
#endif
\ No newline at end of file
#endif
......@@ -58,7 +58,7 @@ static pwr_tStatus PostCreate (
pwr_tMask comp;
comp = pwr_mDistrComponentMask_UserDatabase |
// pwr_mDistrComponentMask_LoadFiles |
pwr_mDistrComponentMask_LoadFiles |
// pwr_mDistrComponentMask_ApplFile |
// pwr_mDistrComponentMask_XttHelpFile |
// pwr_mDistrComponentMask_RHostFiles |
......@@ -149,4 +149,4 @@ pwr_dExport pwr_BindMethods(SevNodeConfig) = {
pwr_BindMethod(PostCreate),
pwr_BindMethod(SyntaxCheck),
pwr_NullMethod
};
\ No newline at end of file
};
This diff is collapsed.
......@@ -128,6 +128,7 @@ pwr_tStatus lfu_volumelist_load( const char *filename,
pwr_tStatus lfu_create_loadfile( ldh_tSesContext ldhses);
pwr_tStatus lfu_create_bootfile( char *nodeconfigname,
int nodetype,
lfu_t_volumelist *volumelist,
int volumecount,
int debug);
......@@ -194,4 +195,4 @@ pwr_tStatus lfu_GetBootList( vector<lfu_boot_info>& vect, int *nodes);
}
#endif
#endif
\ No newline at end of file
#endif
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