loraserver

package
v0.0.0-...-2ac35d6 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2016 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectAndCallOnceWait = time.Millisecond * 100 // the time to wait for the same packet received by multiple gateways
	CollectDataDownWait    = time.Millisecond * 100 // the time to wait on possible downlink payloads from the application
)

Packet collection constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	DB          *sqlx.DB
	RedisPool   *redis.Pool
	Gateway     backend.Gateway
	Application backend.Application
	Controller  backend.NetworkController
	NetID       lorawan.NetID
}

Context holds the context of a loraserver instance (backends, db connections etc..)

type RXPackets

type RXPackets []models.RXPacket

RXPackets is a slice of RXPacket. It implements sort.Interface to sort the slice of packets by signal strength so that the packet received with the strongest signal will be at index 0 of RXPackets.

func (RXPackets) Len

func (p RXPackets) Len() int

Len is part of sort.Interface.

func (RXPackets) Less

func (p RXPackets) Less(i, j int) bool

Less is part of sort.Interface.

func (RXPackets) Swap

func (p RXPackets) Swap(i, j int)

Swap is part of sort.Interface.

type Server

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

Server represents a LoRaWAN network-server.

func NewServer

func NewServer(ctx Context) *Server

NewServer creates a new server.

func (*Server) Start

func (s *Server) Start() error

Start starts the server.

func (*Server) Stop

func (s *Server) Stop() error

Stop closes the gateway and application backends and waits for the server to complete the pending packets and actions.

Jump to

Keyboard shortcuts

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