Structure/Payloads [ Rules ]

[ Top ] [ Structure ] [ Rules ]

SUMMARY

Transform a SysML:Connector into a HiLeS:Payload ($Rev: 43 $)

DESCRIPTION

Craete the Payloads connections between ports and services. Payloads can connect ports of blocks nested in the same architecture, or can connect ports from a block to services on its parent architecture. If all the connector ends have a partWithPort, the connections is from output to input, i.e. between ports of blocks. If not, it can be from input to input or form output to output, i.e. a port in a block connected to a service of it's parent architecture.

SEE ALSO

DOMAIN

SPECIFICATION

        relation Payloads
        {
            checkonly domain SysML c:Connector {
                owner = b:Block{},
                name = cn,
                id = id,
                end = e:ConnectorEnd{},
            }
            enforce domain HiLeS p:Payload {
                owner = arch:Architecture{},
                name = cn,
                type = t:PayloadType,
                target = tr:Point{},
                source = sr:Point{},
            }
            where {
                if(e->forAll(e | e.partWithPort->notEmpty())) then
                    if(e.role.direction = FlowDirection::in) then
                        Ports(e.role, tr);
                    else
                        Ports(e.role, sr);
                    endif
                else
                    if(e->forAll(e | e.role.direction= FlowDirection::out)) {
                        if(e.partWithPort->notEmpty()) then
                            Ports(e.role, sr);
                        else
                            Services(e.role, tr);
                        endif
                    else
                        if(end.partWithPort->notEmpty()) then
                            Ports(e.role, tr);
                        else
                            Services(e.role, sr);
                        endif
                    endif
                endif
            }
        }