当前位置: 首页>>代码示例>>Golang>>正文


Golang SComplex128AObj.Message方法代码示例

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


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

示例1: Fft

func (m *OFDM) Fft(inputPin1 gocomm.Complex128AChannel) {
	/// Read your data from Input channel(s) [inputPin1]
	/// And write it to OutputChannels  [outputPin1]

	outputPin1 := m.Pins["outputPin1"].Channel.(gocomm.Complex128AChannel)
	iters := 1
	for i := 0; i < iters; i++ {
		chData := <-inputPin1
		iters = chData.MaxExpected
		tsamples := chData.Ch
		/// Do process here with chData

		var outData gocomm.SComplex128AObj
		outData.Ch = dsp.ExtFFT_C(tsamples, m.NPoint)

		/// copy meta
		outData.MaxExpected = chData.MaxExpected
		outData.Ts = chData.Ts
		outData.TimeStamp = chData.TimeStamp
		outData.Message = chData.Message

		outputPin1 <- outData
		iters = chData.MaxExpected
	}

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

示例2: Channel

func (m *MPChannel) Channel(inputPin0 gocomm.Complex128Channel) {
	/// Read your data from Input channel(s) [inputPin0]
	/// And write it to OutputChannels  [outputPin0]

	outputPin0 := chipset.ToComplexCH(m.Pins["outputPin0"])
	var IdealChObj gocomm.SComplex128AObj

	iters := 1
	for i := 0; i < iters; i++ {
		chData := <-inputPin0
		iters = chData.MaxExpected
		/// Do process here with chData

		outData := m.ChannelFn(chData)
		/// coeff attempt to send
		IdealChObj.Ch = m.Coeff
		IdealChObj.Ts = chData.Ts
		IdealChObj.TimeStamp = chData.TimeStamp
		IdealChObj.Message = chData.Message
		IdealChObj.MaxExpected = chData.MaxExpected
		//fmt.Printf("\n Want to broadcast %#v to %#v", IdealChObj, coeffPin)
		///

		// select {
		// case coeffPin <- IdealChObj:
		// 	// fmt.Printf("\n%f : sent message %v", IdealChObj.TimeStamp, IdealChObj.Ch)
		// default:
		// 	// fmt.Printf("\n%f: no message sent", IdealChObj.TimeStamp)
		// }
		outputPin0 <- outData
	}

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


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