comms

package
Version: v0.0.0-...-4e3218a Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DISCONNECTED = 0
	CONNECTED    = 1
)

Variables

This section is empty.

Functions

func MqttClient

func MqttClient(s MqttSettings)

Types

type IOMsg

type IOMsg struct {
	Data       []byte
	Raw        []float32
	Topic      string
	Retain     bool
	Qos        byte
	MQTTts     time.Time
	EnqueuedTs time.Time
}

IOMsg is a struct used internally which either originates from or will be send to the wire

type LastWill

type LastWill struct {
	Topic  string
	Data   []byte
	Qos    byte
	Retain bool
}

LastWill defines the LastWill for MQTT. The LastWill will be submitted to the broker on connection and will be published on Disconnect.

type MqttSettings

type MqttSettings struct {
	WaitGroup                   *sync.WaitGroup
	Transport                   string
	BrokerURL                   string
	BrokerPort                  int
	ClientID                    string
	Topics                      []string
	ToDeserializeCatRequestCh   chan []byte
	ToDeserializeCatResponseCh  chan []byte
	ToDeserializeCapabilitiesCh chan []byte
	ToDeserializeStatusCh       chan []byte
	ToDeserializePingRequestCh  chan []byte
	ToDeserializePingResponseCh chan []byte
	ToWire                      chan IOMsg
	Events                      *pubsub.PubSub
	LastWill                    *LastWill
	Logger                      *log.Logger
}

Source Files

Jump to

Keyboard shortcuts

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