controller

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DownlinkLockTTL = time.Millisecond * 100

DownlinkLockTTL defines the downlink lock ttl.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(p *redis.Pool, server, username, password string) (backend.NetworkController, error)

NewBackend creates a new Backend.

Types

type Backend

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

Backend implements a MQTT pub-sub network-controller backend.

func (*Backend) Close

func (b *Backend) Close() error

Close closes the backend. Note that this closes the backend one-way (network-controller to the backend). This makes it possible to perform a graceful shutdown (e.g. when there are still packets to send back to the network-controller).

func (*Backend) SendErrorPayload

func (b *Backend) SendErrorPayload(appEUI, devEUI lorawan.EUI64, payload models.ErrorPayload) error

SendErrorPayload sends the given ErrorPayload to the network-controller.

func (*Backend) SendMACPayload

func (b *Backend) SendMACPayload(appEUI, devEUI lorawan.EUI64, pl models.MACPayload) error

SendMACPayload sends the given MACPayload to the network-controller.

func (*Backend) SendRXInfoPayload

func (b *Backend) SendRXInfoPayload(appEUI, devEUI lorawan.EUI64, payload models.RXInfoPayload) error

SendRXInfoPayload sends the given RXInfoPayload to the network-controller.

func (*Backend) TXMACPayloadChan

func (b *Backend) TXMACPayloadChan() chan models.MACPayload

TXMACPayloadChan returns the channel of MACPayload items to send.

Jump to

Keyboard shortcuts

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