mqttUplink

package
Version: v0.0.0-...-96f3fa0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package mqttUplink is used to receive and handle uplink messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeaderHandler

type HeaderHandler interface {
	CreateNewHeader(payload []byte, devEUI string) ([]components.Sensor, error)
	StoreHeader(header []components.Sensor, devEUI string) ([]components.Sensor, []components.Sensor, error)
}

HeaderHandler is a Helper interface that creates and stores a header.

func NewHeaderHandler

func NewHeaderHandler() HeaderHandler

NewHeaderHandler is the constructor for a HeaderHandler

type MessageCreator

type MessageCreator interface {
	CreateMessage(payload []byte, devEui string) (components.MessageUplinkI, error)
}

MessageCreator is a Helper interface that creates a MessageUplinkI type from bytes.

func NewMessageCreator

func NewMessageCreator() MessageCreator

NewMessageCreator is the constructor for a MessageCreator. The purpose of the MessageCreator is to convert the message, that comes in from a payload and the devEUI as bytes, to the MessageUplinkI format for further use.

type MqttClient

type MqttClient interface {
	Connect() error
	Disconnect()
	GetClient() mqtt.Client
}

MqttClient is the client that will receive message from the network backend.

func New

func New() MqttClient

New is the constructor for the Mqtt-Uplink-Client.

Jump to

Keyboard shortcuts

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