goenocean

package module
v0.0.0-...-96fde8f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: MIT Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

goenocean

Library for creating and decoding enocean ESP3 packages. The API is not 100% yet. Pull requests are appreciated.

Build Status

Documentation

Index

Constants

View Source
const (
	PacketTypeRadioErp1        = 0x01
	PacketTypeResponse         = 0x02
	PacketTypeRadioSubTel      = 0x03
	PacketTypeEvent            = 0x04
	PacketTypeCommonCommand    = 0x05
	PacketTypeSmartAckCommand  = 0x06
	PacketTypeRemoteManCommand = 0x07
	PacketTypeRadioMessage     = 0x09
	PacketTypeRadioErp2        = 0x0a
)
View Source
const (
	TelegramTypeRps = 0xf6
	TelegramType1bs = 0xd5
	TelegramType4bs = 0xa5
	TelegramTypeVld = 0xd2
)

Variables

This section is empty.

Functions

func NewPacket

func NewPacket() *packet

NewPacket creates a new enocean packet

func NewTelegram

func NewTelegram() *telegram

func PrintHex

func PrintHex(a []byte)

func Serial

func Serial(dev string, send chan Encoder, recv chan Packet) error

func ToHex

func ToHex(a []byte) string

Types

type EepA51201

type EepA51201 struct {
	//*Telegram4bs
	Telegram4bs
}

func NewEepA51201

func NewEepA51201() *EepA51201

func (*EepA51201) DataType

func (p *EepA51201) DataType() string

func (*EepA51201) MeterReading

func (p *EepA51201) MeterReading() int64

func (*EepA51201) SetTelegram

func (p *EepA51201) SetTelegram(t Telegram4bs)

func (*EepA51201) TariffInfo

func (p *EepA51201) TariffInfo() uint8

type EepA53808

type EepA53808 struct {
	//*Telegram4bs
	Telegram
}

func NewEepA53808

func NewEepA53808() *EepA53808

A5-38-08 CENTRAL COMMAND

func (*EepA53808) Command

func (p *EepA53808) Command() uint8

func (*EepA53808) DimValue

func (p *EepA53808) DimValue() uint8

func (*EepA53808) RampTime

func (p *EepA53808) RampTime() uint8

func (*EepA53808) SetCommand

func (p *EepA53808) SetCommand(cmd uint8)

func (*EepA53808) SetDimValue

func (p *EepA53808) SetDimValue(val uint8)

func (*EepA53808) SetRampTime

func (p *EepA53808) SetRampTime(val uint8)

func (*EepA53808) SetSwitchingCommand

func (p *EepA53808) SetSwitchingCommand(cmd uint8)

func (*EepA53808) SetTelegram

func (p *EepA53808) SetTelegram(t Telegram)

func (*EepA53808) SetTime

func (p *EepA53808) SetTime(time uint8)

func (*EepA53808) SwitchingCommand

func (p *EepA53808) SwitchingCommand() uint8

func (*EepA53808) Time

func (p *EepA53808) Time() uint8

type EepD20109

type EepD20109 struct {
	TelegramVld
}

func NewEepD20109

func NewEepD20109() *EepD20109

func (*EepD20109) CommandId

func (p *EepD20109) CommandId() uint8

func (*EepD20109) DimValue

func (p *EepD20109) DimValue() uint8

DimValue only valid for command id 1

func (*EepD20109) IOChannel

func (p *EepD20109) IOChannel() uint8

func (*EepD20109) LocalControl

func (p *EepD20109) LocalControl() uint8

func (*EepD20109) OutputValue

func (p *EepD20109) OutputValue() uint8

func (*EepD20109) SetCommandId

func (p *EepD20109) SetCommandId(id uint8)

func (*EepD20109) SetDimValue

func (p *EepD20109) SetDimValue(count uint8)

Can be between 0 and 4.

func (*EepD20109) SetIOChannel

func (p *EepD20109) SetIOChannel(count uint8)

func (*EepD20109) SetOutputValue

func (p *EepD20109) SetOutputValue(count uint8)

func (*EepD20109) SetTelegram

func (p *EepD20109) SetTelegram(t TelegramVld)

type EepF60201

type EepF60201 struct {
	//*TelegramRps
	TelegramRps
}

func NewEepF60201

func NewEepF60201() *EepF60201

func (*EepF60201) EnergyBow

func (p *EepF60201) EnergyBow() bool

func (*EepF60201) Nu

func (p *EepF60201) Nu() bool

func (*EepF60201) R1A0

func (p *EepF60201) R1A0() bool

func (*EepF60201) R1A1

func (p *EepF60201) R1A1() bool

func (*EepF60201) R1B0

func (p *EepF60201) R1B0() bool

func (*EepF60201) R1B1

func (p *EepF60201) R1B1() bool

func (*EepF60201) R2B0

func (p *EepF60201) R2B0() bool

func (*EepF60201) R2B1

func (p *EepF60201) R2B1() bool

func (*EepF60201) SetNu

func (p *EepF60201) SetNu(data bool)

func (*EepF60201) SetT21

func (p *EepF60201) SetT21(data bool)

func (*EepF60201) SetTelegram

func (p *EepF60201) SetTelegram(t TelegramRps)

func (*EepF60201) T21

func (p *EepF60201) T21() bool

type Encoder

type Encoder interface {
	Encode() []byte
}

type Packet

type Packet interface {
	Encoder
	SetSyncByte(byte)
	SetHeaderFromBytes([]byte)
	ValidateCrc() error
	SetData([]byte)
	Header() *header
	SetHeaderCrc(byte)
	HeaderCrc() byte
	SetOptData([]byte)
	SetDataCrc(byte)
	SyncByte() byte
	DataCrc() byte
	Data() []byte
	OptData() []byte
	Process()
	SenderId() [4]byte
	Equal(Packet) bool
	PacketType() byte
}

func Decode

func Decode(data []byte) (p Packet, err error)

type Telegram

type Telegram interface {
	Packet
	SetSenderId([4]byte)
	TelegramData() []byte
	SetTelegramData([]byte)
	TelegramType() byte
	Status() byte
	SetStatus(byte)
	DestinationId() [4]byte
	SetDestinationId([4]byte)
}

type Telegram4bs

type Telegram4bs interface {
	Telegram
}

func NewTelegram4bs

func NewTelegram4bs() Telegram4bs

type Telegram4bsLearn

type Telegram4bsLearn struct {
	Telegram
}

func NewTelegram4bsLearn

func NewTelegram4bsLearn() *Telegram4bsLearn

A5-38-08 CENTRAL COMMAND

func (*Telegram4bsLearn) Learn

func (p *Telegram4bsLearn) Learn() bool

func (*Telegram4bsLearn) LearnFunc

func (p *Telegram4bsLearn) LearnFunc() byte

func (*Telegram4bsLearn) LearnType

func (p *Telegram4bsLearn) LearnType() byte

func (*Telegram4bsLearn) SetLearn

func (p *Telegram4bsLearn) SetLearn(lrn bool)

func (*Telegram4bsLearn) SetLearnFunc

func (p *Telegram4bsLearn) SetLearnFunc(lfunc byte)

func (*Telegram4bsLearn) SetLearnType

func (p *Telegram4bsLearn) SetLearnType(ltype byte)

func (*Telegram4bsLearn) SetTelegram

func (p *Telegram4bsLearn) SetTelegram(t Telegram)

type TelegramRps

type TelegramRps interface {
	Telegram
	RepeatCount() uint8
	SetRepeatCount(uint8)
}

func NewTelegramRps

func NewTelegramRps() TelegramRps

type TelegramVld

type TelegramVld interface {
	Telegram
}

func NewTelegramVld

func NewTelegramVld() TelegramVld

Jump to

Keyboard shortcuts

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