attribute

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeOf

func TypeOf(iface interface{}) string

func ValueOf

func ValueOf(iface interface{}) interface{}

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

func (*Base) Notify

func (b *Base) Notify(val interface{}) error

Notify 触发Base.notifyFn,通过channel通知SA

func (*Base) Set

func (b *Base) Set(val interface{}) error

Set 触发Base.updateFn,更新设备属性

func (*Base) SetNotifyFunc

func (b *Base) SetNotifyFunc(fn NotifyFunc)

SetNotifyFunc 设置通知函数

func (*Base) SetUpdateFunc

func (b *Base) SetUpdateFunc(fn UpdateFunc)

SetUpdateFunc 设置属性更新函数

type Bool

type Bool struct {
	Base
	// contains filtered or unexported fields
}

func (*Bool) GetBool

func (b *Bool) GetBool() bool

func (*Bool) SetBool

func (b *Bool) SetBool(v bool)

type BoolType

type BoolType interface {
	GetBool() bool
	SetBool(bool)
}

type Enum

type Enum struct {
	Base
	// contains filtered or unexported fields
}

func (*Enum) GetEnum

func (e *Enum) GetEnum() int

func (*Enum) SetEnum

func (e *Enum) SetEnum(enum int)

func (*Enum) SetEnums

func (e *Enum) SetEnums(enums ...int)

type Identity

type Identity struct {
	String
}

func NewIdentity

func NewIdentity() *Identity

type Int

type Int struct {
	Base
	// contains filtered or unexported fields
}

func (*Int) GetInt

func (i *Int) GetInt() int

func (*Int) GetRange

func (i *Int) GetRange() (min, max *int)

func (*Int) SetInt

func (i *Int) SetInt(v int)

func (*Int) SetRange

func (i *Int) SetRange(min, max int)

type IntType

type IntType interface {
	GetRange() (*int, *int)
	SetRange(int, int)
	GetInt() int
	SetInt(int)
}

type Manufacturer

type Manufacturer struct {
	String
}

func NewManufacturer

func NewManufacturer() *Manufacturer

type Model

type Model struct {
	String
}

func NewModel

func NewModel() *Model

type Name

type Name struct {
	String
}

func NewName

func NewName() *Name

type Notifier

type Notifier interface {
	Notify(val interface{}) error
	SetNotifyFunc(NotifyFunc)
}

type NotifyFunc

type NotifyFunc func(val interface{}) error

type Power

type Power struct {
	String
}

func NewPower

func NewPower() *Power

type Setter

type Setter interface {
	Set(val interface{}) error
}

type String

type String struct {
	Base
	// contains filtered or unexported fields
}

func StringWithValidValues

func StringWithValidValues(values ...string) String

func (String) GetString

func (s String) GetString() string

func (*String) SetString

func (s *String) SetString(v string)

type StringType

type StringType interface {
	GetString() string
	SetString(string)
}

type UpdateFunc

type UpdateFunc func(val interface{}) error

type Version

type Version struct {
	String
}

func NewVersion

func NewVersion() *Version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL