Commit b9d0d49d authored by Claes Sjofors's avatar Claes Sjofors

Sev node built from 'Build Node'

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