-
Notifications
You must be signed in to change notification settings - Fork 1
/
event.go
83 lines (66 loc) · 1.67 KB
/
event.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package client
import . "github.com/zourva/lwm2m/core"
type BootstrappedEvent struct {
*BaseEvent
}
func NewBootstrappedEvent(args ...string) Event {
return &BootstrappedEvent{
BaseEvent: NewBaseEvent(EventClientBootstrapped, "bootstrapped", "", args...),
}
}
type RegisteredEvent struct {
*BaseEvent
}
func NewRegisteredEvent(args ...string) Event {
return &RegisteredEvent{
BaseEvent: NewBaseEvent(EventClientRegistered, "registered", "", args...),
}
}
type RegUpdatedEvent struct {
*BaseEvent
}
func NewRegUpdatedEvent(args ...string) Event {
return &RegUpdatedEvent{
BaseEvent: NewBaseEvent(EventClientRegUpdated, "registration updated", "", args...),
}
}
type UnregisteredEvent struct {
*BaseEvent
}
func NewUnregisteredEvent(args ...string) Event {
return &UnregisteredEvent{
BaseEvent: NewBaseEvent(EventClientUnregistered, "unregistered", "", args...),
}
}
type DeviceChangedEvent struct {
*BaseEvent
}
func NewDeviceChangedEvent(args ...string) Event {
return &DeviceChangedEvent{
BaseEvent: NewBaseEvent(EventClientDevInfoChanged, "device control", "", args...),
}
}
type InfoObservedEvent struct {
*BaseEvent
}
func NewInfoObservedEvent(args ...string) Event {
return &InfoObservedEvent{
BaseEvent: NewBaseEvent(EventClientObserved, "observe", "", args...),
}
}
type InfoReportedEvent struct {
*BaseEvent
}
func NewInfoReportedEvent(args ...string) Event {
return &InfoReportedEvent{
BaseEvent: NewBaseEvent(EventClientReported, "report", "", args...),
}
}
type AbnormalEvent struct {
*BaseEvent
}
func NewAbnormalEvent(args ...string) Event {
return &AbnormalEvent{
BaseEvent: NewBaseEvent(EventClientAbnormal, "abnormal", "", args...),
}
}