Set interface for port
setInterface(port,interface)
example
setInterface(port,interface) sets the interface for a port.
port
interface
collapse all
Create a model, get the root architecture, add a component, add a port, add an interface, and set the interface for the port.
model = systemcomposer.createModel('archModel'); rootArch = get(model,'Architecture'); newcomponent = addComponent(rootArch,'NewComponent'); newport = addPort(newcomponent.Architecture,'NewCompPort','in'); newinterface = addInterface(model.InterfaceDictionary,'NewInterface'); setInterface(newport,newinterface);
Port to be edited, specified as a systemcomposer.arch.ArchitecturePort or systemcomposer.arch.ComponentPort object.
systemcomposer.arch.ArchitecturePort
systemcomposer.arch.ComponentPort
Interface to set, specified as a systemcomposer.interface.SignalInterface object.
systemcomposer.interface.SignalInterface
systemcomposer.arch.ArchitecturePort | systemcomposer.arch.ComponentPort