Ejemplo n.º 1
0
func CreateXmlSignalType(s bh.SignalTypeIf) *backend.XmlSignalType {
	var scope, mode string
	if s.Scope() == bh.Local {
		scope = "local"
	}
	if s.Mode() == bh.Synchronous {
		mode = "sync"
	}
	return backend.XmlSignalTypeNew(s.TypeName(), scope, mode, s.CType(), s.ChannelId())
}
Ejemplo n.º 2
0
func signalTypeCpmpatible(s1, s2 bh.SignalTypeIf) bool {
	if s1.TypeName() != s2.TypeName() {
		return true
	}
	if s1.CType() != s2.CType() {
		return false
	}
	if s1.Scope() != s2.Scope() {
		return false
	}
	if s1.ChannelId() != s2.ChannelId() {
		return false
	}
	if s1.Mode() != s2.Mode() {
		return false
	}
	return true
}