@teslemetry/tesla-protocol 0.5.0 → 0.6.0
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/charging/charging.cjs +550 -0
- package/dist/charging/charging.d.cts +75 -0
- package/dist/charging/charging.d.mts +75 -0
- package/dist/charging/charging.mjs +543 -0
- package/dist/command/universal_message.cjs +5 -0
- package/dist/command/universal_message.d.cts +2 -0
- package/dist/command/universal_message.d.mts +2 -0
- package/dist/command/universal_message.mjs +5 -0
- package/dist/command/vcsec.cjs +87 -2
- package/dist/command/vcsec.d.cts +11 -1
- package/dist/command/vcsec.d.mts +11 -1
- package/dist/command/vcsec.mjs +86 -3
- package/dist/command/vehicle.cjs +27 -0
- package/dist/command/vehicle.d.cts +4 -0
- package/dist/command/vehicle.d.mts +4 -0
- package/dist/command/vehicle.mjs +27 -0
- package/dist/dashcam/dashcam_sei.cjs +263 -0
- package/dist/dashcam/dashcam_sei.d.cts +60 -0
- package/dist/dashcam/dashcam_sei.d.mts +60 -0
- package/dist/dashcam/dashcam_sei.mjs +255 -0
- package/dist/energy_device/common_api.cjs +604 -11
- package/dist/energy_device/common_api.d.cts +60 -3
- package/dist/energy_device/common_api.d.mts +60 -3
- package/dist/energy_device/common_api.mjs +596 -12
- package/dist/energy_device/device.cjs +129 -0
- package/dist/energy_device/device.d.cts +13 -1
- package/dist/energy_device/device.d.mts +13 -1
- package/dist/energy_device/device.mjs +127 -1
- package/dist/energy_device/energy_site_net.cjs +747 -0
- package/dist/energy_device/energy_site_net.d.cts +84 -1
- package/dist/energy_device/energy_site_net.d.mts +84 -1
- package/dist/energy_device/energy_site_net.mjs +736 -1
- package/dist/energy_device/filestore_api.cjs +575 -0
- package/dist/energy_device/filestore_api.d.cts +81 -0
- package/dist/energy_device/filestore_api.d.mts +81 -0
- package/dist/energy_device/filestore_api.mjs +563 -0
- package/dist/energy_device/google/protobuf/duration.cjs +71 -0
- package/dist/energy_device/google/protobuf/duration.d.cts +95 -0
- package/dist/energy_device/google/protobuf/duration.d.mts +95 -0
- package/dist/energy_device/google/protobuf/duration.mjs +69 -0
- package/dist/energy_device/graphql_api.cjs +449 -0
- package/dist/energy_device/graphql_api.d.cts +78 -0
- package/dist/energy_device/graphql_api.d.mts +78 -0
- package/dist/energy_device/graphql_api.mjs +434 -0
- package/dist/energy_device/intra_site_api.cjs +1698 -0
- package/dist/energy_device/intra_site_api.d.cts +227 -0
- package/dist/energy_device/intra_site_api.d.mts +227 -0
- package/dist/energy_device/intra_site_api.mjs +1644 -0
- package/dist/energy_device/local_auth_api.cjs +505 -0
- package/dist/energy_device/local_auth_api.d.cts +73 -0
- package/dist/energy_device/local_auth_api.d.mts +73 -0
- package/dist/energy_device/local_auth_api.mjs +492 -0
- package/dist/energy_device/networking.cjs +20 -2
- package/dist/energy_device/networking.d.cts +2 -0
- package/dist/energy_device/networking.d.mts +2 -0
- package/dist/energy_device/networking.mjs +20 -2
- package/dist/energy_device/neurio_meter_api.cjs +1442 -0
- package/dist/energy_device/neurio_meter_api.d.cts +202 -0
- package/dist/energy_device/neurio_meter_api.d.mts +202 -0
- package/dist/energy_device/neurio_meter_api.mjs +1401 -0
- package/dist/energy_device/pvi_api.cjs +2954 -0
- package/dist/energy_device/pvi_api.d.cts +319 -0
- package/dist/energy_device/pvi_api.d.mts +319 -0
- package/dist/energy_device/pvi_api.mjs +2892 -0
- package/dist/energy_device/teg_api.cjs +5184 -147
- package/dist/energy_device/teg_api.d.cts +492 -77
- package/dist/energy_device/teg_api.d.mts +492 -77
- package/dist/energy_device/teg_api.mjs +5064 -148
- package/dist/energy_device/transport.cjs +82 -2
- package/dist/energy_device/transport.d.cts +16 -5
- package/dist/energy_device/transport.d.mts +16 -5
- package/dist/energy_device/transport.mjs +82 -2
- package/dist/energy_device/update.cjs +33 -6
- package/dist/energy_device/update.d.cts +3 -0
- package/dist/energy_device/update.d.mts +3 -0
- package/dist/energy_device/update.mjs +33 -6
- package/dist/energy_device/wall_connector.cjs +6729 -5
- package/dist/energy_device/wall_connector.d.cts +696 -2
- package/dist/energy_device/wall_connector.d.mts +696 -2
- package/dist/energy_device/wall_connector.mjs +6591 -6
- package/package.json +1 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _bufbuild_protobuf_wire = require("@bufbuild/protobuf/wire");
|
|
3
|
+
//#region src/dashcam/dashcam_sei.ts
|
|
4
|
+
const protobufPackage = "DashcamSei";
|
|
5
|
+
let SeiMetadata_Gear = /* @__PURE__ */ function(SeiMetadata_Gear) {
|
|
6
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_PARK"] = 0] = "GEAR_PARK";
|
|
7
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_DRIVE"] = 1] = "GEAR_DRIVE";
|
|
8
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_REVERSE"] = 2] = "GEAR_REVERSE";
|
|
9
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_NEUTRAL"] = 3] = "GEAR_NEUTRAL";
|
|
10
|
+
SeiMetadata_Gear[SeiMetadata_Gear["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
11
|
+
return SeiMetadata_Gear;
|
|
12
|
+
}({});
|
|
13
|
+
function seiMetadata_GearFromJSON(object) {
|
|
14
|
+
switch (object) {
|
|
15
|
+
case 0:
|
|
16
|
+
case "GEAR_PARK": return 0;
|
|
17
|
+
case 1:
|
|
18
|
+
case "GEAR_DRIVE": return 1;
|
|
19
|
+
case 2:
|
|
20
|
+
case "GEAR_REVERSE": return 2;
|
|
21
|
+
case 3:
|
|
22
|
+
case "GEAR_NEUTRAL": return 3;
|
|
23
|
+
default: return -1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function seiMetadata_GearToJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0: return "GEAR_PARK";
|
|
29
|
+
case 1: return "GEAR_DRIVE";
|
|
30
|
+
case 2: return "GEAR_REVERSE";
|
|
31
|
+
case 3: return "GEAR_NEUTRAL";
|
|
32
|
+
default: return "UNRECOGNIZED";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let SeiMetadata_AutopilotState = /* @__PURE__ */ function(SeiMetadata_AutopilotState) {
|
|
36
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["NONE"] = 0] = "NONE";
|
|
37
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["SELF_DRIVING"] = 1] = "SELF_DRIVING";
|
|
38
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["AUTOSTEER"] = 2] = "AUTOSTEER";
|
|
39
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["TACC"] = 3] = "TACC";
|
|
40
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
41
|
+
return SeiMetadata_AutopilotState;
|
|
42
|
+
}({});
|
|
43
|
+
function seiMetadata_AutopilotStateFromJSON(object) {
|
|
44
|
+
switch (object) {
|
|
45
|
+
case 0:
|
|
46
|
+
case "NONE": return 0;
|
|
47
|
+
case 1:
|
|
48
|
+
case "SELF_DRIVING": return 1;
|
|
49
|
+
case 2:
|
|
50
|
+
case "AUTOSTEER": return 2;
|
|
51
|
+
case 3:
|
|
52
|
+
case "TACC": return 3;
|
|
53
|
+
default: return -1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function seiMetadata_AutopilotStateToJSON(object) {
|
|
57
|
+
switch (object) {
|
|
58
|
+
case 0: return "NONE";
|
|
59
|
+
case 1: return "SELF_DRIVING";
|
|
60
|
+
case 2: return "AUTOSTEER";
|
|
61
|
+
case 3: return "TACC";
|
|
62
|
+
default: return "UNRECOGNIZED";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function createBaseSeiMetadata() {
|
|
66
|
+
return {
|
|
67
|
+
field1: 0,
|
|
68
|
+
gearState: 0,
|
|
69
|
+
frameSeqNo: 0,
|
|
70
|
+
vehicleSpeedMps: 0,
|
|
71
|
+
acceleratorPedalPosition: 0,
|
|
72
|
+
steeringWheelAngle: 0,
|
|
73
|
+
blinkerOnLeft: false,
|
|
74
|
+
blinkerOnRight: false,
|
|
75
|
+
brakeApplied: false,
|
|
76
|
+
autopilotState: 0,
|
|
77
|
+
latitudeDeg: 0,
|
|
78
|
+
longitudeDeg: 0,
|
|
79
|
+
headingDeg: 0,
|
|
80
|
+
linearAccelerationMps2X: 0,
|
|
81
|
+
linearAccelerationMps2Y: 0,
|
|
82
|
+
linearAccelerationMps2Z: 0
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const SeiMetadata = {
|
|
86
|
+
encode(message, writer = new _bufbuild_protobuf_wire.BinaryWriter()) {
|
|
87
|
+
if (message.field1 !== 0) writer.uint32(8).uint32(message.field1);
|
|
88
|
+
if (message.gearState !== 0) writer.uint32(16).int32(message.gearState);
|
|
89
|
+
if (message.frameSeqNo !== 0) writer.uint32(24).uint64(message.frameSeqNo);
|
|
90
|
+
if (message.vehicleSpeedMps !== 0) writer.uint32(37).float(message.vehicleSpeedMps);
|
|
91
|
+
if (message.acceleratorPedalPosition !== 0) writer.uint32(45).float(message.acceleratorPedalPosition);
|
|
92
|
+
if (message.steeringWheelAngle !== 0) writer.uint32(53).float(message.steeringWheelAngle);
|
|
93
|
+
if (message.blinkerOnLeft !== false) writer.uint32(56).bool(message.blinkerOnLeft);
|
|
94
|
+
if (message.blinkerOnRight !== false) writer.uint32(64).bool(message.blinkerOnRight);
|
|
95
|
+
if (message.brakeApplied !== false) writer.uint32(72).bool(message.brakeApplied);
|
|
96
|
+
if (message.autopilotState !== 0) writer.uint32(80).int32(message.autopilotState);
|
|
97
|
+
if (message.latitudeDeg !== 0) writer.uint32(89).double(message.latitudeDeg);
|
|
98
|
+
if (message.longitudeDeg !== 0) writer.uint32(97).double(message.longitudeDeg);
|
|
99
|
+
if (message.headingDeg !== 0) writer.uint32(105).double(message.headingDeg);
|
|
100
|
+
if (message.linearAccelerationMps2X !== 0) writer.uint32(113).double(message.linearAccelerationMps2X);
|
|
101
|
+
if (message.linearAccelerationMps2Y !== 0) writer.uint32(121).double(message.linearAccelerationMps2Y);
|
|
102
|
+
if (message.linearAccelerationMps2Z !== 0) writer.uint32(129).double(message.linearAccelerationMps2Z);
|
|
103
|
+
return writer;
|
|
104
|
+
},
|
|
105
|
+
decode(input, length) {
|
|
106
|
+
const reader = input instanceof _bufbuild_protobuf_wire.BinaryReader ? input : new _bufbuild_protobuf_wire.BinaryReader(input);
|
|
107
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
108
|
+
const message = createBaseSeiMetadata();
|
|
109
|
+
while (reader.pos < end) {
|
|
110
|
+
const tag = reader.uint32();
|
|
111
|
+
switch (tag >>> 3) {
|
|
112
|
+
case 1:
|
|
113
|
+
if (tag !== 8) break;
|
|
114
|
+
message.field1 = reader.uint32();
|
|
115
|
+
continue;
|
|
116
|
+
case 2:
|
|
117
|
+
if (tag !== 16) break;
|
|
118
|
+
message.gearState = reader.int32();
|
|
119
|
+
continue;
|
|
120
|
+
case 3:
|
|
121
|
+
if (tag !== 24) break;
|
|
122
|
+
message.frameSeqNo = longToNumber(reader.uint64());
|
|
123
|
+
continue;
|
|
124
|
+
case 4:
|
|
125
|
+
if (tag !== 37) break;
|
|
126
|
+
message.vehicleSpeedMps = reader.float();
|
|
127
|
+
continue;
|
|
128
|
+
case 5:
|
|
129
|
+
if (tag !== 45) break;
|
|
130
|
+
message.acceleratorPedalPosition = reader.float();
|
|
131
|
+
continue;
|
|
132
|
+
case 6:
|
|
133
|
+
if (tag !== 53) break;
|
|
134
|
+
message.steeringWheelAngle = reader.float();
|
|
135
|
+
continue;
|
|
136
|
+
case 7:
|
|
137
|
+
if (tag !== 56) break;
|
|
138
|
+
message.blinkerOnLeft = reader.bool();
|
|
139
|
+
continue;
|
|
140
|
+
case 8:
|
|
141
|
+
if (tag !== 64) break;
|
|
142
|
+
message.blinkerOnRight = reader.bool();
|
|
143
|
+
continue;
|
|
144
|
+
case 9:
|
|
145
|
+
if (tag !== 72) break;
|
|
146
|
+
message.brakeApplied = reader.bool();
|
|
147
|
+
continue;
|
|
148
|
+
case 10:
|
|
149
|
+
if (tag !== 80) break;
|
|
150
|
+
message.autopilotState = reader.int32();
|
|
151
|
+
continue;
|
|
152
|
+
case 11:
|
|
153
|
+
if (tag !== 89) break;
|
|
154
|
+
message.latitudeDeg = reader.double();
|
|
155
|
+
continue;
|
|
156
|
+
case 12:
|
|
157
|
+
if (tag !== 97) break;
|
|
158
|
+
message.longitudeDeg = reader.double();
|
|
159
|
+
continue;
|
|
160
|
+
case 13:
|
|
161
|
+
if (tag !== 105) break;
|
|
162
|
+
message.headingDeg = reader.double();
|
|
163
|
+
continue;
|
|
164
|
+
case 14:
|
|
165
|
+
if (tag !== 113) break;
|
|
166
|
+
message.linearAccelerationMps2X = reader.double();
|
|
167
|
+
continue;
|
|
168
|
+
case 15:
|
|
169
|
+
if (tag !== 121) break;
|
|
170
|
+
message.linearAccelerationMps2Y = reader.double();
|
|
171
|
+
continue;
|
|
172
|
+
case 16:
|
|
173
|
+
if (tag !== 129) break;
|
|
174
|
+
message.linearAccelerationMps2Z = reader.double();
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
178
|
+
reader.skip(tag & 7);
|
|
179
|
+
}
|
|
180
|
+
return message;
|
|
181
|
+
},
|
|
182
|
+
fromJSON(object) {
|
|
183
|
+
return {
|
|
184
|
+
field1: isSet(object.field1) ? globalThis.Number(object.field1) : 0,
|
|
185
|
+
gearState: isSet(object.gearState) ? seiMetadata_GearFromJSON(object.gearState) : 0,
|
|
186
|
+
frameSeqNo: isSet(object.frameSeqNo) ? globalThis.Number(object.frameSeqNo) : 0,
|
|
187
|
+
vehicleSpeedMps: isSet(object.vehicleSpeedMps) ? globalThis.Number(object.vehicleSpeedMps) : 0,
|
|
188
|
+
acceleratorPedalPosition: isSet(object.acceleratorPedalPosition) ? globalThis.Number(object.acceleratorPedalPosition) : 0,
|
|
189
|
+
steeringWheelAngle: isSet(object.steeringWheelAngle) ? globalThis.Number(object.steeringWheelAngle) : 0,
|
|
190
|
+
blinkerOnLeft: isSet(object.blinkerOnLeft) ? globalThis.Boolean(object.blinkerOnLeft) : false,
|
|
191
|
+
blinkerOnRight: isSet(object.blinkerOnRight) ? globalThis.Boolean(object.blinkerOnRight) : false,
|
|
192
|
+
brakeApplied: isSet(object.brakeApplied) ? globalThis.Boolean(object.brakeApplied) : false,
|
|
193
|
+
autopilotState: isSet(object.autopilotState) ? seiMetadata_AutopilotStateFromJSON(object.autopilotState) : 0,
|
|
194
|
+
latitudeDeg: isSet(object.latitudeDeg) ? globalThis.Number(object.latitudeDeg) : 0,
|
|
195
|
+
longitudeDeg: isSet(object.longitudeDeg) ? globalThis.Number(object.longitudeDeg) : 0,
|
|
196
|
+
headingDeg: isSet(object.headingDeg) ? globalThis.Number(object.headingDeg) : 0,
|
|
197
|
+
linearAccelerationMps2X: isSet(object.linearAccelerationMps2X) ? globalThis.Number(object.linearAccelerationMps2X) : 0,
|
|
198
|
+
linearAccelerationMps2Y: isSet(object.linearAccelerationMps2Y) ? globalThis.Number(object.linearAccelerationMps2Y) : 0,
|
|
199
|
+
linearAccelerationMps2Z: isSet(object.linearAccelerationMps2Z) ? globalThis.Number(object.linearAccelerationMps2Z) : 0
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
toJSON(message) {
|
|
203
|
+
const obj = {};
|
|
204
|
+
if (message.field1 !== void 0) obj.field1 = Math.round(message.field1);
|
|
205
|
+
if (message.gearState !== void 0) obj.gearState = seiMetadata_GearToJSON(message.gearState);
|
|
206
|
+
if (message.frameSeqNo !== void 0) obj.frameSeqNo = Math.round(message.frameSeqNo);
|
|
207
|
+
if (message.vehicleSpeedMps !== void 0) obj.vehicleSpeedMps = message.vehicleSpeedMps;
|
|
208
|
+
if (message.acceleratorPedalPosition !== void 0) obj.acceleratorPedalPosition = message.acceleratorPedalPosition;
|
|
209
|
+
if (message.steeringWheelAngle !== void 0) obj.steeringWheelAngle = message.steeringWheelAngle;
|
|
210
|
+
if (message.blinkerOnLeft !== void 0) obj.blinkerOnLeft = message.blinkerOnLeft;
|
|
211
|
+
if (message.blinkerOnRight !== void 0) obj.blinkerOnRight = message.blinkerOnRight;
|
|
212
|
+
if (message.brakeApplied !== void 0) obj.brakeApplied = message.brakeApplied;
|
|
213
|
+
if (message.autopilotState !== void 0) obj.autopilotState = seiMetadata_AutopilotStateToJSON(message.autopilotState);
|
|
214
|
+
if (message.latitudeDeg !== void 0) obj.latitudeDeg = message.latitudeDeg;
|
|
215
|
+
if (message.longitudeDeg !== void 0) obj.longitudeDeg = message.longitudeDeg;
|
|
216
|
+
if (message.headingDeg !== void 0) obj.headingDeg = message.headingDeg;
|
|
217
|
+
if (message.linearAccelerationMps2X !== void 0) obj.linearAccelerationMps2X = message.linearAccelerationMps2X;
|
|
218
|
+
if (message.linearAccelerationMps2Y !== void 0) obj.linearAccelerationMps2Y = message.linearAccelerationMps2Y;
|
|
219
|
+
if (message.linearAccelerationMps2Z !== void 0) obj.linearAccelerationMps2Z = message.linearAccelerationMps2Z;
|
|
220
|
+
return obj;
|
|
221
|
+
},
|
|
222
|
+
create(base) {
|
|
223
|
+
return SeiMetadata.fromPartial(base ?? {});
|
|
224
|
+
},
|
|
225
|
+
fromPartial(object) {
|
|
226
|
+
const message = createBaseSeiMetadata();
|
|
227
|
+
message.field1 = object.field1 ?? 0;
|
|
228
|
+
message.gearState = object.gearState ?? 0;
|
|
229
|
+
message.frameSeqNo = object.frameSeqNo ?? 0;
|
|
230
|
+
message.vehicleSpeedMps = object.vehicleSpeedMps ?? 0;
|
|
231
|
+
message.acceleratorPedalPosition = object.acceleratorPedalPosition ?? 0;
|
|
232
|
+
message.steeringWheelAngle = object.steeringWheelAngle ?? 0;
|
|
233
|
+
message.blinkerOnLeft = object.blinkerOnLeft ?? false;
|
|
234
|
+
message.blinkerOnRight = object.blinkerOnRight ?? false;
|
|
235
|
+
message.brakeApplied = object.brakeApplied ?? false;
|
|
236
|
+
message.autopilotState = object.autopilotState ?? 0;
|
|
237
|
+
message.latitudeDeg = object.latitudeDeg ?? 0;
|
|
238
|
+
message.longitudeDeg = object.longitudeDeg ?? 0;
|
|
239
|
+
message.headingDeg = object.headingDeg ?? 0;
|
|
240
|
+
message.linearAccelerationMps2X = object.linearAccelerationMps2X ?? 0;
|
|
241
|
+
message.linearAccelerationMps2Y = object.linearAccelerationMps2Y ?? 0;
|
|
242
|
+
message.linearAccelerationMps2Z = object.linearAccelerationMps2Z ?? 0;
|
|
243
|
+
return message;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
function longToNumber(int64) {
|
|
247
|
+
const num = globalThis.Number(int64.toString());
|
|
248
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
249
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
250
|
+
return num;
|
|
251
|
+
}
|
|
252
|
+
function isSet(value) {
|
|
253
|
+
return value !== null && value !== void 0;
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
exports.SeiMetadata = SeiMetadata;
|
|
257
|
+
exports.SeiMetadata_AutopilotState = SeiMetadata_AutopilotState;
|
|
258
|
+
exports.SeiMetadata_Gear = SeiMetadata_Gear;
|
|
259
|
+
exports.protobufPackage = protobufPackage;
|
|
260
|
+
exports.seiMetadata_AutopilotStateFromJSON = seiMetadata_AutopilotStateFromJSON;
|
|
261
|
+
exports.seiMetadata_AutopilotStateToJSON = seiMetadata_AutopilotStateToJSON;
|
|
262
|
+
exports.seiMetadata_GearFromJSON = seiMetadata_GearFromJSON;
|
|
263
|
+
exports.seiMetadata_GearToJSON = seiMetadata_GearToJSON;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
//#region src/dashcam/dashcam_sei.d.ts
|
|
3
|
+
declare const protobufPackage = "DashcamSei";
|
|
4
|
+
/**
|
|
5
|
+
* SeiMetadata is the per-frame vehicle telemetry carried in the SEI (supplemental
|
|
6
|
+
* enhancement information) payload embedded in TeslaCam / Sentry / live-camera
|
|
7
|
+
* H.264 video, synchronized to the frame it accompanies.
|
|
8
|
+
*/
|
|
9
|
+
interface SeiMetadata {
|
|
10
|
+
/** Schema/frame-type version byte; meaning beyond that is not confirmed. */
|
|
11
|
+
field1: number;
|
|
12
|
+
gearState: SeiMetadata_Gear;
|
|
13
|
+
frameSeqNo: number;
|
|
14
|
+
vehicleSpeedMps: number;
|
|
15
|
+
acceleratorPedalPosition: number;
|
|
16
|
+
steeringWheelAngle: number;
|
|
17
|
+
blinkerOnLeft: boolean;
|
|
18
|
+
blinkerOnRight: boolean;
|
|
19
|
+
brakeApplied: boolean;
|
|
20
|
+
autopilotState: SeiMetadata_AutopilotState;
|
|
21
|
+
latitudeDeg: number;
|
|
22
|
+
longitudeDeg: number;
|
|
23
|
+
headingDeg: number;
|
|
24
|
+
linearAccelerationMps2X: number;
|
|
25
|
+
linearAccelerationMps2Y: number;
|
|
26
|
+
linearAccelerationMps2Z: number;
|
|
27
|
+
}
|
|
28
|
+
declare enum SeiMetadata_Gear {
|
|
29
|
+
GEAR_PARK = 0,
|
|
30
|
+
GEAR_DRIVE = 1,
|
|
31
|
+
GEAR_REVERSE = 2,
|
|
32
|
+
GEAR_NEUTRAL = 3,
|
|
33
|
+
UNRECOGNIZED = -1
|
|
34
|
+
}
|
|
35
|
+
declare function seiMetadata_GearFromJSON(object: any): SeiMetadata_Gear;
|
|
36
|
+
declare function seiMetadata_GearToJSON(object: SeiMetadata_Gear): string;
|
|
37
|
+
declare enum SeiMetadata_AutopilotState {
|
|
38
|
+
NONE = 0,
|
|
39
|
+
SELF_DRIVING = 1,
|
|
40
|
+
AUTOSTEER = 2,
|
|
41
|
+
TACC = 3,
|
|
42
|
+
UNRECOGNIZED = -1
|
|
43
|
+
}
|
|
44
|
+
declare function seiMetadata_AutopilotStateFromJSON(object: any): SeiMetadata_AutopilotState;
|
|
45
|
+
declare function seiMetadata_AutopilotStateToJSON(object: SeiMetadata_AutopilotState): string;
|
|
46
|
+
declare const SeiMetadata: MessageFns<SeiMetadata>;
|
|
47
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
48
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
|
|
49
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
50
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
|
|
51
|
+
interface MessageFns<T> {
|
|
52
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
53
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
54
|
+
fromJSON(object: any): T;
|
|
55
|
+
toJSON(message: T): unknown;
|
|
56
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
57
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { DeepPartial, Exact, MessageFns, SeiMetadata, SeiMetadata_AutopilotState, SeiMetadata_Gear, protobufPackage, seiMetadata_AutopilotStateFromJSON, seiMetadata_AutopilotStateToJSON, seiMetadata_GearFromJSON, seiMetadata_GearToJSON };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
//#region src/dashcam/dashcam_sei.d.ts
|
|
3
|
+
declare const protobufPackage = "DashcamSei";
|
|
4
|
+
/**
|
|
5
|
+
* SeiMetadata is the per-frame vehicle telemetry carried in the SEI (supplemental
|
|
6
|
+
* enhancement information) payload embedded in TeslaCam / Sentry / live-camera
|
|
7
|
+
* H.264 video, synchronized to the frame it accompanies.
|
|
8
|
+
*/
|
|
9
|
+
interface SeiMetadata {
|
|
10
|
+
/** Schema/frame-type version byte; meaning beyond that is not confirmed. */
|
|
11
|
+
field1: number;
|
|
12
|
+
gearState: SeiMetadata_Gear;
|
|
13
|
+
frameSeqNo: number;
|
|
14
|
+
vehicleSpeedMps: number;
|
|
15
|
+
acceleratorPedalPosition: number;
|
|
16
|
+
steeringWheelAngle: number;
|
|
17
|
+
blinkerOnLeft: boolean;
|
|
18
|
+
blinkerOnRight: boolean;
|
|
19
|
+
brakeApplied: boolean;
|
|
20
|
+
autopilotState: SeiMetadata_AutopilotState;
|
|
21
|
+
latitudeDeg: number;
|
|
22
|
+
longitudeDeg: number;
|
|
23
|
+
headingDeg: number;
|
|
24
|
+
linearAccelerationMps2X: number;
|
|
25
|
+
linearAccelerationMps2Y: number;
|
|
26
|
+
linearAccelerationMps2Z: number;
|
|
27
|
+
}
|
|
28
|
+
declare enum SeiMetadata_Gear {
|
|
29
|
+
GEAR_PARK = 0,
|
|
30
|
+
GEAR_DRIVE = 1,
|
|
31
|
+
GEAR_REVERSE = 2,
|
|
32
|
+
GEAR_NEUTRAL = 3,
|
|
33
|
+
UNRECOGNIZED = -1
|
|
34
|
+
}
|
|
35
|
+
declare function seiMetadata_GearFromJSON(object: any): SeiMetadata_Gear;
|
|
36
|
+
declare function seiMetadata_GearToJSON(object: SeiMetadata_Gear): string;
|
|
37
|
+
declare enum SeiMetadata_AutopilotState {
|
|
38
|
+
NONE = 0,
|
|
39
|
+
SELF_DRIVING = 1,
|
|
40
|
+
AUTOSTEER = 2,
|
|
41
|
+
TACC = 3,
|
|
42
|
+
UNRECOGNIZED = -1
|
|
43
|
+
}
|
|
44
|
+
declare function seiMetadata_AutopilotStateFromJSON(object: any): SeiMetadata_AutopilotState;
|
|
45
|
+
declare function seiMetadata_AutopilotStateToJSON(object: SeiMetadata_AutopilotState): string;
|
|
46
|
+
declare const SeiMetadata: MessageFns<SeiMetadata>;
|
|
47
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
48
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>;
|
|
49
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
50
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; };
|
|
51
|
+
interface MessageFns<T> {
|
|
52
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
53
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
54
|
+
fromJSON(object: any): T;
|
|
55
|
+
toJSON(message: T): unknown;
|
|
56
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
57
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { DeepPartial, Exact, MessageFns, SeiMetadata, SeiMetadata_AutopilotState, SeiMetadata_Gear, protobufPackage, seiMetadata_AutopilotStateFromJSON, seiMetadata_AutopilotStateToJSON, seiMetadata_GearFromJSON, seiMetadata_GearToJSON };
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
//#region src/dashcam/dashcam_sei.ts
|
|
3
|
+
const protobufPackage = "DashcamSei";
|
|
4
|
+
let SeiMetadata_Gear = /* @__PURE__ */ function(SeiMetadata_Gear) {
|
|
5
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_PARK"] = 0] = "GEAR_PARK";
|
|
6
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_DRIVE"] = 1] = "GEAR_DRIVE";
|
|
7
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_REVERSE"] = 2] = "GEAR_REVERSE";
|
|
8
|
+
SeiMetadata_Gear[SeiMetadata_Gear["GEAR_NEUTRAL"] = 3] = "GEAR_NEUTRAL";
|
|
9
|
+
SeiMetadata_Gear[SeiMetadata_Gear["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
10
|
+
return SeiMetadata_Gear;
|
|
11
|
+
}({});
|
|
12
|
+
function seiMetadata_GearFromJSON(object) {
|
|
13
|
+
switch (object) {
|
|
14
|
+
case 0:
|
|
15
|
+
case "GEAR_PARK": return 0;
|
|
16
|
+
case 1:
|
|
17
|
+
case "GEAR_DRIVE": return 1;
|
|
18
|
+
case 2:
|
|
19
|
+
case "GEAR_REVERSE": return 2;
|
|
20
|
+
case 3:
|
|
21
|
+
case "GEAR_NEUTRAL": return 3;
|
|
22
|
+
default: return -1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function seiMetadata_GearToJSON(object) {
|
|
26
|
+
switch (object) {
|
|
27
|
+
case 0: return "GEAR_PARK";
|
|
28
|
+
case 1: return "GEAR_DRIVE";
|
|
29
|
+
case 2: return "GEAR_REVERSE";
|
|
30
|
+
case 3: return "GEAR_NEUTRAL";
|
|
31
|
+
default: return "UNRECOGNIZED";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
let SeiMetadata_AutopilotState = /* @__PURE__ */ function(SeiMetadata_AutopilotState) {
|
|
35
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["NONE"] = 0] = "NONE";
|
|
36
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["SELF_DRIVING"] = 1] = "SELF_DRIVING";
|
|
37
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["AUTOSTEER"] = 2] = "AUTOSTEER";
|
|
38
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["TACC"] = 3] = "TACC";
|
|
39
|
+
SeiMetadata_AutopilotState[SeiMetadata_AutopilotState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
40
|
+
return SeiMetadata_AutopilotState;
|
|
41
|
+
}({});
|
|
42
|
+
function seiMetadata_AutopilotStateFromJSON(object) {
|
|
43
|
+
switch (object) {
|
|
44
|
+
case 0:
|
|
45
|
+
case "NONE": return 0;
|
|
46
|
+
case 1:
|
|
47
|
+
case "SELF_DRIVING": return 1;
|
|
48
|
+
case 2:
|
|
49
|
+
case "AUTOSTEER": return 2;
|
|
50
|
+
case 3:
|
|
51
|
+
case "TACC": return 3;
|
|
52
|
+
default: return -1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function seiMetadata_AutopilotStateToJSON(object) {
|
|
56
|
+
switch (object) {
|
|
57
|
+
case 0: return "NONE";
|
|
58
|
+
case 1: return "SELF_DRIVING";
|
|
59
|
+
case 2: return "AUTOSTEER";
|
|
60
|
+
case 3: return "TACC";
|
|
61
|
+
default: return "UNRECOGNIZED";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function createBaseSeiMetadata() {
|
|
65
|
+
return {
|
|
66
|
+
field1: 0,
|
|
67
|
+
gearState: 0,
|
|
68
|
+
frameSeqNo: 0,
|
|
69
|
+
vehicleSpeedMps: 0,
|
|
70
|
+
acceleratorPedalPosition: 0,
|
|
71
|
+
steeringWheelAngle: 0,
|
|
72
|
+
blinkerOnLeft: false,
|
|
73
|
+
blinkerOnRight: false,
|
|
74
|
+
brakeApplied: false,
|
|
75
|
+
autopilotState: 0,
|
|
76
|
+
latitudeDeg: 0,
|
|
77
|
+
longitudeDeg: 0,
|
|
78
|
+
headingDeg: 0,
|
|
79
|
+
linearAccelerationMps2X: 0,
|
|
80
|
+
linearAccelerationMps2Y: 0,
|
|
81
|
+
linearAccelerationMps2Z: 0
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const SeiMetadata = {
|
|
85
|
+
encode(message, writer = new BinaryWriter()) {
|
|
86
|
+
if (message.field1 !== 0) writer.uint32(8).uint32(message.field1);
|
|
87
|
+
if (message.gearState !== 0) writer.uint32(16).int32(message.gearState);
|
|
88
|
+
if (message.frameSeqNo !== 0) writer.uint32(24).uint64(message.frameSeqNo);
|
|
89
|
+
if (message.vehicleSpeedMps !== 0) writer.uint32(37).float(message.vehicleSpeedMps);
|
|
90
|
+
if (message.acceleratorPedalPosition !== 0) writer.uint32(45).float(message.acceleratorPedalPosition);
|
|
91
|
+
if (message.steeringWheelAngle !== 0) writer.uint32(53).float(message.steeringWheelAngle);
|
|
92
|
+
if (message.blinkerOnLeft !== false) writer.uint32(56).bool(message.blinkerOnLeft);
|
|
93
|
+
if (message.blinkerOnRight !== false) writer.uint32(64).bool(message.blinkerOnRight);
|
|
94
|
+
if (message.brakeApplied !== false) writer.uint32(72).bool(message.brakeApplied);
|
|
95
|
+
if (message.autopilotState !== 0) writer.uint32(80).int32(message.autopilotState);
|
|
96
|
+
if (message.latitudeDeg !== 0) writer.uint32(89).double(message.latitudeDeg);
|
|
97
|
+
if (message.longitudeDeg !== 0) writer.uint32(97).double(message.longitudeDeg);
|
|
98
|
+
if (message.headingDeg !== 0) writer.uint32(105).double(message.headingDeg);
|
|
99
|
+
if (message.linearAccelerationMps2X !== 0) writer.uint32(113).double(message.linearAccelerationMps2X);
|
|
100
|
+
if (message.linearAccelerationMps2Y !== 0) writer.uint32(121).double(message.linearAccelerationMps2Y);
|
|
101
|
+
if (message.linearAccelerationMps2Z !== 0) writer.uint32(129).double(message.linearAccelerationMps2Z);
|
|
102
|
+
return writer;
|
|
103
|
+
},
|
|
104
|
+
decode(input, length) {
|
|
105
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
106
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
107
|
+
const message = createBaseSeiMetadata();
|
|
108
|
+
while (reader.pos < end) {
|
|
109
|
+
const tag = reader.uint32();
|
|
110
|
+
switch (tag >>> 3) {
|
|
111
|
+
case 1:
|
|
112
|
+
if (tag !== 8) break;
|
|
113
|
+
message.field1 = reader.uint32();
|
|
114
|
+
continue;
|
|
115
|
+
case 2:
|
|
116
|
+
if (tag !== 16) break;
|
|
117
|
+
message.gearState = reader.int32();
|
|
118
|
+
continue;
|
|
119
|
+
case 3:
|
|
120
|
+
if (tag !== 24) break;
|
|
121
|
+
message.frameSeqNo = longToNumber(reader.uint64());
|
|
122
|
+
continue;
|
|
123
|
+
case 4:
|
|
124
|
+
if (tag !== 37) break;
|
|
125
|
+
message.vehicleSpeedMps = reader.float();
|
|
126
|
+
continue;
|
|
127
|
+
case 5:
|
|
128
|
+
if (tag !== 45) break;
|
|
129
|
+
message.acceleratorPedalPosition = reader.float();
|
|
130
|
+
continue;
|
|
131
|
+
case 6:
|
|
132
|
+
if (tag !== 53) break;
|
|
133
|
+
message.steeringWheelAngle = reader.float();
|
|
134
|
+
continue;
|
|
135
|
+
case 7:
|
|
136
|
+
if (tag !== 56) break;
|
|
137
|
+
message.blinkerOnLeft = reader.bool();
|
|
138
|
+
continue;
|
|
139
|
+
case 8:
|
|
140
|
+
if (tag !== 64) break;
|
|
141
|
+
message.blinkerOnRight = reader.bool();
|
|
142
|
+
continue;
|
|
143
|
+
case 9:
|
|
144
|
+
if (tag !== 72) break;
|
|
145
|
+
message.brakeApplied = reader.bool();
|
|
146
|
+
continue;
|
|
147
|
+
case 10:
|
|
148
|
+
if (tag !== 80) break;
|
|
149
|
+
message.autopilotState = reader.int32();
|
|
150
|
+
continue;
|
|
151
|
+
case 11:
|
|
152
|
+
if (tag !== 89) break;
|
|
153
|
+
message.latitudeDeg = reader.double();
|
|
154
|
+
continue;
|
|
155
|
+
case 12:
|
|
156
|
+
if (tag !== 97) break;
|
|
157
|
+
message.longitudeDeg = reader.double();
|
|
158
|
+
continue;
|
|
159
|
+
case 13:
|
|
160
|
+
if (tag !== 105) break;
|
|
161
|
+
message.headingDeg = reader.double();
|
|
162
|
+
continue;
|
|
163
|
+
case 14:
|
|
164
|
+
if (tag !== 113) break;
|
|
165
|
+
message.linearAccelerationMps2X = reader.double();
|
|
166
|
+
continue;
|
|
167
|
+
case 15:
|
|
168
|
+
if (tag !== 121) break;
|
|
169
|
+
message.linearAccelerationMps2Y = reader.double();
|
|
170
|
+
continue;
|
|
171
|
+
case 16:
|
|
172
|
+
if (tag !== 129) break;
|
|
173
|
+
message.linearAccelerationMps2Z = reader.double();
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
177
|
+
reader.skip(tag & 7);
|
|
178
|
+
}
|
|
179
|
+
return message;
|
|
180
|
+
},
|
|
181
|
+
fromJSON(object) {
|
|
182
|
+
return {
|
|
183
|
+
field1: isSet(object.field1) ? globalThis.Number(object.field1) : 0,
|
|
184
|
+
gearState: isSet(object.gearState) ? seiMetadata_GearFromJSON(object.gearState) : 0,
|
|
185
|
+
frameSeqNo: isSet(object.frameSeqNo) ? globalThis.Number(object.frameSeqNo) : 0,
|
|
186
|
+
vehicleSpeedMps: isSet(object.vehicleSpeedMps) ? globalThis.Number(object.vehicleSpeedMps) : 0,
|
|
187
|
+
acceleratorPedalPosition: isSet(object.acceleratorPedalPosition) ? globalThis.Number(object.acceleratorPedalPosition) : 0,
|
|
188
|
+
steeringWheelAngle: isSet(object.steeringWheelAngle) ? globalThis.Number(object.steeringWheelAngle) : 0,
|
|
189
|
+
blinkerOnLeft: isSet(object.blinkerOnLeft) ? globalThis.Boolean(object.blinkerOnLeft) : false,
|
|
190
|
+
blinkerOnRight: isSet(object.blinkerOnRight) ? globalThis.Boolean(object.blinkerOnRight) : false,
|
|
191
|
+
brakeApplied: isSet(object.brakeApplied) ? globalThis.Boolean(object.brakeApplied) : false,
|
|
192
|
+
autopilotState: isSet(object.autopilotState) ? seiMetadata_AutopilotStateFromJSON(object.autopilotState) : 0,
|
|
193
|
+
latitudeDeg: isSet(object.latitudeDeg) ? globalThis.Number(object.latitudeDeg) : 0,
|
|
194
|
+
longitudeDeg: isSet(object.longitudeDeg) ? globalThis.Number(object.longitudeDeg) : 0,
|
|
195
|
+
headingDeg: isSet(object.headingDeg) ? globalThis.Number(object.headingDeg) : 0,
|
|
196
|
+
linearAccelerationMps2X: isSet(object.linearAccelerationMps2X) ? globalThis.Number(object.linearAccelerationMps2X) : 0,
|
|
197
|
+
linearAccelerationMps2Y: isSet(object.linearAccelerationMps2Y) ? globalThis.Number(object.linearAccelerationMps2Y) : 0,
|
|
198
|
+
linearAccelerationMps2Z: isSet(object.linearAccelerationMps2Z) ? globalThis.Number(object.linearAccelerationMps2Z) : 0
|
|
199
|
+
};
|
|
200
|
+
},
|
|
201
|
+
toJSON(message) {
|
|
202
|
+
const obj = {};
|
|
203
|
+
if (message.field1 !== void 0) obj.field1 = Math.round(message.field1);
|
|
204
|
+
if (message.gearState !== void 0) obj.gearState = seiMetadata_GearToJSON(message.gearState);
|
|
205
|
+
if (message.frameSeqNo !== void 0) obj.frameSeqNo = Math.round(message.frameSeqNo);
|
|
206
|
+
if (message.vehicleSpeedMps !== void 0) obj.vehicleSpeedMps = message.vehicleSpeedMps;
|
|
207
|
+
if (message.acceleratorPedalPosition !== void 0) obj.acceleratorPedalPosition = message.acceleratorPedalPosition;
|
|
208
|
+
if (message.steeringWheelAngle !== void 0) obj.steeringWheelAngle = message.steeringWheelAngle;
|
|
209
|
+
if (message.blinkerOnLeft !== void 0) obj.blinkerOnLeft = message.blinkerOnLeft;
|
|
210
|
+
if (message.blinkerOnRight !== void 0) obj.blinkerOnRight = message.blinkerOnRight;
|
|
211
|
+
if (message.brakeApplied !== void 0) obj.brakeApplied = message.brakeApplied;
|
|
212
|
+
if (message.autopilotState !== void 0) obj.autopilotState = seiMetadata_AutopilotStateToJSON(message.autopilotState);
|
|
213
|
+
if (message.latitudeDeg !== void 0) obj.latitudeDeg = message.latitudeDeg;
|
|
214
|
+
if (message.longitudeDeg !== void 0) obj.longitudeDeg = message.longitudeDeg;
|
|
215
|
+
if (message.headingDeg !== void 0) obj.headingDeg = message.headingDeg;
|
|
216
|
+
if (message.linearAccelerationMps2X !== void 0) obj.linearAccelerationMps2X = message.linearAccelerationMps2X;
|
|
217
|
+
if (message.linearAccelerationMps2Y !== void 0) obj.linearAccelerationMps2Y = message.linearAccelerationMps2Y;
|
|
218
|
+
if (message.linearAccelerationMps2Z !== void 0) obj.linearAccelerationMps2Z = message.linearAccelerationMps2Z;
|
|
219
|
+
return obj;
|
|
220
|
+
},
|
|
221
|
+
create(base) {
|
|
222
|
+
return SeiMetadata.fromPartial(base ?? {});
|
|
223
|
+
},
|
|
224
|
+
fromPartial(object) {
|
|
225
|
+
const message = createBaseSeiMetadata();
|
|
226
|
+
message.field1 = object.field1 ?? 0;
|
|
227
|
+
message.gearState = object.gearState ?? 0;
|
|
228
|
+
message.frameSeqNo = object.frameSeqNo ?? 0;
|
|
229
|
+
message.vehicleSpeedMps = object.vehicleSpeedMps ?? 0;
|
|
230
|
+
message.acceleratorPedalPosition = object.acceleratorPedalPosition ?? 0;
|
|
231
|
+
message.steeringWheelAngle = object.steeringWheelAngle ?? 0;
|
|
232
|
+
message.blinkerOnLeft = object.blinkerOnLeft ?? false;
|
|
233
|
+
message.blinkerOnRight = object.blinkerOnRight ?? false;
|
|
234
|
+
message.brakeApplied = object.brakeApplied ?? false;
|
|
235
|
+
message.autopilotState = object.autopilotState ?? 0;
|
|
236
|
+
message.latitudeDeg = object.latitudeDeg ?? 0;
|
|
237
|
+
message.longitudeDeg = object.longitudeDeg ?? 0;
|
|
238
|
+
message.headingDeg = object.headingDeg ?? 0;
|
|
239
|
+
message.linearAccelerationMps2X = object.linearAccelerationMps2X ?? 0;
|
|
240
|
+
message.linearAccelerationMps2Y = object.linearAccelerationMps2Y ?? 0;
|
|
241
|
+
message.linearAccelerationMps2Z = object.linearAccelerationMps2Z ?? 0;
|
|
242
|
+
return message;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
function longToNumber(int64) {
|
|
246
|
+
const num = globalThis.Number(int64.toString());
|
|
247
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
248
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
249
|
+
return num;
|
|
250
|
+
}
|
|
251
|
+
function isSet(value) {
|
|
252
|
+
return value !== null && value !== void 0;
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
export { SeiMetadata, SeiMetadata_AutopilotState, SeiMetadata_Gear, protobufPackage, seiMetadata_AutopilotStateFromJSON, seiMetadata_AutopilotStateToJSON, seiMetadata_GearFromJSON, seiMetadata_GearToJSON };
|