Documentation
¶
Index ¶
- type BaseDevice
- func (b *BaseDevice) AddCapability(c capability.Capability)
- func (b *BaseDevice) DecodeRequest(pkt *packet.Packet) (*transport.Request, error)
- func (b *BaseDevice) HandleDiscover(pkt *packet.Packet) (*packet.Packet, error)
- func (b *BaseDevice) HandlePacket(pkt *packet.Packet) (*packet.Packet, error)
- func (b *BaseDevice) PackResponse(response interface{}) (*packet.Packet, error)
- type SimulatedDevice
- type SimulatedPowerPlug
- type SimulatedYeelight
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDevice ¶
type BaseDevice struct {
// contains filtered or unexported fields
}
func NewBaseDevice ¶
func NewBaseDevice(deviceID uint32, deviceToken []byte, revealToken bool) (*BaseDevice, error)
func (*BaseDevice) AddCapability ¶
func (b *BaseDevice) AddCapability(c capability.Capability)
func (*BaseDevice) DecodeRequest ¶
func (*BaseDevice) HandleDiscover ¶
func (*BaseDevice) HandlePacket ¶
func (*BaseDevice) PackResponse ¶
func (b *BaseDevice) PackResponse(response interface{}) (*packet.Packet, error)
type SimulatedDevice ¶
type SimulatedPowerPlug ¶
type SimulatedPowerPlug struct {
*BaseDevice
}
func NewSimulatedPowerPlug ¶
func NewSimulatedPowerPlug(baseDevice *BaseDevice) *SimulatedPowerPlug
type SimulatedYeelight ¶
type SimulatedYeelight struct {
*BaseDevice
}
func NewSimulatedYeelight ¶
func NewSimulatedYeelight(baseDevice *BaseDevice) *SimulatedYeelight
Click to show internal directories.
Click to hide internal directories.