• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang chipset.PinInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/wiless/gocomm/chipset.PinInfo的典型用法代码示例。如果您正苦于以下问题:Golang PinInfo类的具体用法?Golang PinInfo怎么用?Golang PinInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了PinInfo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: PinOut

func (m BitSource) PinOut(pid int) chipset.PinInfo {
	if pid >= m.OutPinCount() {
		fmt.Printf("%d > No of Output Pins %d", pid, m.OutPinCount())
		var result chipset.PinInfo
		result.Id = -1
		return result
	}
	return m.Pins[m.PinNames[pid+m.InPinCount()]]
}
开发者ID:postfix,项目名称:gocomm,代码行数:9,代码来源:bitsource.go


示例2: PinIn

func (m OFDM) PinIn(pid int) chipset.PinInfo {
	if pid >= m.InPinCount() {
		fmt.Printf("%d > No of Input Pins %d", pid, m.InPinCount())
		var result chipset.PinInfo
		result.Id = -1
		return result
	}

	return m.Pins[m.PinNames[pid]]

}
开发者ID:postfix,项目名称:gocomm,代码行数:11,代码来源:ofdm.go


示例3: InitPins

func (m *OFDM) InitPins() {
	totalpins := m.InPinCount() + m.OutPinCount()
	m.Pins = make(map[string]chipset.PinInfo, totalpins)
	m.PinNames = make(map[int]string, totalpins)
	strlist := [4]string{"inputPin0", "inputPin1", "outputPin0", "outputPin1"}
	for cnt := 0; cnt < len(strlist); cnt++ {
		m.PinNames[cnt] = strlist[cnt]
	}

	/// something try begins
	var pinfo chipset.PinInfo

	pinfo.Name = "inputPin0"
	pinfo.Id = 0
	pinfo.InputPin = true

	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	m.Pins["inputPin0"] = pinfo

	pinfo.Name = "inputPin1"
	pinfo.Id = 1
	pinfo.InputPin = true
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	m.Pins["inputPin1"] = pinfo

	pinfo.Name = "outputPin0"
	pinfo.Id = 2
	pinfo.InputPin = false
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	pinfo.CreateChannel()

	m.Pins["outputPin0"] = pinfo

	pinfo.Name = "outputPin1"
	pinfo.Id = 3
	pinfo.InputPin = false
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	pinfo.CreateChannel()

	m.Pins["outputPin1"] = pinfo

	/// something try ends

}
开发者ID:postfix,项目名称:gocomm,代码行数:48,代码来源:ofdm.go


示例4: InitPins

func (m *BitSource) 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 := [1]string{"bitOut"}
	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

	}

	testch := gocomm.NewBitChannel()
	var dummypin chipset.PinInfo
	/// All output pins
	dummypin = m.Pins["bitOut"]
	dummypin.Id = 0
	dummypin.SourceName = "genbit"
	dummypin.Desc = "Output Pin where bits are written"
	dummypin.DataType = reflect.TypeOf(testch)
	dummypin.CreateBitChannel()
	m.Pins["bitOut"] = dummypin

}
开发者ID:postfix,项目名称:gocomm,代码行数:37,代码来源:bitsource.go


示例5: InitPins

func (m *MPChannel) InitPins() {
	totalpins := m.InPinCount() + m.OutPinCount()
	m.Pins = make(map[string]chipset.PinInfo, totalpins)
	m.PinNames = make(map[int]string, totalpins)
	strlist := [6]string{"inputPin1", "outputPin0", "outputPin1", "inputPin0", "inputPin2", "outputPin2"}
	for cnt := 0; cnt < len(strlist); cnt++ {
		m.PinNames[cnt] = strlist[cnt]
	}

	/// something try begins
	var pinfo chipset.PinInfo

	pinfo.Name = "inputPin0"
	pinfo.Id = 0
	pinfo.InputPin = true
	pinfo.DataType = reflect.TypeOf((*gocomm.FloatChannel)(nil)).Elem()

	m.Pins["inputPin0"] = pinfo

	pinfo.Name = "inputPin1"
	pinfo.Id = 1
	pinfo.InputPin = true
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	m.Pins["inputPin1"] = pinfo

	pinfo.Name = "outputPin0"
	pinfo.Id = 2
	pinfo.InputPin = false
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128Channel)(nil)).Elem()

	pinfo.CreateChannel()

	m.Pins["outputPin0"] = pinfo

	pinfo.Name = "outputPin1"
	pinfo.Id = 3
	pinfo.InputPin = false
	pinfo.DataType = reflect.TypeOf((*gocomm.FloatChannel)(nil)).Elem()
	pinfo.CreateChannel()

	m.Pins["outputPin1"] = pinfo

	pinfo.Name = "inputPin2"
	pinfo.Id = 4
	pinfo.InputPin = true
	pinfo.DataType = reflect.TypeOf((*gocomm.FloatChannel)(nil)).Elem()

	pinfo.CreateChannel()

	m.Pins["inputPin2"] = pinfo

	pinfo.Name = "outputPin2"
	pinfo.Id = 5
	pinfo.InputPin = false
	pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()

	pinfo.CreateChannel()

	m.Pins["outputPin2"] = pinfo

	// pinfo.Name = "coeffPin"
	// pinfo.Id = 6
	// pinfo.InputPin = false
	// pinfo.DataType = reflect.TypeOf((*gocomm.Complex128AChannel)(nil)).Elem()
	// pinfo.Channel = make(gocomm.Complex128AChannel, 20) /// Last 20 samples will be queued

	// m.Pins["coeffPin"] = pinfo

	/// something try ends

}
开发者ID:postfix,项目名称:gocomm,代码行数:72,代码来源:mpchannel.go


示例6: 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

}
开发者ID:postfix,项目名称:gocomm,代码行数:43,代码来源:awgn.go


示例7: InitPins

func (m *Modem) 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{"bitIn", "symbolIn", "symbolOut", "bitOut"}
	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]
		pinfo.Id = i
		if i < m.InPinCount() {
			pinfo.InputPin = true
		} else {
			pinfo.InputPin = false
		}
		m.Pins[m.PinNames[i]] = pinfo

	}

	// testcch := gocomm.NewComplex128Channel()
	// testch := gocomm.NewBitChannel()

	var dummypin chipset.PinInfo

	/// all Input Pins
	dummypin = m.Pins["symbolIn"]
	dummypin.Id = 1
	// dummypin.DataType = reflect.TypeOf(testcch)
	dummypin.DataType = reflect.TypeOf((*gocomm.Complex128Channel)(nil)).Elem()

	m.Pins["symbolIn"] = dummypin

	dummypin = m.Pins["bitIn"]
	dummypin.Id = 0
	// dummypin.DataType = reflect.TypeOf(testch)
	dummypin.DataType = reflect.TypeOf((*gocomm.BitChannel)(nil)).Elem()
	m.Pins["bitIn"] = dummypin

	///
	/// All output pins
	dummypin = m.Pins["symbolOut"]
	dummypin.Id = 2
	// dummypin.DataType = reflect.TypeOf(testcch)
	dummypin.DataType = reflect.TypeOf((*gocomm.Complex128Channel)(nil)).Elem()
	dummypin.CreateChannel()
	dummypin.SourceName = "modulate"
	m.Pins["symbolOut"] = dummypin

	// fmt.Printf("\n %v : PinO : %v , Channel : %v", m.modetype(), m.Pins["symbolOut"].Name, m.Pins["symbolOut"].Channel)
	dummypin = m.Pins["bitOut"]
	dummypin.Id = 3
	dummypin.SourceName = "demodulate"
	dummypin.DataType = reflect.TypeOf((*gocomm.Complex128Channel)(nil)).Elem()

	// dummypin.DataType = reflect.TypeOf(testcch)
	// dummypin.CreateComplex128Channel()
	dummypin.CreateChannel()

	m.Pins["bitOut"] = dummypin
	// fmt.Printf("\n %v : PinO : %v , Channel : %v", m.modetype(), m.Pins["bitOut"].Name, m.Pins["bitOut"].Channel)

}
开发者ID:postfix,项目名称:gocomm,代码行数:69,代码来源:modem.go



注:本文中的github.com/wiless/gocomm/chipset.PinInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang vlib.VectorC类代码示例发布时间:2022-05-28
下一篇:
Golang chipset.ModuleInfo类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap