Documentation ¶
Index ¶
- Variables
- func Addr16(addr uint16) func(interface{})
- func Addr64(addr uint64) func(interface{})
- func BroadcastRadius(hops byte) func(interface{})
- func ClusterID(id uint16) func(interface{})
- func Command(cmd [2]byte) func(interface{})
- func Data(data []byte) func(interface{})
- func DstEP(dst byte) func(interface{})
- func FrameID(id byte) func(interface{})
- func Options(options byte) func(interface{})
- func Parameter(parameter []byte) func(interface{})
- func ProfileID(id uint16) func(interface{})
- func SrcEP(src byte) func(interface{})
- type APIFrame
- type AT
- type ATQueue
- type ATRemote
- func (f *ATRemote) Bytes() ([]byte, error)
- func (f *ATRemote) SetAddr16(addr uint16)
- func (f *ATRemote) SetAddr64(addr uint64)
- func (f *ATRemote) SetCommand(cmd [2]byte)
- func (f *ATRemote) SetFrameID(id byte)
- func (f *ATRemote) SetOptions(options byte)
- func (f *ATRemote) SetParameter(parameter []byte)
- type Addr16Setter
- type Addr64Setter
- type BroadcastRadiusSetter
- type ClusterIDSetter
- type CommandSetter
- type DataSetter
- type DstEPSetter
- type Frame
- type FrameIDSetter
- type OptionsSetter
- type ParameterSetter
- type ProfileIDSetter
- type SrcEPSetter
- type ZB
- type ZBExplicit
- func (f *ZBExplicit) Bytes() ([]byte, error)
- func (f *ZBExplicit) SetAddr16(addr uint16)
- func (f *ZBExplicit) SetAddr64(addr uint64)
- func (f *ZBExplicit) SetBroadcastRadius(hops byte)
- func (f *ZBExplicit) SetClusterID(id uint16)
- func (f *ZBExplicit) SetData(data []byte)
- func (f *ZBExplicit) SetDstEP(dst byte)
- func (f *ZBExplicit) SetFrameID(id byte)
- func (f *ZBExplicit) SetOptions(options byte)
- func (f *ZBExplicit) SetProfileID(id uint16)
- func (f *ZBExplicit) SetSrcEP(src byte)
Constants ¶
This section is empty.
Variables ¶
var NI = [...]byte{'N', 'I'}
Functions ¶
func Addr16 ¶
func Addr16(addr uint16) func(interface{})
Addr16 helper options function to set frames 16-bit address
func Addr64 ¶
func Addr64(addr uint64) func(interface{})
Addr64 helper options function to set frames 64-bit address
func BroadcastRadius ¶
func BroadcastRadius(hops byte) func(interface{})
BroadcastRadius helper options function to set frame broadcast radius
func ClusterID ¶
func ClusterID(id uint16) func(interface{})
ClusterID helper options function to set frame cluster ID
func Command ¶
func Command(cmd [2]byte) func(interface{})
Command helper options function to set AT related frame command
func DstEP ¶
func DstEP(dst byte) func(interface{})
DstEP helper options function to set frame destination endpoint
func FrameID ¶
func FrameID(id byte) func(interface{})
FrameID helper options function to set frame ID
func Options ¶
func Options(options byte) func(interface{})
Options helper options function to set frame options
func Parameter ¶
func Parameter(parameter []byte) func(interface{})
Parameter helper options function to set frame parameter
Types ¶
type APIFrame ¶
type APIFrame struct {
Mode api.EscapeMode
}
APIFrame defines an API frame structure
func (*APIFrame) SetAPIEscapeMode ¶
func (f *APIFrame) SetAPIEscapeMode(mode api.EscapeMode)
SetAPIEscapeMode satisfy APIEscapeModeSetter interface
type AT ¶
AT transmit frame
func (*AT) SetCommand ¶
SetCommand satisfy CommandSetter interface
func (*AT) SetParameter ¶
SetParameter satisfy ParameterSetter interface
type ATQueue ¶
ATQueue queue transmit frame
func NewATQueue ¶
func NewATQueue(options ...func(interface{})) *ATQueue
func (*ATQueue) SetCommand ¶
SetCommand satisfy CommandSetter interface
func (*ATQueue) SetFrameID ¶
SetFrameID satisfy FrameIDSetter interface
func (*ATQueue) SetParameter ¶
SetParameter satisfy ParameterSetter interface
type ATRemote ¶
type ATRemote struct { FrameID byte Addr64 uint64 Addr16 uint16 Options byte Cmd [2]byte Parameter []byte }
ATRemote AT remote transmit frame
func NewATRemote ¶
func NewATRemote(options ...func(interface{})) *ATRemote
func (*ATRemote) SetCommand ¶
SetCommand satisfy CommandSetter interface
func (*ATRemote) SetFrameID ¶
SetFrameID satisfy FrameIDSetter interface
func (*ATRemote) SetOptions ¶
SetOptions satisfy OptionsSetter interface
func (*ATRemote) SetParameter ¶
SetParameter satisfy ParameterSetter interface
type Addr16Setter ¶
type Addr16Setter interface {
SetAddr16(uint16)
}
Addr64Setter sets frame 16-bit address
type Addr64Setter ¶
type Addr64Setter interface {
SetAddr64(uint64)
}
Addr64Setter sets frame 64-bit address
type BroadcastRadiusSetter ¶
type BroadcastRadiusSetter interface {
SetBroadcastRadius(byte)
}
BroadcastRadiusSetter sets frame broadcast radius
type ClusterIDSetter ¶
type ClusterIDSetter interface {
SetClusterID(uint16)
}
ClusterIDSetter sets frame cluster ID
type CommandSetter ¶
type CommandSetter interface {
SetCommand([2]byte)
}
CommandSetter sets AT related frame command
type DstEPSetter ¶
type DstEPSetter interface {
SetDstEP(byte)
}
DstEPSetter sets frame destination endpoint
type FrameIDSetter ¶
type FrameIDSetter interface {
SetFrameID(byte)
}
FrameIDSetter sets the frame ID
type OptionsSetter ¶
type OptionsSetter interface {
SetOptions(byte)
}
OptionsSetter sets frame options
type ParameterSetter ¶
type ParameterSetter interface {
SetParameter([]byte)
}
ParameterSetter sets frame parameters
type ProfileIDSetter ¶
type ProfileIDSetter interface {
SetProfileID(uint16)
}
ProfileIDSetter sets frame profile ID
type SrcEPSetter ¶
type SrcEPSetter interface {
SetSrcEP(byte)
}
SrcEPSetter sets frame source endpoint
type ZB ¶
type ZB struct { FrameID byte Addr64 uint64 Addr16 uint16 BroadcastRadius byte Options byte Data []byte }
ZB transmit frame
func (*ZB) SetBroadcastRadius ¶
SetBroadcastRadius satisfy BroadcastRadiusSetter interface
func (*ZB) SetOptions ¶
SetOptions satisfy OptionsSetter interface
type ZBExplicit ¶
type ZBExplicit struct { FrameID byte Addr64 uint64 Addr16 uint16 SrcEP byte DstEP byte ClusterID uint16 ProfileID uint16 BroadcastRadius byte Options byte Data []byte }
ZBExplicit transmit frame
func NewZBExplicit ¶
func NewZBExplicit(options ...func(interface{})) *ZBExplicit
func (*ZBExplicit) Bytes ¶
func (f *ZBExplicit) Bytes() ([]byte, error)
Bytes turn frame into bytes, satosfy Frame interface
func (*ZBExplicit) SetAddr16 ¶
func (f *ZBExplicit) SetAddr16(addr uint16)
SetAddr16 satisfy Addr16Setter interface
func (*ZBExplicit) SetAddr64 ¶
func (f *ZBExplicit) SetAddr64(addr uint64)
SetAddr64 satisfy Addr64Setter interface
func (*ZBExplicit) SetBroadcastRadius ¶
func (f *ZBExplicit) SetBroadcastRadius(hops byte)
SetBroadcastRadius satisfy BroadcastRadiusSetter interface
func (*ZBExplicit) SetClusterID ¶
func (f *ZBExplicit) SetClusterID(id uint16)
SetClusterID satisfy ClusterIDSetter interface
func (*ZBExplicit) SetData ¶
func (f *ZBExplicit) SetData(data []byte)
SetData satisfy DataSetter interface
func (*ZBExplicit) SetDstEP ¶
func (f *ZBExplicit) SetDstEP(dst byte)
SetDstEP satisfy DstEPSetter interface
func (*ZBExplicit) SetFrameID ¶
func (f *ZBExplicit) SetFrameID(id byte)
SetFrameID satisfy FrameIDSetter interface
func (*ZBExplicit) SetOptions ¶
func (f *ZBExplicit) SetOptions(options byte)
SetOptions satisfy OptionsSetter interface
func (*ZBExplicit) SetProfileID ¶
func (f *ZBExplicit) SetProfileID(id uint16)
SetProfileID satisfy ProfileIDSetter interface
func (*ZBExplicit) SetSrcEP ¶
func (f *ZBExplicit) SetSrcEP(src byte)
SetSrcEP satisfy SrcEPSetter interface