instance

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 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 Active added in v1.9.1

type Active struct {
	attribute.Int
}

Active 活动状态,0 非活动,1 活动

func NewActive added in v1.9.1

func NewActive() *Active

type Battery added in v1.5.0

type Battery struct {
	attribute.Int
}

func NewBattery added in v1.5.0

func NewBattery() *Battery

NewBattery 电量

type Brightness

type Brightness struct {
	attribute.Int
}

func NewBrightness

func NewBrightness() *Brightness

type Calibration added in v1.9.1

type Calibration struct {
	attribute.Bool
}

func NewCalibration added in v1.9.1

func NewCalibration() *Calibration

type ChildInstanceService added in v1.9.1

type ChildInstanceService interface {
	GetAid() int // 获取设备ID
	GetIid() int // 获取特征ID
}

ChildInstanceService 子设备服务

type ChildInstances added in v1.9.1

type ChildInstances struct {
	Instances []interface{}
}

ChildInstances 子设备

func (ChildInstances) InstanceName added in v1.9.1

func (c ChildInstances) InstanceName() string

type ColorTemp

type ColorTemp struct {
	attribute.Int
}

func NewColorTemp

func NewColorTemp() *ColorTemp

type CurrentState added in v1.5.0

type CurrentState struct {
	attribute.Int
}

CurrentState 当前状态

func NewCurrentState added in v1.5.0

func NewCurrentState() *CurrentState

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设置
	Calibration *Calibration // 校准 true为进行校准/已经校准完 false为未校准
}

Curtain 窗帘

func (Curtain) InstanceName

func (c Curtain) InstanceName() string

type Detected added in v1.5.0

type Detected struct {
	attribute.Int
}

func NewDetected added in v1.5.0

func NewDetected() *Detected

NewDetected 侦查

type Direction

type Direction struct {
	attribute.Enum
}

Direction 方向

func NewDirection

func NewDirection() *Direction

type GatewayServices added in v1.9.1

type GatewayServices struct {
	Services []interface{}
}

func (GatewayServices) InstanceName added in v1.9.1

func (s GatewayServices) InstanceName() string

type HeaterCooler added in v1.9.1

type HeaterCooler struct {
	Active                      *Active
	CurrentTemperature          *Temperature       // 当前温度
	CoolingThresholdTemperature *Temperature       // 冷却阈值温度
	HeatingThresholdTemperature *Temperature       // 加热阈值温度
	CurrentHeaterCoolerState    *HeaterCoolerState // 当前加热器冷却器状态,1 空闲,2 加热,3 冷却
	TargetHeaterCoolerState     *HeaterCoolerState // 当前加热器冷却器状态,1 加热,2 冷却
	RotationSpeed               *RotationSpeed     // 风扇旋转速度,0-100,step 25
	SwingMode                   *SwingMode         // 摆动模式,0 不摆动,1 摆动
}

HeaterCooler 加热冷却

type HeaterCoolerState added in v1.9.1

type HeaterCoolerState struct {
	attribute.Int
}

HeaterCoolerState 加热冷却器的当前状态 0“无效”“1”空闲”“2”加热“3”冷却

func NewHeaterCoolerState added in v1.9.1

func NewHeaterCoolerState() *HeaterCoolerState

type Hue

type Hue struct {
	attribute.Int
}

func NewHue

func NewHue() *Hue

type Humidity added in v1.5.0

type Humidity struct {
	attribute.Int
}

Humidity 湿度

func NewHumidity added in v1.5.0

func NewHumidity() *Humidity

type HumiditySensor added in v1.9.1

type HumiditySensor struct {
	CurrentRelativeHumidity *Humidity
}

HumiditySensor 湿度

type InUse added in v1.9.1

type InUse struct {
	attribute.Bool
}

InUse 电源插座是否有物理插入

func NewInUse added in v1.9.1

func NewInUse() *InUse

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 IsChildInstance added in v1.9.1

type IsChildInstance struct {
	attribute.Bool
}

IsChildInstance 是否子设备

func NewIsChildInstance added in v1.9.1

func NewIsChildInstance() *IsChildInstance

type LeakDetected added in v1.5.0

type LeakDetected struct {
	attribute.Int
}

LeakDetected 0:表示未检测到水浸 1:表示检测到水浸

func NewLeakDetected added in v1.5.0

func NewLeakDetected() *LeakDetected

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 Lock added in v1.9.1

type Lock struct {
	LockTargetState *LockTargetState
	Logs            *Logs
	Battery         *Battery
}

Lock 智能门锁

type LockTargetState added in v1.9.1

type LockTargetState struct {
	attribute.Int
}

LockTargetState 锁的目标状态

func NewLockTargetState added in v1.9.1

func NewLockTargetState() *LockTargetState

type Logs added in v1.9.1

type Logs struct {
	attribute.String
}

Logs 日志

func NewLogs added in v1.9.1

func NewLogs() *Logs

type MotionSensor added in v1.5.0

type MotionSensor struct {
	IsChildInstance *IsChildInstance
	Name            *attribute.Name
	Model           *attribute.Model
	Manufacturer    *attribute.Manufacturer
	Version         *attribute.Version

	Detected *Detected
	Battery  *Battery
}

MotionSensor 人体传感器

func (MotionSensor) InstanceName added in v1.5.0

func (w MotionSensor) InstanceName() string

type Outlet

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

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.String
}

func NewRGB

func NewRGB() *RGB

type RotationSpeed added in v1.9.1

type RotationSpeed struct {
	attribute.Int
}

RotationSpeed 风扇旋转速度

func NewRotationSpeed added in v1.9.1

func NewRotationSpeed() *RotationSpeed

type Saturation

type Saturation struct {
	attribute.Int
}

func NewSaturation

func NewSaturation() *Saturation

type SecuritySystem added in v1.5.0

type SecuritySystem struct {
	TargetState  *TargetState
	CurrentState *CurrentState
}

SecuritySystem 安全系统

func (SecuritySystem) InstanceName added in v1.5.0

func (w SecuritySystem) InstanceName() string

type State

type State struct {
	attribute.Enum
}

State 窗帘状态

func NewState

func NewState() *State

type StatelessSwitch added in v1.9.1

type StatelessSwitch struct {
	IsChildInstance *IsChildInstance
	Name            *attribute.Name
	Model           *attribute.Model
	Manufacturer    *attribute.Manufacturer
	Version         *attribute.Version

	SwitchEvent *SwitchEvent
	Battery     *Battery
}

StatelessSwitch 无状态开关

func (StatelessSwitch) InstanceName added in v1.9.1

func (s StatelessSwitch) InstanceName() string

type Style

type Style struct {
	attribute.Enum
}

Style 窗帘样式

func NewStyle

func NewStyle() *Style

type SwingMode added in v1.9.1

type SwingMode struct {
	attribute.Int
}

SwingMode 摆动模式,0 不摆动,1 摆动

func NewSwingMode added in v1.9.1

func NewSwingMode() *SwingMode

type Switch

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

func (Switch) InstanceName

func (l Switch) InstanceName() string

type SwitchEvent added in v1.9.1

type SwitchEvent struct {
	attribute.Int
}

SwitchEvent 开关事件

func NewSwitchEvent added in v1.9.1

func NewSwitchEvent() *SwitchEvent

type TargetState added in v1.5.0

type TargetState struct {
	attribute.Int
}

TargetState 目标状态

func NewTargetState added in v1.5.0

func NewTargetState() *TargetState

type TempHumiditySensor added in v1.5.0

type TempHumiditySensor struct {
	IsChildInstance *IsChildInstance
	Name            *attribute.Name
	Model           *attribute.Model
	Manufacturer    *attribute.Manufacturer
	Version         *attribute.Version

	Temperature *Temperature
	Humidity    *Humidity
	Battery     *Battery
}

TempHumiditySensor 温湿度传感器

func (TempHumiditySensor) InstanceName added in v1.5.0

func (w TempHumiditySensor) InstanceName() string

type Temperature added in v1.5.0

type Temperature struct {
	attribute.Int
}

Temperature 温度

func NewTemperature added in v1.5.0

func NewTemperature() *Temperature

type WaterLeakSensor added in v1.5.0

type WaterLeakSensor struct {
	IsChildInstance *IsChildInstance
	Name            *attribute.Name
	Model           *attribute.Model
	Manufacturer    *attribute.Manufacturer
	Version         *attribute.Version

	LeakDetected *LeakDetected
	Battery      *Battery
}

WaterLeakSensor 水浸传感器

func (WaterLeakSensor) InstanceName added in v1.5.0

func (w WaterLeakSensor) InstanceName() string

type WindowDoorClose added in v1.5.0

type WindowDoorClose struct {
	attribute.Int
}

func NewWindowDoorClose added in v1.5.0

func NewWindowDoorClose() *WindowDoorClose

type WindowDoorSensor added in v1.5.0

type WindowDoorSensor struct {
	IsChildInstance *IsChildInstance
	Name            *attribute.Name
	Model           *attribute.Model
	Manufacturer    *attribute.Manufacturer
	Version         *attribute.Version

	WindowDoorClose *WindowDoorClose
	Battery         *Battery
}

WindowDoorSensor 门窗传感器

func (WindowDoorSensor) InstanceName added in v1.5.0

func (w WindowDoorSensor) InstanceName() string

Jump to

Keyboard shortcuts

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