Documentation ¶
Index ¶
- 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
- type AttrSet
- type BufWriter
- type Cluster
- type CmdAttr
- type Command
- type Condition
- type DataType
- type Desc
- type Device
- type Dir
- type Domain
- type DomainRef
- type EnumValue
- type Enumeration
- type File
- type Hex
- type Int
- type Length
- type MfCode
- type Multiplier
- type Name
- type Profile
- type Required
- type Root
- type Type
- type Zdo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateStruct ¶
func GenerateTypescript ¶
func GenerateZdo ¶
Types ¶
type Attr ¶
type Attr struct { ID Hex `xml:"id,attr" toml:"id,omitempty" yaml:"id,omitempty" json:"id,omitempty"` Name Name `xml:"name,attr" toml:"name,omitempty" yaml:"name,omitempty" json:"name,omitempty"` ArgName Name `xml:"argname,attr" toml:"argname,omitempty" yaml:"argname,omitempty" json:"argname,omitempty"` Type Type `xml:"type,attr" toml:"type,omitempty" yaml:"type,omitempty" json:"type,omitempty"` ArrayType Type `xml:"arrayType,attr" toml:"arraytype,omitempty" yaml:"arraytype,omitempty" json:"arraytype,omitempty"` Access string `xml:"access,attr" toml:"access,omitempty" yaml:"access,omitempty" json:"access,omitempty"` Default Hex `xml:"default,attr" toml:"default,omitempty" yaml:"default,omitempty" json:"default,omitempty"` Required string `xml:"required,attr" toml:"required,omitempty" yaml:"required,omitempty" json:"required,omitempty"` Report bool `xml:"-" toml:"report,omitempty" yaml:"report,omitempty" json:"report,omitempty"` Scene Int `xml:"-" toml:"scene,omitempty" yaml:"scene,omitempty" json:"scene,omitempty"` Range string `xml:"range,attr" toml:"range,omitempty" yaml:"range,omitempty" json:"range,omitempty"` MfCode MfCode `xml:"mfcode,attr" toml:"mnfcode,omitempty" yaml:"mnfcode,omitempty" json:"mnfcode,omitempty"` ShowAs string `xml:"showas,attr" toml:"showas,omitempty" yaml:"showas,omitempty" json:"showas,omitempty"` ListSize string `xml:"listSize,attr" toml:"listsize,omitempty" yaml:"listsize,omitempty" json:"listsize,omitempty"` Enumeration Name `xml:"enumeration,attr" toml:"enumeration,omitempty" yaml:"enumeration,omitempty" json:"enumeration,omitempty"` Unit string `xml:"unit,attr" toml:"unit,omitempty" yaml:"unit,omitempty" json:"unit,omitempty"` Multiplier Multiplier `xml:"multiplier,attr" toml:"multiplier,omitempty" yaml:"multiplier,omitempty" json:"multiplier,omitempty"` Desc Desc `xml:"description" toml:"description,omitempty" yaml:"description,omitempty" json:"description,omitempty"` Values map[string]Name `xml:"value" toml:"values,omitempty" yaml:"values,omitempty" json:"values,omitempty"` Bits map[string]Name `xml:"bit" toml:"bits,omitempty" yaml:"bits,omitempty" json:"bits,omitempty"` Cond []Condition `xml:"payload>condition" toml:"cond,omitempty" yaml:"cond,omitempty" json:"cond,omitempty"` Marshal string `xml:"marshal" toml:"marshal,omitempty" yaml:"marshal,omitempty" json:"marshal,omitempty"` Unmarshal string `xml:"unmarshal" toml:"unmarshal,omitempty" yaml:"unmarshal,omitempty" json:"unmarshal,omitempty"` MarshalNoType bool `xml:"marshalnotype" toml:"marshalnotype,omitempty" yaml:"marshalnotype,omitempty" json:"marshalnotype,omitempty"` StructAttr []Attr `xml:"structattr" toml:"structattr,omitempty" yaml:"structattr,omitempty" json:"structattr,omitempty"` }
func (Attr) ArgNameFmt ¶
type Cluster ¶
type Cluster struct { TypeMap map[string]Attr `xml:"types" toml:"types,omitempty" yaml:"types,omitempty" json:"types,omitempty"` ID Hex `xml:"id,attr" toml:"id,omitempty" yaml:"id,omitempty" json:"id,omitempty"` Name Name `xml:"name,attr" toml:"name,omitempty" yaml:"name,omitempty" json:"name,omitempty"` MfCode MfCode `xml:"mfcode,attr" toml:"mnfcode,omitempty" yaml:"mnfcode,omitempty" json:"mnfcode,omitempty"` Desc Desc `xml:"description" toml:"description,omitempty" yaml:"description,omitempty" json:"description,omitempty"` Server CmdAttr `xml:"server" toml:"server,omitempty" yaml:"server,omitempty" json:"server,omitempty"` Client CmdAttr `xml:"client" toml:"client,omitempty" yaml:"client,omitempty" json:"client,omitempty"` Clusters []Cluster `xml:"clusters" toml:"clusters,omitempty" yaml:"clusters,omitempty" json:"clusters,omitempty"` }
type CmdAttr ¶
type Command ¶
type Command struct { ID Hex `xml:"id,attr" toml:"id,omitempty" yaml:"id,omitempty" json:"id,omitempty"` Name Name `xml:"name,attr" toml:"name,omitempty" yaml:"name,omitempty" json:"name,omitempty"` Desc Desc `xml:"description" toml:"description,omitempty" yaml:"description,omitempty" json:"description,omitempty"` Dir string `xml:"dir,attr" toml:"dir,omitempty" yaml:"dir,omitempty" json:"dir,omitempty"` Required Required `xml:"required,attr" toml:"required,omitempty" yaml:"required,omitempty" json:"required,omitempty"` Response *Hex `xml:"response,attr" toml:"response,omitempty" yaml:"response,omitempty" json:"response,omitempty"` ShowAs string `xml:"showas,attr" toml:"showas,omitempty" yaml:"showas,omitempty" json:"showas,omitempty"` Vendor string `xml:"vendor,attr" toml:"vendor,omitempty" yaml:"vendor,omitempty" json:"vendor,omitempty"` MfCode MfCode `xml:"mfcode,attr" toml:"mnfcode,omitempty" yaml:"mnfcode,omitempty" json:"mnfcode,omitempty"` PayloadAttr []Attr `xml:"payload>attribute" toml:"payloadattr,omitempty" yaml:"payloadattr,omitempty" json:"payloadattr,omitempty"` }
type Condition ¶
type Condition struct { Desc Desc `xml:"description" toml:"description,omitempty" yaml:"description,omitempty" json:"description,omitempty"` Name Name `xml:"name,attr" toml:"name,omitempty" yaml:"name,omitempty" json:"name,omitempty"` Attr Hex `toml:"attr,omitempty" yaml:"attr,omitempty" json:"attr,omitempty"` Value Hex `toml:"value,omitempty" yaml:"value,omitempty" json:"value,omitempty"` Mask Hex `toml:"mask,omitempty" yaml:"mask,omitempty" json:"mask,omitempty"` Invert bool `toml:"invert,omitempty" yaml:"invert,omitempty" json:"invert,omitempty"` Operator string `toml:"operator,omitempty" yaml:"operator,omitempty" json:"operator,omitempty"` }
type DataType ¶
type DataType struct { ID Hex `xml:"id,attr"` Name Name `xml:"name,attr"` ShortName Type `xml:"shortname,attr"` Length Length `xml:"length,attr"` AD string `xml:"ad,attr"` Invalid Hex `xml:"inval,attr"` }
func (DataType) MarshalCast ¶
func (DataType) UnmarshalFn ¶
type Enumeration ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) ReadCluster ¶
type Multiplier ¶
type Multiplier string
Click to show internal directories.
Click to hide internal directories.