Esempio n. 1
0
func CreateXmlArch(a pf.ArchIf) *backend.XmlArch {
	ret := backend.XmlArchNew(a.Name())
	for _, t := range a.IOTypes() {
		ret.IOType = append(ret.IOType, *CreateXmlIOType(t))
	}
	for _, p := range a.Processes() {
		ret.Processes = append(ret.Processes, *CreateXmlProcess(p))
	}
	//ret.Entry = freesp.CreateXmlModePosition(a).Entry
	return ret
}
Esempio n. 2
0
func channelGetIOTypeFromArch(a pf.ArchIf, iotype string) (iot pf.IOTypeIf, err error) {
	var ok bool
	for _, iot = range a.IOTypes() {
		if iot.Name() == iotype {
			ok = true
			break
		}
	}
	if !ok {
		err = fmt.Errorf("createInChannelFromXml error: referenced ioType %s not found in arch %s.\n",
			iotype, a.Name())
	}
	return
}