loracloudgeolocationv3

package
v3.11.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const PackageName = "lora-cloud-geolocation-v3"

PackageName defines the package name.

Variables

This section is empty.

Functions

func New

New instantiates the LoRa Cloud Geolocation package.

Types

type Data

type Data struct {
	// Query is the query type used by the package.
	Query QueryType
	// ServerURL represents the remote server to which the GLS queries are sent.
	ServerURL *url.URL
	// Token is the API token to be used when comunicating with the GLS server.
	Token string
}

Data contains the package configuration.

func (*Data) FromStruct

func (d *Data) FromStruct(st *types.Struct) error

FromStruct deserializes the configuration from *types.Struct.

func (*Data) Struct

func (d *Data) Struct() *types.Struct

Struct serializes the configuration to *types.Struct.

type GeolocationPackage

type GeolocationPackage struct {
	// contains filtered or unexported fields
}

GeolocationPackage is the LoRa Cloud Geolocation application package.

TODO: Once https://github.com/TheThingsNetwork/lorawan-stack/issues/2533 is merged, remove the custom client usage.

func (*GeolocationPackage) HandleUp

HandleUp implements packages.ApplicationPackageHandler.

func (*GeolocationPackage) Package

Package implements packages.ApplicationPackageHandler.

func (*GeolocationPackage) RegisterHandlers

func (p *GeolocationPackage) RegisterHandlers(s *runtime.ServeMux, conn *grpc.ClientConn)

RegisterHandlers implements packages.ApplicationPackageHandler.

func (*GeolocationPackage) RegisterServices

func (p *GeolocationPackage) RegisterServices(s *grpc.Server)

RegisterServices implements packages.ApplicationPackageHandler.

type QueryType

type QueryType uint8

QueryType enum defines the location query types of the package.

const (
	// QUERY_TOARSSI uses the TOA and RSSI information from the gateway metadata to compute the location of the end device.
	QUERY_TOARSSI QueryType = 1 << 0
)

func (*QueryType) FromValue

func (t *QueryType) FromValue(v *types.Value) error

func (QueryType) Value

func (t QueryType) Value() *types.Value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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