characteristic

package
v0.0.0-...-927397c Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeAccessoryFlags                            = "A6"
	TypeActive                                    = "B0"
	TypeActiveIdentifier                          = "E7"
	TypeAdministratorOnlyAccess                   = "1"
	TypeAudioFeedback                             = "5"
	TypeAirParticulateDensity                     = "64"
	TypeAirParticulateSize                        = "65"
	TypeAirQuality                                = "95"
	TypeBatteryLevel                              = "68"
	TypeBrightness                                = "8"
	TypeButtonEvent                               = "126"
	TypeCarbonMonoxideLevel                       = "90"
	TypeCarbonMonoxidePeakLevel                   = "91"
	TypeCarbonDioxideDetected                     = "92"
	TypeCarbonDioxideLevel                        = "93"
	TypeCarbonDioxidePeakLevel                    = "94"
	TypeCarbonMonoxideDetected                    = "69"
	TypeChargingState                             = "8F"
	TypeCoolingThresholdTemperature               = "D"
	TypeColorTemperature                          = "CE"
	TypeContactSensorState                        = "6A"
	TypeCurrentAmbientLightLevel                  = "6B"
	TypeCurrentHorizontalTiltAngle                = "6C"
	TypeCurrentAirPurifierState                   = "A9"
	TypeCurrentSlatState                          = "AA"
	TypeCurrentPosition                           = "6D"
	TypeCurrentVerticalTiltAngle                  = "6E"
	TypeCurrentHumidifierDehumidifierState        = "B3"
	TypeCurrentDoorState                          = "E"
	TypeCurrentFanState                           = "AF"
	TypeCurrentHeatingCoolingState                = "F"
	TypeCurrentHeaterCoolerState                  = "B1"
	TypeCurrentRelativeHumidity                   = "10"
	TypeCurrentTemperature                        = "11"
	TypeCurrentTiltAngle                          = "C1"
	TypeDigitalZoom                               = "11D"
	TypeFilterLifeLevel                           = "AB"
	TypeFilterChangeIndication                    = "AC"
	TypeFirmwareRevision                          = "52"
	TypeHardwareRevision                          = "53"
	TypeHeatingThresholdTemperature               = "12"
	TypeHoldPosition                              = "6F"
	TypeHue                                       = "13"
	TypeIdentify                                  = "14"
	TypeImageRotation                             = "11E"
	TypeImageMirroring                            = "11F"
	TypeInUse                                     = "D2"
	TypeIsConfigured                              = "D6"
	TypeLeakDetected                              = "70"
	TypeLockControlPoint                          = "19"
	TypeLockCurrentState                          = "1D"
	TypeLockLastKnownAction                       = "1C"
	TypeLockManagementAutoSecurityTimeout         = "1A"
	TypeLockPhysicalControls                      = "A7"
	TypeLockTargetState                           = "1E"
	TypeLogs                                      = "1F"
	TypeManufacturer                              = "20"
	TypeModel                                     = "21"
	TypeMotionDetected                            = "22"
	TypeMute                                      = "11A"
	TypeName                                      = "23"
	TypeNightVision                               = "11B"
	TypeNitrogenDioxideDensity                    = "C4"
	TypeObstructionDetected                       = "24"
	TypePM25Density                               = "C6"
	TypeOccupancyDetected                         = "71"
	TypeOpticalZoom                               = "11C"
	TypeOutletInUse                               = "26"
	TypeOn                                        = "25"
	TypeOzoneDensity                              = "C3"
	TypePM10Density                               = "C7"
	TypePositionState                             = "72"
	TypeProgramMode                               = "D1"
	TypeProgrammableSwitchEvent                   = "73"
	TypeRelativeHumidityDehumidifierThreshold     = "C9"
	TypeRelativeHumidityHumidifierThreshold       = "CA"
	TypeRemainingDuration                         = "D4"
	TypeResetFilterIndication                     = "AD"
	TypeRotationDirection                         = "28"
	TypeRotationSpeed                             = "29"
	TypeSaturation                                = "2F"
	TypeSecuritySystemAlarmType                   = "8E"
	TypeSecuritySystemCurrentState                = "66"
	TypeSecuritySystemTargetState                 = "67"
	TypeSelectedAudioStreamConfiguration          = "128"
	TypeSerialNumber                              = "30"
	TypeServiceLabelIndex                         = "CB"
	TypeServiceLabelNamespace                     = "CD"
	TypeSetupDataStreamTransport                  = "131"
	TypeSelectedRTPStreamConfiguration            = "117"
	TypeSetupEndpoints                            = "118"
	TypeSiriInputType                             = "132"
	TypeSlatType                                  = "C0"
	TypeSmokeDetected                             = "76"
	TypeStatusActive                              = "75"
	TypeStatusFault                               = "77"
	TypeStatusJammed                              = "78"
	TypeStatusLowBattery                          = "79"
	TypeStatusTampered                            = "7A"
	TypeStreamingStatus                           = "120"
	TypeSupportedAudioStreamConfiguration         = "115"
	TypeSupportedDataStreamTransportConfiguration = "130"
	TypeSupportedRTPConfiguration                 = "116"
	TypeSupportedVideoStreamConfiguration         = "114"
	TypeSulphurDioxideDensity                     = "C5"
	TypeSwingMode                                 = "B6"
	TypeTargetAirPurifierState                    = "A8"
	TypeTargetFanState                            = "BF"
	TypeTargetTiltAngle                           = "C2"
	TypeSetDuration                               = "D3"
	TypeTargetControlSupportedConfiguration       = "123"
	TypeTargetControlList                         = "124"
	TypeTargetHorizontalTiltAngle                 = "7B"
	TypeTargetHeaterCoolerState                   = "B2"
	TypeTargetHumidifierDehumidifierState         = "B4"
	TypeTargetPosition                            = "7C"
	TypeTargetDoorState                           = "32"
	TypeTargetHeatingCoolingState                 = "33"
	TypeTargetRelativeHumidity                    = "34"
	TypeTargetTemperature                         = "35"
	TypeTemperatureDisplayUnits                   = "36"
	TypeTargetVerticalTiltAngle                   = "7D"
	TypeValveType                                 = "D5"
	TypeVersion                                   = "37"
	TypeVOCDensity                                = "C8"
	TypeVolume                                    = "119"
	TypeWaterLevel                                = "B5"
)

Variables

This section is empty.

Functions

func NameForType

func NameForType(t string) string

NameForType returns a human friendly name for the type or "<Unknown>" if the type is not registered.

func ParseValueForType

func ParseValueForType(t string, v string) (interface{}, error)

ParseValueForType parses a string value to go type defined by the type metadata's format.

func RegisterType

func RegisterType(tm TypeMetadata)

RegisterType allows registering a custom type

func ValueForFormat

func ValueForFormat(f string, v Value) interface{}

ValueForFormat will parse v to the type matching the format. The value must match the format or this method will panic. If the format is unknown then an instance of UndefinedValue is returned.

func ValueForType

func ValueForType(t string, v Value) interface{}

ValueForType will parse v based on the format registered in the type's metadata.

Types

type AccessoryFlags

type AccessoryFlags struct {
	ID    uint64
	Value uint32
}

func ReadAccessoryFlags

func ReadAccessoryFlags(ch *RawCharacteristic) *AccessoryFlags

type Active

type Active struct {
	ID    uint64
	Value byte
}

func ReadActive

func ReadActive(ch *RawCharacteristic) *Active

type ActiveIdentifier

type ActiveIdentifier struct {
	ID    uint64
	Value uint32
}

func ReadActiveIdentifier

func ReadActiveIdentifier(ch *RawCharacteristic) *ActiveIdentifier

type AdministratorOnlyAccess

type AdministratorOnlyAccess struct {
	ID    uint64
	Value bool
}

func ReadAdministratorOnlyAccess

func ReadAdministratorOnlyAccess(ch *RawCharacteristic) *AdministratorOnlyAccess

type AirParticulateDensity

type AirParticulateDensity struct {
	ID    uint64
	Value float64
}

func ReadAirParticulateDensity

func ReadAirParticulateDensity(ch *RawCharacteristic) *AirParticulateDensity

type AirParticulateSize

type AirParticulateSize struct {
	ID    uint64
	Value byte
}

func ReadAirParticulateSize

func ReadAirParticulateSize(ch *RawCharacteristic) *AirParticulateSize

type AirQuality

type AirQuality struct {
	ID    uint64
	Value byte
}

func ReadAirQuality

func ReadAirQuality(ch *RawCharacteristic) *AirQuality

type AudioFeedback

type AudioFeedback struct {
	ID    uint64
	Value bool
}

func ReadAudioFeedback

func ReadAudioFeedback(ch *RawCharacteristic) *AudioFeedback

type BatteryLevel

type BatteryLevel struct {
	ID    uint64
	Value byte
}

func ReadBatteryLevel

func ReadBatteryLevel(ch *RawCharacteristic) *BatteryLevel

type Brightness

type Brightness struct {
	ID    uint64
	Value int32
}

func ReadBrightness

func ReadBrightness(ch *RawCharacteristic) *Brightness

type ButtonEvent

type ButtonEvent struct {
	ID    uint64
	Value []byte
}

func ReadButtonEvent

func ReadButtonEvent(ch *RawCharacteristic) *ButtonEvent

type CarbonDioxideDetected

type CarbonDioxideDetected struct {
	ID    uint64
	Value byte
}

func ReadCarbonDioxideDetected

func ReadCarbonDioxideDetected(ch *RawCharacteristic) *CarbonDioxideDetected

type CarbonDioxideLevel

type CarbonDioxideLevel struct {
	ID    uint64
	Value float64
}

func ReadCarbonDioxideLevel

func ReadCarbonDioxideLevel(ch *RawCharacteristic) *CarbonDioxideLevel

type CarbonDioxidePeakLevel

type CarbonDioxidePeakLevel struct {
	ID    uint64
	Value float64
}

func ReadCarbonDioxidePeakLevel

func ReadCarbonDioxidePeakLevel(ch *RawCharacteristic) *CarbonDioxidePeakLevel

type CarbonMonoxideDetected

type CarbonMonoxideDetected struct {
	ID    uint64
	Value byte
}

func ReadCarbonMonoxideDetected

func ReadCarbonMonoxideDetected(ch *RawCharacteristic) *CarbonMonoxideDetected

type CarbonMonoxideLevel

type CarbonMonoxideLevel struct {
	ID    uint64
	Value float64
}

func ReadCarbonMonoxideLevel

func ReadCarbonMonoxideLevel(ch *RawCharacteristic) *CarbonMonoxideLevel

type CarbonMonoxidePeakLevel

type CarbonMonoxidePeakLevel struct {
	ID    uint64
	Value float64
}

func ReadCarbonMonoxidePeakLevel

func ReadCarbonMonoxidePeakLevel(ch *RawCharacteristic) *CarbonMonoxidePeakLevel

type ChargingState

type ChargingState struct {
	ID    uint64
	Value byte
}

func ReadChargingState

func ReadChargingState(ch *RawCharacteristic) *ChargingState

type ColorTemperature

type ColorTemperature struct {
	ID    uint64
	Value uint32
}

func ReadColorTemperature

func ReadColorTemperature(ch *RawCharacteristic) *ColorTemperature

type ContactSensorState

type ContactSensorState struct {
	ID    uint64
	Value byte
}

func ReadContactSensorState

func ReadContactSensorState(ch *RawCharacteristic) *ContactSensorState

type CoolingThresholdTemperature

type CoolingThresholdTemperature struct {
	ID    uint64
	Value float64
}

func ReadCoolingThresholdTemperature

func ReadCoolingThresholdTemperature(ch *RawCharacteristic) *CoolingThresholdTemperature

type CurrentAirPurifierState

type CurrentAirPurifierState struct {
	ID    uint64
	Value byte
}

func ReadCurrentAirPurifierState

func ReadCurrentAirPurifierState(ch *RawCharacteristic) *CurrentAirPurifierState

type CurrentAmbientLightLevel

type CurrentAmbientLightLevel struct {
	ID    uint64
	Value float64
}

func ReadCurrentAmbientLightLevel

func ReadCurrentAmbientLightLevel(ch *RawCharacteristic) *CurrentAmbientLightLevel

type CurrentDoorState

type CurrentDoorState struct {
	ID    uint64
	Value byte
}

func ReadCurrentDoorState

func ReadCurrentDoorState(ch *RawCharacteristic) *CurrentDoorState

type CurrentFanState

type CurrentFanState struct {
	ID    uint64
	Value byte
}

func ReadCurrentFanState

func ReadCurrentFanState(ch *RawCharacteristic) *CurrentFanState

type CurrentHeaterCoolerState

type CurrentHeaterCoolerState struct {
	ID    uint64
	Value byte
}

func ReadCurrentHeaterCoolerState

func ReadCurrentHeaterCoolerState(ch *RawCharacteristic) *CurrentHeaterCoolerState

type CurrentHeatingCoolingState

type CurrentHeatingCoolingState struct {
	ID    uint64
	Value byte
}

func ReadCurrentHeatingCoolingState

func ReadCurrentHeatingCoolingState(ch *RawCharacteristic) *CurrentHeatingCoolingState

type CurrentHorizontalTiltAngle

type CurrentHorizontalTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadCurrentHorizontalTiltAngle

func ReadCurrentHorizontalTiltAngle(ch *RawCharacteristic) *CurrentHorizontalTiltAngle

type CurrentHumidifierDehumidifierState

type CurrentHumidifierDehumidifierState struct {
	ID    uint64
	Value byte
}

type CurrentPosition

type CurrentPosition struct {
	ID    uint64
	Value byte
}

func ReadCurrentPosition

func ReadCurrentPosition(ch *RawCharacteristic) *CurrentPosition

type CurrentRelativeHumidity

type CurrentRelativeHumidity struct {
	ID    uint64
	Value float64
}

func ReadCurrentRelativeHumidity

func ReadCurrentRelativeHumidity(ch *RawCharacteristic) *CurrentRelativeHumidity

type CurrentSlatState

type CurrentSlatState struct {
	ID    uint64
	Value byte
}

func ReadCurrentSlatState

func ReadCurrentSlatState(ch *RawCharacteristic) *CurrentSlatState

type CurrentTemperature

type CurrentTemperature struct {
	ID    uint64
	Value float64
}

func ReadCurrentTemperature

func ReadCurrentTemperature(ch *RawCharacteristic) *CurrentTemperature

func (*CurrentTemperature) Celcius

func (c *CurrentTemperature) Celcius() float64

Celcius returns the temperature in degrees Celcius

func (*CurrentTemperature) Fahrenheit

func (c *CurrentTemperature) Fahrenheit() float64

Fahrenheit returns the temperature in degrees Fahrenheit

type CurrentTiltAngle

type CurrentTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadCurrentTiltAngle

func ReadCurrentTiltAngle(ch *RawCharacteristic) *CurrentTiltAngle

type CurrentVerticalTiltAngle

type CurrentVerticalTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadCurrentVerticalTiltAngle

func ReadCurrentVerticalTiltAngle(ch *RawCharacteristic) *CurrentVerticalTiltAngle

type DigitalZoom

type DigitalZoom struct {
	ID    uint64
	Value float64
}

func ReadDigitalZoom

func ReadDigitalZoom(ch *RawCharacteristic) *DigitalZoom

type FilterChangeIndication

type FilterChangeIndication struct {
	ID    uint64
	Value byte
}

func ReadFilterChangeIndication

func ReadFilterChangeIndication(ch *RawCharacteristic) *FilterChangeIndication

type FilterLifeLevel

type FilterLifeLevel struct {
	ID    uint64
	Value float64
}

func ReadFilterLifeLevel

func ReadFilterLifeLevel(ch *RawCharacteristic) *FilterLifeLevel

type FirmwareRevision

type FirmwareRevision struct {
	ID    uint64
	Value string
}

func ReadFirmwareRevision

func ReadFirmwareRevision(ch *RawCharacteristic) *FirmwareRevision

type HardwareRevision

type HardwareRevision struct {
	ID    uint64
	Value string
}

func ReadHardwareRevision

func ReadHardwareRevision(ch *RawCharacteristic) *HardwareRevision

type HeatingThresholdTemperature

type HeatingThresholdTemperature struct {
	ID    uint64
	Value float64
}

func ReadHeatingThresholdTemperature

func ReadHeatingThresholdTemperature(ch *RawCharacteristic) *HeatingThresholdTemperature

type HoldPosition

type HoldPosition struct {
	ID    uint64
	Value bool
}

func ReadHoldPosition

func ReadHoldPosition(ch *RawCharacteristic) *HoldPosition

type Hue

type Hue struct {
	ID    uint64
	Value float64
}

func ReadHue

func ReadHue(ch *RawCharacteristic) *Hue

type Identify

type Identify struct {
	ID    uint64
	Value bool
}

func ReadIdentify

func ReadIdentify(ch *RawCharacteristic) *Identify

type ImageMirroring

type ImageMirroring struct {
	ID    uint64
	Value bool
}

func ReadImageMirroring

func ReadImageMirroring(ch *RawCharacteristic) *ImageMirroring

type ImageRotation

type ImageRotation struct {
	ID    uint64
	Value float64
}

func ReadImageRotation

func ReadImageRotation(ch *RawCharacteristic) *ImageRotation

type InUse

type InUse struct {
	ID    uint64
	Value byte
}

func ReadInUse

func ReadInUse(ch *RawCharacteristic) *InUse

type IsConfigured

type IsConfigured struct {
	ID    uint64
	Value byte
}

func ReadIsConfigured

func ReadIsConfigured(ch *RawCharacteristic) *IsConfigured

type LeakDetected

type LeakDetected struct {
	ID    uint64
	Value byte
}

func ReadLeakDetected

func ReadLeakDetected(ch *RawCharacteristic) *LeakDetected

type LockControlPoint

type LockControlPoint struct {
	ID    uint64
	Value []byte
}

func ReadLockControlPoint

func ReadLockControlPoint(ch *RawCharacteristic) *LockControlPoint

type LockCurrentState

type LockCurrentState struct {
	ID    uint64
	Value byte
}

func ReadLockCurrentState

func ReadLockCurrentState(ch *RawCharacteristic) *LockCurrentState

type LockLastKnownAction

type LockLastKnownAction struct {
	ID    uint64
	Value byte
}

func ReadLockLastKnownAction

func ReadLockLastKnownAction(ch *RawCharacteristic) *LockLastKnownAction

type LockManagementAutoSecurityTimeout

type LockManagementAutoSecurityTimeout struct {
	ID    uint64
	Value uint32
}

type LockPhysicalControls

type LockPhysicalControls struct {
	ID    uint64
	Value byte
}

func ReadLockPhysicalControls

func ReadLockPhysicalControls(ch *RawCharacteristic) *LockPhysicalControls

type LockTargetState

type LockTargetState struct {
	ID    uint64
	Value byte
}

func ReadLockTargetState

func ReadLockTargetState(ch *RawCharacteristic) *LockTargetState

type Logs

type Logs struct {
	ID    uint64
	Value []byte
}

func ReadLogs

func ReadLogs(ch *RawCharacteristic) *Logs

type Manufacturer

type Manufacturer struct {
	ID    uint64
	Value string
}

func ReadManufacturer

func ReadManufacturer(ch *RawCharacteristic) *Manufacturer

type Model

type Model struct {
	ID    uint64
	Value string
}

func ReadModel

func ReadModel(ch *RawCharacteristic) *Model

type MotionDetected

type MotionDetected struct {
	ID    uint64
	Value bool
}

func ReadMotionDetected

func ReadMotionDetected(ch *RawCharacteristic) *MotionDetected

type Mute

type Mute struct {
	ID    uint64
	Value bool
}

func ReadMute

func ReadMute(ch *RawCharacteristic) *Mute

type Name

type Name struct {
	ID    uint64
	Value string
}

func ReadName

func ReadName(ch *RawCharacteristic) *Name

type NightVision

type NightVision struct {
	ID    uint64
	Value bool
}

func ReadNightVision

func ReadNightVision(ch *RawCharacteristic) *NightVision

type NitrogenDioxideDensity

type NitrogenDioxideDensity struct {
	ID    uint64
	Value float64
}

func ReadNitrogenDioxideDensity

func ReadNitrogenDioxideDensity(ch *RawCharacteristic) *NitrogenDioxideDensity

type ObstructionDetected

type ObstructionDetected struct {
	ID    uint64
	Value bool
}

func ReadObstructionDetected

func ReadObstructionDetected(ch *RawCharacteristic) *ObstructionDetected

type OccupancyDetected

type OccupancyDetected struct {
	ID    uint64
	Value byte
}

func ReadOccupancyDetected

func ReadOccupancyDetected(ch *RawCharacteristic) *OccupancyDetected

type On

type On struct {
	ID    uint64
	Value bool
}

func ReadOn

func ReadOn(ch *RawCharacteristic) *On

type OpticalZoom

type OpticalZoom struct {
	ID    uint64
	Value float64
}

func ReadOpticalZoom

func ReadOpticalZoom(ch *RawCharacteristic) *OpticalZoom

type OutletInUse

type OutletInUse struct {
	ID    uint64
	Value bool
}

func ReadOutletInUse

func ReadOutletInUse(ch *RawCharacteristic) *OutletInUse

type OzoneDensity

type OzoneDensity struct {
	ID    uint64
	Value float64
}

func ReadOzoneDensity

func ReadOzoneDensity(ch *RawCharacteristic) *OzoneDensity

type PM10Density

type PM10Density struct {
	ID    uint64
	Value float64
}

func ReadPM10Density

func ReadPM10Density(ch *RawCharacteristic) *PM10Density

type PM25Density

type PM25Density struct {
	ID    uint64
	Value float64
}

func ReadPM25Density

func ReadPM25Density(ch *RawCharacteristic) *PM25Density

type PositionState

type PositionState struct {
	ID    uint64
	Value byte
}

func ReadPositionState

func ReadPositionState(ch *RawCharacteristic) *PositionState

type ProgramMode

type ProgramMode struct {
	ID    uint64
	Value byte
}

func ReadProgramMode

func ReadProgramMode(ch *RawCharacteristic) *ProgramMode

type ProgrammableSwitchEvent

type ProgrammableSwitchEvent struct {
	ID    uint64
	Value byte
}

func ReadProgrammableSwitchEvent

func ReadProgrammableSwitchEvent(ch *RawCharacteristic) *ProgrammableSwitchEvent

type RawCharacteristic

type RawCharacteristic struct {
	ID    uint64 `json:"iid"`
	Value Value  `json:"value"`

	Type        string   `json:"type"`
	Events      *bool    `json:"ev,omitempty"`
	Permissions []string `json:"perms,omitempty"`

	Format string `json:"format"`
	Unit   string `json:"unit"`

	MaxLen    *int  `json:"maxLen,omitempty"`
	MaxValue  Value `json:"maxValue,omitempty"`
	MinValue  Value `json:"minValue,omitempty"`
	StepValue Value `json:"minStep,omitempty"`
}

RawCharacteristic captures information related to a particular characteristic of a service.

type RelativeHumidityDehumidifierThreshold

type RelativeHumidityDehumidifierThreshold struct {
	ID    uint64
	Value float64
}

type RelativeHumidityHumidifierThreshold

type RelativeHumidityHumidifierThreshold struct {
	ID    uint64
	Value float64
}

type RemainingDuration

type RemainingDuration struct {
	ID    uint64
	Value uint32
}

func ReadRemainingDuration

func ReadRemainingDuration(ch *RawCharacteristic) *RemainingDuration

type ResetFilterIndication

type ResetFilterIndication struct {
	ID    uint64
	Value byte
}

func ReadResetFilterIndication

func ReadResetFilterIndication(ch *RawCharacteristic) *ResetFilterIndication

type RotationDirection

type RotationDirection struct {
	ID    uint64
	Value int32
}

func ReadRotationDirection

func ReadRotationDirection(ch *RawCharacteristic) *RotationDirection

type RotationSpeed

type RotationSpeed struct {
	ID    uint64
	Value float64
}

func ReadRotationSpeed

func ReadRotationSpeed(ch *RawCharacteristic) *RotationSpeed

type Saturation

type Saturation struct {
	ID    uint64
	Value float64
}

func ReadSaturation

func ReadSaturation(ch *RawCharacteristic) *Saturation

type SecuritySystemAlarmType

type SecuritySystemAlarmType struct {
	ID    uint64
	Value byte
}

func ReadSecuritySystemAlarmType

func ReadSecuritySystemAlarmType(ch *RawCharacteristic) *SecuritySystemAlarmType

type SecuritySystemCurrentState

type SecuritySystemCurrentState struct {
	ID    uint64
	Value byte
}

func ReadSecuritySystemCurrentState

func ReadSecuritySystemCurrentState(ch *RawCharacteristic) *SecuritySystemCurrentState

type SecuritySystemTargetState

type SecuritySystemTargetState struct {
	ID    uint64
	Value byte
}

func ReadSecuritySystemTargetState

func ReadSecuritySystemTargetState(ch *RawCharacteristic) *SecuritySystemTargetState

type SelectedAudioStreamConfiguration

type SelectedAudioStreamConfiguration struct {
	ID    uint64
	Value []byte
}

func ReadSelectedAudioStreamConfiguration

func ReadSelectedAudioStreamConfiguration(ch *RawCharacteristic) *SelectedAudioStreamConfiguration

type SelectedRTPStreamConfiguration

type SelectedRTPStreamConfiguration struct {
	ID    uint64
	Value []byte
}

func ReadSelectedRTPStreamConfiguration

func ReadSelectedRTPStreamConfiguration(ch *RawCharacteristic) *SelectedRTPStreamConfiguration

type SerialNumber

type SerialNumber struct {
	ID    uint64
	Value string
}

func ReadSerialNumber

func ReadSerialNumber(ch *RawCharacteristic) *SerialNumber

type ServiceLabelIndex

type ServiceLabelIndex struct {
	ID    uint64
	Value byte
}

func ReadServiceLabelIndex

func ReadServiceLabelIndex(ch *RawCharacteristic) *ServiceLabelIndex

type ServiceLabelNamespace

type ServiceLabelNamespace struct {
	ID    uint64
	Value byte
}

func ReadServiceLabelNamespace

func ReadServiceLabelNamespace(ch *RawCharacteristic) *ServiceLabelNamespace

type SetDuration

type SetDuration struct {
	ID    uint64
	Value uint32
}

func ReadSetDuration

func ReadSetDuration(ch *RawCharacteristic) *SetDuration

type SetupDataStreamTransport

type SetupDataStreamTransport struct {
	ID    uint64
	Value []byte
}

func ReadSetupDataStreamTransport

func ReadSetupDataStreamTransport(ch *RawCharacteristic) *SetupDataStreamTransport

type SetupEndpoints

type SetupEndpoints struct {
	ID    uint64
	Value []byte
}

func ReadSetupEndpoints

func ReadSetupEndpoints(ch *RawCharacteristic) *SetupEndpoints

type SiriInputType

type SiriInputType struct {
	ID    uint64
	Value byte
}

func ReadSiriInputType

func ReadSiriInputType(ch *RawCharacteristic) *SiriInputType

type SlatType

type SlatType struct {
	ID    uint64
	Value byte
}

func ReadSlatType

func ReadSlatType(ch *RawCharacteristic) *SlatType

type SmokeDetected

type SmokeDetected struct {
	ID    uint64
	Value byte
}

func ReadSmokeDetected

func ReadSmokeDetected(ch *RawCharacteristic) *SmokeDetected

type StatusActive

type StatusActive struct {
	ID    uint64
	Value bool
}

func ReadStatusActive

func ReadStatusActive(ch *RawCharacteristic) *StatusActive

type StatusFault

type StatusFault struct {
	ID    uint64
	Value byte
}

func ReadStatusFault

func ReadStatusFault(ch *RawCharacteristic) *StatusFault

type StatusJammed

type StatusJammed struct {
	ID    uint64
	Value byte
}

func ReadStatusJammed

func ReadStatusJammed(ch *RawCharacteristic) *StatusJammed

type StatusLowBattery

type StatusLowBattery struct {
	ID    uint64
	Value byte
}

func ReadStatusLowBattery

func ReadStatusLowBattery(ch *RawCharacteristic) *StatusLowBattery

type StatusTampered

type StatusTampered struct {
	ID    uint64
	Value byte
}

func ReadStatusTampered

func ReadStatusTampered(ch *RawCharacteristic) *StatusTampered

type StreamingStatus

type StreamingStatus struct {
	ID    uint64
	Value []byte
}

func ReadStreamingStatus

func ReadStreamingStatus(ch *RawCharacteristic) *StreamingStatus

type SulphurDioxideDensity

type SulphurDioxideDensity struct {
	ID    uint64
	Value float64
}

func ReadSulphurDioxideDensity

func ReadSulphurDioxideDensity(ch *RawCharacteristic) *SulphurDioxideDensity

type SupportedAudioStreamConfiguration

type SupportedAudioStreamConfiguration struct {
	ID    uint64
	Value []byte
}

type SupportedDataStreamTransportConfiguration

type SupportedDataStreamTransportConfiguration struct {
	ID    uint64
	Value []byte
}

type SupportedRTPConfiguration

type SupportedRTPConfiguration struct {
	ID    uint64
	Value []byte
}

func ReadSupportedRTPConfiguration

func ReadSupportedRTPConfiguration(ch *RawCharacteristic) *SupportedRTPConfiguration

type SupportedVideoStreamConfiguration

type SupportedVideoStreamConfiguration struct {
	ID    uint64
	Value []byte
}

type SwingMode

type SwingMode struct {
	ID    uint64
	Value byte
}

func ReadSwingMode

func ReadSwingMode(ch *RawCharacteristic) *SwingMode

type TargetAirPurifierState

type TargetAirPurifierState struct {
	ID    uint64
	Value byte
}

func ReadTargetAirPurifierState

func ReadTargetAirPurifierState(ch *RawCharacteristic) *TargetAirPurifierState

type TargetControlList

type TargetControlList struct {
	ID    uint64
	Value []byte
}

func ReadTargetControlList

func ReadTargetControlList(ch *RawCharacteristic) *TargetControlList

type TargetControlSupportedConfiguration

type TargetControlSupportedConfiguration struct {
	ID    uint64
	Value []byte
}

type TargetDoorState

type TargetDoorState struct {
	ID    uint64
	Value byte
}

func ReadTargetDoorState

func ReadTargetDoorState(ch *RawCharacteristic) *TargetDoorState

type TargetFanState

type TargetFanState struct {
	ID    uint64
	Value byte
}

func ReadTargetFanState

func ReadTargetFanState(ch *RawCharacteristic) *TargetFanState

type TargetHeaterCoolerState

type TargetHeaterCoolerState struct {
	ID    uint64
	Value byte
}

func ReadTargetHeaterCoolerState

func ReadTargetHeaterCoolerState(ch *RawCharacteristic) *TargetHeaterCoolerState

type TargetHeatingCoolingState

type TargetHeatingCoolingState struct {
	ID    uint64
	Value byte
}

func ReadTargetHeatingCoolingState

func ReadTargetHeatingCoolingState(ch *RawCharacteristic) *TargetHeatingCoolingState

type TargetHorizontalTiltAngle

type TargetHorizontalTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadTargetHorizontalTiltAngle

func ReadTargetHorizontalTiltAngle(ch *RawCharacteristic) *TargetHorizontalTiltAngle

type TargetHumidifierDehumidifierState

type TargetHumidifierDehumidifierState struct {
	ID    uint64
	Value byte
}

type TargetPosition

type TargetPosition struct {
	ID    uint64
	Value byte
}

func ReadTargetPosition

func ReadTargetPosition(ch *RawCharacteristic) *TargetPosition

type TargetRelativeHumidity

type TargetRelativeHumidity struct {
	ID    uint64
	Value float64
}

func ReadTargetRelativeHumidity

func ReadTargetRelativeHumidity(ch *RawCharacteristic) *TargetRelativeHumidity

type TargetTemperature

type TargetTemperature struct {
	ID    uint64
	Value float64
}

func ReadTargetTemperature

func ReadTargetTemperature(ch *RawCharacteristic) *TargetTemperature

type TargetTiltAngle

type TargetTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadTargetTiltAngle

func ReadTargetTiltAngle(ch *RawCharacteristic) *TargetTiltAngle

type TargetVerticalTiltAngle

type TargetVerticalTiltAngle struct {
	ID    uint64
	Value int32
}

func ReadTargetVerticalTiltAngle

func ReadTargetVerticalTiltAngle(ch *RawCharacteristic) *TargetVerticalTiltAngle

type TemperatureDisplayUnits

type TemperatureDisplayUnits struct {
	ID    uint64
	Value byte
}

func ReadTemperatureDisplayUnits

func ReadTemperatureDisplayUnits(ch *RawCharacteristic) *TemperatureDisplayUnits

type TypeMetadata

type TypeMetadata struct {
	Type   string
	Name   string
	Format string
}

TypeMetadata captures standard known metadata that applies to all characteristics with the given type.

type UndefinedValue

type UndefinedValue struct{}

UndefinedValue represents a value with an unknown format

func (UndefinedValue) String

func (u UndefinedValue) String() string

type UnknownType

type UnknownType struct{}

UnknownType represents a value from an unknown type

func (UnknownType) String

func (u UnknownType) String() string

type VOCDensity

type VOCDensity struct {
	ID    uint64
	Value float64
}

func ReadVOCDensity

func ReadVOCDensity(ch *RawCharacteristic) *VOCDensity

type Value

type Value []byte

Value is a clone of json.RawMessage that lets us defer unmarshalling of a value until we determine the expected data type. Convenience methods are available to unmarshal to a known type.

func (Value) Bool

func (v Value) Bool() (bool, error)

Bool attempts to unmarshal v to a bool

func (Value) Byte

func (v Value) Byte() (byte, error)

Byte attempts to unmarshal v to a byte

func (Value) Bytes

func (v Value) Bytes() ([]byte, error)

Bytes attempts to unmarshal v to a byte slice

func (Value) Float64

func (v Value) Float64() (float64, error)

Float64 attempts to unmarshal v to a float64

func (Value) Int32

func (v Value) Int32() (int32, error)

Int32 attempts to unmarshal v to a int32

func (Value) MarshalJSON

func (v Value) MarshalJSON() ([]byte, error)

MarshalJSON returns v as the JSON encoding of v.

func (Value) MustBool

func (v Value) MustBool() bool

MustBool attempts to unmarshal v to a bool and panics if unsuccessful

func (Value) MustByte

func (v Value) MustByte() byte

MustByte attempts to unmarshal v to a byte and panics if unsuccessful

func (Value) MustBytes

func (v Value) MustBytes() []byte

MustBytes attempts to unmarshal v to a byte slice and panics if unsuccessful

func (Value) MustFloat64

func (v Value) MustFloat64() float64

MustFloat64 attempts to unmarshal v to a float64 and panics if unsuccessful

func (Value) MustInt32

func (v Value) MustInt32() int32

MustInt32 attempts to unmarshal v to a int32 and panics if unsuccessful

func (Value) MustString

func (v Value) MustString() string

MustString attempts to unmarshal v to a string and panics if unsuccessful

func (Value) MustUint16

func (v Value) MustUint16() uint16

MustUint16 attempts to unmarshal v to a uint16 and panics if unsuccessful

func (Value) MustUint32

func (v Value) MustUint32() uint32

MustUint32 attempts to unmarshal v to a uint32 and panics if unsuccessful

func (Value) MustUint64

func (v Value) MustUint64() uint64

MustUint64 attempts to unmarshal v to a uint64 and panics if unsuccessful

func (Value) String

func (v Value) String() (string, error)

String attempts to unmarshal v to a string

func (Value) Uint16

func (v Value) Uint16() (uint16, error)

Uint16 attempts to unmarshal v to a uint16

func (Value) Uint32

func (v Value) Uint32() (uint32, error)

Uint32 attempts to unmarshal v to a uint32

func (Value) Uint64

func (v Value) Uint64() (uint64, error)

Uint64 attempts to unmarshal v to a uint64

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *v to a copy of data.

type ValveType

type ValveType struct {
	ID    uint64
	Value byte
}

func ReadValveType

func ReadValveType(ch *RawCharacteristic) *ValveType

type Version

type Version struct {
	ID    uint64
	Value string
}

func ReadVersion

func ReadVersion(ch *RawCharacteristic) *Version

type Volume

type Volume struct {
	ID    uint64
	Value byte
}

func ReadVolume

func ReadVolume(ch *RawCharacteristic) *Volume

type WaterLevel

type WaterLevel struct {
	ID    uint64
	Value float64
}

func ReadWaterLevel

func ReadWaterLevel(ch *RawCharacteristic) *WaterLevel

Jump to

Keyboard shortcuts

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