Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ArrayAttrib
- type ArrayLen
- type BasicDevice
- type Bit24
- type BitField
- type BitFlag
- type Bitmask
- type Byte
- type Command
- type CommandClass
- type Config
- type Const
- type DWord
- type Enum
- type FieldEnum
- type Generator
- type GenericDevice
- type Param
- type SpecificDevice
- type ValueAttrib
- type Variant
- type Word
- type ZwClasses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ArrayAttrib ¶
type BasicDevice ¶
type BitField ¶
type BitField struct { Key string `xml:"key,attr"` FieldName string `xml:"fieldname,attr"` FieldMask string `xml:"fieldmask,attr"` Shifter uint8 `xml:"shifter,attr"` }
func (BitField) IsNotReserved ¶
type BitFlag ¶
type BitFlag struct { Key string `xml:"key,attr"` FlagName string `xml:"flagname,attr"` FlagMask string `xml:"flagmask,attr"` }
func (BitFlag) IsNotReserved ¶
type Command ¶
type Command struct { Name string `xml:"name,attr"` Key string `xml:"key,attr"` Type string `xml:"type,attr"` HashCode string Comment string `xml:"comment,attr"` Params []Param `xml:"param"` }
func (Command) GetBaseName ¶
func (c Command) GetBaseName(cc CommandClass) string
func (Command) GetFileName ¶
func (c Command) GetFileName(cc CommandClass) string
func (Command) GetStructName ¶
func (c Command) GetStructName(cc CommandClass) string
type CommandClass ¶
type CommandClass struct { Name string `xml:"name,attr"` Key string `xml:"key,attr"` Version int `xml:"version,attr"` Help string `xml:"help,attr"` Comment string `xml:"comment,attr"` Commands []Command `xml:"cmd"` Enabled bool `xml:"-"` }
func (CommandClass) CanGen ¶
func (c CommandClass) CanGen() (can bool)
func (CommandClass) CanGenerate ¶
func (c CommandClass) CanGenerate() (can bool, reason string)
func (CommandClass) GetBaseName ¶
func (c CommandClass) GetBaseName() string
func (CommandClass) GetConstName ¶
func (c CommandClass) GetConstName() string
func (CommandClass) GetDirName ¶
func (c CommandClass) GetDirName() string
func (CommandClass) GetPackageName ¶
func (c CommandClass) GetPackageName() string
type FieldEnum ¶
type FieldEnum struct { Key string `xml:"key,attr"` FieldName string `xml:"fieldname,attr"` FieldMask string `xml:"fieldmask,attr"` Shifter uint8 `xml:"shifter,attr"` Value string `xml:"value,attr"` EnumValues []FieldEnum `xml:"fieldenum"` }
func (FieldEnum) IsNotReserved ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func (*Generator) GenCommandClasses ¶
func (*Generator) GenDevices ¶
type GenericDevice ¶
type Param ¶
type Param struct { Key string `xml:"key,attr"` Name string `xml:"name,attr"` Type string `xml:"type,attr"` TypeHashCode string `xml:"typehashcode,attr"` Comment string `xml:"comment,attr"` EncapType string `xml:"encaptype,attr"` OptionalOffset string `xml:"optionaloffs,attr"` OptionalMask string `xml:"optionalmask,attr"` Encapsulated bool `xml:"encapsulated,attr"` CommandMask string `xml:"cmd_mask,attr"` Affix bool `xml:"affix,attr"` ArrayAttrib []ArrayAttrib `xml:"arrayattrib"` Bit24 []Bit24 `xml:"bit_24"` BitField []BitField `xml:"bitfield"` BitFlag []BitFlag `xml:"bitflag"` Const []Const `xml:"const"` DWord []DWord `xml:"dword"` FieldEnum []FieldEnum `xml:"fieldenum"` ValueAttrib []ValueAttrib `xml:"valueattrib"` Variant []Variant `xml:"variant"` Bitmask []Bitmask `xml:"bitmask"` Word []Word `xml:"word"` }
func (Param) GetEncodedByteLength ¶
func (Param) IsNotReserved ¶
type SpecificDevice ¶
type ValueAttrib ¶
type Variant ¶
type Variant struct { Key string `xml:"key,attr"` ParamOffset Byte `xml:"paramoffs,attr"` HasDefines bool `xml:"hasdefines,attr"` ShowHex bool `xml:"showhex,attr"` Signed bool `xml:"signed,attr"` SizeMask string `xml:"sizemask,attr"` SizeOffset string `xml:"sizeoffs,attr"` MarkerDelimited bool MarkerValue string RemainingBytes uint8 }
type ZwClasses ¶
type ZwClasses struct { XMLName xml.Name `xml:"zw_classes"` BasicDevices []BasicDevice `xml:"bas_dev"` GenericDevices []GenericDevice `xml:"gen_dev"` CommandClasses []CommandClass `xml:"cmd_class"` }