blob: 0c0acf28262279e261cf63b28e6b0eefc16415f7 (
about) (
plain)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
package dtcommon
import "time"
const (
// RetryTimes for retry times
RetryTimes = 5
// RetryInterval for retry interval
RetryInterval = 1 * time.Second
// LifeCycleConnectETPrefix the topic prefix for connected event
LifeCycleConnectETPrefix = "$hw/events/connected/"
// LifeCycleDisconnectETPrefix the topic prefix for disconnected event
LifeCycleDisconnectETPrefix = "$hw/events/disconnected/"
// MemETPrefix the topic prefix for membership event
MemETPrefix = "$hw/events/node/"
// MemETUpdateSuffix the topic suffix for membership updated event
MemETUpdateSuffix = "/membership/updated"
// MemETDetailSuffix the topic suffix for membership detail
MemETDetailSuffix = "/membership/detail"
// MemETDetailResultSuffix the topic suffix for membership detail event
MemETDetailResultSuffix = "/membership/detail/result"
// MemETGetSuffix the topic suffix for membership get
MemETGetSuffix = "/membership/get"
// MemETGetResultSuffix the topic suffix for membership get event
MemETGetResultSuffix = "/membership/get/result"
// DeviceETPrefix the topic prefix for device event
DeviceETPrefix = "$hw/events/device/"
// TwinETUpdateSuffix the topic suffix for twin update event
TwinETUpdateSuffix = "/twin/update"
// TwinETUpdateResultSuffix the topic suffix for twin update result event
TwinETUpdateResultSuffix = "/twin/update/result"
// TwinETGetSuffix the topic suffix for twin get
TwinETGetSuffix = "/twin/get"
// TwinETGetResultSuffix the topic suffix for twin get event
TwinETGetResultSuffix = "/twin/get/result"
// TwinETCloudSyncSuffix the topic suffix for twin sync event
TwinETCloudSyncSuffix = "/twin/cloud_updated"
// TwinETEdgeSyncSuffix the topic suffix for twin sync event
TwinETEdgeSyncSuffix = "/twin/edge_updated"
// TwinETDeltaSuffix the topic suffix for twin delta event
TwinETDeltaSuffix = "/twin/update/delta"
// TwinETDocumentSuffix the topic suffix for twin document event
TwinETDocumentSuffix = "/twin/update/document"
// DeviceETUpdatedSuffix the topic suffix for device updated event
DeviceETUpdatedSuffix = "/updated"
// DeviceETStateUpdateSuffix the topic suffix for device state update event
DeviceETStateUpdateSuffix = "/state/update"
// DeviceETStateUpdateResultSuffix the topic suffix for device state update result event
DeviceETStateUpdateResultSuffix = "/state/update/result"
// DeviceETStateGetSuffix the topic suffix for device state get event
DeviceETStateGetSuffix = "/state/get"
// MemDetailResult membership detail result
MemDetailResult = "MemDetailResult"
// MemDetail membership detail
MemDetail = "MemDetail"
// MemGet get
MemGet = "MemGet"
// MemUpdated membership updated
MemUpdated = "MemUpdated"
// TwinGet get twin
TwinGet = "TwinGet"
// TwinUpdate twin update
TwinUpdate = "TwinUpdate"
// TwinCloudSync twin cloud sync
TwinCloudSync = "TwinCloudSync"
// TwinEdgeSync twin edge sync
TwinEdgeSync = "TwinEdgeSync"
// DeviceUpdated device attributes update
DeviceUpdated = "DeviceUpdated"
// DeviceStateGet device state get
DeviceStateGet = "DeviceStateGet"
// DeviceStateUpdate device state update
DeviceStateUpdate = "DeviceStateUpdate"
// SendToEdge send info to edge
SendToEdge = "SendToEdge"
// SendToCloud send info to cloud
SendToCloud = "SendToCloud"
// LifeCycle life cycle
LifeCycle = "LifeCycle"
// Connected event
Connected = "connected"
// Confirm event
Confirm = "Confirm"
// Disconnected event
Disconnected = "disconnected"
// MetaDeviceOperation event
MetaDeviceOperation = "MetaDeviceOperation"
// CommModule communicate module
CommModule = "CommModule"
// DeviceModule device module
DeviceModule = "DeviceModule"
// MemModule membership module
MemModule = "MemModule"
// TwinModule twin module
TwinModule = "TwinModule"
// DMIModule DMI module
DMIModule = "DMIModule"
// HubModule the name of hub module
HubModule = "websocket"
// EventHubModule the name of event hub module
EventHubModule = "eventbus"
// DeviceTwinModule the name of twin module
DeviceTwinModule = "twin"
// BadRequestCode bad request
BadRequestCode = 400
// NotFoundCode device not found
NotFoundCode = 404
// ConflictCode version conflict
ConflictCode = 409
// InternalErrorCode server internal error
InternalErrorCode = 500
TypeDeleted = "deleted"
TypeUpdated = "updated"
DeviceStatusOK = "ok"
DeviceStatusOnline = "online"
DeviceStatusOffline = "offline"
DeviceStatusUnhealthy = "unhealthy" /* Unhealthy status from device */
DeviceStatusUnknown = "unknown"
)
|