lorawan

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package lorawan provides types for working with LoRaWAN payloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	DecodedPayload json.RawMessage `json:"decodedPayload"`
	Device         Device          `json:"device"`
	ID             string          `json:"id"`
	Metadata       Metadata        `json:"metadata"`
	Payload        string          `json:"payload"`
	Timestamp      int64           `json:"timestamp"`
	Via            []Via           `json:"via"`
}

Data represents the data field of a lorawan payload

type Device

type Device struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Nonce    int    `json:"nonce"`
	Protocol string `json:"protocol"`
}

type GWMetadata

type GWMetadata struct {
	GatewayID   string `json:"gatewayId"`
	GatewayName string `json:"gatewayName"`
}

type Location

type Location struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Ref       string  `json:"ref"`
	RSSI      int     `json:"rssi"`
	SNR       float64 `json:"snr"`
}

type Metadata

type Metadata struct {
	AppEUI      string `json:"app_eui"`
	DCBalance   int    `json:"dc_balance"`
	DevAddr     string `json:"devAddr"`
	FPort       string `json:"fPort"`
	FCnt        string `json:"fcnt"`
	PayloadSize string `json:"payload_size"`
}

type Via

type Via struct {
	Channel   int        `json:"channel"`
	Frequency float64    `json:"frequency"`
	ID        string     `json:"id"`
	Location  Location   `json:"location"`
	Metadata  GWMetadata `json:"metadata"`
	Network   string     `json:"network"`
	Protocol  string     `json:"protocol"`
	Spreading string     `json:"spreading"`
	Status    string     `json:"status"`
	Timestamp int64      `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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