ttn

package
v2.3.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	Ctx log.Interface
	// contains filtered or unexported fields
}

Router side of the bridge

func New

func New(config RouterConfig, ctx log.Interface, tokenFunc func(string) string) (*Router, error)

New sets up a new TTN Router

func (*Router) CleanupGateway

func (r *Router) CleanupGateway(gatewayID string)

CleanupGateway cleans up gateway clients that are no longer needed

func (*Router) Connect

func (r *Router) Connect() error

Connect to the TTN Router

func (*Router) Disconnect

func (r *Router) Disconnect() error

Disconnect from the TTN Router and clean up gateway connections

func (*Router) PublishStatus

func (r *Router) PublishStatus(message *types.StatusMessage) error

PublishStatus publishes status messages to the TTN Router

func (r *Router) PublishUplink(message *types.UplinkMessage) error

PublishUplink publishes uplink messages to the TTN Router

func (r *Router) SubscribeDownlink(gatewayID string) (<-chan *types.DownlinkMessage, error)

SubscribeDownlink handles downlink messages for the given gateway ID

func (r *Router) UnsubscribeDownlink(gatewayID string) error

UnsubscribeDownlink should unsubscribe from downlink, but in practice just disconnects the entire gateway

type RouterConfig

type RouterConfig struct {
	DiscoveryServer string
	RouterID        string
}

RouterConfig contains configuration for the TTN Router

Jump to

Keyboard shortcuts

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