cayennelpp

package
v2.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder is a CayenneLPP PayloadDecoder

func (*Decoder) Accelerometer

func (d *Decoder) Accelerometer(channel uint8, x, y, z float32)

func (*Decoder) AnalogInput

func (d *Decoder) AnalogInput(channel uint8, value float32)

func (*Decoder) AnalogOutput

func (d *Decoder) AnalogOutput(channel uint8, value float32)

func (*Decoder) BarometricPressure

func (d *Decoder) BarometricPressure(channel uint8, hpa float32)

func (*Decoder) Decode

func (d *Decoder) Decode(payload []byte, fPort uint8) (map[string]interface{}, bool, error)

Decodes decodes the CayenneLPP payload to fields

func (*Decoder) DigitalInput

func (d *Decoder) DigitalInput(channel, value uint8)

func (*Decoder) DigitalOutput

func (d *Decoder) DigitalOutput(channel, value uint8)

func (*Decoder) GPS

func (d *Decoder) GPS(channel uint8, latitude, longitude, altitude float32)

func (*Decoder) Gyrometer

func (d *Decoder) Gyrometer(channel uint8, x, y, z float32)

func (*Decoder) Log

func (d *Decoder) Log() []*pb_handler.LogEntry

Log returns the log

func (*Decoder) Luminosity

func (d *Decoder) Luminosity(channel uint8, value uint16)

func (*Decoder) Presence

func (d *Decoder) Presence(channel, value uint8)

func (*Decoder) RelativeHumidity

func (d *Decoder) RelativeHumidity(channel uint8, rh float32)

func (*Decoder) Temperature

func (d *Decoder) Temperature(channel uint8, celcius float32)

type Encoder

type Encoder struct {
}

Encoder is a CayenneLPP PayloadEncoder

func (*Encoder) Encode

func (e *Encoder) Encode(fields map[string]interface{}, fPort uint8) ([]byte, bool, error)

Encode encodes the fields to CayenneLPP

func (*Encoder) Log

func (e *Encoder) Log() []*pb_handler.LogEntry

Log returns the log

Jump to

Keyboard shortcuts

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