func CreateXmlProcess(p pf.ProcessIf) *backend.XmlProcess { ret := backend.XmlProcessNew(p.Name()) for _, c := range p.InChannels() { ret.InputChannels = append(ret.InputChannels, *CreateXmlInChannel(c)) } for _, c := range p.OutChannels() { ret.OutputChannels = append(ret.OutputChannels, *CreateXmlOutChannel(c)) } //ret.Entry = freesp.CreateXmlModePosition(p).Entry return ret }
func CreateXmlProcessHint(p pf.ProcessIf) (xmlp *backend.XmlProcessPosHint) { xmlp = backend.XmlProcessPosHintNew(p.Name()) xmlp.Entry = freesp.CreateXmlModePosition(p).Entry for _, c := range p.InChannels() { xmlp.InChannels = append(xmlp.InChannels, *CreateXmlChannelHint(c)) } for _, c := range p.OutChannels() { xmlp.OutChannels = append(xmlp.OutChannels, *CreateXmlChannelHint(c)) } return }
func channelMakeName(iotype pf.IOTypeIf, link pf.ProcessIf) string { return fmt.Sprintf("%s-%s/%s", iotype.Name(), link.Arch().Name(), link.Name()) }