@m1kad0/hannah-proto 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +46 -1
- package/dist/agent.js +2010 -1
- package/dist/car_state.d.ts +24 -1
- package/dist/car_state.js +457 -1
- package/dist/control.d.ts +71 -0
- package/dist/control.js +3707 -1
- package/dist/device_control_menu.d.ts +23 -0
- package/dist/device_control_menu.js +314 -1
- package/dist/event_stream.d.ts +24 -0
- package/dist/event_stream.js +353 -1
- package/dist/hannah.d.ts +1160 -0
- package/dist/hannah.js +704 -1
- package/dist/satellite_provisioning.d.ts +19 -0
- package/dist/satellite_provisioning.js +65 -1
- package/dist/satellite_proxy.d.ts +25 -0
- package/dist/satellite_proxy.js +478 -1
- package/dist/shared.d.ts +20 -0
- package/dist/shared.js +84 -1
- package/dist/speaker_enrollment.d.ts +19 -0
- package/dist/speaker_enrollment.js +65 -1
- package/dist/timer_service.d.ts +34 -2
- package/dist/timer_service.js +796 -1
- package/dist/user_registry.d.ts +36 -0
- package/dist/user_registry.js +1179 -1
- package/dist/wakeword_capture.d.ts +22 -0
- package/dist/wakeword_capture.js +221 -1
- package/package.json +11 -4
package/dist/agent.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: agent.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ResidentType = exports.protobufPackage = void 0;
|
|
8
|
+
exports.AgentSensorUpdate = exports.AgentBleUpdate = exports.AgentResidentAnswered = exports.AgentAskResident = exports.AgentResidentSnapshot = exports.AgentResident = exports.AgentRoomSnapshot = exports.AgentRoom_DisplayNamesEntry = exports.AgentRoom = exports.AgentDeviceSnapshot = exports.AgentDevice_RoomNamesEntry = exports.AgentDevice = exports.AgentStateValue = exports.AgentNotification = exports.AgentTextAnswer = exports.AgentSatelliteDeleted = exports.AgentSatelliteUpdate = exports.AgentSetResidentMood = exports.AgentSetResident = exports.AgentWatchMore = exports.AgentSetState = exports.AgentFirmwareEvent = exports.AgentCommand = exports.AgentTextCommand = exports.AgentStateUpdate = exports.AgentSatelliteControl = exports.AgentMessage = exports.ResidentType = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
10
11
|
exports.protobufPackage = "hannah";
|
|
11
12
|
var ResidentType;
|
|
12
13
|
(function (ResidentType) {
|
|
@@ -16,3 +17,2011 @@ var ResidentType;
|
|
|
16
17
|
ResidentType[ResidentType["PET"] = 3] = "PET";
|
|
17
18
|
ResidentType[ResidentType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
19
|
})(ResidentType || (exports.ResidentType = ResidentType = {}));
|
|
20
|
+
function createBaseAgentMessage() {
|
|
21
|
+
return {
|
|
22
|
+
stateUpdate: undefined,
|
|
23
|
+
residentUpdate: undefined,
|
|
24
|
+
textCommand: undefined,
|
|
25
|
+
satelliteControl: undefined,
|
|
26
|
+
sendSnapshot: undefined,
|
|
27
|
+
sendResidents: undefined,
|
|
28
|
+
askResident: undefined,
|
|
29
|
+
sendRooms: undefined,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.AgentMessage = {
|
|
33
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
34
|
+
if (message.stateUpdate !== undefined) {
|
|
35
|
+
exports.AgentStateUpdate.encode(message.stateUpdate, writer.uint32(10).fork()).join();
|
|
36
|
+
}
|
|
37
|
+
if (message.residentUpdate !== undefined) {
|
|
38
|
+
exports.AgentResident.encode(message.residentUpdate, writer.uint32(18).fork()).join();
|
|
39
|
+
}
|
|
40
|
+
if (message.textCommand !== undefined) {
|
|
41
|
+
exports.AgentTextCommand.encode(message.textCommand, writer.uint32(26).fork()).join();
|
|
42
|
+
}
|
|
43
|
+
if (message.satelliteControl !== undefined) {
|
|
44
|
+
exports.AgentSatelliteControl.encode(message.satelliteControl, writer.uint32(34).fork()).join();
|
|
45
|
+
}
|
|
46
|
+
if (message.sendSnapshot !== undefined) {
|
|
47
|
+
exports.AgentDeviceSnapshot.encode(message.sendSnapshot, writer.uint32(42).fork()).join();
|
|
48
|
+
}
|
|
49
|
+
if (message.sendResidents !== undefined) {
|
|
50
|
+
exports.AgentResidentSnapshot.encode(message.sendResidents, writer.uint32(50).fork()).join();
|
|
51
|
+
}
|
|
52
|
+
if (message.askResident !== undefined) {
|
|
53
|
+
exports.AgentAskResident.encode(message.askResident, writer.uint32(58).fork()).join();
|
|
54
|
+
}
|
|
55
|
+
if (message.sendRooms !== undefined) {
|
|
56
|
+
exports.AgentRoomSnapshot.encode(message.sendRooms, writer.uint32(66).fork()).join();
|
|
57
|
+
}
|
|
58
|
+
return writer;
|
|
59
|
+
},
|
|
60
|
+
decode(input, length) {
|
|
61
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
62
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
63
|
+
const message = createBaseAgentMessage();
|
|
64
|
+
while (reader.pos < end) {
|
|
65
|
+
const tag = reader.uint32();
|
|
66
|
+
switch (tag >>> 3) {
|
|
67
|
+
case 1: {
|
|
68
|
+
if (tag !== 10) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
message.stateUpdate = exports.AgentStateUpdate.decode(reader, reader.uint32());
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
case 2: {
|
|
75
|
+
if (tag !== 18) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
message.residentUpdate = exports.AgentResident.decode(reader, reader.uint32());
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
case 3: {
|
|
82
|
+
if (tag !== 26) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
message.textCommand = exports.AgentTextCommand.decode(reader, reader.uint32());
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
case 4: {
|
|
89
|
+
if (tag !== 34) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
message.satelliteControl = exports.AgentSatelliteControl.decode(reader, reader.uint32());
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
case 5: {
|
|
96
|
+
if (tag !== 42) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
message.sendSnapshot = exports.AgentDeviceSnapshot.decode(reader, reader.uint32());
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
case 6: {
|
|
103
|
+
if (tag !== 50) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
message.sendResidents = exports.AgentResidentSnapshot.decode(reader, reader.uint32());
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
case 7: {
|
|
110
|
+
if (tag !== 58) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
message.askResident = exports.AgentAskResident.decode(reader, reader.uint32());
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
case 8: {
|
|
117
|
+
if (tag !== 66) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.sendRooms = exports.AgentRoomSnapshot.decode(reader, reader.uint32());
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
reader.skip(tag & 7);
|
|
128
|
+
}
|
|
129
|
+
return message;
|
|
130
|
+
},
|
|
131
|
+
create(base) {
|
|
132
|
+
return exports.AgentMessage.fromPartial(base ?? {});
|
|
133
|
+
},
|
|
134
|
+
fromPartial(object) {
|
|
135
|
+
const message = createBaseAgentMessage();
|
|
136
|
+
message.stateUpdate = (object.stateUpdate !== undefined && object.stateUpdate !== null)
|
|
137
|
+
? exports.AgentStateUpdate.fromPartial(object.stateUpdate)
|
|
138
|
+
: undefined;
|
|
139
|
+
message.residentUpdate = (object.residentUpdate !== undefined && object.residentUpdate !== null)
|
|
140
|
+
? exports.AgentResident.fromPartial(object.residentUpdate)
|
|
141
|
+
: undefined;
|
|
142
|
+
message.textCommand = (object.textCommand !== undefined && object.textCommand !== null)
|
|
143
|
+
? exports.AgentTextCommand.fromPartial(object.textCommand)
|
|
144
|
+
: undefined;
|
|
145
|
+
message.satelliteControl = (object.satelliteControl !== undefined && object.satelliteControl !== null)
|
|
146
|
+
? exports.AgentSatelliteControl.fromPartial(object.satelliteControl)
|
|
147
|
+
: undefined;
|
|
148
|
+
message.sendSnapshot = (object.sendSnapshot !== undefined && object.sendSnapshot !== null)
|
|
149
|
+
? exports.AgentDeviceSnapshot.fromPartial(object.sendSnapshot)
|
|
150
|
+
: undefined;
|
|
151
|
+
message.sendResidents = (object.sendResidents !== undefined && object.sendResidents !== null)
|
|
152
|
+
? exports.AgentResidentSnapshot.fromPartial(object.sendResidents)
|
|
153
|
+
: undefined;
|
|
154
|
+
message.askResident = (object.askResident !== undefined && object.askResident !== null)
|
|
155
|
+
? exports.AgentAskResident.fromPartial(object.askResident)
|
|
156
|
+
: undefined;
|
|
157
|
+
message.sendRooms = (object.sendRooms !== undefined && object.sendRooms !== null)
|
|
158
|
+
? exports.AgentRoomSnapshot.fromPartial(object.sendRooms)
|
|
159
|
+
: undefined;
|
|
160
|
+
return message;
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
function createBaseAgentSatelliteControl() {
|
|
164
|
+
return {
|
|
165
|
+
room: "",
|
|
166
|
+
deviceId: "",
|
|
167
|
+
dnd: undefined,
|
|
168
|
+
mute: undefined,
|
|
169
|
+
volume: undefined,
|
|
170
|
+
announcement: undefined,
|
|
171
|
+
announcementSsml: undefined,
|
|
172
|
+
announcementRephrase: undefined,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
exports.AgentSatelliteControl = {
|
|
176
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
177
|
+
if (message.room !== "") {
|
|
178
|
+
writer.uint32(10).string(message.room);
|
|
179
|
+
}
|
|
180
|
+
if (message.deviceId !== "") {
|
|
181
|
+
writer.uint32(58).string(message.deviceId);
|
|
182
|
+
}
|
|
183
|
+
if (message.dnd !== undefined) {
|
|
184
|
+
writer.uint32(16).bool(message.dnd);
|
|
185
|
+
}
|
|
186
|
+
if (message.mute !== undefined) {
|
|
187
|
+
writer.uint32(24).bool(message.mute);
|
|
188
|
+
}
|
|
189
|
+
if (message.volume !== undefined) {
|
|
190
|
+
writer.uint32(32).int32(message.volume);
|
|
191
|
+
}
|
|
192
|
+
if (message.announcement !== undefined) {
|
|
193
|
+
writer.uint32(42).string(message.announcement);
|
|
194
|
+
}
|
|
195
|
+
if (message.announcementSsml !== undefined) {
|
|
196
|
+
writer.uint32(50).string(message.announcementSsml);
|
|
197
|
+
}
|
|
198
|
+
if (message.announcementRephrase !== undefined) {
|
|
199
|
+
writer.uint32(66).string(message.announcementRephrase);
|
|
200
|
+
}
|
|
201
|
+
return writer;
|
|
202
|
+
},
|
|
203
|
+
decode(input, length) {
|
|
204
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
205
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
206
|
+
const message = createBaseAgentSatelliteControl();
|
|
207
|
+
while (reader.pos < end) {
|
|
208
|
+
const tag = reader.uint32();
|
|
209
|
+
switch (tag >>> 3) {
|
|
210
|
+
case 1: {
|
|
211
|
+
if (tag !== 10) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
message.room = reader.string();
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
case 7: {
|
|
218
|
+
if (tag !== 58) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
message.deviceId = reader.string();
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
case 2: {
|
|
225
|
+
if (tag !== 16) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
message.dnd = reader.bool();
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
case 3: {
|
|
232
|
+
if (tag !== 24) {
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
message.mute = reader.bool();
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
case 4: {
|
|
239
|
+
if (tag !== 32) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
message.volume = reader.int32();
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
case 5: {
|
|
246
|
+
if (tag !== 42) {
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
message.announcement = reader.string();
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
case 6: {
|
|
253
|
+
if (tag !== 50) {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
message.announcementSsml = reader.string();
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
case 8: {
|
|
260
|
+
if (tag !== 66) {
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
message.announcementRephrase = reader.string();
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
reader.skip(tag & 7);
|
|
271
|
+
}
|
|
272
|
+
return message;
|
|
273
|
+
},
|
|
274
|
+
create(base) {
|
|
275
|
+
return exports.AgentSatelliteControl.fromPartial(base ?? {});
|
|
276
|
+
},
|
|
277
|
+
fromPartial(object) {
|
|
278
|
+
const message = createBaseAgentSatelliteControl();
|
|
279
|
+
message.room = object.room ?? "";
|
|
280
|
+
message.deviceId = object.deviceId ?? "";
|
|
281
|
+
message.dnd = object.dnd ?? undefined;
|
|
282
|
+
message.mute = object.mute ?? undefined;
|
|
283
|
+
message.volume = object.volume ?? undefined;
|
|
284
|
+
message.announcement = object.announcement ?? undefined;
|
|
285
|
+
message.announcementSsml = object.announcementSsml ?? undefined;
|
|
286
|
+
message.announcementRephrase = object.announcementRephrase ?? undefined;
|
|
287
|
+
return message;
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
function createBaseAgentStateUpdate() {
|
|
291
|
+
return { stateId: "", value: "", ack: false, ts: 0n };
|
|
292
|
+
}
|
|
293
|
+
exports.AgentStateUpdate = {
|
|
294
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
295
|
+
if (message.stateId !== "") {
|
|
296
|
+
writer.uint32(10).string(message.stateId);
|
|
297
|
+
}
|
|
298
|
+
if (message.value !== "") {
|
|
299
|
+
writer.uint32(18).string(message.value);
|
|
300
|
+
}
|
|
301
|
+
if (message.ack !== false) {
|
|
302
|
+
writer.uint32(24).bool(message.ack);
|
|
303
|
+
}
|
|
304
|
+
if (message.ts !== 0n) {
|
|
305
|
+
if (BigInt.asIntN(64, message.ts) !== message.ts) {
|
|
306
|
+
throw new globalThis.Error("value provided for field message.ts of type int64 too large");
|
|
307
|
+
}
|
|
308
|
+
writer.uint32(32).int64(message.ts);
|
|
309
|
+
}
|
|
310
|
+
return writer;
|
|
311
|
+
},
|
|
312
|
+
decode(input, length) {
|
|
313
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
314
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
315
|
+
const message = createBaseAgentStateUpdate();
|
|
316
|
+
while (reader.pos < end) {
|
|
317
|
+
const tag = reader.uint32();
|
|
318
|
+
switch (tag >>> 3) {
|
|
319
|
+
case 1: {
|
|
320
|
+
if (tag !== 10) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
message.stateId = reader.string();
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
case 2: {
|
|
327
|
+
if (tag !== 18) {
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
message.value = reader.string();
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
case 3: {
|
|
334
|
+
if (tag !== 24) {
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
message.ack = reader.bool();
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
case 4: {
|
|
341
|
+
if (tag !== 32) {
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
message.ts = reader.int64();
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
reader.skip(tag & 7);
|
|
352
|
+
}
|
|
353
|
+
return message;
|
|
354
|
+
},
|
|
355
|
+
create(base) {
|
|
356
|
+
return exports.AgentStateUpdate.fromPartial(base ?? {});
|
|
357
|
+
},
|
|
358
|
+
fromPartial(object) {
|
|
359
|
+
const message = createBaseAgentStateUpdate();
|
|
360
|
+
message.stateId = object.stateId ?? "";
|
|
361
|
+
message.value = object.value ?? "";
|
|
362
|
+
message.ack = object.ack ?? false;
|
|
363
|
+
message.ts = (object.ts !== undefined && object.ts !== null) ? BigInt(object.ts) : 0n;
|
|
364
|
+
return message;
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
function createBaseAgentTextCommand() {
|
|
368
|
+
return { text: "" };
|
|
369
|
+
}
|
|
370
|
+
exports.AgentTextCommand = {
|
|
371
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
372
|
+
if (message.text !== "") {
|
|
373
|
+
writer.uint32(10).string(message.text);
|
|
374
|
+
}
|
|
375
|
+
return writer;
|
|
376
|
+
},
|
|
377
|
+
decode(input, length) {
|
|
378
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
379
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
380
|
+
const message = createBaseAgentTextCommand();
|
|
381
|
+
while (reader.pos < end) {
|
|
382
|
+
const tag = reader.uint32();
|
|
383
|
+
switch (tag >>> 3) {
|
|
384
|
+
case 1: {
|
|
385
|
+
if (tag !== 10) {
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
message.text = reader.string();
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
reader.skip(tag & 7);
|
|
396
|
+
}
|
|
397
|
+
return message;
|
|
398
|
+
},
|
|
399
|
+
create(base) {
|
|
400
|
+
return exports.AgentTextCommand.fromPartial(base ?? {});
|
|
401
|
+
},
|
|
402
|
+
fromPartial(object) {
|
|
403
|
+
const message = createBaseAgentTextCommand();
|
|
404
|
+
message.text = object.text ?? "";
|
|
405
|
+
return message;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
function createBaseAgentCommand() {
|
|
409
|
+
return {
|
|
410
|
+
setState: undefined,
|
|
411
|
+
watchMore: undefined,
|
|
412
|
+
setResident: undefined,
|
|
413
|
+
satelliteUpdate: undefined,
|
|
414
|
+
textAnswer: undefined,
|
|
415
|
+
firmwareEvent: undefined,
|
|
416
|
+
bleUpdate: undefined,
|
|
417
|
+
sensorUpdate: undefined,
|
|
418
|
+
residentAnswered: undefined,
|
|
419
|
+
satelliteDeleted: undefined,
|
|
420
|
+
setResidentMood: undefined,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
exports.AgentCommand = {
|
|
424
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
425
|
+
if (message.setState !== undefined) {
|
|
426
|
+
exports.AgentSetState.encode(message.setState, writer.uint32(10).fork()).join();
|
|
427
|
+
}
|
|
428
|
+
if (message.watchMore !== undefined) {
|
|
429
|
+
exports.AgentWatchMore.encode(message.watchMore, writer.uint32(18).fork()).join();
|
|
430
|
+
}
|
|
431
|
+
if (message.setResident !== undefined) {
|
|
432
|
+
exports.AgentSetResident.encode(message.setResident, writer.uint32(26).fork()).join();
|
|
433
|
+
}
|
|
434
|
+
if (message.satelliteUpdate !== undefined) {
|
|
435
|
+
exports.AgentSatelliteUpdate.encode(message.satelliteUpdate, writer.uint32(34).fork()).join();
|
|
436
|
+
}
|
|
437
|
+
if (message.textAnswer !== undefined) {
|
|
438
|
+
exports.AgentTextAnswer.encode(message.textAnswer, writer.uint32(42).fork()).join();
|
|
439
|
+
}
|
|
440
|
+
if (message.firmwareEvent !== undefined) {
|
|
441
|
+
exports.AgentFirmwareEvent.encode(message.firmwareEvent, writer.uint32(50).fork()).join();
|
|
442
|
+
}
|
|
443
|
+
if (message.bleUpdate !== undefined) {
|
|
444
|
+
exports.AgentBleUpdate.encode(message.bleUpdate, writer.uint32(58).fork()).join();
|
|
445
|
+
}
|
|
446
|
+
if (message.sensorUpdate !== undefined) {
|
|
447
|
+
exports.AgentSensorUpdate.encode(message.sensorUpdate, writer.uint32(66).fork()).join();
|
|
448
|
+
}
|
|
449
|
+
if (message.residentAnswered !== undefined) {
|
|
450
|
+
exports.AgentResidentAnswered.encode(message.residentAnswered, writer.uint32(74).fork()).join();
|
|
451
|
+
}
|
|
452
|
+
if (message.satelliteDeleted !== undefined) {
|
|
453
|
+
exports.AgentSatelliteDeleted.encode(message.satelliteDeleted, writer.uint32(82).fork()).join();
|
|
454
|
+
}
|
|
455
|
+
if (message.setResidentMood !== undefined) {
|
|
456
|
+
exports.AgentSetResidentMood.encode(message.setResidentMood, writer.uint32(90).fork()).join();
|
|
457
|
+
}
|
|
458
|
+
return writer;
|
|
459
|
+
},
|
|
460
|
+
decode(input, length) {
|
|
461
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
462
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
463
|
+
const message = createBaseAgentCommand();
|
|
464
|
+
while (reader.pos < end) {
|
|
465
|
+
const tag = reader.uint32();
|
|
466
|
+
switch (tag >>> 3) {
|
|
467
|
+
case 1: {
|
|
468
|
+
if (tag !== 10) {
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
message.setState = exports.AgentSetState.decode(reader, reader.uint32());
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
case 2: {
|
|
475
|
+
if (tag !== 18) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
message.watchMore = exports.AgentWatchMore.decode(reader, reader.uint32());
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
case 3: {
|
|
482
|
+
if (tag !== 26) {
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
message.setResident = exports.AgentSetResident.decode(reader, reader.uint32());
|
|
486
|
+
continue;
|
|
487
|
+
}
|
|
488
|
+
case 4: {
|
|
489
|
+
if (tag !== 34) {
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
message.satelliteUpdate = exports.AgentSatelliteUpdate.decode(reader, reader.uint32());
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
case 5: {
|
|
496
|
+
if (tag !== 42) {
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
message.textAnswer = exports.AgentTextAnswer.decode(reader, reader.uint32());
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
case 6: {
|
|
503
|
+
if (tag !== 50) {
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
message.firmwareEvent = exports.AgentFirmwareEvent.decode(reader, reader.uint32());
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
case 7: {
|
|
510
|
+
if (tag !== 58) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
message.bleUpdate = exports.AgentBleUpdate.decode(reader, reader.uint32());
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
case 8: {
|
|
517
|
+
if (tag !== 66) {
|
|
518
|
+
break;
|
|
519
|
+
}
|
|
520
|
+
message.sensorUpdate = exports.AgentSensorUpdate.decode(reader, reader.uint32());
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
case 9: {
|
|
524
|
+
if (tag !== 74) {
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
message.residentAnswered = exports.AgentResidentAnswered.decode(reader, reader.uint32());
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
case 10: {
|
|
531
|
+
if (tag !== 82) {
|
|
532
|
+
break;
|
|
533
|
+
}
|
|
534
|
+
message.satelliteDeleted = exports.AgentSatelliteDeleted.decode(reader, reader.uint32());
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
case 11: {
|
|
538
|
+
if (tag !== 90) {
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
message.setResidentMood = exports.AgentSetResidentMood.decode(reader, reader.uint32());
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
reader.skip(tag & 7);
|
|
549
|
+
}
|
|
550
|
+
return message;
|
|
551
|
+
},
|
|
552
|
+
create(base) {
|
|
553
|
+
return exports.AgentCommand.fromPartial(base ?? {});
|
|
554
|
+
},
|
|
555
|
+
fromPartial(object) {
|
|
556
|
+
const message = createBaseAgentCommand();
|
|
557
|
+
message.setState = (object.setState !== undefined && object.setState !== null)
|
|
558
|
+
? exports.AgentSetState.fromPartial(object.setState)
|
|
559
|
+
: undefined;
|
|
560
|
+
message.watchMore = (object.watchMore !== undefined && object.watchMore !== null)
|
|
561
|
+
? exports.AgentWatchMore.fromPartial(object.watchMore)
|
|
562
|
+
: undefined;
|
|
563
|
+
message.setResident = (object.setResident !== undefined && object.setResident !== null)
|
|
564
|
+
? exports.AgentSetResident.fromPartial(object.setResident)
|
|
565
|
+
: undefined;
|
|
566
|
+
message.satelliteUpdate = (object.satelliteUpdate !== undefined && object.satelliteUpdate !== null)
|
|
567
|
+
? exports.AgentSatelliteUpdate.fromPartial(object.satelliteUpdate)
|
|
568
|
+
: undefined;
|
|
569
|
+
message.textAnswer = (object.textAnswer !== undefined && object.textAnswer !== null)
|
|
570
|
+
? exports.AgentTextAnswer.fromPartial(object.textAnswer)
|
|
571
|
+
: undefined;
|
|
572
|
+
message.firmwareEvent = (object.firmwareEvent !== undefined && object.firmwareEvent !== null)
|
|
573
|
+
? exports.AgentFirmwareEvent.fromPartial(object.firmwareEvent)
|
|
574
|
+
: undefined;
|
|
575
|
+
message.bleUpdate = (object.bleUpdate !== undefined && object.bleUpdate !== null)
|
|
576
|
+
? exports.AgentBleUpdate.fromPartial(object.bleUpdate)
|
|
577
|
+
: undefined;
|
|
578
|
+
message.sensorUpdate = (object.sensorUpdate !== undefined && object.sensorUpdate !== null)
|
|
579
|
+
? exports.AgentSensorUpdate.fromPartial(object.sensorUpdate)
|
|
580
|
+
: undefined;
|
|
581
|
+
message.residentAnswered = (object.residentAnswered !== undefined && object.residentAnswered !== null)
|
|
582
|
+
? exports.AgentResidentAnswered.fromPartial(object.residentAnswered)
|
|
583
|
+
: undefined;
|
|
584
|
+
message.satelliteDeleted = (object.satelliteDeleted !== undefined && object.satelliteDeleted !== null)
|
|
585
|
+
? exports.AgentSatelliteDeleted.fromPartial(object.satelliteDeleted)
|
|
586
|
+
: undefined;
|
|
587
|
+
message.setResidentMood = (object.setResidentMood !== undefined && object.setResidentMood !== null)
|
|
588
|
+
? exports.AgentSetResidentMood.fromPartial(object.setResidentMood)
|
|
589
|
+
: undefined;
|
|
590
|
+
return message;
|
|
591
|
+
},
|
|
592
|
+
};
|
|
593
|
+
function createBaseAgentFirmwareEvent() {
|
|
594
|
+
return { device: "", version: "", updateAvailable: false };
|
|
595
|
+
}
|
|
596
|
+
exports.AgentFirmwareEvent = {
|
|
597
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
598
|
+
if (message.device !== "") {
|
|
599
|
+
writer.uint32(10).string(message.device);
|
|
600
|
+
}
|
|
601
|
+
if (message.version !== "") {
|
|
602
|
+
writer.uint32(18).string(message.version);
|
|
603
|
+
}
|
|
604
|
+
if (message.updateAvailable !== false) {
|
|
605
|
+
writer.uint32(24).bool(message.updateAvailable);
|
|
606
|
+
}
|
|
607
|
+
return writer;
|
|
608
|
+
},
|
|
609
|
+
decode(input, length) {
|
|
610
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
611
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
612
|
+
const message = createBaseAgentFirmwareEvent();
|
|
613
|
+
while (reader.pos < end) {
|
|
614
|
+
const tag = reader.uint32();
|
|
615
|
+
switch (tag >>> 3) {
|
|
616
|
+
case 1: {
|
|
617
|
+
if (tag !== 10) {
|
|
618
|
+
break;
|
|
619
|
+
}
|
|
620
|
+
message.device = reader.string();
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
case 2: {
|
|
624
|
+
if (tag !== 18) {
|
|
625
|
+
break;
|
|
626
|
+
}
|
|
627
|
+
message.version = reader.string();
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
case 3: {
|
|
631
|
+
if (tag !== 24) {
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
message.updateAvailable = reader.bool();
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
reader.skip(tag & 7);
|
|
642
|
+
}
|
|
643
|
+
return message;
|
|
644
|
+
},
|
|
645
|
+
create(base) {
|
|
646
|
+
return exports.AgentFirmwareEvent.fromPartial(base ?? {});
|
|
647
|
+
},
|
|
648
|
+
fromPartial(object) {
|
|
649
|
+
const message = createBaseAgentFirmwareEvent();
|
|
650
|
+
message.device = object.device ?? "";
|
|
651
|
+
message.version = object.version ?? "";
|
|
652
|
+
message.updateAvailable = object.updateAvailable ?? false;
|
|
653
|
+
return message;
|
|
654
|
+
},
|
|
655
|
+
};
|
|
656
|
+
function createBaseAgentSetState() {
|
|
657
|
+
return { stateId: "", value: "" };
|
|
658
|
+
}
|
|
659
|
+
exports.AgentSetState = {
|
|
660
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
661
|
+
if (message.stateId !== "") {
|
|
662
|
+
writer.uint32(10).string(message.stateId);
|
|
663
|
+
}
|
|
664
|
+
if (message.value !== "") {
|
|
665
|
+
writer.uint32(18).string(message.value);
|
|
666
|
+
}
|
|
667
|
+
return writer;
|
|
668
|
+
},
|
|
669
|
+
decode(input, length) {
|
|
670
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
671
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
672
|
+
const message = createBaseAgentSetState();
|
|
673
|
+
while (reader.pos < end) {
|
|
674
|
+
const tag = reader.uint32();
|
|
675
|
+
switch (tag >>> 3) {
|
|
676
|
+
case 1: {
|
|
677
|
+
if (tag !== 10) {
|
|
678
|
+
break;
|
|
679
|
+
}
|
|
680
|
+
message.stateId = reader.string();
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
case 2: {
|
|
684
|
+
if (tag !== 18) {
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
message.value = reader.string();
|
|
688
|
+
continue;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
692
|
+
break;
|
|
693
|
+
}
|
|
694
|
+
reader.skip(tag & 7);
|
|
695
|
+
}
|
|
696
|
+
return message;
|
|
697
|
+
},
|
|
698
|
+
create(base) {
|
|
699
|
+
return exports.AgentSetState.fromPartial(base ?? {});
|
|
700
|
+
},
|
|
701
|
+
fromPartial(object) {
|
|
702
|
+
const message = createBaseAgentSetState();
|
|
703
|
+
message.stateId = object.stateId ?? "";
|
|
704
|
+
message.value = object.value ?? "";
|
|
705
|
+
return message;
|
|
706
|
+
},
|
|
707
|
+
};
|
|
708
|
+
function createBaseAgentWatchMore() {
|
|
709
|
+
return { stateIds: [] };
|
|
710
|
+
}
|
|
711
|
+
exports.AgentWatchMore = {
|
|
712
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
713
|
+
for (const v of message.stateIds) {
|
|
714
|
+
writer.uint32(10).string(v);
|
|
715
|
+
}
|
|
716
|
+
return writer;
|
|
717
|
+
},
|
|
718
|
+
decode(input, length) {
|
|
719
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
720
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
721
|
+
const message = createBaseAgentWatchMore();
|
|
722
|
+
while (reader.pos < end) {
|
|
723
|
+
const tag = reader.uint32();
|
|
724
|
+
switch (tag >>> 3) {
|
|
725
|
+
case 1: {
|
|
726
|
+
if (tag !== 10) {
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
message.stateIds.push(reader.string());
|
|
730
|
+
continue;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
734
|
+
break;
|
|
735
|
+
}
|
|
736
|
+
reader.skip(tag & 7);
|
|
737
|
+
}
|
|
738
|
+
return message;
|
|
739
|
+
},
|
|
740
|
+
create(base) {
|
|
741
|
+
return exports.AgentWatchMore.fromPartial(base ?? {});
|
|
742
|
+
},
|
|
743
|
+
fromPartial(object) {
|
|
744
|
+
const message = createBaseAgentWatchMore();
|
|
745
|
+
message.stateIds = object.stateIds?.map((e) => e) || [];
|
|
746
|
+
return message;
|
|
747
|
+
},
|
|
748
|
+
};
|
|
749
|
+
function createBaseAgentSetResident() {
|
|
750
|
+
return { residentId: "", presenceState: 0, type: 0 };
|
|
751
|
+
}
|
|
752
|
+
exports.AgentSetResident = {
|
|
753
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
754
|
+
if (message.residentId !== "") {
|
|
755
|
+
writer.uint32(10).string(message.residentId);
|
|
756
|
+
}
|
|
757
|
+
if (message.presenceState !== 0) {
|
|
758
|
+
writer.uint32(16).int32(message.presenceState);
|
|
759
|
+
}
|
|
760
|
+
if (message.type !== 0) {
|
|
761
|
+
writer.uint32(24).int32(message.type);
|
|
762
|
+
}
|
|
763
|
+
return writer;
|
|
764
|
+
},
|
|
765
|
+
decode(input, length) {
|
|
766
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
767
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
768
|
+
const message = createBaseAgentSetResident();
|
|
769
|
+
while (reader.pos < end) {
|
|
770
|
+
const tag = reader.uint32();
|
|
771
|
+
switch (tag >>> 3) {
|
|
772
|
+
case 1: {
|
|
773
|
+
if (tag !== 10) {
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
message.residentId = reader.string();
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
case 2: {
|
|
780
|
+
if (tag !== 16) {
|
|
781
|
+
break;
|
|
782
|
+
}
|
|
783
|
+
message.presenceState = reader.int32();
|
|
784
|
+
continue;
|
|
785
|
+
}
|
|
786
|
+
case 3: {
|
|
787
|
+
if (tag !== 24) {
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
message.type = reader.int32();
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
reader.skip(tag & 7);
|
|
798
|
+
}
|
|
799
|
+
return message;
|
|
800
|
+
},
|
|
801
|
+
create(base) {
|
|
802
|
+
return exports.AgentSetResident.fromPartial(base ?? {});
|
|
803
|
+
},
|
|
804
|
+
fromPartial(object) {
|
|
805
|
+
const message = createBaseAgentSetResident();
|
|
806
|
+
message.residentId = object.residentId ?? "";
|
|
807
|
+
message.presenceState = object.presenceState ?? 0;
|
|
808
|
+
message.type = object.type ?? 0;
|
|
809
|
+
return message;
|
|
810
|
+
},
|
|
811
|
+
};
|
|
812
|
+
function createBaseAgentSetResidentMood() {
|
|
813
|
+
return { residentId: "", mood: 0, type: 0 };
|
|
814
|
+
}
|
|
815
|
+
exports.AgentSetResidentMood = {
|
|
816
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
817
|
+
if (message.residentId !== "") {
|
|
818
|
+
writer.uint32(10).string(message.residentId);
|
|
819
|
+
}
|
|
820
|
+
if (message.mood !== 0) {
|
|
821
|
+
writer.uint32(16).int32(message.mood);
|
|
822
|
+
}
|
|
823
|
+
if (message.type !== 0) {
|
|
824
|
+
writer.uint32(24).int32(message.type);
|
|
825
|
+
}
|
|
826
|
+
return writer;
|
|
827
|
+
},
|
|
828
|
+
decode(input, length) {
|
|
829
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
830
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
831
|
+
const message = createBaseAgentSetResidentMood();
|
|
832
|
+
while (reader.pos < end) {
|
|
833
|
+
const tag = reader.uint32();
|
|
834
|
+
switch (tag >>> 3) {
|
|
835
|
+
case 1: {
|
|
836
|
+
if (tag !== 10) {
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
message.residentId = reader.string();
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
case 2: {
|
|
843
|
+
if (tag !== 16) {
|
|
844
|
+
break;
|
|
845
|
+
}
|
|
846
|
+
message.mood = reader.int32();
|
|
847
|
+
continue;
|
|
848
|
+
}
|
|
849
|
+
case 3: {
|
|
850
|
+
if (tag !== 24) {
|
|
851
|
+
break;
|
|
852
|
+
}
|
|
853
|
+
message.type = reader.int32();
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
858
|
+
break;
|
|
859
|
+
}
|
|
860
|
+
reader.skip(tag & 7);
|
|
861
|
+
}
|
|
862
|
+
return message;
|
|
863
|
+
},
|
|
864
|
+
create(base) {
|
|
865
|
+
return exports.AgentSetResidentMood.fromPartial(base ?? {});
|
|
866
|
+
},
|
|
867
|
+
fromPartial(object) {
|
|
868
|
+
const message = createBaseAgentSetResidentMood();
|
|
869
|
+
message.residentId = object.residentId ?? "";
|
|
870
|
+
message.mood = object.mood ?? 0;
|
|
871
|
+
message.type = object.type ?? 0;
|
|
872
|
+
return message;
|
|
873
|
+
},
|
|
874
|
+
};
|
|
875
|
+
function createBaseAgentSatelliteUpdate() {
|
|
876
|
+
return { deviceId: "", room: "", address: "", online: false, volume: undefined, mute: undefined, displayName: "" };
|
|
877
|
+
}
|
|
878
|
+
exports.AgentSatelliteUpdate = {
|
|
879
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
880
|
+
if (message.deviceId !== "") {
|
|
881
|
+
writer.uint32(10).string(message.deviceId);
|
|
882
|
+
}
|
|
883
|
+
if (message.room !== "") {
|
|
884
|
+
writer.uint32(18).string(message.room);
|
|
885
|
+
}
|
|
886
|
+
if (message.address !== "") {
|
|
887
|
+
writer.uint32(26).string(message.address);
|
|
888
|
+
}
|
|
889
|
+
if (message.online !== false) {
|
|
890
|
+
writer.uint32(32).bool(message.online);
|
|
891
|
+
}
|
|
892
|
+
if (message.volume !== undefined) {
|
|
893
|
+
writer.uint32(40).int32(message.volume);
|
|
894
|
+
}
|
|
895
|
+
if (message.mute !== undefined) {
|
|
896
|
+
writer.uint32(48).bool(message.mute);
|
|
897
|
+
}
|
|
898
|
+
if (message.displayName !== "") {
|
|
899
|
+
writer.uint32(66).string(message.displayName);
|
|
900
|
+
}
|
|
901
|
+
return writer;
|
|
902
|
+
},
|
|
903
|
+
decode(input, length) {
|
|
904
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
905
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
906
|
+
const message = createBaseAgentSatelliteUpdate();
|
|
907
|
+
while (reader.pos < end) {
|
|
908
|
+
const tag = reader.uint32();
|
|
909
|
+
switch (tag >>> 3) {
|
|
910
|
+
case 1: {
|
|
911
|
+
if (tag !== 10) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
message.deviceId = reader.string();
|
|
915
|
+
continue;
|
|
916
|
+
}
|
|
917
|
+
case 2: {
|
|
918
|
+
if (tag !== 18) {
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
message.room = reader.string();
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
case 3: {
|
|
925
|
+
if (tag !== 26) {
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
message.address = reader.string();
|
|
929
|
+
continue;
|
|
930
|
+
}
|
|
931
|
+
case 4: {
|
|
932
|
+
if (tag !== 32) {
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
message.online = reader.bool();
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
case 5: {
|
|
939
|
+
if (tag !== 40) {
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
message.volume = reader.int32();
|
|
943
|
+
continue;
|
|
944
|
+
}
|
|
945
|
+
case 6: {
|
|
946
|
+
if (tag !== 48) {
|
|
947
|
+
break;
|
|
948
|
+
}
|
|
949
|
+
message.mute = reader.bool();
|
|
950
|
+
continue;
|
|
951
|
+
}
|
|
952
|
+
case 8: {
|
|
953
|
+
if (tag !== 66) {
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
message.displayName = reader.string();
|
|
957
|
+
continue;
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
961
|
+
break;
|
|
962
|
+
}
|
|
963
|
+
reader.skip(tag & 7);
|
|
964
|
+
}
|
|
965
|
+
return message;
|
|
966
|
+
},
|
|
967
|
+
create(base) {
|
|
968
|
+
return exports.AgentSatelliteUpdate.fromPartial(base ?? {});
|
|
969
|
+
},
|
|
970
|
+
fromPartial(object) {
|
|
971
|
+
const message = createBaseAgentSatelliteUpdate();
|
|
972
|
+
message.deviceId = object.deviceId ?? "";
|
|
973
|
+
message.room = object.room ?? "";
|
|
974
|
+
message.address = object.address ?? "";
|
|
975
|
+
message.online = object.online ?? false;
|
|
976
|
+
message.volume = object.volume ?? undefined;
|
|
977
|
+
message.mute = object.mute ?? undefined;
|
|
978
|
+
message.displayName = object.displayName ?? "";
|
|
979
|
+
return message;
|
|
980
|
+
},
|
|
981
|
+
};
|
|
982
|
+
function createBaseAgentSatelliteDeleted() {
|
|
983
|
+
return { deviceId: "", room: "" };
|
|
984
|
+
}
|
|
985
|
+
exports.AgentSatelliteDeleted = {
|
|
986
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
987
|
+
if (message.deviceId !== "") {
|
|
988
|
+
writer.uint32(10).string(message.deviceId);
|
|
989
|
+
}
|
|
990
|
+
if (message.room !== "") {
|
|
991
|
+
writer.uint32(18).string(message.room);
|
|
992
|
+
}
|
|
993
|
+
return writer;
|
|
994
|
+
},
|
|
995
|
+
decode(input, length) {
|
|
996
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
997
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
998
|
+
const message = createBaseAgentSatelliteDeleted();
|
|
999
|
+
while (reader.pos < end) {
|
|
1000
|
+
const tag = reader.uint32();
|
|
1001
|
+
switch (tag >>> 3) {
|
|
1002
|
+
case 1: {
|
|
1003
|
+
if (tag !== 10) {
|
|
1004
|
+
break;
|
|
1005
|
+
}
|
|
1006
|
+
message.deviceId = reader.string();
|
|
1007
|
+
continue;
|
|
1008
|
+
}
|
|
1009
|
+
case 2: {
|
|
1010
|
+
if (tag !== 18) {
|
|
1011
|
+
break;
|
|
1012
|
+
}
|
|
1013
|
+
message.room = reader.string();
|
|
1014
|
+
continue;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1018
|
+
break;
|
|
1019
|
+
}
|
|
1020
|
+
reader.skip(tag & 7);
|
|
1021
|
+
}
|
|
1022
|
+
return message;
|
|
1023
|
+
},
|
|
1024
|
+
create(base) {
|
|
1025
|
+
return exports.AgentSatelliteDeleted.fromPartial(base ?? {});
|
|
1026
|
+
},
|
|
1027
|
+
fromPartial(object) {
|
|
1028
|
+
const message = createBaseAgentSatelliteDeleted();
|
|
1029
|
+
message.deviceId = object.deviceId ?? "";
|
|
1030
|
+
message.room = object.room ?? "";
|
|
1031
|
+
return message;
|
|
1032
|
+
},
|
|
1033
|
+
};
|
|
1034
|
+
function createBaseAgentTextAnswer() {
|
|
1035
|
+
return { text: "", intent: "" };
|
|
1036
|
+
}
|
|
1037
|
+
exports.AgentTextAnswer = {
|
|
1038
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1039
|
+
if (message.text !== "") {
|
|
1040
|
+
writer.uint32(10).string(message.text);
|
|
1041
|
+
}
|
|
1042
|
+
if (message.intent !== "") {
|
|
1043
|
+
writer.uint32(18).string(message.intent);
|
|
1044
|
+
}
|
|
1045
|
+
return writer;
|
|
1046
|
+
},
|
|
1047
|
+
decode(input, length) {
|
|
1048
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1049
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1050
|
+
const message = createBaseAgentTextAnswer();
|
|
1051
|
+
while (reader.pos < end) {
|
|
1052
|
+
const tag = reader.uint32();
|
|
1053
|
+
switch (tag >>> 3) {
|
|
1054
|
+
case 1: {
|
|
1055
|
+
if (tag !== 10) {
|
|
1056
|
+
break;
|
|
1057
|
+
}
|
|
1058
|
+
message.text = reader.string();
|
|
1059
|
+
continue;
|
|
1060
|
+
}
|
|
1061
|
+
case 2: {
|
|
1062
|
+
if (tag !== 18) {
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
message.intent = reader.string();
|
|
1066
|
+
continue;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1070
|
+
break;
|
|
1071
|
+
}
|
|
1072
|
+
reader.skip(tag & 7);
|
|
1073
|
+
}
|
|
1074
|
+
return message;
|
|
1075
|
+
},
|
|
1076
|
+
create(base) {
|
|
1077
|
+
return exports.AgentTextAnswer.fromPartial(base ?? {});
|
|
1078
|
+
},
|
|
1079
|
+
fromPartial(object) {
|
|
1080
|
+
const message = createBaseAgentTextAnswer();
|
|
1081
|
+
message.text = object.text ?? "";
|
|
1082
|
+
message.intent = object.intent ?? "";
|
|
1083
|
+
return message;
|
|
1084
|
+
},
|
|
1085
|
+
};
|
|
1086
|
+
function createBaseAgentNotification() {
|
|
1087
|
+
return { text: "", direct: false, severity: "" };
|
|
1088
|
+
}
|
|
1089
|
+
exports.AgentNotification = {
|
|
1090
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1091
|
+
if (message.text !== "") {
|
|
1092
|
+
writer.uint32(10).string(message.text);
|
|
1093
|
+
}
|
|
1094
|
+
if (message.direct !== false) {
|
|
1095
|
+
writer.uint32(16).bool(message.direct);
|
|
1096
|
+
}
|
|
1097
|
+
if (message.severity !== "") {
|
|
1098
|
+
writer.uint32(26).string(message.severity);
|
|
1099
|
+
}
|
|
1100
|
+
return writer;
|
|
1101
|
+
},
|
|
1102
|
+
decode(input, length) {
|
|
1103
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1104
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1105
|
+
const message = createBaseAgentNotification();
|
|
1106
|
+
while (reader.pos < end) {
|
|
1107
|
+
const tag = reader.uint32();
|
|
1108
|
+
switch (tag >>> 3) {
|
|
1109
|
+
case 1: {
|
|
1110
|
+
if (tag !== 10) {
|
|
1111
|
+
break;
|
|
1112
|
+
}
|
|
1113
|
+
message.text = reader.string();
|
|
1114
|
+
continue;
|
|
1115
|
+
}
|
|
1116
|
+
case 2: {
|
|
1117
|
+
if (tag !== 16) {
|
|
1118
|
+
break;
|
|
1119
|
+
}
|
|
1120
|
+
message.direct = reader.bool();
|
|
1121
|
+
continue;
|
|
1122
|
+
}
|
|
1123
|
+
case 3: {
|
|
1124
|
+
if (tag !== 26) {
|
|
1125
|
+
break;
|
|
1126
|
+
}
|
|
1127
|
+
message.severity = reader.string();
|
|
1128
|
+
continue;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1132
|
+
break;
|
|
1133
|
+
}
|
|
1134
|
+
reader.skip(tag & 7);
|
|
1135
|
+
}
|
|
1136
|
+
return message;
|
|
1137
|
+
},
|
|
1138
|
+
create(base) {
|
|
1139
|
+
return exports.AgentNotification.fromPartial(base ?? {});
|
|
1140
|
+
},
|
|
1141
|
+
fromPartial(object) {
|
|
1142
|
+
const message = createBaseAgentNotification();
|
|
1143
|
+
message.text = object.text ?? "";
|
|
1144
|
+
message.direct = object.direct ?? false;
|
|
1145
|
+
message.severity = object.severity ?? "";
|
|
1146
|
+
return message;
|
|
1147
|
+
},
|
|
1148
|
+
};
|
|
1149
|
+
function createBaseAgentStateValue() {
|
|
1150
|
+
return { value: "", ack: false };
|
|
1151
|
+
}
|
|
1152
|
+
exports.AgentStateValue = {
|
|
1153
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1154
|
+
if (message.value !== "") {
|
|
1155
|
+
writer.uint32(10).string(message.value);
|
|
1156
|
+
}
|
|
1157
|
+
if (message.ack !== false) {
|
|
1158
|
+
writer.uint32(16).bool(message.ack);
|
|
1159
|
+
}
|
|
1160
|
+
return writer;
|
|
1161
|
+
},
|
|
1162
|
+
decode(input, length) {
|
|
1163
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1164
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1165
|
+
const message = createBaseAgentStateValue();
|
|
1166
|
+
while (reader.pos < end) {
|
|
1167
|
+
const tag = reader.uint32();
|
|
1168
|
+
switch (tag >>> 3) {
|
|
1169
|
+
case 1: {
|
|
1170
|
+
if (tag !== 10) {
|
|
1171
|
+
break;
|
|
1172
|
+
}
|
|
1173
|
+
message.value = reader.string();
|
|
1174
|
+
continue;
|
|
1175
|
+
}
|
|
1176
|
+
case 2: {
|
|
1177
|
+
if (tag !== 16) {
|
|
1178
|
+
break;
|
|
1179
|
+
}
|
|
1180
|
+
message.ack = reader.bool();
|
|
1181
|
+
continue;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1187
|
+
reader.skip(tag & 7);
|
|
1188
|
+
}
|
|
1189
|
+
return message;
|
|
1190
|
+
},
|
|
1191
|
+
create(base) {
|
|
1192
|
+
return exports.AgentStateValue.fromPartial(base ?? {});
|
|
1193
|
+
},
|
|
1194
|
+
fromPartial(object) {
|
|
1195
|
+
const message = createBaseAgentStateValue();
|
|
1196
|
+
message.value = object.value ?? "";
|
|
1197
|
+
message.ack = object.ack ?? false;
|
|
1198
|
+
return message;
|
|
1199
|
+
},
|
|
1200
|
+
};
|
|
1201
|
+
function createBaseAgentDevice() {
|
|
1202
|
+
return {
|
|
1203
|
+
stateId: "",
|
|
1204
|
+
floor: "",
|
|
1205
|
+
room: "",
|
|
1206
|
+
device: "",
|
|
1207
|
+
deviceType: "",
|
|
1208
|
+
functions: [],
|
|
1209
|
+
value: undefined,
|
|
1210
|
+
roomNames: {},
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
exports.AgentDevice = {
|
|
1214
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1215
|
+
if (message.stateId !== "") {
|
|
1216
|
+
writer.uint32(10).string(message.stateId);
|
|
1217
|
+
}
|
|
1218
|
+
if (message.floor !== "") {
|
|
1219
|
+
writer.uint32(18).string(message.floor);
|
|
1220
|
+
}
|
|
1221
|
+
if (message.room !== "") {
|
|
1222
|
+
writer.uint32(26).string(message.room);
|
|
1223
|
+
}
|
|
1224
|
+
if (message.device !== "") {
|
|
1225
|
+
writer.uint32(34).string(message.device);
|
|
1226
|
+
}
|
|
1227
|
+
if (message.deviceType !== "") {
|
|
1228
|
+
writer.uint32(42).string(message.deviceType);
|
|
1229
|
+
}
|
|
1230
|
+
for (const v of message.functions) {
|
|
1231
|
+
writer.uint32(50).string(v);
|
|
1232
|
+
}
|
|
1233
|
+
if (message.value !== undefined) {
|
|
1234
|
+
exports.AgentStateValue.encode(message.value, writer.uint32(58).fork()).join();
|
|
1235
|
+
}
|
|
1236
|
+
globalThis.Object.entries(message.roomNames).forEach(([key, value]) => {
|
|
1237
|
+
exports.AgentDevice_RoomNamesEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
|
|
1238
|
+
});
|
|
1239
|
+
return writer;
|
|
1240
|
+
},
|
|
1241
|
+
decode(input, length) {
|
|
1242
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1243
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1244
|
+
const message = createBaseAgentDevice();
|
|
1245
|
+
while (reader.pos < end) {
|
|
1246
|
+
const tag = reader.uint32();
|
|
1247
|
+
switch (tag >>> 3) {
|
|
1248
|
+
case 1: {
|
|
1249
|
+
if (tag !== 10) {
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
message.stateId = reader.string();
|
|
1253
|
+
continue;
|
|
1254
|
+
}
|
|
1255
|
+
case 2: {
|
|
1256
|
+
if (tag !== 18) {
|
|
1257
|
+
break;
|
|
1258
|
+
}
|
|
1259
|
+
message.floor = reader.string();
|
|
1260
|
+
continue;
|
|
1261
|
+
}
|
|
1262
|
+
case 3: {
|
|
1263
|
+
if (tag !== 26) {
|
|
1264
|
+
break;
|
|
1265
|
+
}
|
|
1266
|
+
message.room = reader.string();
|
|
1267
|
+
continue;
|
|
1268
|
+
}
|
|
1269
|
+
case 4: {
|
|
1270
|
+
if (tag !== 34) {
|
|
1271
|
+
break;
|
|
1272
|
+
}
|
|
1273
|
+
message.device = reader.string();
|
|
1274
|
+
continue;
|
|
1275
|
+
}
|
|
1276
|
+
case 5: {
|
|
1277
|
+
if (tag !== 42) {
|
|
1278
|
+
break;
|
|
1279
|
+
}
|
|
1280
|
+
message.deviceType = reader.string();
|
|
1281
|
+
continue;
|
|
1282
|
+
}
|
|
1283
|
+
case 6: {
|
|
1284
|
+
if (tag !== 50) {
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1287
|
+
message.functions.push(reader.string());
|
|
1288
|
+
continue;
|
|
1289
|
+
}
|
|
1290
|
+
case 7: {
|
|
1291
|
+
if (tag !== 58) {
|
|
1292
|
+
break;
|
|
1293
|
+
}
|
|
1294
|
+
message.value = exports.AgentStateValue.decode(reader, reader.uint32());
|
|
1295
|
+
continue;
|
|
1296
|
+
}
|
|
1297
|
+
case 8: {
|
|
1298
|
+
if (tag !== 66) {
|
|
1299
|
+
break;
|
|
1300
|
+
}
|
|
1301
|
+
const entry8 = exports.AgentDevice_RoomNamesEntry.decode(reader, reader.uint32());
|
|
1302
|
+
if (entry8.value !== undefined) {
|
|
1303
|
+
message.roomNames[entry8.key] = entry8.value;
|
|
1304
|
+
}
|
|
1305
|
+
continue;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
reader.skip(tag & 7);
|
|
1312
|
+
}
|
|
1313
|
+
return message;
|
|
1314
|
+
},
|
|
1315
|
+
create(base) {
|
|
1316
|
+
return exports.AgentDevice.fromPartial(base ?? {});
|
|
1317
|
+
},
|
|
1318
|
+
fromPartial(object) {
|
|
1319
|
+
const message = createBaseAgentDevice();
|
|
1320
|
+
message.stateId = object.stateId ?? "";
|
|
1321
|
+
message.floor = object.floor ?? "";
|
|
1322
|
+
message.room = object.room ?? "";
|
|
1323
|
+
message.device = object.device ?? "";
|
|
1324
|
+
message.deviceType = object.deviceType ?? "";
|
|
1325
|
+
message.functions = object.functions?.map((e) => e) || [];
|
|
1326
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
1327
|
+
? exports.AgentStateValue.fromPartial(object.value)
|
|
1328
|
+
: undefined;
|
|
1329
|
+
message.roomNames = globalThis.Object.entries(object.roomNames ?? {}).reduce((acc, [key, value]) => {
|
|
1330
|
+
if (value !== undefined) {
|
|
1331
|
+
acc[key] = globalThis.String(value);
|
|
1332
|
+
}
|
|
1333
|
+
return acc;
|
|
1334
|
+
}, {});
|
|
1335
|
+
return message;
|
|
1336
|
+
},
|
|
1337
|
+
};
|
|
1338
|
+
function createBaseAgentDevice_RoomNamesEntry() {
|
|
1339
|
+
return { key: "", value: "" };
|
|
1340
|
+
}
|
|
1341
|
+
exports.AgentDevice_RoomNamesEntry = {
|
|
1342
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1343
|
+
if (message.key !== "") {
|
|
1344
|
+
writer.uint32(10).string(message.key);
|
|
1345
|
+
}
|
|
1346
|
+
if (message.value !== "") {
|
|
1347
|
+
writer.uint32(18).string(message.value);
|
|
1348
|
+
}
|
|
1349
|
+
return writer;
|
|
1350
|
+
},
|
|
1351
|
+
decode(input, length) {
|
|
1352
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1353
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1354
|
+
const message = createBaseAgentDevice_RoomNamesEntry();
|
|
1355
|
+
while (reader.pos < end) {
|
|
1356
|
+
const tag = reader.uint32();
|
|
1357
|
+
switch (tag >>> 3) {
|
|
1358
|
+
case 1: {
|
|
1359
|
+
if (tag !== 10) {
|
|
1360
|
+
break;
|
|
1361
|
+
}
|
|
1362
|
+
message.key = reader.string();
|
|
1363
|
+
continue;
|
|
1364
|
+
}
|
|
1365
|
+
case 2: {
|
|
1366
|
+
if (tag !== 18) {
|
|
1367
|
+
break;
|
|
1368
|
+
}
|
|
1369
|
+
message.value = reader.string();
|
|
1370
|
+
continue;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
reader.skip(tag & 7);
|
|
1377
|
+
}
|
|
1378
|
+
return message;
|
|
1379
|
+
},
|
|
1380
|
+
create(base) {
|
|
1381
|
+
return exports.AgentDevice_RoomNamesEntry.fromPartial(base ?? {});
|
|
1382
|
+
},
|
|
1383
|
+
fromPartial(object) {
|
|
1384
|
+
const message = createBaseAgentDevice_RoomNamesEntry();
|
|
1385
|
+
message.key = object.key ?? "";
|
|
1386
|
+
message.value = object.value ?? "";
|
|
1387
|
+
return message;
|
|
1388
|
+
},
|
|
1389
|
+
};
|
|
1390
|
+
function createBaseAgentDeviceSnapshot() {
|
|
1391
|
+
return { devices: [] };
|
|
1392
|
+
}
|
|
1393
|
+
exports.AgentDeviceSnapshot = {
|
|
1394
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1395
|
+
for (const v of message.devices) {
|
|
1396
|
+
exports.AgentDevice.encode(v, writer.uint32(10).fork()).join();
|
|
1397
|
+
}
|
|
1398
|
+
return writer;
|
|
1399
|
+
},
|
|
1400
|
+
decode(input, length) {
|
|
1401
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1402
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1403
|
+
const message = createBaseAgentDeviceSnapshot();
|
|
1404
|
+
while (reader.pos < end) {
|
|
1405
|
+
const tag = reader.uint32();
|
|
1406
|
+
switch (tag >>> 3) {
|
|
1407
|
+
case 1: {
|
|
1408
|
+
if (tag !== 10) {
|
|
1409
|
+
break;
|
|
1410
|
+
}
|
|
1411
|
+
message.devices.push(exports.AgentDevice.decode(reader, reader.uint32()));
|
|
1412
|
+
continue;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
reader.skip(tag & 7);
|
|
1419
|
+
}
|
|
1420
|
+
return message;
|
|
1421
|
+
},
|
|
1422
|
+
create(base) {
|
|
1423
|
+
return exports.AgentDeviceSnapshot.fromPartial(base ?? {});
|
|
1424
|
+
},
|
|
1425
|
+
fromPartial(object) {
|
|
1426
|
+
const message = createBaseAgentDeviceSnapshot();
|
|
1427
|
+
message.devices = object.devices?.map((e) => exports.AgentDevice.fromPartial(e)) || [];
|
|
1428
|
+
return message;
|
|
1429
|
+
},
|
|
1430
|
+
};
|
|
1431
|
+
function createBaseAgentRoom() {
|
|
1432
|
+
return { roomId: "", displayNames: {} };
|
|
1433
|
+
}
|
|
1434
|
+
exports.AgentRoom = {
|
|
1435
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1436
|
+
if (message.roomId !== "") {
|
|
1437
|
+
writer.uint32(10).string(message.roomId);
|
|
1438
|
+
}
|
|
1439
|
+
globalThis.Object.entries(message.displayNames).forEach(([key, value]) => {
|
|
1440
|
+
exports.AgentRoom_DisplayNamesEntry.encode({ key: key, value }, writer.uint32(18).fork()).join();
|
|
1441
|
+
});
|
|
1442
|
+
return writer;
|
|
1443
|
+
},
|
|
1444
|
+
decode(input, length) {
|
|
1445
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1446
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1447
|
+
const message = createBaseAgentRoom();
|
|
1448
|
+
while (reader.pos < end) {
|
|
1449
|
+
const tag = reader.uint32();
|
|
1450
|
+
switch (tag >>> 3) {
|
|
1451
|
+
case 1: {
|
|
1452
|
+
if (tag !== 10) {
|
|
1453
|
+
break;
|
|
1454
|
+
}
|
|
1455
|
+
message.roomId = reader.string();
|
|
1456
|
+
continue;
|
|
1457
|
+
}
|
|
1458
|
+
case 2: {
|
|
1459
|
+
if (tag !== 18) {
|
|
1460
|
+
break;
|
|
1461
|
+
}
|
|
1462
|
+
const entry2 = exports.AgentRoom_DisplayNamesEntry.decode(reader, reader.uint32());
|
|
1463
|
+
if (entry2.value !== undefined) {
|
|
1464
|
+
message.displayNames[entry2.key] = entry2.value;
|
|
1465
|
+
}
|
|
1466
|
+
continue;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1470
|
+
break;
|
|
1471
|
+
}
|
|
1472
|
+
reader.skip(tag & 7);
|
|
1473
|
+
}
|
|
1474
|
+
return message;
|
|
1475
|
+
},
|
|
1476
|
+
create(base) {
|
|
1477
|
+
return exports.AgentRoom.fromPartial(base ?? {});
|
|
1478
|
+
},
|
|
1479
|
+
fromPartial(object) {
|
|
1480
|
+
const message = createBaseAgentRoom();
|
|
1481
|
+
message.roomId = object.roomId ?? "";
|
|
1482
|
+
message.displayNames = globalThis.Object.entries(object.displayNames ?? {}).reduce((acc, [key, value]) => {
|
|
1483
|
+
if (value !== undefined) {
|
|
1484
|
+
acc[key] = globalThis.String(value);
|
|
1485
|
+
}
|
|
1486
|
+
return acc;
|
|
1487
|
+
}, {});
|
|
1488
|
+
return message;
|
|
1489
|
+
},
|
|
1490
|
+
};
|
|
1491
|
+
function createBaseAgentRoom_DisplayNamesEntry() {
|
|
1492
|
+
return { key: "", value: "" };
|
|
1493
|
+
}
|
|
1494
|
+
exports.AgentRoom_DisplayNamesEntry = {
|
|
1495
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1496
|
+
if (message.key !== "") {
|
|
1497
|
+
writer.uint32(10).string(message.key);
|
|
1498
|
+
}
|
|
1499
|
+
if (message.value !== "") {
|
|
1500
|
+
writer.uint32(18).string(message.value);
|
|
1501
|
+
}
|
|
1502
|
+
return writer;
|
|
1503
|
+
},
|
|
1504
|
+
decode(input, length) {
|
|
1505
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1506
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1507
|
+
const message = createBaseAgentRoom_DisplayNamesEntry();
|
|
1508
|
+
while (reader.pos < end) {
|
|
1509
|
+
const tag = reader.uint32();
|
|
1510
|
+
switch (tag >>> 3) {
|
|
1511
|
+
case 1: {
|
|
1512
|
+
if (tag !== 10) {
|
|
1513
|
+
break;
|
|
1514
|
+
}
|
|
1515
|
+
message.key = reader.string();
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
case 2: {
|
|
1519
|
+
if (tag !== 18) {
|
|
1520
|
+
break;
|
|
1521
|
+
}
|
|
1522
|
+
message.value = reader.string();
|
|
1523
|
+
continue;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1527
|
+
break;
|
|
1528
|
+
}
|
|
1529
|
+
reader.skip(tag & 7);
|
|
1530
|
+
}
|
|
1531
|
+
return message;
|
|
1532
|
+
},
|
|
1533
|
+
create(base) {
|
|
1534
|
+
return exports.AgentRoom_DisplayNamesEntry.fromPartial(base ?? {});
|
|
1535
|
+
},
|
|
1536
|
+
fromPartial(object) {
|
|
1537
|
+
const message = createBaseAgentRoom_DisplayNamesEntry();
|
|
1538
|
+
message.key = object.key ?? "";
|
|
1539
|
+
message.value = object.value ?? "";
|
|
1540
|
+
return message;
|
|
1541
|
+
},
|
|
1542
|
+
};
|
|
1543
|
+
function createBaseAgentRoomSnapshot() {
|
|
1544
|
+
return { rooms: [] };
|
|
1545
|
+
}
|
|
1546
|
+
exports.AgentRoomSnapshot = {
|
|
1547
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1548
|
+
for (const v of message.rooms) {
|
|
1549
|
+
exports.AgentRoom.encode(v, writer.uint32(10).fork()).join();
|
|
1550
|
+
}
|
|
1551
|
+
return writer;
|
|
1552
|
+
},
|
|
1553
|
+
decode(input, length) {
|
|
1554
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1555
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1556
|
+
const message = createBaseAgentRoomSnapshot();
|
|
1557
|
+
while (reader.pos < end) {
|
|
1558
|
+
const tag = reader.uint32();
|
|
1559
|
+
switch (tag >>> 3) {
|
|
1560
|
+
case 1: {
|
|
1561
|
+
if (tag !== 10) {
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
message.rooms.push(exports.AgentRoom.decode(reader, reader.uint32()));
|
|
1565
|
+
continue;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1569
|
+
break;
|
|
1570
|
+
}
|
|
1571
|
+
reader.skip(tag & 7);
|
|
1572
|
+
}
|
|
1573
|
+
return message;
|
|
1574
|
+
},
|
|
1575
|
+
create(base) {
|
|
1576
|
+
return exports.AgentRoomSnapshot.fromPartial(base ?? {});
|
|
1577
|
+
},
|
|
1578
|
+
fromPartial(object) {
|
|
1579
|
+
const message = createBaseAgentRoomSnapshot();
|
|
1580
|
+
message.rooms = object.rooms?.map((e) => exports.AgentRoom.fromPartial(e)) || [];
|
|
1581
|
+
return message;
|
|
1582
|
+
},
|
|
1583
|
+
};
|
|
1584
|
+
function createBaseAgentResident() {
|
|
1585
|
+
return { roomieId: "", name: "", type: 0, moodLevel: undefined, presenceState: 0 };
|
|
1586
|
+
}
|
|
1587
|
+
exports.AgentResident = {
|
|
1588
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1589
|
+
if (message.roomieId !== "") {
|
|
1590
|
+
writer.uint32(10).string(message.roomieId);
|
|
1591
|
+
}
|
|
1592
|
+
if (message.name !== "") {
|
|
1593
|
+
writer.uint32(18).string(message.name);
|
|
1594
|
+
}
|
|
1595
|
+
if (message.type !== 0) {
|
|
1596
|
+
writer.uint32(24).int32(message.type);
|
|
1597
|
+
}
|
|
1598
|
+
if (message.moodLevel !== undefined) {
|
|
1599
|
+
writer.uint32(32).int32(message.moodLevel);
|
|
1600
|
+
}
|
|
1601
|
+
if (message.presenceState !== 0) {
|
|
1602
|
+
writer.uint32(40).int32(message.presenceState);
|
|
1603
|
+
}
|
|
1604
|
+
return writer;
|
|
1605
|
+
},
|
|
1606
|
+
decode(input, length) {
|
|
1607
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1608
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1609
|
+
const message = createBaseAgentResident();
|
|
1610
|
+
while (reader.pos < end) {
|
|
1611
|
+
const tag = reader.uint32();
|
|
1612
|
+
switch (tag >>> 3) {
|
|
1613
|
+
case 1: {
|
|
1614
|
+
if (tag !== 10) {
|
|
1615
|
+
break;
|
|
1616
|
+
}
|
|
1617
|
+
message.roomieId = reader.string();
|
|
1618
|
+
continue;
|
|
1619
|
+
}
|
|
1620
|
+
case 2: {
|
|
1621
|
+
if (tag !== 18) {
|
|
1622
|
+
break;
|
|
1623
|
+
}
|
|
1624
|
+
message.name = reader.string();
|
|
1625
|
+
continue;
|
|
1626
|
+
}
|
|
1627
|
+
case 3: {
|
|
1628
|
+
if (tag !== 24) {
|
|
1629
|
+
break;
|
|
1630
|
+
}
|
|
1631
|
+
message.type = reader.int32();
|
|
1632
|
+
continue;
|
|
1633
|
+
}
|
|
1634
|
+
case 4: {
|
|
1635
|
+
if (tag !== 32) {
|
|
1636
|
+
break;
|
|
1637
|
+
}
|
|
1638
|
+
message.moodLevel = reader.int32();
|
|
1639
|
+
continue;
|
|
1640
|
+
}
|
|
1641
|
+
case 5: {
|
|
1642
|
+
if (tag !== 40) {
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
message.presenceState = reader.int32();
|
|
1646
|
+
continue;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1650
|
+
break;
|
|
1651
|
+
}
|
|
1652
|
+
reader.skip(tag & 7);
|
|
1653
|
+
}
|
|
1654
|
+
return message;
|
|
1655
|
+
},
|
|
1656
|
+
create(base) {
|
|
1657
|
+
return exports.AgentResident.fromPartial(base ?? {});
|
|
1658
|
+
},
|
|
1659
|
+
fromPartial(object) {
|
|
1660
|
+
const message = createBaseAgentResident();
|
|
1661
|
+
message.roomieId = object.roomieId ?? "";
|
|
1662
|
+
message.name = object.name ?? "";
|
|
1663
|
+
message.type = object.type ?? 0;
|
|
1664
|
+
message.moodLevel = object.moodLevel ?? undefined;
|
|
1665
|
+
message.presenceState = object.presenceState ?? 0;
|
|
1666
|
+
return message;
|
|
1667
|
+
},
|
|
1668
|
+
};
|
|
1669
|
+
function createBaseAgentResidentSnapshot() {
|
|
1670
|
+
return { residents: [] };
|
|
1671
|
+
}
|
|
1672
|
+
exports.AgentResidentSnapshot = {
|
|
1673
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1674
|
+
for (const v of message.residents) {
|
|
1675
|
+
exports.AgentResident.encode(v, writer.uint32(10).fork()).join();
|
|
1676
|
+
}
|
|
1677
|
+
return writer;
|
|
1678
|
+
},
|
|
1679
|
+
decode(input, length) {
|
|
1680
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1681
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1682
|
+
const message = createBaseAgentResidentSnapshot();
|
|
1683
|
+
while (reader.pos < end) {
|
|
1684
|
+
const tag = reader.uint32();
|
|
1685
|
+
switch (tag >>> 3) {
|
|
1686
|
+
case 1: {
|
|
1687
|
+
if (tag !== 10) {
|
|
1688
|
+
break;
|
|
1689
|
+
}
|
|
1690
|
+
message.residents.push(exports.AgentResident.decode(reader, reader.uint32()));
|
|
1691
|
+
continue;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1695
|
+
break;
|
|
1696
|
+
}
|
|
1697
|
+
reader.skip(tag & 7);
|
|
1698
|
+
}
|
|
1699
|
+
return message;
|
|
1700
|
+
},
|
|
1701
|
+
create(base) {
|
|
1702
|
+
return exports.AgentResidentSnapshot.fromPartial(base ?? {});
|
|
1703
|
+
},
|
|
1704
|
+
fromPartial(object) {
|
|
1705
|
+
const message = createBaseAgentResidentSnapshot();
|
|
1706
|
+
message.residents = object.residents?.map((e) => exports.AgentResident.fromPartial(e)) || [];
|
|
1707
|
+
return message;
|
|
1708
|
+
},
|
|
1709
|
+
};
|
|
1710
|
+
function createBaseAgentAskResident() {
|
|
1711
|
+
return { correlationId: "", room: "", question: "" };
|
|
1712
|
+
}
|
|
1713
|
+
exports.AgentAskResident = {
|
|
1714
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1715
|
+
if (message.correlationId !== "") {
|
|
1716
|
+
writer.uint32(26).string(message.correlationId);
|
|
1717
|
+
}
|
|
1718
|
+
if (message.room !== "") {
|
|
1719
|
+
writer.uint32(10).string(message.room);
|
|
1720
|
+
}
|
|
1721
|
+
if (message.question !== "") {
|
|
1722
|
+
writer.uint32(18).string(message.question);
|
|
1723
|
+
}
|
|
1724
|
+
return writer;
|
|
1725
|
+
},
|
|
1726
|
+
decode(input, length) {
|
|
1727
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1728
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1729
|
+
const message = createBaseAgentAskResident();
|
|
1730
|
+
while (reader.pos < end) {
|
|
1731
|
+
const tag = reader.uint32();
|
|
1732
|
+
switch (tag >>> 3) {
|
|
1733
|
+
case 3: {
|
|
1734
|
+
if (tag !== 26) {
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
message.correlationId = reader.string();
|
|
1738
|
+
continue;
|
|
1739
|
+
}
|
|
1740
|
+
case 1: {
|
|
1741
|
+
if (tag !== 10) {
|
|
1742
|
+
break;
|
|
1743
|
+
}
|
|
1744
|
+
message.room = reader.string();
|
|
1745
|
+
continue;
|
|
1746
|
+
}
|
|
1747
|
+
case 2: {
|
|
1748
|
+
if (tag !== 18) {
|
|
1749
|
+
break;
|
|
1750
|
+
}
|
|
1751
|
+
message.question = reader.string();
|
|
1752
|
+
continue;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1756
|
+
break;
|
|
1757
|
+
}
|
|
1758
|
+
reader.skip(tag & 7);
|
|
1759
|
+
}
|
|
1760
|
+
return message;
|
|
1761
|
+
},
|
|
1762
|
+
create(base) {
|
|
1763
|
+
return exports.AgentAskResident.fromPartial(base ?? {});
|
|
1764
|
+
},
|
|
1765
|
+
fromPartial(object) {
|
|
1766
|
+
const message = createBaseAgentAskResident();
|
|
1767
|
+
message.correlationId = object.correlationId ?? "";
|
|
1768
|
+
message.room = object.room ?? "";
|
|
1769
|
+
message.question = object.question ?? "";
|
|
1770
|
+
return message;
|
|
1771
|
+
},
|
|
1772
|
+
};
|
|
1773
|
+
function createBaseAgentResidentAnswered() {
|
|
1774
|
+
return { correlationId: "", answer: "" };
|
|
1775
|
+
}
|
|
1776
|
+
exports.AgentResidentAnswered = {
|
|
1777
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1778
|
+
if (message.correlationId !== "") {
|
|
1779
|
+
writer.uint32(10).string(message.correlationId);
|
|
1780
|
+
}
|
|
1781
|
+
if (message.answer !== "") {
|
|
1782
|
+
writer.uint32(18).string(message.answer);
|
|
1783
|
+
}
|
|
1784
|
+
return writer;
|
|
1785
|
+
},
|
|
1786
|
+
decode(input, length) {
|
|
1787
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1788
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1789
|
+
const message = createBaseAgentResidentAnswered();
|
|
1790
|
+
while (reader.pos < end) {
|
|
1791
|
+
const tag = reader.uint32();
|
|
1792
|
+
switch (tag >>> 3) {
|
|
1793
|
+
case 1: {
|
|
1794
|
+
if (tag !== 10) {
|
|
1795
|
+
break;
|
|
1796
|
+
}
|
|
1797
|
+
message.correlationId = reader.string();
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
case 2: {
|
|
1801
|
+
if (tag !== 18) {
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
message.answer = reader.string();
|
|
1805
|
+
continue;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1809
|
+
break;
|
|
1810
|
+
}
|
|
1811
|
+
reader.skip(tag & 7);
|
|
1812
|
+
}
|
|
1813
|
+
return message;
|
|
1814
|
+
},
|
|
1815
|
+
create(base) {
|
|
1816
|
+
return exports.AgentResidentAnswered.fromPartial(base ?? {});
|
|
1817
|
+
},
|
|
1818
|
+
fromPartial(object) {
|
|
1819
|
+
const message = createBaseAgentResidentAnswered();
|
|
1820
|
+
message.correlationId = object.correlationId ?? "";
|
|
1821
|
+
message.answer = object.answer ?? "";
|
|
1822
|
+
return message;
|
|
1823
|
+
},
|
|
1824
|
+
};
|
|
1825
|
+
function createBaseAgentBleUpdate() {
|
|
1826
|
+
return { label: "", mac: "", room: "", satellite: "", rssi: 0 };
|
|
1827
|
+
}
|
|
1828
|
+
exports.AgentBleUpdate = {
|
|
1829
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1830
|
+
if (message.label !== "") {
|
|
1831
|
+
writer.uint32(10).string(message.label);
|
|
1832
|
+
}
|
|
1833
|
+
if (message.mac !== "") {
|
|
1834
|
+
writer.uint32(18).string(message.mac);
|
|
1835
|
+
}
|
|
1836
|
+
if (message.room !== "") {
|
|
1837
|
+
writer.uint32(26).string(message.room);
|
|
1838
|
+
}
|
|
1839
|
+
if (message.satellite !== "") {
|
|
1840
|
+
writer.uint32(34).string(message.satellite);
|
|
1841
|
+
}
|
|
1842
|
+
if (message.rssi !== 0) {
|
|
1843
|
+
writer.uint32(40).int32(message.rssi);
|
|
1844
|
+
}
|
|
1845
|
+
return writer;
|
|
1846
|
+
},
|
|
1847
|
+
decode(input, length) {
|
|
1848
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1849
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1850
|
+
const message = createBaseAgentBleUpdate();
|
|
1851
|
+
while (reader.pos < end) {
|
|
1852
|
+
const tag = reader.uint32();
|
|
1853
|
+
switch (tag >>> 3) {
|
|
1854
|
+
case 1: {
|
|
1855
|
+
if (tag !== 10) {
|
|
1856
|
+
break;
|
|
1857
|
+
}
|
|
1858
|
+
message.label = reader.string();
|
|
1859
|
+
continue;
|
|
1860
|
+
}
|
|
1861
|
+
case 2: {
|
|
1862
|
+
if (tag !== 18) {
|
|
1863
|
+
break;
|
|
1864
|
+
}
|
|
1865
|
+
message.mac = reader.string();
|
|
1866
|
+
continue;
|
|
1867
|
+
}
|
|
1868
|
+
case 3: {
|
|
1869
|
+
if (tag !== 26) {
|
|
1870
|
+
break;
|
|
1871
|
+
}
|
|
1872
|
+
message.room = reader.string();
|
|
1873
|
+
continue;
|
|
1874
|
+
}
|
|
1875
|
+
case 4: {
|
|
1876
|
+
if (tag !== 34) {
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1879
|
+
message.satellite = reader.string();
|
|
1880
|
+
continue;
|
|
1881
|
+
}
|
|
1882
|
+
case 5: {
|
|
1883
|
+
if (tag !== 40) {
|
|
1884
|
+
break;
|
|
1885
|
+
}
|
|
1886
|
+
message.rssi = reader.int32();
|
|
1887
|
+
continue;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1891
|
+
break;
|
|
1892
|
+
}
|
|
1893
|
+
reader.skip(tag & 7);
|
|
1894
|
+
}
|
|
1895
|
+
return message;
|
|
1896
|
+
},
|
|
1897
|
+
create(base) {
|
|
1898
|
+
return exports.AgentBleUpdate.fromPartial(base ?? {});
|
|
1899
|
+
},
|
|
1900
|
+
fromPartial(object) {
|
|
1901
|
+
const message = createBaseAgentBleUpdate();
|
|
1902
|
+
message.label = object.label ?? "";
|
|
1903
|
+
message.mac = object.mac ?? "";
|
|
1904
|
+
message.room = object.room ?? "";
|
|
1905
|
+
message.satellite = object.satellite ?? "";
|
|
1906
|
+
message.rssi = object.rssi ?? 0;
|
|
1907
|
+
return message;
|
|
1908
|
+
},
|
|
1909
|
+
};
|
|
1910
|
+
function createBaseAgentSensorUpdate() {
|
|
1911
|
+
return { device: "", temperature: 0, pressure: 0, humidity: 0, iaq: 0, iaqAccuracy: 0, co2Equiv: 0, vocEquiv: 0 };
|
|
1912
|
+
}
|
|
1913
|
+
exports.AgentSensorUpdate = {
|
|
1914
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1915
|
+
if (message.device !== "") {
|
|
1916
|
+
writer.uint32(10).string(message.device);
|
|
1917
|
+
}
|
|
1918
|
+
if (message.temperature !== 0) {
|
|
1919
|
+
writer.uint32(21).float(message.temperature);
|
|
1920
|
+
}
|
|
1921
|
+
if (message.pressure !== 0) {
|
|
1922
|
+
writer.uint32(29).float(message.pressure);
|
|
1923
|
+
}
|
|
1924
|
+
if (message.humidity !== 0) {
|
|
1925
|
+
writer.uint32(37).float(message.humidity);
|
|
1926
|
+
}
|
|
1927
|
+
if (message.iaq !== 0) {
|
|
1928
|
+
writer.uint32(53).float(message.iaq);
|
|
1929
|
+
}
|
|
1930
|
+
if (message.iaqAccuracy !== 0) {
|
|
1931
|
+
writer.uint32(56).uint32(message.iaqAccuracy);
|
|
1932
|
+
}
|
|
1933
|
+
if (message.co2Equiv !== 0) {
|
|
1934
|
+
writer.uint32(69).float(message.co2Equiv);
|
|
1935
|
+
}
|
|
1936
|
+
if (message.vocEquiv !== 0) {
|
|
1937
|
+
writer.uint32(77).float(message.vocEquiv);
|
|
1938
|
+
}
|
|
1939
|
+
return writer;
|
|
1940
|
+
},
|
|
1941
|
+
decode(input, length) {
|
|
1942
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1943
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1944
|
+
const message = createBaseAgentSensorUpdate();
|
|
1945
|
+
while (reader.pos < end) {
|
|
1946
|
+
const tag = reader.uint32();
|
|
1947
|
+
switch (tag >>> 3) {
|
|
1948
|
+
case 1: {
|
|
1949
|
+
if (tag !== 10) {
|
|
1950
|
+
break;
|
|
1951
|
+
}
|
|
1952
|
+
message.device = reader.string();
|
|
1953
|
+
continue;
|
|
1954
|
+
}
|
|
1955
|
+
case 2: {
|
|
1956
|
+
if (tag !== 21) {
|
|
1957
|
+
break;
|
|
1958
|
+
}
|
|
1959
|
+
message.temperature = reader.float();
|
|
1960
|
+
continue;
|
|
1961
|
+
}
|
|
1962
|
+
case 3: {
|
|
1963
|
+
if (tag !== 29) {
|
|
1964
|
+
break;
|
|
1965
|
+
}
|
|
1966
|
+
message.pressure = reader.float();
|
|
1967
|
+
continue;
|
|
1968
|
+
}
|
|
1969
|
+
case 4: {
|
|
1970
|
+
if (tag !== 37) {
|
|
1971
|
+
break;
|
|
1972
|
+
}
|
|
1973
|
+
message.humidity = reader.float();
|
|
1974
|
+
continue;
|
|
1975
|
+
}
|
|
1976
|
+
case 6: {
|
|
1977
|
+
if (tag !== 53) {
|
|
1978
|
+
break;
|
|
1979
|
+
}
|
|
1980
|
+
message.iaq = reader.float();
|
|
1981
|
+
continue;
|
|
1982
|
+
}
|
|
1983
|
+
case 7: {
|
|
1984
|
+
if (tag !== 56) {
|
|
1985
|
+
break;
|
|
1986
|
+
}
|
|
1987
|
+
message.iaqAccuracy = reader.uint32();
|
|
1988
|
+
continue;
|
|
1989
|
+
}
|
|
1990
|
+
case 8: {
|
|
1991
|
+
if (tag !== 69) {
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
message.co2Equiv = reader.float();
|
|
1995
|
+
continue;
|
|
1996
|
+
}
|
|
1997
|
+
case 9: {
|
|
1998
|
+
if (tag !== 77) {
|
|
1999
|
+
break;
|
|
2000
|
+
}
|
|
2001
|
+
message.vocEquiv = reader.float();
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
reader.skip(tag & 7);
|
|
2009
|
+
}
|
|
2010
|
+
return message;
|
|
2011
|
+
},
|
|
2012
|
+
create(base) {
|
|
2013
|
+
return exports.AgentSensorUpdate.fromPartial(base ?? {});
|
|
2014
|
+
},
|
|
2015
|
+
fromPartial(object) {
|
|
2016
|
+
const message = createBaseAgentSensorUpdate();
|
|
2017
|
+
message.device = object.device ?? "";
|
|
2018
|
+
message.temperature = object.temperature ?? 0;
|
|
2019
|
+
message.pressure = object.pressure ?? 0;
|
|
2020
|
+
message.humidity = object.humidity ?? 0;
|
|
2021
|
+
message.iaq = object.iaq ?? 0;
|
|
2022
|
+
message.iaqAccuracy = object.iaqAccuracy ?? 0;
|
|
2023
|
+
message.co2Equiv = object.co2Equiv ?? 0;
|
|
2024
|
+
message.vocEquiv = object.vocEquiv ?? 0;
|
|
2025
|
+
return message;
|
|
2026
|
+
},
|
|
2027
|
+
};
|