instance

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brightness

type Brightness struct {
	attribute.Int
}

func NewBrightness

func NewBrightness() *Brightness

type ColorTemp

type ColorTemp struct {
	attribute.Int
}

func NewColorTemp

func NewColorTemp() *ColorTemp

type Curtain

type Curtain struct {
	CurrentPosition *Position `tag:"required"` // 当前位置 0-100 TODO 不可写字段
	TargetPosition  *Position `tag:"required"` // 目标位置 0-100
	State           *State    `tag:"required"` // 0关1开2暂停
	Style           *Style    // 0左右1左开2右开3上下

	// TODO 考虑窗帘和窗帘控制器分开定义
	Direction  *Direction // 0默认方向1反方向
	UpperLimit *Limit     // 0删除1设置
	LowerLimit *Limit     // 0删除1设置
}

Curtain 窗帘

func (Curtain) InstanceName

func (c Curtain) InstanceName() string

type Direction

type Direction struct {
	attribute.Enum
}

Direction 方向

func NewDirection

func NewDirection() *Direction

type Hue

type Hue struct {
	attribute.Int
}

func NewHue

func NewHue() *Hue

type Info

type Info struct {
	Name         *attribute.Name
	Identity     *attribute.Identity     `tag:"required"`
	Model        *attribute.Model        `tag:"required"`
	Manufacturer *attribute.Manufacturer `tag:"required"`
	Version      *attribute.Version
}

func (Info) InstanceName

func (i Info) InstanceName() string

type LightBulb

type LightBulb struct {
	Power      *attribute.Power `tag:"required"`
	ColorTemp  *ColorTemp
	Brightness *Brightness
	Hue        *Hue
	Saturation *Saturation
	RGB        *RGB
}

func (LightBulb) InstanceName

func (l LightBulb) InstanceName() string

type Limit

type Limit struct {
	attribute.Enum
}

Limit 上/下限

func NewLimit

func NewLimit() *Limit

type Outlet

type Outlet struct {
	Power *attribute.Power `tag:"required"`
}

func (Outlet) InstanceName

func (o Outlet) InstanceName() string

type Position

type Position struct {
	attribute.Int
}

Position 窗帘行程位置

func NewPosition

func NewPosition() *Position

type RGB

type RGB struct {
	attribute.Int
}

func NewRGB

func NewRGB() *RGB

type Saturation

type Saturation struct {
	attribute.Int
}

func NewSaturation

func NewSaturation() *Saturation

type State

type State struct {
	attribute.Enum
}

State 窗帘状态

func NewState

func NewState() *State

type Style

type Style struct {
	attribute.Enum
}

Style 窗帘样式

func NewStyle

func NewStyle() *Style

type Switch

type Switch struct {
	Power *attribute.Power `tag:"required"`
}

func (Switch) InstanceName

func (l Switch) InstanceName() string

Jump to

Keyboard shortcuts

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