Esempio n. 1
0
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
}
Esempio n. 2
0
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
}
Esempio n. 3
0
func channelMakeName(iotype pf.IOTypeIf, link pf.ProcessIf) string {
	return fmt.Sprintf("%s-%s/%s", iotype.Name(), link.Arch().Name(), link.Name())
}