本文整理匯總了Golang中github.com/wiless/gocomm/chipset.PinInfo.CreateComplex128Channel方法的典型用法代碼示例。如果您正苦於以下問題:Golang PinInfo.CreateComplex128Channel方法的具體用法?Golang PinInfo.CreateComplex128Channel怎麽用?Golang PinInfo.CreateComplex128Channel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/wiless/gocomm/chipset.PinInfo
的用法示例。
在下文中一共展示了PinInfo.CreateComplex128Channel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: InitPins
func (m *ChannelEmulator) InitPins() {
m.isInitialized = true
totalpins := m.InPinCount() + m.OutPinCount()
m.Pins = make(map[string]chipset.PinInfo, totalpins)
m.PinNames = make(map[int]string, totalpins)
// b := [...]string{"Penn", "Teller"}
strlist := [4]string{"symbolIn", "symbolOut"}
for i := 0; i < totalpins; i++ {
m.PinNames[i] = strlist[i]
}
for i := 0; i < totalpins; i++ {
var pinfo chipset.PinInfo
// pinfo.CreateComplex128Channel()
pinfo.Name = m.PinNames[i]
if i < m.InPinCount() {
pinfo.InputPin = true
} else {
pinfo.InputPin = false
}
m.Pins[m.PinNames[i]] = pinfo
}
testcch := gocomm.NewComplex128Channel()
var dummypin chipset.PinInfo
/// all Input Pins
dummypin = m.Pins["symbolIn"]
dummypin.Id = 0
dummypin.DataType = reflect.TypeOf(testcch)
m.Pins["symbolIn"] = dummypin
/// All output pins
dummypin = m.Pins["symbolOut"]
dummypin.Id = 1
dummypin.SourceName = "fadingchannel/awgn"
dummypin.DataType = reflect.TypeOf(testcch)
dummypin.CreateComplex128Channel()
m.Pins["symbolOut"] = dummypin
}