func createOutChannelFromXml(xmlc backend.XmlOutChannel, p pf.ProcessIf) (ch *channel, err error) { var iot pf.IOTypeIf iot, err = channelGetIOTypeFromArch(p.Arch(), xmlc.IOType) if err != nil { return } ch = ChannelNew(gr.OutPort, iot, p, xmlc.Dest) //ch.channelPositionsFromXml(xmlc.XmlChannel) ap := p.Arch().(*arch).AddArchPort(ch) //ap.archPortPositionsFromXml(xmlc.XmlChannel) ch.archport = ap return }
func getOtherProcesses(fts *models.FilesTreeStore, object tr.TreeElementIf) (ret []pf.ProcessIf) { var thisProcess pf.ProcessIf switch object.(type) { case pf.ChannelIf: thisProcess = object.(pf.ChannelIf).Process() case pf.ProcessIf: thisProcess = object.(pf.ProcessIf) default: log.Fatalf("getOtherProcesses error: invalid type %T\n", object) } platform := thisProcess.Arch().Platform() for _, a := range platform.Arch() { for _, p := range a.Processes() { if p != thisProcess { ret = append(ret, p) } } } return }
func channelMakeName(iotype pf.IOTypeIf, link pf.ProcessIf) string { return fmt.Sprintf("%s-%s/%s", iotype.Name(), link.Arch().Name(), link.Name()) }