Documentation ¶
Index ¶
- Constants
- func Color16ToRGB(colorStr string) (red, green, blue int, err error)
- type Device
- func (device *Device) AddAction(action *actions.Action)
- func (device *Device) AddEvent(event *events.Event)
- func (device *Device) AddProperty(property *properties.Property)
- func (device *Device) GetAtContext() string
- func (device *Device) GetAtType() string
- func (device *Device) GetDescription() string
- func (device *Device) GetID() string
- func (device *Device) GetTitle() string
- type LightBulb
- type LightHandler
- type Link
- type Pin
Constants ¶
View Source
const ( TypeString = "string" TypeBoolean = "boolean" TypeInteger = "integer" TypeNumber = "number" UnitHectopascal = "hectopascal" UnitKelvin = "kelvin" UnitPercentage = "percentage" UnitArcDegrees = "arcdegrees" UnitCelsius = "celsius" UnitLux = "lux" UnitSeconds = "seconds" UnitPPM = "ppm" AlarmProperty = "AlarmProperty" BarometricPressureProperty = "BarometricPressureProperty" ColorProperty = "ColorProperty" ColorTemperatureProperty = "ColorTemperatureProperty" ConcentrationProperty = "ConcentrationProperty" CurrentProperty = "CurrentProperty" DensityProperty = "DensityProperty" FrequencyProperty = "FrequencyProperty" HeatingCoolingProperty = "HeatingCoolingProperty" HumidityProperty = "HumidityProperty" ImageProperty = "ImageProperty" InstantaneousPowerFactorProperty = "InstantaneousPowerFactorProperty" InstantaneousPowerProperty = "InstantaneousPowerProperty" LeakProperty = "LeakProperty" LevelProperty = "LevelProperty" LockedProperty = "LockedProperty" MotionProperty = "MotionProperty" OpenProperty = "OpenProperty" PushedProperty = "PushedProperty" SmokeProperty = "SmokeProperty" TargetTemperatureProperty = "TargetTemperatureProperty" TemperatureProperty = "TemperatureProperty" ThermostatModeProperty = "ThermostatModeProperty" VideoProperty = "VideoProperty" VoltageProperty = "VoltageProperty" )
Variables ¶
This section is empty.
Functions ¶
func Color16ToRGB ¶
Types ¶
type Device ¶
type Device struct { ID string `json:"id"` AtContext string `json:"@context"` AtType string `json:"@type"` Title string `json:"title"` Description string `json:"description,omitempty"` Links []*Link `json:"links,omitempty"` PinRequired bool `json:"pinRequired"` CredentialsRequired bool `json:"credentialsRequired"` BaseHref string `json:"baseHref"` Pin *Pin `json:"pin,omitempty"` Properties map[string]*properties.Property `json:"properties,omitempty"` Actions map[string]*actions.Action `json:"action,omitempty"` Events map[string]*events.Event `json:"events,omitempty"` }
func NewDeviceFormMessage ¶
func NewDeviceFormMessage(dev *rpc.Device) *Device
func NewDeviceFormString ¶
func (*Device) AddProperty ¶
func (device *Device) AddProperty(property *properties.Property)
func (*Device) GetAtContext ¶
func (*Device) GetDescription ¶
type LightHandler ¶
type LightHandler interface { TurnOn() TurnOff() SetBrightness(brightness int) }
Click to show internal directories.
Click to hide internal directories.