mqtt

package
v0.0.0-...-8397304 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: MIT Imports: 18 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 {
	// contains filtered or unexported fields
}

Backend implements a MQTT backend.

func NewBackend

func NewBackend(conf config.Config) (*Backend, error)

NewBackend creates a new Backend.

func (*Backend) PublishEvent

func (b *Backend) PublishEvent(gatewayID lorawan.EUI64, event string, id uuid.UUID, v proto.Message) error

PublishEvent publishes the given event.

func (*Backend) SetDownlinkFrameFunc

func (b *Backend) SetDownlinkFrameFunc(f func(gw.DownlinkFrame))

SetDownlinkFrameFunc sets the DownlinkFrame handler func.

func (*Backend) SetGatewayCommandExecRequestFunc

func (b *Backend) SetGatewayCommandExecRequestFunc(f func(gw.GatewayCommandExecRequest))

SetGatewayCommandExecRequestFunc sets the GatewayCommandExecRequest handler func.

func (*Backend) SetGatewayConfigurationFunc

func (b *Backend) SetGatewayConfigurationFunc(f func(gw.GatewayConfiguration))

SetGatewayConfigurationFunc sets the GatewayConfiguration handler func.

func (*Backend) SetGatewaySubscription

func (b *Backend) SetGatewaySubscription(subscribe bool, gatewayID lorawan.EUI64) error

SetGatewaySubscription sets or unsets the gateway. Note: the actual MQTT (un)subscribe happens in a separate function to avoid race conditions in case of connection issues. This way, the gateways map always reflect the desired state.

func (*Backend) SetRawPacketForwarderCommandFunc

func (b *Backend) SetRawPacketForwarderCommandFunc(f func(gw.RawPacketForwarderCommand))

SetRawPacketForwarderCommandFunc sets the RawPacketForwarderCommand handler func.

func (*Backend) Start

func (b *Backend) Start() error

Start starts the integration.

func (*Backend) Stop

func (b *Backend) Stop() error

Stop stops the integration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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