types

package
v0.0.0-...-9a529fd Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ABPEUIPrefix = []byte{0, 0, 0, 0}

ABPEUIPrefix is the prefix denoting a prefixed dev address

Functions

This section is empty.

Types

type AES128Key

type AES128Key [16]byte

AES128Key is an 128 bit AES key.

func ParseAES128Key

func ParseAES128Key(input string) (key AES128Key, err error)

ParseAES128Key parses a 128-bit hex-encoded string to an AES128Key

func (AES128Key) Bytes

func (key AES128Key) Bytes() []byte

Bytes returns the AES128Key as a byte slice

func (AES128Key) GoString

func (key AES128Key) GoString() string

GoString implements the GoStringer interface.

func (AES128Key) IsEmpty

func (key AES128Key) IsEmpty() bool

func (AES128Key) Marshal

func (key AES128Key) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (AES128Key) MarshalBinary

func (key AES128Key) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (AES128Key) MarshalText

func (key AES128Key) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (AES128Key) String

func (key AES128Key) String() string

String implements the Stringer interface.

func (*AES128Key) Unmarshal

func (key *AES128Key) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*AES128Key) UnmarshalBinary

func (key *AES128Key) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*AES128Key) UnmarshalText

func (key *AES128Key) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type AppEUI

type AppEUI EUI64

AppEUI is a unique identifier for applications.

func ParseAppEUI

func ParseAppEUI(input string) (eui AppEUI, err error)

ParseAppEUI parses a 64-bit hex-encoded string to an AppEUI

func (AppEUI) Bytes

func (eui AppEUI) Bytes() []byte

Bytes returns the AppEUI as a byte slice

func (AppEUI) GoString

func (eui AppEUI) GoString() string

GoString implements the GoStringer interface.

func (AppEUI) IsEmpty

func (eui AppEUI) IsEmpty() bool

func (AppEUI) Marshal

func (eui AppEUI) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (AppEUI) MarshalBinary

func (eui AppEUI) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (AppEUI) MarshalText

func (eui AppEUI) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (AppEUI) String

func (eui AppEUI) String() string

String implements the Stringer interface.

func (*AppEUI) Unmarshal

func (eui *AppEUI) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*AppEUI) UnmarshalBinary

func (eui *AppEUI) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*AppEUI) UnmarshalText

func (eui *AppEUI) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type AppKey

type AppKey AES128Key

AppKey (Application Key) is used for LoRaWAN OTAA.

func ParseAppKey

func ParseAppKey(input string) (key AppKey, err error)

ParseAppKey parses a 64-bit hex-encoded string to an AppKey

func (AppKey) Bytes

func (key AppKey) Bytes() []byte

Bytes returns the AppKey as a byte slice

func (AppKey) GoString

func (key AppKey) GoString() string

GoString implements the GoStringer interface.

func (AppKey) IsEmpty

func (key AppKey) IsEmpty() bool

func (AppKey) Marshal

func (key AppKey) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (AppKey) MarshalBinary

func (key AppKey) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (AppKey) MarshalText

func (key AppKey) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (AppKey) String

func (key AppKey) String() string

func (*AppKey) Unmarshal

func (key *AppKey) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*AppKey) UnmarshalBinary

func (key *AppKey) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*AppKey) UnmarshalText

func (key *AppKey) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type AppSKey

type AppSKey AES128Key

AppSKey (Application Session Key) is used for LoRaWAN payload encryption.

func ParseAppSKey

func ParseAppSKey(input string) (key AppSKey, err error)

ParseAppSKey parses a 64-bit hex-encoded string to an AppSKey

func (AppSKey) Bytes

func (key AppSKey) Bytes() []byte

Bytes returns the AppSKey as a byte slice

func (AppSKey) GoString

func (key AppSKey) GoString() string

GoString implements the GoStringer interface.

func (AppSKey) IsEmpty

func (key AppSKey) IsEmpty() bool

func (AppSKey) Marshal

func (key AppSKey) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (AppSKey) MarshalBinary

func (key AppSKey) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (AppSKey) MarshalText

func (key AppSKey) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (AppSKey) String

func (key AppSKey) String() string

func (*AppSKey) Unmarshal

func (key *AppSKey) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*AppSKey) UnmarshalBinary

func (key *AppSKey) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*AppSKey) UnmarshalText

func (key *AppSKey) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type DevAddr

type DevAddr [4]byte

DevAddr is a non-unique address for LoRaWAN devices.

func ParseDevAddr

func ParseDevAddr(input string) (addr DevAddr, err error)

ParseDevAddr parses a 32-bit hex-encoded string to a DevAddr

func (DevAddr) Bytes

func (addr DevAddr) Bytes() []byte

Bytes returns the DevAddr as a byte slice

func (DevAddr) GoString

func (addr DevAddr) GoString() string

GoString implements the GoStringer interface.

func (DevAddr) IsEmpty

func (addr DevAddr) IsEmpty() bool

func (DevAddr) Marshal

func (addr DevAddr) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (DevAddr) MarshalBinary

func (addr DevAddr) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (DevAddr) MarshalText

func (addr DevAddr) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (DevAddr) String

func (addr DevAddr) String() string

String implements the Stringer interface.

func (DevAddr) ToEUI

func (addr DevAddr) ToEUI() DevEUI

func (*DevAddr) Unmarshal

func (addr *DevAddr) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*DevAddr) UnmarshalBinary

func (addr *DevAddr) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*DevAddr) UnmarshalText

func (addr *DevAddr) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type DevEUI

type DevEUI EUI64

DevEUI is a unique identifier for devices.

func ParseDevEUI

func ParseDevEUI(input string) (eui DevEUI, err error)

ParseDevEUI parses a 64-bit hex-encoded string to an DevEUI

func (DevEUI) Bytes

func (eui DevEUI) Bytes() []byte

Bytes returns the DevEUI as a byte slice

func (DevEUI) GoString

func (eui DevEUI) GoString() string

GoString implements the GoStringer interface.

func (DevEUI) IsEmpty

func (eui DevEUI) IsEmpty() bool

func (DevEUI) Marshal

func (eui DevEUI) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (DevEUI) MarshalBinary

func (eui DevEUI) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (DevEUI) MarshalText

func (eui DevEUI) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (DevEUI) String

func (eui DevEUI) String() string

String implements the Stringer interface.

func (*DevEUI) Unmarshal

func (eui *DevEUI) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*DevEUI) UnmarshalBinary

func (eui *DevEUI) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*DevEUI) UnmarshalText

func (eui *DevEUI) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type DeviceType

type DeviceType byte

DeviceType is the type of a LoRaWAN device.

const (
	// ABP is a LoRaWAN device that is activated by personalization.
	ABP DeviceType = iota
	// OTAA is an over-the-air activated LoRaWAN device.
	OTAA
)

func ParseDeviceType

func ParseDeviceType(input string) (devType DeviceType, err error)

ParseDeviceType parses a string to a DeviceType.

func (DeviceType) GoString

func (devType DeviceType) GoString() string

GoString implements the GoStringer interface.

func (DeviceType) Marshal

func (devType DeviceType) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (DeviceType) MarshalBinary

func (devType DeviceType) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (DeviceType) MarshalText

func (devType DeviceType) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (DeviceType) String

func (devType DeviceType) String() string

String implements the Stringer interface.

func (*DeviceType) Unmarshal

func (devType *DeviceType) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*DeviceType) UnmarshalBinary

func (devType *DeviceType) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*DeviceType) UnmarshalText

func (devType *DeviceType) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type EUI64

type EUI64 [8]byte

EUI64 is used for AppEUIs and DevEUIs.

func ParseEUI64

func ParseEUI64(input string) (eui EUI64, err error)

ParseEUI64 parses a 64-bit hex-encoded string to an EUI64.

func (EUI64) Bytes

func (eui EUI64) Bytes() []byte

Bytes returns the EUI64 as a byte slice

func (EUI64) GoString

func (eui EUI64) GoString() string

GoString implements the GoStringer interface.

func (EUI64) IsEmpty

func (eui EUI64) IsEmpty() bool

func (EUI64) Marshal

func (eui EUI64) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (EUI64) MarshalBinary

func (eui EUI64) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (EUI64) MarshalText

func (eui EUI64) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (EUI64) String

func (eui EUI64) String() string

func (*EUI64) Unmarshal

func (eui *EUI64) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*EUI64) UnmarshalBinary

func (eui *EUI64) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*EUI64) UnmarshalText

func (eui *EUI64) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type GatewayEUI

type GatewayEUI EUI64

GatewayEUI is a unique identifier for devices.

func ParseGatewayEUI

func ParseGatewayEUI(input string) (eui GatewayEUI, err error)

ParseGatewayEUI parses a 64-bit hex-encoded string to an GatewayEUI

func (GatewayEUI) Bytes

func (eui GatewayEUI) Bytes() []byte

Bytes returns the GatewayEUI as a byte slice

func (GatewayEUI) GoString

func (eui GatewayEUI) GoString() string

GoString implements the GoStringer interface.

func (GatewayEUI) IsEmpty

func (eui GatewayEUI) IsEmpty() bool

func (GatewayEUI) Marshal

func (eui GatewayEUI) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (GatewayEUI) MarshalBinary

func (eui GatewayEUI) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (GatewayEUI) MarshalText

func (eui GatewayEUI) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (GatewayEUI) String

func (eui GatewayEUI) String() string

String implements the Stringer interface.

func (*GatewayEUI) Unmarshal

func (eui *GatewayEUI) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*GatewayEUI) UnmarshalBinary

func (eui *GatewayEUI) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*GatewayEUI) UnmarshalText

func (eui *GatewayEUI) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

type NwkSKey

type NwkSKey AES128Key

NwkSKey (Network Session Key) is used for LoRaWAN MIC calculation.

func ParseNwkSKey

func ParseNwkSKey(input string) (key NwkSKey, err error)

ParseNwkSKey parses a 64-bit hex-encoded string to an NwkSKey

func (NwkSKey) Bytes

func (key NwkSKey) Bytes() []byte

Bytes returns the NwkSKey as a byte slice

func (NwkSKey) GoString

func (key NwkSKey) GoString() string

GoString implements the GoStringer interface.

func (NwkSKey) IsEmpty

func (key NwkSKey) IsEmpty() bool

func (NwkSKey) Marshal

func (key NwkSKey) Marshal() ([]byte, error)

Marshal implements the Marshaler interface.

func (NwkSKey) MarshalBinary

func (key NwkSKey) MarshalBinary() ([]byte, error)

MarshalBinary implements the BinaryMarshaler interface.

func (NwkSKey) MarshalText

func (key NwkSKey) MarshalText() ([]byte, error)

MarshalText implements the TextMarshaler interface.

func (NwkSKey) String

func (key NwkSKey) String() string

String implements the Stringer interface.

func (*NwkSKey) Unmarshal

func (key *NwkSKey) Unmarshal(data []byte) error

Unmarshal implements the Unmarshaler interface.

func (*NwkSKey) UnmarshalBinary

func (key *NwkSKey) UnmarshalBinary(data []byte) error

UnmarshalBinary implements the BinaryUnmarshaler interface.

func (*NwkSKey) UnmarshalText

func (key *NwkSKey) UnmarshalText(data []byte) error

UnmarshalText implements the TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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