Commit 7a76cbd9 authored by claes's avatar claes

BusConfig class added

parent 58567737
...@@ -128,7 +128,7 @@ reload_cnvdirvolume() ...@@ -128,7 +128,7 @@ reload_cnvdirvolume()
reload_continue "Pass cnvdirvolume" reload_continue "Pass cnvdirvolume"
# Create a script that dumps each volume # Create a script that removes DbConfig objects and create BusConfig objects
tmpfile=$pwrp_tmp/cnvdirvolume.sh tmpfile=$pwrp_tmp/cnvdirvolume.sh
cat > $tmpfile << EOF cat > $tmpfile << EOF
main main
...@@ -136,6 +136,11 @@ main ...@@ -136,6 +136,11 @@ main
string class; string class;
string child; string child;
string sibling; string sibling;
string nodeconfig;
string attr;
int busnumber;
string bus;
string next;
set volume/volume=Directory set volume/volume=Directory
...@@ -157,6 +162,25 @@ main ...@@ -157,6 +162,25 @@ main
object = GetNextSibling( object); object = GetNextSibling( object);
endif endif
endwhile endwhile
nodeconfig = GetRootList();
while ( nodeconfig != "")
next = GetNextSibling( nodeconfig);
class = GetObjectClass( nodeconfig);
if ( class == "NodeConfig" || class == "FriendNodeConfig")
attr = nodeconfig + ".BusNumber";
busnumber = GetAttribute( attr);
bus = busnumber;
class = GetObjectClass(bus);
if ( class == "")
create object/dest=""/name='bus'/class="BusConfig"/last
set attr/name='bus'/attr="BusNumber"/value='bus'/noconf/nolog
endif
move object/source='nodeconfig'/dest='bus'/last
endif
nodeconfig = next;
endwhile
save save
endmain endmain
EOF EOF
......
! pwrb_c_busconfig.wb_load -- Defines the class BusConfig.
!
! PROVIEW/R
! Copyright (C) 1996 by Comator Process AB.
!
! <Description>.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures a Qcom bus.
! The Bus object configures a qcom that nodes in the project will
! communicate on.
!
! The object should be configured in the project volume as a top object,
! and have the NodeConfig object of the nodes in the bus as children.
!
! @classlink NodeConfig pwrb_nodeconfig.html
!
!*/
Object BusConfig $ClassDef 362
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard
Attr Flags |= pwr_mClassDef_TopObject
EndBody
Object RtBody $ObjBodyDef 1
!/**
! Description of the bus
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! QCOM bus number.
!*/
Object BusNumber $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
EndObject
EndObject
EndSObject
...@@ -26,7 +26,6 @@ SObject pwrb:Class ...@@ -26,7 +26,6 @@ SObject pwrb:Class
Body SysBody Body SysBody
Attr Editor = pwr_eEditor_AttrEd Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard Attr Method = pwr_eMethod_Standard
Attr Flags |= pwr_mClassDef_TopObject
EndBody EndBody
Object RtBody $ObjBodyDef 1 Object RtBody $ObjBodyDef 1
Body SysBody Body SysBody
...@@ -50,10 +49,12 @@ SObject pwrb:Class ...@@ -50,10 +49,12 @@ SObject pwrb:Class
EndObject EndObject
!/** !/**
! QCOM bus number. ! QCOM bus number.
! Obsolete since V4.0
!*/ !*/
Object BusNumber $Attribute 3 Object BusNumber $Attribute 3
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = PWR_MASK_INVISIBLE
EndBody EndBody
EndObject EndObject
!/** !/**
......
...@@ -40,7 +40,6 @@ SObject pwrb:Class ...@@ -40,7 +40,6 @@ SObject pwrb:Class
Body SysBody Body SysBody
Attr Editor = pwr_eEditor_AttrEd Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_Standard Attr Method = pwr_eMethod_Standard
Attr Flags |= pwr_mClassDef_TopObject
EndBody EndBody
Object RtBody $ObjBodyDef 1 Object RtBody $ObjBodyDef 1
Body SysBody Body SysBody
...@@ -89,10 +88,12 @@ SObject pwrb:Class ...@@ -89,10 +88,12 @@ SObject pwrb:Class
EndObject EndObject
!/** !/**
! QCOM bus number. ! QCOM bus number.
! Obsolete since V4.0
!*/ !*/
Object BusNumber $Attribute 5 Object BusNumber $Attribute 5
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
Attr Flags = PWR_MASK_INVISIBLE
EndBody EndBody
EndObject EndObject
!/** !/**
......
...@@ -226,6 +226,7 @@ topobjects ProjectNavigatorW2 ...@@ -226,6 +226,7 @@ topobjects ProjectNavigatorW2
class $System class $System
class NodeConfig class NodeConfig
class FriendNodeConfig class FriendNodeConfig
class BusConfig
} }
palette ProjectNavigatorPalette palette ProjectNavigatorPalette
...@@ -246,6 +247,7 @@ palette ProjectNavigatorPalette ...@@ -246,6 +247,7 @@ palette ProjectNavigatorPalette
menu Node menu Node
{ {
class ApplDistribute class ApplDistribute
class BusConfig
class ClassVolumeLoad class ClassVolumeLoad
class Distribute class Distribute
class FriendNodeConfig class FriendNodeConfig
......
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