regional_parameters

package
v0.0.0-...-7a68c68 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LenChMask  = 16
	Code_Eu868 = iota
	Code_Us915
	Code_Cn779
	Code_Eu433
	Code_Au915
	Code_Cn470
	Code_As923
	Code_Kr920
	Code_In865
	Code_Ru864
)
View Source
const (
	ChMaskCntlChannel = iota
	ChMaskCntlGroup
)

Variables

This section is empty.

Functions

func DecrementDataRate

func DecrementDataRate(region Region, datarate uint8) uint8

func GetInfo

func GetInfo(Code int) models.Informations

Types

type As923

type As923 struct {
	Info models.Parameters
}

func (*As923) DataRateSupported

func (as *As923) DataRateSupported(datarate uint8) error

func (*As923) FrequencySupported

func (as *As923) FrequencySupported(frequency uint32) error

func (*As923) GetChannels

func (as *As923) GetChannels() []c.Channel

func (*As923) GetCodR

func (as *As923) GetCodR(datarate uint8) string

func (*As923) GetCode

func (as *As923) GetCode() int

func (*As923) GetDataRate

func (as *As923) GetDataRate(datarate uint8) (string, string)

func (*As923) GetDataRateBeacon

func (as *As923) GetDataRateBeacon() uint8

func (*As923) GetFrequencyBeacon

func (as *As923) GetFrequencyBeacon() uint32

func (*As923) GetMaxDataRate

func (as *As923) GetMaxDataRate() uint8

func (*As923) GetMinDataRate

func (as *As923) GetMinDataRate() uint8

func (*As923) GetNbReservedChannels

func (as *As923) GetNbReservedChannels() int

func (*As923) GetParameters

func (as *As923) GetParameters() models.Parameters

func (*As923) GetPayloadSize

func (as *As923) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*As923) LinkAdrReq

func (as *As923) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*As923) RX1DROffsetSupported

func (as *As923) RX1DROffsetSupported(offset uint8) error

func (*As923) Setup

func (as *As923) Setup()

manca un setup

func (*As923) SetupInfoRequest

func (as *As923) SetupInfoRequest(indexChannel int) (string, int)

func (*As923) SetupRX1

func (as *As923) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Au915

type Au915 struct {
	Info models.Parameters
}

func (*Au915) DataRateSupported

func (au *Au915) DataRateSupported(datarate uint8) error

func (*Au915) FrequencySupported

func (au *Au915) FrequencySupported(frequency uint32) error

func (*Au915) GetChannels

func (au *Au915) GetChannels() []c.Channel

func (*Au915) GetCodR

func (au *Au915) GetCodR(datarate uint8) string

func (*Au915) GetCode

func (au *Au915) GetCode() int

func (*Au915) GetDataRate

func (au *Au915) GetDataRate(datarate uint8) (string, string)

func (*Au915) GetDataRateBeacon

func (au *Au915) GetDataRateBeacon() uint8

func (*Au915) GetFrequencyBeacon

func (au *Au915) GetFrequencyBeacon() uint32

func (*Au915) GetMaxDataRate

func (au *Au915) GetMaxDataRate() uint8

func (*Au915) GetMinDataRate

func (au *Au915) GetMinDataRate() uint8

func (*Au915) GetNbReservedChannels

func (au *Au915) GetNbReservedChannels() int

func (*Au915) GetParameters

func (au *Au915) GetParameters() models.Parameters

func (*Au915) GetPayloadSize

func (au *Au915) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Au915) LinkAdrReq

func (au *Au915) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Au915) RX1DROffsetSupported

func (au *Au915) RX1DROffsetSupported(offset uint8) error

func (*Au915) Setup

func (au *Au915) Setup()

manca un setup

func (*Au915) SetupInfoRequest

func (au *Au915) SetupInfoRequest(indexChannel int) (string, int)

func (*Au915) SetupRX1

func (au *Au915) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Cn470

type Cn470 struct {
	Info models.Parameters
}

func (*Cn470) DataRateSupported

func (cn *Cn470) DataRateSupported(datarate uint8) error

func (*Cn470) FrequencySupported

func (cn *Cn470) FrequencySupported(frequency uint32) error

func (*Cn470) GetChannels

func (cn *Cn470) GetChannels() []c.Channel

func (*Cn470) GetCodR

func (cn *Cn470) GetCodR(datarate uint8) string

func (*Cn470) GetCode

func (cn *Cn470) GetCode() int

func (*Cn470) GetDataRate

func (cn *Cn470) GetDataRate(datarate uint8) (string, string)

func (*Cn470) GetDataRateBeacon

func (cn *Cn470) GetDataRateBeacon() uint8

func (*Cn470) GetFrequencyBeacon

func (cn *Cn470) GetFrequencyBeacon() uint32

func (*Cn470) GetMaxDataRate

func (cn *Cn470) GetMaxDataRate() uint8

func (*Cn470) GetMinDataRate

func (cn *Cn470) GetMinDataRate() uint8

func (*Cn470) GetNbReservedChannels

func (cn *Cn470) GetNbReservedChannels() int

func (*Cn470) GetParameters

func (cn *Cn470) GetParameters() models.Parameters

func (*Cn470) GetPayloadSize

func (cn *Cn470) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Cn470) LinkAdrReq

func (cn *Cn470) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Cn470) RX1DROffsetSupported

func (cn *Cn470) RX1DROffsetSupported(offset uint8) error

func (*Cn470) Setup

func (cn *Cn470) Setup()

manca un setup

func (*Cn470) SetupInfoRequest

func (cn *Cn470) SetupInfoRequest(indexChannel int) (string, int)

func (*Cn470) SetupRX1

func (cn *Cn470) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Cn779

type Cn779 struct {
	Info models.Parameters
}

func (*Cn779) DataRateSupported

func (cn *Cn779) DataRateSupported(datarate uint8) error

func (*Cn779) FrequencySupported

func (cn *Cn779) FrequencySupported(frequency uint32) error

func (*Cn779) GetChannels

func (cn *Cn779) GetChannels() []c.Channel

func (*Cn779) GetCodR

func (cn *Cn779) GetCodR(datarate uint8) string

func (*Cn779) GetCode

func (cn *Cn779) GetCode() int

func (*Cn779) GetDataRate

func (cn *Cn779) GetDataRate(datarate uint8) (string, string)

func (*Cn779) GetDataRateBeacon

func (cn *Cn779) GetDataRateBeacon() uint8

func (*Cn779) GetFrequencyBeacon

func (cn *Cn779) GetFrequencyBeacon() uint32

func (*Cn779) GetMaxDataRate

func (cn *Cn779) GetMaxDataRate() uint8

func (*Cn779) GetMinDataRate

func (cn *Cn779) GetMinDataRate() uint8

func (*Cn779) GetNbReservedChannels

func (cn *Cn779) GetNbReservedChannels() int

func (*Cn779) GetParameters

func (cn *Cn779) GetParameters() models.Parameters

func (*Cn779) GetPayloadSize

func (cn *Cn779) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Cn779) LinkAdrReq

func (cn *Cn779) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Cn779) RX1DROffsetSupported

func (cn *Cn779) RX1DROffsetSupported(offset uint8) error

func (*Cn779) Setup

func (cn *Cn779) Setup()

manca un setup

func (*Cn779) SetupInfoRequest

func (cn *Cn779) SetupInfoRequest(indexChannel int) (string, int)

func (*Cn779) SetupRX1

func (cn *Cn779) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Eu433

type Eu433 struct {
	Info models.Parameters
}

func (*Eu433) DataRateSupported

func (eu *Eu433) DataRateSupported(datarate uint8) error

func (*Eu433) FrequencySupported

func (eu *Eu433) FrequencySupported(frequency uint32) error

func (*Eu433) GetChannels

func (eu *Eu433) GetChannels() []c.Channel

func (*Eu433) GetCodR

func (eu *Eu433) GetCodR(datarate uint8) string

func (*Eu433) GetCode

func (eu *Eu433) GetCode() int

func (*Eu433) GetDataRate

func (eu *Eu433) GetDataRate(datarate uint8) (string, string)

func (*Eu433) GetDataRateBeacon

func (eu *Eu433) GetDataRateBeacon() uint8

func (*Eu433) GetFrequencyBeacon

func (eu *Eu433) GetFrequencyBeacon() uint32

func (*Eu433) GetMaxDataRate

func (eu *Eu433) GetMaxDataRate() uint8

func (*Eu433) GetMinDataRate

func (eu *Eu433) GetMinDataRate() uint8

func (*Eu433) GetNbReservedChannels

func (eu *Eu433) GetNbReservedChannels() int

func (*Eu433) GetParameters

func (eu *Eu433) GetParameters() models.Parameters

func (*Eu433) GetPayloadSize

func (eu *Eu433) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Eu433) LinkAdrReq

func (eu *Eu433) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Eu433) RX1DROffsetSupported

func (eu *Eu433) RX1DROffsetSupported(offset uint8) error

func (*Eu433) Setup

func (eu *Eu433) Setup()

manca un setup

func (*Eu433) SetupInfoRequest

func (eu *Eu433) SetupInfoRequest(indexChannel int) (string, int)

func (*Eu433) SetupRX1

func (eu *Eu433) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Eu868

type Eu868 struct {
	Info models.Parameters
}

func (*Eu868) DataRateSupported

func (eu *Eu868) DataRateSupported(datarate uint8) error

func (*Eu868) FrequencySupported

func (eu *Eu868) FrequencySupported(frequency uint32) error

func (*Eu868) GetChannels

func (eu *Eu868) GetChannels() []c.Channel

func (*Eu868) GetCodR

func (eu *Eu868) GetCodR(datarate uint8) string

func (*Eu868) GetCode

func (eu *Eu868) GetCode() int

func (*Eu868) GetDataRate

func (eu *Eu868) GetDataRate(datarate uint8) (string, string)

func (*Eu868) GetDataRateBeacon

func (eu *Eu868) GetDataRateBeacon() uint8

func (*Eu868) GetFrequencyBeacon

func (eu *Eu868) GetFrequencyBeacon() uint32

func (*Eu868) GetMaxDataRate

func (eu *Eu868) GetMaxDataRate() uint8

func (*Eu868) GetMinDataRate

func (eu *Eu868) GetMinDataRate() uint8

func (*Eu868) GetNbReservedChannels

func (eu *Eu868) GetNbReservedChannels() int

func (*Eu868) GetParameters

func (eu *Eu868) GetParameters() models.Parameters

func (*Eu868) GetPayloadSize

func (eu *Eu868) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Eu868) LinkAdrReq

func (eu *Eu868) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask,
	newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Eu868) RX1DROffsetSupported

func (eu *Eu868) RX1DROffsetSupported(offset uint8) error

func (*Eu868) Setup

func (eu *Eu868) Setup()

manca un setup

func (*Eu868) SetupInfoRequest

func (eu *Eu868) SetupInfoRequest(indexChannel int) (string, int)

func (*Eu868) SetupRX1

func (eu *Eu868) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type In865

type In865 struct {
	Info models.Parameters
}

func (*In865) DataRateSupported

func (in *In865) DataRateSupported(datarate uint8) error

func (*In865) FrequencySupported

func (in *In865) FrequencySupported(frequency uint32) error

func (*In865) GetChannels

func (in *In865) GetChannels() []c.Channel

func (*In865) GetCodR

func (in *In865) GetCodR(datarate uint8) string

func (*In865) GetCode

func (in *In865) GetCode() int

func (*In865) GetDataRate

func (in *In865) GetDataRate(datarate uint8) (string, string)

func (*In865) GetDataRateBeacon

func (in *In865) GetDataRateBeacon() uint8

func (*In865) GetFrequencyBeacon

func (in *In865) GetFrequencyBeacon() uint32

func (*In865) GetMaxDataRate

func (in *In865) GetMaxDataRate() uint8

func (*In865) GetMinDataRate

func (in *In865) GetMinDataRate() uint8

func (*In865) GetNbReservedChannels

func (in *In865) GetNbReservedChannels() int

func (*In865) GetParameters

func (in *In865) GetParameters() models.Parameters

func (*In865) GetPayloadSize

func (in *In865) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*In865) LinkAdrReq

func (in *In865) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask, newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*In865) RX1DROffsetSupported

func (in *In865) RX1DROffsetSupported(offset uint8) error

func (*In865) Setup

func (in *In865) Setup()

manca un setup

func (*In865) SetupInfoRequest

func (in *In865) SetupInfoRequest(indexChannel int) (string, int)

func (*In865) SetupRX1

func (in *In865) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Kr920

type Kr920 struct {
	Info models.Parameters
}

func (*Kr920) DataRateSupported

func (kr *Kr920) DataRateSupported(datarate uint8) error

func (*Kr920) FrequencySupported

func (kr *Kr920) FrequencySupported(frequency uint32) error

func (*Kr920) GetChannels

func (kr *Kr920) GetChannels() []c.Channel

func (*Kr920) GetCodR

func (kr *Kr920) GetCodR(datarate uint8) string

func (*Kr920) GetCode

func (kr *Kr920) GetCode() int

func (*Kr920) GetDataRate

func (kr *Kr920) GetDataRate(datarate uint8) (string, string)

func (*Kr920) GetDataRateBeacon

func (kr *Kr920) GetDataRateBeacon() uint8

func (*Kr920) GetFrequencyBeacon

func (kr *Kr920) GetFrequencyBeacon() uint32

func (*Kr920) GetMaxDataRate

func (kr *Kr920) GetMaxDataRate() uint8

func (*Kr920) GetMinDataRate

func (kr *Kr920) GetMinDataRate() uint8

func (*Kr920) GetNbReservedChannels

func (kr *Kr920) GetNbReservedChannels() int

func (*Kr920) GetParameters

func (kr *Kr920) GetParameters() models.Parameters

func (*Kr920) GetPayloadSize

func (kr *Kr920) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Kr920) LinkAdrReq

func (kr *Kr920) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask, newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Kr920) RX1DROffsetSupported

func (kr *Kr920) RX1DROffsetSupported(offset uint8) error

func (*Kr920) Setup

func (kr *Kr920) Setup()

manca un setup

func (*Kr920) SetupInfoRequest

func (kr *Kr920) SetupInfoRequest(indexChannel int) (string, int)

func (*Kr920) SetupRX1

func (kr *Kr920) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Region

type Region interface {
	Setup()
	GetDataRate(uint8) (string, string)
	FrequencySupported(uint32) error
	DataRateSupported(uint8) error
	RX1DROffsetSupported(uint8) error
	GetCode() int
	GetChannels() []c.Channel
	GetMinDataRate() uint8
	GetMaxDataRate() uint8
	GetNbReservedChannels() int
	GetFrequencyBeacon() uint32
	GetDataRateBeacon() uint8
	GetCodR(uint8) string
	SetupInfoRequest(int) (string, int)
	LinkAdrReq(uint8, lorawan.ChMask, uint8, *[]c.Channel) ([]bool, []error)
	SetupRX1(uint8, uint8, int, lorawan.DwellTime) (uint8, int)
	GetPayloadSize(uint8, lorawan.DwellTime) (int, int)
	GetParameters() models.Parameters
}

func GetRegionalParameters

func GetRegionalParameters(Code int) Region

type Ru864

type Ru864 struct {
	Info models.Parameters
}

func (*Ru864) DataRateSupported

func (ru *Ru864) DataRateSupported(datarate uint8) error

func (*Ru864) FrequencySupported

func (ru *Ru864) FrequencySupported(frequency uint32) error

func (*Ru864) GetChannels

func (ru *Ru864) GetChannels() []c.Channel

func (*Ru864) GetCodR

func (ru *Ru864) GetCodR(datarate uint8) string

func (*Ru864) GetCode

func (ru *Ru864) GetCode() int

func (*Ru864) GetDataRate

func (ru *Ru864) GetDataRate(datarate uint8) (string, string)

func (*Ru864) GetDataRateBeacon

func (ru *Ru864) GetDataRateBeacon() uint8

func (*Ru864) GetFrequencyBeacon

func (ru *Ru864) GetFrequencyBeacon() uint32

func (*Ru864) GetMaxDataRate

func (ru *Ru864) GetMaxDataRate() uint8

func (*Ru864) GetMinDataRate

func (ru *Ru864) GetMinDataRate() uint8

func (*Ru864) GetNbReservedChannels

func (ru *Ru864) GetNbReservedChannels() int

func (*Ru864) GetParameters

func (ru *Ru864) GetParameters() models.Parameters

func (*Ru864) GetPayloadSize

func (ru *Ru864) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Ru864) LinkAdrReq

func (ru *Ru864) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask, newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Ru864) RX1DROffsetSupported

func (ru *Ru864) RX1DROffsetSupported(offset uint8) error

func (*Ru864) Setup

func (ru *Ru864) Setup()

manca un setup

func (*Ru864) SetupInfoRequest

func (ru *Ru864) SetupInfoRequest(indexChannel int) (string, int)

func (*Ru864) SetupRX1

func (ru *Ru864) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

type Us915

type Us915 struct {
	Info models.Parameters
}

func (*Us915) DataRateSupported

func (us *Us915) DataRateSupported(datarate uint8) error

func (*Us915) FrequencySupported

func (us *Us915) FrequencySupported(frequency uint32) error

func (*Us915) GetChannels

func (us *Us915) GetChannels() []c.Channel

func (*Us915) GetCodR

func (us *Us915) GetCodR(datarate uint8) string

func (*Us915) GetCode

func (us *Us915) GetCode() int

func (*Us915) GetDataRate

func (us *Us915) GetDataRate(datarate uint8) (string, string)

func (*Us915) GetDataRateBeacon

func (us *Us915) GetDataRateBeacon() uint8

func (*Us915) GetFrequencyBeacon

func (us *Us915) GetFrequencyBeacon() uint32

func (*Us915) GetMaxDataRate

func (us *Us915) GetMaxDataRate() uint8

func (*Us915) GetMinDataRate

func (us *Us915) GetMinDataRate() uint8

func (*Us915) GetNbReservedChannels

func (us *Us915) GetNbReservedChannels() int

func (*Us915) GetParameters

func (us *Us915) GetParameters() models.Parameters

func (*Us915) GetPayloadSize

func (us *Us915) GetPayloadSize(datarate uint8, dTime lorawan.DwellTime) (int, int)

func (*Us915) LinkAdrReq

func (us *Us915) LinkAdrReq(ChMaskCntl uint8, ChMask lorawan.ChMask, newDataRate uint8, channels *[]c.Channel) ([]bool, []error)

func (*Us915) RX1DROffsetSupported

func (us *Us915) RX1DROffsetSupported(offset uint8) error

func (*Us915) Setup

func (us *Us915) Setup()

manca un setup

func (*Us915) SetupInfoRequest

func (us *Us915) SetupInfoRequest(indexChannel int) (string, int)

func (*Us915) SetupRX1

func (us *Us915) SetupRX1(datarate uint8, rx1offset uint8, indexChannel int, dtime lorawan.DwellTime) (uint8, int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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