Structure/StructuralBlock [ Rules ]
[ Top ] [ Structure ] [ Rules ]
SUMMARY
Transform a SysML:Block into a HiLeS;Structural block with the required ports and inner architecture. ($Rev: 134 $)
DESCRIPTION
Copies the name and id values from the sysml block, adds all the block ports, and if the block has children creates a new architecture and adds all the children blocks and payload channels to it.
SEE ALSO
DOMAIN
SPECIFICATION
relation StructuralBlock { domain SysML sysmlb:Block { namespace = p:Package{}, name = bn, id = id; flowPorts = fp:ownedAttribute{}, properties = prop:ownedAttribute{}, connectors = con:ownedConnector{}, behavior = activity:ownedBehavior{}, children = ch:nestedClassifier{} } domain HiLeS hilesb:Structural { architecture = arch:Architecture{}, name = bn, id = id, parentArchitecture = arch, ports = pt:Port{}, innerArchitecture = iArch:Architecture{}, } when { InitialArchitecture(p, a); } where { Ports(fp, pt); Services(fp,iArch.services); let children : Block{} = sysmlb.getChildrenBlocks() in if children->size() > 0 then StructuralBlock(children,iArch.blocks); Payloads(con,iArch.payloads); endif } }