forked from brutella/hc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
valve.go
57 lines (41 loc) · 1.55 KB
/
valve.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// THIS FILE IS AUTO-GENERATED
package service
import (
"github.com/grumpylabs/hcf/characteristic"
)
const TypeValve = "D0"
type Valve struct {
*Service
Active *characteristic.Active
InUse *characteristic.InUse
ValveType *characteristic.ValveType
SetDuration *characteristic.SetDuration
RemainingDuration *characteristic.RemainingDuration
IsConfigured *characteristic.IsConfigured
ServiceLabelIndex *characteristic.ServiceLabelIndex
StatusFault *characteristic.StatusFault
Name *characteristic.Name
}
func NewValve() *Valve {
svc := Valve{}
svc.Service = New(TypeValve)
svc.Active = characteristic.NewActive()
svc.AddCharacteristic(svc.Active.Characteristic)
svc.InUse = characteristic.NewInUse()
svc.AddCharacteristic(svc.InUse.Characteristic)
svc.ValveType = characteristic.NewValveType()
svc.AddCharacteristic(svc.ValveType.Characteristic)
svc.SetDuration = characteristic.NewSetDuration()
svc.AddCharacteristic(svc.SetDuration.Characteristic)
svc.RemainingDuration = characteristic.NewRemainingDuration()
svc.AddCharacteristic(svc.RemainingDuration.Characteristic)
svc.IsConfigured = characteristic.NewIsConfigured()
svc.AddCharacteristic(svc.IsConfigured.Characteristic)
svc.ServiceLabelIndex = characteristic.NewServiceLabelIndex()
svc.AddCharacteristic(svc.ServiceLabelIndex.Characteristic)
svc.StatusFault = characteristic.NewStatusFault()
svc.AddCharacteristic(svc.StatusFault.Characteristic)
svc.Name = characteristic.NewName()
svc.AddCharacteristic(svc.Name.Characteristic)
return &svc
}