mqttpubsub

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	UplinkTemplate   *template.Template
	DownlinkTemplate *template.Template
	StatsTemplate    *template.Template
	AckTemplate      *template.Template
	ConfigTemplate   *template.Template
	// contains filtered or unexported fields
}

Backend implements a MQTT pub-sub backend.

func NewBackend

func NewBackend(c newMQTT.BackendConfig) (*Backend, error)

NewBackend creates a new Backend.

func (*Backend) Close

func (b *Backend) Close()

Close closes the backend.

func (*Backend) ConfigPacketChan

func (b *Backend) ConfigPacketChan() chan gw.GatewayConfigPacket

ConfigPacketChan returns the ConfigPacketChan channel.

func (*Backend) PublishGatewayRX

func (b *Backend) PublishGatewayRX(mac lorawan.EUI64, rxPacket gw.RXPacketBytes) error

PublishGatewayRX publishes a RX packet to the MQTT broker.

func (*Backend) PublishGatewayStats

func (b *Backend) PublishGatewayStats(mac lorawan.EUI64, stats gw.GatewayStatsPacket) error

PublishGatewayStats publishes a GatewayStatsPacket to the MQTT broker.

func (*Backend) PublishGatewayTXAck

func (b *Backend) PublishGatewayTXAck(mac lorawan.EUI64, ack gw.TXAck) error

PublishGatewayTXAck publishes a TX ack to the MQTT broker.

func (*Backend) SubscribeGatewayTopics

func (b *Backend) SubscribeGatewayTopics(mac lorawan.EUI64) error

SubscribeGatewayTopics subscribes the backend to the gateway topics. (downlink and configuration).

func (*Backend) TXPacketChan

func (b *Backend) TXPacketChan() chan gw.TXPacketBytes

TXPacketChan returns the TXPacketBytes channel.

func (*Backend) UnSubscribeGatewayTopics

func (b *Backend) UnSubscribeGatewayTopics(mac lorawan.EUI64) error

UnSubscribeGatewayTopics unsubscribes the backend from the gateway topics. (downlink and configuration).

Jump to

Keyboard shortcuts

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