@fatehan/tsrp 1.4.24 → 1.4.25
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.
|
@@ -31,6 +31,7 @@ export interface TirePressureMonitoringSystemModule_TirePosition {
|
|
|
31
31
|
pressure?: number | undefined;
|
|
32
32
|
temperature?: number | undefined;
|
|
33
33
|
status?: number | undefined;
|
|
34
|
+
updatedAt?: Date | undefined;
|
|
34
35
|
position: TirePressureMonitoringSystemModule_Position;
|
|
35
36
|
}
|
|
36
37
|
export interface TirePressureMonitoringSystemModule_TireDataEntry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataModule.d.ts","sourceRoot":"","sources":["../../../src/fatehan/packets/dataModule.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"dataModule.d.ts","sourceRoot":"","sources":["../../../src/fatehan/packets/dataModule.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,kCAAkC,GAAG,SAAS,CAAC;CACvD;AAED,MAAM,WAAW,kCAAkC;IACjD,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MA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AAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
// protoc-gen-ts_proto v2.7.5
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: packets/dataModule.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
7
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
11
|
exports.TirePressureMonitoringSystemModule_TireDataEntry = exports.TirePressureMonitoringSystemModule_TirePosition = exports.TirePressureMonitoringSystemModule = exports.DataModule_ModuleList = exports.DataModule = exports.TirePressureMonitoringSystemModule_Position = exports.protobufPackage = void 0;
|
|
9
12
|
exports.tirePressureMonitoringSystemModule_PositionFromJSON = tirePressureMonitoringSystemModule_PositionFromJSON;
|
|
10
13
|
exports.tirePressureMonitoringSystemModule_PositionToJSON = tirePressureMonitoringSystemModule_PositionToJSON;
|
|
11
14
|
/* eslint-disable */
|
|
12
15
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
16
|
+
const long_1 = __importDefault(require("long"));
|
|
17
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
13
18
|
exports.protobufPackage = "com.fatehan.packets";
|
|
14
19
|
var TirePressureMonitoringSystemModule_Position;
|
|
15
20
|
(function (TirePressureMonitoringSystemModule_Position) {
|
|
@@ -305,7 +310,15 @@ exports.TirePressureMonitoringSystemModule = {
|
|
|
305
310
|
},
|
|
306
311
|
};
|
|
307
312
|
function createBaseTirePressureMonitoringSystemModule_TirePosition() {
|
|
308
|
-
return {
|
|
313
|
+
return {
|
|
314
|
+
axle: 0,
|
|
315
|
+
tire: 0,
|
|
316
|
+
pressure: undefined,
|
|
317
|
+
temperature: undefined,
|
|
318
|
+
status: undefined,
|
|
319
|
+
updatedAt: undefined,
|
|
320
|
+
position: 0,
|
|
321
|
+
};
|
|
309
322
|
}
|
|
310
323
|
exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
311
324
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -324,6 +337,9 @@ exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
|
324
337
|
if (message.status !== undefined) {
|
|
325
338
|
writer.uint32(40).uint32(message.status);
|
|
326
339
|
}
|
|
340
|
+
if (message.updatedAt !== undefined) {
|
|
341
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(58).fork()).join();
|
|
342
|
+
}
|
|
327
343
|
if (message.position !== 0) {
|
|
328
344
|
writer.uint32(48).int32(message.position);
|
|
329
345
|
}
|
|
@@ -371,6 +387,13 @@ exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
|
371
387
|
message.status = reader.uint32();
|
|
372
388
|
continue;
|
|
373
389
|
}
|
|
390
|
+
case 7: {
|
|
391
|
+
if (tag !== 58) {
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
374
397
|
case 6: {
|
|
375
398
|
if (tag !== 48) {
|
|
376
399
|
break;
|
|
@@ -393,6 +416,7 @@ exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
|
393
416
|
pressure: isSet(object.pressure) ? globalThis.Number(object.pressure) : undefined,
|
|
394
417
|
temperature: isSet(object.temperature) ? globalThis.Number(object.temperature) : undefined,
|
|
395
418
|
status: isSet(object.status) ? globalThis.Number(object.status) : undefined,
|
|
419
|
+
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
396
420
|
position: isSet(object.position) ? tirePressureMonitoringSystemModule_PositionFromJSON(object.position) : 0,
|
|
397
421
|
};
|
|
398
422
|
},
|
|
@@ -413,6 +437,9 @@ exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
|
413
437
|
if (message.status !== undefined) {
|
|
414
438
|
obj.status = Math.round(message.status);
|
|
415
439
|
}
|
|
440
|
+
if (message.updatedAt !== undefined) {
|
|
441
|
+
obj.updated_at = message.updatedAt.toISOString();
|
|
442
|
+
}
|
|
416
443
|
if (message.position !== 0) {
|
|
417
444
|
obj.position = tirePressureMonitoringSystemModule_PositionToJSON(message.position);
|
|
418
445
|
}
|
|
@@ -422,14 +449,15 @@ exports.TirePressureMonitoringSystemModule_TirePosition = {
|
|
|
422
449
|
return exports.TirePressureMonitoringSystemModule_TirePosition.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
423
450
|
},
|
|
424
451
|
fromPartial(object) {
|
|
425
|
-
var _a, _b, _c, _d, _e, _f;
|
|
452
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
426
453
|
const message = createBaseTirePressureMonitoringSystemModule_TirePosition();
|
|
427
454
|
message.axle = (_a = object.axle) !== null && _a !== void 0 ? _a : 0;
|
|
428
455
|
message.tire = (_b = object.tire) !== null && _b !== void 0 ? _b : 0;
|
|
429
456
|
message.pressure = (_c = object.pressure) !== null && _c !== void 0 ? _c : undefined;
|
|
430
457
|
message.temperature = (_d = object.temperature) !== null && _d !== void 0 ? _d : undefined;
|
|
431
458
|
message.status = (_e = object.status) !== null && _e !== void 0 ? _e : undefined;
|
|
432
|
-
message.
|
|
459
|
+
message.updatedAt = (_f = object.updatedAt) !== null && _f !== void 0 ? _f : undefined;
|
|
460
|
+
message.position = (_g = object.position) !== null && _g !== void 0 ? _g : 0;
|
|
433
461
|
return message;
|
|
434
462
|
},
|
|
435
463
|
};
|
|
@@ -504,6 +532,30 @@ exports.TirePressureMonitoringSystemModule_TireDataEntry = {
|
|
|
504
532
|
return message;
|
|
505
533
|
},
|
|
506
534
|
};
|
|
535
|
+
function toTimestamp(date) {
|
|
536
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
537
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
538
|
+
return { seconds, nanos };
|
|
539
|
+
}
|
|
540
|
+
function fromTimestamp(t) {
|
|
541
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
542
|
+
millis += (t.nanos || 0) / 1000000;
|
|
543
|
+
return new globalThis.Date(millis);
|
|
544
|
+
}
|
|
545
|
+
function fromJsonTimestamp(o) {
|
|
546
|
+
if (o instanceof globalThis.Date) {
|
|
547
|
+
return o;
|
|
548
|
+
}
|
|
549
|
+
else if (typeof o === "string") {
|
|
550
|
+
return new globalThis.Date(o);
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function numberToLong(number) {
|
|
557
|
+
return long_1.default.fromNumber(number);
|
|
558
|
+
}
|
|
507
559
|
function isObject(value) {
|
|
508
560
|
return typeof value === "object" && value !== null;
|
|
509
561
|
}
|