radiofreq

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BandMap = &Bands{
	bands: []Band{
		{
			Spec:      S_5G,
			Shortname: "n71",
			Frequency: 0.6,
		},
		{
			Spec:      S_5G,
			Shortname: "n41",
			Frequency: 2.5,
		},
		{
			Spec:      S_5G,
			Shortname: "n2",
			Frequency: 3.4,
		},
		{
			Spec:      S_5G,
			Shortname: "n77",
			Frequency: 3.7,
		},
		{
			Spec:      S_5G,
			Shortname: "n258",
			Frequency: 24,
		},
		{
			Spec:      S_5G,
			Shortname: "n261",
			Frequency: 39,
		},
		{
			Spec:      S_5G,
			Shortname: "n262",
			Frequency: 47,
		},
		{
			Spec:      S_LTE,
			Shortname: "B71",
			Frequency: 0.6,
		},
		{
			Spec:      S_LTE,
			Shortname: "B12",
			Frequency: 0.7,
		},
		{
			Spec:      S_LTE,
			Shortname: "B5",
			Frequency: 0.85,
		},
		{
			Spec:      S_LTE,
			Shortname: "B4",
			Frequency: 1.7,
		},
		{
			Spec:      S_LTE,
			Shortname: "B66",
			Frequency: 2.1,
		},
		{
			Spec:      S_LTE,
			Shortname: "B2",
			Frequency: 1.9,
		},
	},
}

BandMap is a mapped list of band names and their associated Spectrum and Frequency in GHz

Functions

This section is empty.

Types

type Band

type Band struct {
	Spec      Spectrum
	Shortname string
	Frequency float64
}

Band defines a single band within a spectrum

func (*Band) Spectrum

func (b *Band) Spectrum() string

Spectrum returns a given Band's spectrum name

type Bands

type Bands struct {
	// contains filtered or unexported fields
}

Bands contains a list of bands the software may encounter

func (*Bands) BandFromShortname

func (b *Bands) BandFromShortname(shortname string) *Band

BandFromShortname when given an appropriate shortname will return the band object associated with it, else nil

func (*Bands) FrequencyFromShortname

func (b *Bands) FrequencyFromShortname(shortname string) float64

FrequencyFromShortname when given an appropriate shortname will return the associated freuency in GHz, else 0

func (*Bands) Map

func (b *Bands) Map() map[string]float64

Map returns a map[string]float64 of all bands

type Frequency

type Frequency float64

type Spectrum

type Spectrum int
const (
	S_5G Spectrum = iota
	S_LTE
)

func (Spectrum) String

func (s Spectrum) String() string

Jump to

Keyboard shortcuts

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