band

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasSubband

func HasSubband(region string) (bool, error)

func TryFindSubband

func TryFindSubband(region string, enableChannels []int) (int, error)

Types

type Band

type Band interface {
	String() string

	GetSX130xConfig() *SX130xConfig

	GetExtraChannels() []ExtraChannel

	GetUplinkChannels() []int

	GetSubband() (int, error)

	SetSubband(int) error

	GetApiRegion() *api.GateWayRegion

	GetAdrRange() (int, int)
}

func NewWithChannel

func NewWithChannel(region string, config *SX130xConfig) (Band, error)

func NewWithSubband

func NewWithSubband(region string, config *SX130xConfig, subband int) (Band, error)

type ChanLoraFSK

type ChanLoraFSK struct {
	Enable    bool  `json:"enable" mapstructure:"enable"`
	Radio     int32 `json:"radio" mapstructure:"radio"`
	IF        int32 `json:"if" mapstructure:"if"`
	Bandwidth int32 `json:"bandwidth" mapstructure:"bandwidth"`
	Datarate  int32 `json:"datarate" mapstructure:"datarate"`
}

type ChanLoraStd

type ChanLoraStd struct {
	Enable                bool  `json:"enable" mapstructure:"enable"`
	Radio                 int32 `json:"radio" mapstructure:"radio"`
	IF                    int32 `json:"if" mapstructure:"if"`
	Bandwidth             int32 `json:"bandwidth" mapstructure:"bandwidth"`
	SpreadFactor          int32 `json:"spread_factor" mapstructure:"spread_factor"`
	ImplicitHdr           bool  `json:"implicit_hdr" mapstructure:"implicit_hdr"`
	Implicitpayloadlength int32 `json:"implicit_payload_length" mapstructure:"implicit_payload_length"`
	ImplicitcrcEn         bool  `json:"implicit_crc_en" mapstructure:"implicit_crc_en"`
	Implicitcoderate      int32 `json:"implicit_coderate" mapstructure:"implicit_coderate"`
}

type ChanMultiSF

type ChanMultiSF struct {
	Enable bool  `json:"enable" mapstructure:"enable"`
	Radio  int32 `json:"radio" mapstructure:"radio"`
	IF     int32 `json:"if" mapstructure:"if"`
}

type ChanMultiSFAll

type ChanMultiSFAll struct {
	SpreadingFactorEnable []int32 `json:"spreading_factor_enable" mapstructure:"spreading_factor_enable"`
}

type EU868

type EU868 struct {
	*SX130xConfig
}

func (*EU868) GetAdrRange added in v1.0.1

func (b *EU868) GetAdrRange() (int, int)

func (*EU868) GetApiRegion

func (b *EU868) GetApiRegion() *api.GateWayRegion

func (*EU868) GetDefaultRssiTComp

func (b *EU868) GetDefaultRssiTComp() *RssiTcomp

func (*EU868) GetDefaultTxGainLut

func (b *EU868) GetDefaultTxGainLut() *[]TxGainLutItem

func (*EU868) GetExtraChannels

func (b *EU868) GetExtraChannels() []ExtraChannel

func (*EU868) GetSX130xConfig

func (b *EU868) GetSX130xConfig() *SX130xConfig

func (*EU868) GetSubband

func (b *EU868) GetSubband() (int, error)

func (*EU868) GetUplinkChannels

func (b *EU868) GetUplinkChannels() []int

func (*EU868) SetSubband

func (b *EU868) SetSubband(id int) error

func (*EU868) String

func (b *EU868) String() string

type ExtraChannel

type ExtraChannel struct {
	Frequency int `mapstructure:"frequency" toml:"frequency"`
	MinDR     int `mapstructure:"min_dr" toml:"min_dr"`
	MaxDR     int `mapstructure:"max_dr" toml:"max_dr"`
}

type FineTimeStamp

type FineTimeStamp struct {
	Enable bool   `json:"enable"`
	Mode   string `json:"mode"`
}

type Radio0

type Radio0 struct {
	Enable          bool    `json:"enable" mapstructure:"enable"`
	Type            string  `json:"type" mapstructure:"type"`
	SingleInputMode bool    `json:"single_input_mode" mapstructure:"single_input_mode"`
	Freq            int32   `json:"freq" mapstructure:"freq"`
	RssiOffset      float32 `json:"rssi_offset" mapstructure:"rssi_offset"`
	RssiTcomp       `json:"rssi_tcomp" mapstructure:"rssi_tcomp"`
	TxEnable        bool            `json:"tx_enable" mapstructure:"tx_enable"`
	TxFreqMin       int32           `json:"tx_freq_min" mapstructure:"tx_freq_min"`
	TxFreqMax       int32           `json:"tx_freq_max" mapstructure:"tx_freq_max"`
	TxGainLut       []TxGainLutItem `json:"tx_gain_lut" mapstructure:"tx_gain_lut"`
}

type Radio1

type Radio1 struct {
	Enable          bool    `json:"enable" mapstructure:"enable"`
	Type            string  `json:"type" mapstructure:"type"`
	SingleInputMode bool    `json:"single_input_mode" mapstructure:"single_input_mode"`
	Freq            int32   `json:"freq" mapstructure:"freq"`
	RssiOffset      float32 `json:"rssi_offset" mapstructure:"rssi_offset"`
	RssiTcomp       `json:"rssi_tcomp" mapstructure:"rssi_tcomp"`
	TxEnable        bool `json:"tx_enable" mapstructure:"tx_enable"`
}

type RssiTcomp

type RssiTcomp struct {
	CoeffA float32 `json:"coeff_a" mapstructure:"coeff_a"`
	CoeffB float32 `json:"coeff_b" mapstructure:"coeff_b"`
	CoeffC float32 `json:"coeff_c" mapstructure:"coeff_c"`
	CoeffD float32 `json:"coeff_d" mapstructure:"coeff_d"`
	CoeffE float32 `json:"coeff_e" mapstructure:"coeff_e"`
}

type SX130xConfig

type SX130xConfig struct {
	ComType        string `json:"com_type"`
	ComPath        string `json:"com_path"`
	LorawanPublic  bool   `json:"lorawan_public"`
	ClkSrc         int32  `json:"clksrc"`
	AntennaGain    int32  `json:"antenna_gain"`
	FullDuplex     bool   `json:"full_duplex"`
	FineTimeStamp  `json:"fine_timestamp"`
	Radio0         `json:"radio_0" mapstructure:"radio_0"`
	Radio1         `json:"radio_1" mapstructure:"radio_1"`
	ChanMultiSFAll ChanMultiSFAll `json:"chan_multiSF_All" mapstructure:"chan_multiSF_All"`
	ChanMultiSF0   ChanMultiSF    `json:"chan_multiSF_0" mapstructure:"chan_multiSF_0"`
	ChanMultiSF1   ChanMultiSF    `json:"chan_multiSF_1" mapstructure:"chan_multiSF_1"`
	ChanMultiSF2   ChanMultiSF    `json:"chan_multiSF_2" mapstructure:"chan_multiSF_2"`
	ChanMultiSF3   ChanMultiSF    `json:"chan_multiSF_3" mapstructure:"chan_multiSF_3"`
	ChanMultiSF4   ChanMultiSF    `json:"chan_multiSF_4" mapstructure:"chan_multiSF_4"`
	ChanMultiSF5   ChanMultiSF    `json:"chan_multiSF_5" mapstructure:"chan_multiSF_5"`
	ChanMultiSF6   ChanMultiSF    `json:"chan_multiSF_6" mapstructure:"chan_multiSF_6"`
	ChanMultiSF7   ChanMultiSF    `json:"chan_multiSF_7" mapstructure:"chan_multiSF_7"`
	ChanLoraStd    `json:"chan_Lora_std" mapstructure:"chan_Lora_std"`
	ChanLoraFSK    `json:"chan_FSK" mapstructure:"chan_FSK"`
}

func SetChannel

func SetChannel(c *SX130xConfig, a *api.EU868Config) *SX130xConfig

func (*SX130xConfig) ApiRegion

func (c *SX130xConfig) ApiRegion() *api.EU868Config

type TxGainLutItem

type TxGainLutItem struct {
	RFPower int `json:"rf_power" mapstructure:"rf_power"`
	PaGain  int `json:"pa_gain" mapstructure:"pa_gain"`
	PwrIdx  int `json:"pwr_idx" mapstructure:"pwr_idx"`
}

func NewTxGainLutItem

func NewTxGainLutItem(a *api.TxGainLutItem) *TxGainLutItem

type US915

type US915 struct {
	*SX130xConfig
	// contains filtered or unexported fields
}

func (*US915) GetAdrRange added in v1.0.1

func (b *US915) GetAdrRange() (int, int)

func (*US915) GetApiRegion

func (b *US915) GetApiRegion() *api.GateWayRegion

func (*US915) GetDefaultRssiTComp

func (b *US915) GetDefaultRssiTComp() *RssiTcomp

func (*US915) GetDefaultTxGainLut

func (b *US915) GetDefaultTxGainLut() *[]TxGainLutItem

func (*US915) GetExtraChannels

func (b *US915) GetExtraChannels() []ExtraChannel

func (*US915) GetSX130xConfig

func (b *US915) GetSX130xConfig() *SX130xConfig

func (*US915) GetSubband

func (b *US915) GetSubband() (int, error)

func (*US915) GetUplinkChannels

func (b *US915) GetUplinkChannels() []int

func (*US915) SetSubband

func (b *US915) SetSubband(id int) error

func (*US915) String

func (b *US915) String() string

Jump to

Keyboard shortcuts

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