frame

package
v0.0.0-...-6529675 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Data            []int
	SignalFrequency int
	Wave            []float64
	HeaderPacket    bool
}

Frame is the base structure for a transaction frame

func NewFrame

func NewFrame(data ...int) *Frame

NewFrame creates a new frame

func NewHeaderFrames

func NewHeaderFrames(options *GenerationOptions) []*Frame

NewHeaderFrames creates the header frames

func (*Frame) Generate

func (f *Frame) Generate(options *GenerationOptions, startIndex int64) int64

Generate creates the wave

type GenerationOptions

type GenerationOptions struct {
	CarrierCount   int
	CarrierSpacing float64
	Duration       int64
	SampleRate     int64
	BaseFrequency  int

	NoiseLevel int
}

GenerationOptions is the base option

func (*GenerationOptions) Carriers

func (o *GenerationOptions) Carriers() []float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL