datarate

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DR

type DR struct {
	*ttnpb.DataRate
}

DR encodes a LoRa data rate or an FSK data rate, and implements marshalling and unmarshalling between JSON.

func ParseLRFHSS added in v3.14.0

func ParseLRFHSS(dr string) (DR, error)

ParseLRFHSS converts a string of format "MxxCWxxx" to a LRFHSSDataRate.

func ParseLoRa

func ParseLoRa(dr string) (DR, error)

ParseLoRa converts a string of format "SFxxBWxxx" to a LoRaDataRate.

func (DR) MarshalJSON

func (dr DR) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (DR) String

func (dr DR) String() string

String implements the Stringer interface.

func (*DR) UnmarshalJSON

func (dr *DR) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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