map_models

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceState

type DeviceState struct {
	Id          int64          `json:"id"`
	Status      *m.DeviceState `json:"status"`
	Options     interface{}    `json:"options"`
	ElementName string         `json:"element_name"`
}

type Devices

type Devices struct {
	sync.Mutex
	Total       int64                   `json:"total"`
	DeviceStats map[string]*DeviceState `json:"device_stats"`
	// contains filtered or unexported fields
}

func NewDevices

func NewDevices(adaptors *adaptors.Adaptors,
	core *core.Core) *Devices

func (*Devices) Broadcast

func (d *Devices) Broadcast() (map[string]interface{}, bool)

func (*Devices) BroadcastOne

func (d *Devices) BroadcastOne(deviceId int64, elementName string) (map[string]interface{}, bool)

func (*Devices) GetDevicesStates

func (d *Devices) GetDevicesStates(client *stream.Client, message stream.Message)

only on request: 'map.get.devices.states'

func (*Devices) Update

func (d *Devices) Update()

Jump to

Keyboard shortcuts

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