Documentation
¶
Index ¶
- Constants
- func NewPacket() *packet
- func NewTelegram() *telegram
- func PrintHex(a []byte)
- func Serial(dev string, send chan Encoder, recv chan Packet) error
- func ToHex(a []byte) string
- type EepA51201
- type EepA53808
- func (p *EepA53808) Command() uint8
- func (p *EepA53808) DimValue() uint8
- func (p *EepA53808) RampTime() uint8
- func (p *EepA53808) SetCommand(cmd uint8)
- func (p *EepA53808) SetDimValue(val uint8)
- func (p *EepA53808) SetRampTime(val uint8)
- func (p *EepA53808) SetSwitchingCommand(cmd uint8)
- func (p *EepA53808) SetTelegram(t Telegram)
- func (p *EepA53808) SetTime(time uint8)
- func (p *EepA53808) SwitchingCommand() uint8
- func (p *EepA53808) Time() uint8
- type EepD20109
- func (p *EepD20109) CommandId() uint8
- func (p *EepD20109) DimValue() uint8
- func (p *EepD20109) IOChannel() uint8
- func (p *EepD20109) LocalControl() uint8
- func (p *EepD20109) OutputValue() uint8
- func (p *EepD20109) SetCommandId(id uint8)
- func (p *EepD20109) SetDimValue(count uint8)
- func (p *EepD20109) SetIOChannel(count uint8)
- func (p *EepD20109) SetOutputValue(count uint8)
- func (p *EepD20109) SetTelegram(t TelegramVld)
- type EepF60201
- func (p *EepF60201) EnergyBow() bool
- func (p *EepF60201) Nu() bool
- func (p *EepF60201) R1A0() bool
- func (p *EepF60201) R1A1() bool
- func (p *EepF60201) R1B0() bool
- func (p *EepF60201) R1B1() bool
- func (p *EepF60201) R2B0() bool
- func (p *EepF60201) R2B1() bool
- func (p *EepF60201) SetNu(data bool)
- func (p *EepF60201) SetT21(data bool)
- func (p *EepF60201) SetTelegram(t TelegramRps)
- func (p *EepF60201) T21() bool
- type Encoder
- type Packet
- type Telegram
- type Telegram4bs
- type Telegram4bsLearn
- func (p *Telegram4bsLearn) Learn() bool
- func (p *Telegram4bsLearn) LearnFunc() byte
- func (p *Telegram4bsLearn) LearnType() byte
- func (p *Telegram4bsLearn) SetLearn(lrn bool)
- func (p *Telegram4bsLearn) SetLearnFunc(lfunc byte)
- func (p *Telegram4bsLearn) SetLearnType(ltype byte)
- func (p *Telegram4bsLearn) SetTelegram(t Telegram)
- type TelegramRps
- type TelegramVld
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 NewTelegram ¶
func NewTelegram() *telegram
Types ¶
type EepA51201 ¶
type EepA51201 struct {
//*Telegram4bs
Telegram4bs
}
func NewEepA51201 ¶
func NewEepA51201() *EepA51201
func (*EepA51201) MeterReading ¶
func (*EepA51201) SetTelegram ¶
func (p *EepA51201) SetTelegram(t Telegram4bs)
func (*EepA51201) TariffInfo ¶
type EepA53808 ¶
type EepA53808 struct {
//*Telegram4bs
Telegram
}
func (*EepA53808) SetCommand ¶
func (*EepA53808) SetDimValue ¶
func (*EepA53808) SetRampTime ¶
func (*EepA53808) SetSwitchingCommand ¶
func (*EepA53808) SetTelegram ¶
func (*EepA53808) SwitchingCommand ¶
type EepD20109 ¶
type EepD20109 struct {
TelegramVld
}
func NewEepD20109 ¶
func NewEepD20109() *EepD20109
func (*EepD20109) LocalControl ¶
func (*EepD20109) OutputValue ¶
func (*EepD20109) SetCommandId ¶
func (*EepD20109) SetDimValue ¶
Can be between 0 and 4.
func (*EepD20109) SetIOChannel ¶
func (*EepD20109) SetOutputValue ¶
func (*EepD20109) SetTelegram ¶
func (p *EepD20109) SetTelegram(t TelegramVld)
type EepF60201 ¶
type EepF60201 struct {
//*TelegramRps
TelegramRps
}
func NewEepF60201 ¶
func NewEepF60201() *EepF60201
func (*EepF60201) SetTelegram ¶
func (p *EepF60201) SetTelegram(t TelegramRps)
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
}
type Telegram4bs ¶
type Telegram4bs interface {
Telegram
}
func NewTelegram4bs ¶
func NewTelegram4bs() Telegram4bs
type Telegram4bsLearn ¶
type Telegram4bsLearn struct {
Telegram
}
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 ¶
func NewTelegramRps ¶
func NewTelegramRps() TelegramRps
type TelegramVld ¶
type TelegramVld interface {
Telegram
}
func NewTelegramVld ¶
func NewTelegramVld() TelegramVld
Click to show internal directories.
Click to hide internal directories.