tlv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package tlv decodes tlv packets into more useful data

Index

Constants

View Source
const (
	Rain        = 0
	Temperature = 1
	SoftReset   = 2
	HardReset   = 3
	Pause       = 4
	Unpause     = 5
)

tags for TLV packets

View Source
const (
	RainValue      = 1
	SoftResetValue = 1
	HardResetValue = 1
	PauseValue     = 1
	UnpauseValue   = 1
)

values for TLV packets

Variables

This section is empty.

Functions

This section is empty.

Types

type TLV

type TLV struct {
	Tag    int
	Length int
	Value  int
}

TLV: tag, length, value encoding for binary packets received over serial

func NewTLV

func NewTLV(packet []byte) (*TLV, error)

NewTLV makes a new TLV packet

Jump to

Keyboard shortcuts

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