Versions in this module Expand all Collapse all v0 v0.4.0 Mar 24, 2023 v0.3.0 Jan 22, 2022 v0.2.0 Mar 28, 2021 Changes in this version type Condition + Operator string v0.1.0 Apr 12, 2020 Changes in this version + func GenerateStruct(base, defPath, tplPath, outPath string) error + func GenerateTypescript(base, defPath, tplPath, outPath string) error + func GenerateZdo(base, defPath, tplPath, outPath string) error + type Attr struct + Access string + ArgName Name + ArrayType Type + Bits map[string]Name + Cond []Condition + Default Hex + Desc Desc + Enumeration Name + ID Hex + ListSize string + Marshal string + MarshalNoType bool + MfCode MfCode + Multiplier Multiplier + Name Name + Range string + Report bool + Required string + Scene Int + ShowAs string + StructAttr []Attr + Type Type + Unit string + Unmarshal string + Values map[string]Name + func (a Attr) ArgNameFmt() string + func (a Attr) CanRead() bool + func (a Attr) CanWrite() bool + func (a Attr) Equal(o Attr) bool + type AttrSet struct + Attr []Attr + Desc Desc + ID string + MfCode MfCode + type BufWriter []byte + func (b *BufWriter) Write(bytes []byte) (int, error) + type Cluster struct + Client CmdAttr + Clusters []Cluster + Desc Desc + ID Hex + MfCode MfCode + Name Name + Server CmdAttr + TypeMap map[string]Attr + func (c Cluster) Attr() []Attr + func (c Cluster) Command() []Command + func (c Cluster) Types() []Attr + type CmdAttr struct + Attr []Attr + AttrSet []AttrSet + Command []Command + func (c CmdAttr) SceneAttr() []Attr + type Command struct + Desc Desc + Dir string + ID Hex + MfCode MfCode + Name Name + PayloadAttr []Attr + Required Required + Response *Hex + ShowAs string + Vendor string + func (c Command) TypeCode(mnf MfCode) uint8 + type Condition struct + Attr Hex + Desc Desc + Invert bool + Mask Hex + Name Name + Value Hex + type DataType struct + AD string + ID Hex + Invalid Hex + Length Length + Name Name + ShortName Type + func (d DataType) MarshalCast() string + func (d DataType) MarshalFn() string + func (d DataType) Native() string + func (d DataType) Tag() string + func (d DataType) UnmarshalFn() string + type Desc string + func (d Desc) Comment(prefix ...string) string + func (d Desc) Trim() string + type Device struct + Desc Desc + ID Hex + Icon string + Name Name + type Dir struct + func (d *Dir) Files() (files []*File) + func (d *Dir) Path() string + func (d *Dir) SubPath() string + type Domain struct + Cluster []Cluster + Desc Desc + Devices []Device + HighBound Hex + LowBound Hex + Name Name + Package string + UseZCL bool + type DomainRef struct + LowBound Hex + Name Name + func (d DomainRef) Resolve(r *Root) (cluster []Cluster) + type EnumValue struct + Desc Desc + Name Name + Value Hex + type Enumeration struct + ID Hex + Name Name + Values []EnumValue + type File struct + func (f *File) Path() string + func (f *File) ReadCluster() (*Cluster, error) + func (f *File) SubPath() string + type Hex string + func (h Hex) AsDecimal() uint64 + func (h Hex) Bytes(size int) []byte + func (h Hex) Hex() string + func (h Hex) Hex2() string + func (h Hex) Hex4() string + func (h Hex) Trim() string + func (h Hex) Uint() uint64 + func (h Hex) Valid(bits int) bool + type Int string + func (i Int) Int() int + func (i Int) Valid() bool + type Length string + func (l Length) FixLen() bool + func (l Length) Uint() uint + type MfCode string + func (m MfCode) ByteStr() string + func (m MfCode) Bytes() []byte + func (m MfCode) Name() string + func (m MfCode) Stn(name Name) string + func (m MfCode) Trim() string + func (m MfCode) Uint() uint64 + func (m MfCode) Valid() bool + type Multiplier string + type Name string + func (n Name) Fmt() string + func (n Name) FmtUs() string + func (n Name) Pfx() string + type Profile struct + Desc Desc + Devices []Device + Domains []DomainRef + ID Hex + Icon string + Name Name + Rev string + Version string + type Required string + func (r Required) IsTrue() bool + type Root struct + DataTypes []DataType + Devices []Device + Domains []Domain + Enum []Enumeration + Package string + Profiles []Profile + type Type string + func (n Type) Native() string + func (n Type) RealType() string + func (n Type) TsType(path string) string + func (n Type) Type() string + type Zdo struct + Commands []Command + TypeMap map[string]Attr + func (c Zdo) Types() []Attr