@teslemetry/tesla-protocol 0.1.1
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/README.md +20 -0
- package/dist/command/car_server.cjs +11126 -0
- package/dist/command/car_server.d.cts +1281 -0
- package/dist/command/car_server.d.mts +1281 -0
- package/dist/command/car_server.mjs +10880 -0
- package/dist/command/common.cjs +1536 -0
- package/dist/command/common.d.cts +327 -0
- package/dist/command/common.d.mts +327 -0
- package/dist/command/common.mjs +1488 -0
- package/dist/command/errors.cjs +107 -0
- package/dist/command/errors.d.cts +40 -0
- package/dist/command/errors.d.mts +40 -0
- package/dist/command/errors.mjs +102 -0
- package/dist/command/google/protobuf/timestamp.cjs +71 -0
- package/dist/command/google/protobuf/timestamp.d.cts +124 -0
- package/dist/command/google/protobuf/timestamp.d.mts +124 -0
- package/dist/command/google/protobuf/timestamp.mjs +69 -0
- package/dist/command/google/protobuf/wrappers.cjs +421 -0
- package/dist/command/google/protobuf/wrappers.d.cts +134 -0
- package/dist/command/google/protobuf/wrappers.d.mts +134 -0
- package/dist/command/google/protobuf/wrappers.mjs +411 -0
- package/dist/command/keys.cjs +60 -0
- package/dist/command/keys.d.cts +23 -0
- package/dist/command/keys.d.mts +23 -0
- package/dist/command/keys.mjs +56 -0
- package/dist/command/managed_charging.cjs +435 -0
- package/dist/command/managed_charging.d.cts +86 -0
- package/dist/command/managed_charging.d.mts +86 -0
- package/dist/command/managed_charging.mjs +421 -0
- package/dist/command/session.cjs +119 -0
- package/dist/command/session.d.cts +28 -0
- package/dist/command/session.d.mts +28 -0
- package/dist/command/session.mjs +117 -0
- package/dist/command/signatures.cjs +696 -0
- package/dist/command/signatures.d.cts +107 -0
- package/dist/command/signatures.d.mts +107 -0
- package/dist/command/signatures.mjs +678 -0
- package/dist/command/universal_message.cjs +588 -0
- package/dist/command/universal_message.d.cts +141 -0
- package/dist/command/universal_message.d.mts +141 -0
- package/dist/command/universal_message.mjs +571 -0
- package/dist/command/vcsec.cjs +2281 -0
- package/dist/command/vcsec.d.cts +404 -0
- package/dist/command/vcsec.d.mts +404 -0
- package/dist/command/vcsec.mjs +2218 -0
- package/dist/command/vehicle.cjs +10332 -0
- package/dist/command/vehicle.d.cts +1429 -0
- package/dist/command/vehicle.d.mts +1429 -0
- package/dist/command/vehicle.mjs +10168 -0
- package/dist/energy_command/identifier_type.cjs +47 -0
- package/dist/energy_command/identifier_type.d.cts +19 -0
- package/dist/energy_command/identifier_type.d.mts +19 -0
- package/dist/energy_command/identifier_type.mjs +43 -0
- package/dist/energy_device/authorization_api.cjs +815 -0
- package/dist/energy_device/authorization_api.d.cts +92 -0
- package/dist/energy_device/authorization_api.d.mts +92 -0
- package/dist/energy_device/authorization_api.mjs +801 -0
- package/dist/energy_device/authorization_types.cjs +348 -0
- package/dist/energy_device/authorization_types.d.cts +79 -0
- package/dist/energy_device/authorization_types.d.mts +79 -0
- package/dist/energy_device/authorization_types.mjs +331 -0
- package/dist/energy_device/common_api.cjs +2104 -0
- package/dist/energy_device/common_api.d.cts +211 -0
- package/dist/energy_device/common_api.d.mts +211 -0
- package/dist/energy_device/common_api.mjs +2064 -0
- package/dist/energy_device/device.cjs +485 -0
- package/dist/energy_device/device.d.cts +102 -0
- package/dist/energy_device/device.d.mts +102 -0
- package/dist/energy_device/device.mjs +462 -0
- package/dist/energy_device/energy.cjs +442 -0
- package/dist/energy_device/energy.d.cts +82 -0
- package/dist/energy_device/energy.d.mts +82 -0
- package/dist/energy_device/energy.mjs +429 -0
- package/dist/energy_device/energy_site_net.cjs +235 -0
- package/dist/energy_device/energy_site_net.d.cts +69 -0
- package/dist/energy_device/energy_site_net.d.mts +69 -0
- package/dist/energy_device/energy_site_net.mjs +219 -0
- package/dist/energy_device/error.cjs +53 -0
- package/dist/energy_device/error.d.cts +27 -0
- package/dist/energy_device/error.d.mts +27 -0
- package/dist/energy_device/error.mjs +51 -0
- package/dist/energy_device/google/protobuf/timestamp.cjs +71 -0
- package/dist/energy_device/google/protobuf/timestamp.d.cts +124 -0
- package/dist/energy_device/google/protobuf/timestamp.d.mts +124 -0
- package/dist/energy_device/google/protobuf/timestamp.mjs +69 -0
- package/dist/energy_device/google/protobuf/wrappers.cjs +421 -0
- package/dist/energy_device/google/protobuf/wrappers.d.cts +134 -0
- package/dist/energy_device/google/protobuf/wrappers.d.mts +134 -0
- package/dist/energy_device/google/protobuf/wrappers.mjs +411 -0
- package/dist/energy_device/google/rpc/status.cjs +65 -0
- package/dist/energy_device/google/rpc/status.d.cts +26 -0
- package/dist/energy_device/google/rpc/status.d.mts +26 -0
- package/dist/energy_device/google/rpc/status.mjs +63 -0
- package/dist/energy_device/networking.cjs +834 -0
- package/dist/energy_device/networking.d.cts +141 -0
- package/dist/energy_device/networking.d.mts +141 -0
- package/dist/energy_device/networking.mjs +810 -0
- package/dist/energy_device/teg_api.cjs +594 -0
- package/dist/energy_device/teg_api.d.cts +140 -0
- package/dist/energy_device/teg_api.d.mts +140 -0
- package/dist/energy_device/teg_api.mjs +581 -0
- package/dist/energy_device/transport.cjs +478 -0
- package/dist/energy_device/transport.d.cts +95 -0
- package/dist/energy_device/transport.d.mts +95 -0
- package/dist/energy_device/transport.mjs +460 -0
- package/dist/energy_device/update.cjs +521 -0
- package/dist/energy_device/update.d.cts +86 -0
- package/dist/energy_device/update.d.mts +86 -0
- package/dist/energy_device/update.mjs +506 -0
- package/dist/energy_device/wall_connector.cjs +634 -0
- package/dist/energy_device/wall_connector.d.cts +182 -0
- package/dist/energy_device/wall_connector.d.mts +182 -0
- package/dist/energy_device/wall_connector.mjs +590 -0
- package/dist/telemetry/google/protobuf/timestamp.cjs +71 -0
- package/dist/telemetry/google/protobuf/timestamp.d.cts +124 -0
- package/dist/telemetry/google/protobuf/timestamp.d.mts +124 -0
- package/dist/telemetry/google/protobuf/timestamp.mjs +69 -0
- package/dist/telemetry/vehicle_alert.cjs +214 -0
- package/dist/telemetry/vehicle_alert.d.cts +48 -0
- package/dist/telemetry/vehicle_alert.d.mts +48 -0
- package/dist/telemetry/vehicle_alert.mjs +208 -0
- package/dist/telemetry/vehicle_connectivity.cjs +145 -0
- package/dist/telemetry/vehicle_connectivity.d.cts +41 -0
- package/dist/telemetry/vehicle_connectivity.d.mts +41 -0
- package/dist/telemetry/vehicle_connectivity.mjs +140 -0
- package/dist/telemetry/vehicle_data.cjs +3792 -0
- package/dist/telemetry/vehicle_data.d.cts +872 -0
- package/dist/telemetry/vehicle_data.d.mts +872 -0
- package/dist/telemetry/vehicle_data.mjs +3655 -0
- package/dist/telemetry/vehicle_error.cjs +245 -0
- package/dist/telemetry/vehicle_error.d.cts +45 -0
- package/dist/telemetry/vehicle_error.d.mts +45 -0
- package/dist/telemetry/vehicle_error.mjs +241 -0
- package/dist/telemetry/vehicle_metric.cjs +236 -0
- package/dist/telemetry/vehicle_metric.d.cts +44 -0
- package/dist/telemetry/vehicle_metric.d.mts +44 -0
- package/dist/telemetry/vehicle_metric.mjs +232 -0
- package/dist/teslapower/google/protobuf/any.cjs +84 -0
- package/dist/teslapower/google/protobuf/any.d.cts +140 -0
- package/dist/teslapower/google/protobuf/any.d.mts +140 -0
- package/dist/teslapower/google/protobuf/any.mjs +82 -0
- package/dist/teslapower/google/protobuf/timestamp.cjs +71 -0
- package/dist/teslapower/google/protobuf/timestamp.d.cts +124 -0
- package/dist/teslapower/google/protobuf/timestamp.d.mts +124 -0
- package/dist/teslapower/google/protobuf/timestamp.mjs +69 -0
- package/dist/teslapower/teslapower.cjs +5486 -0
- package/dist/teslapower/teslapower.d.cts +518 -0
- package/dist/teslapower/teslapower.d.mts +518 -0
- package/dist/teslapower/teslapower.mjs +5381 -0
- package/package.json +53 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { FloatValue, UInt64Value } from "./google/protobuf/wrappers.mjs";
|
|
2
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
|
+
//#region src/energy_device/energy.ts
|
|
4
|
+
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
5
|
+
/**
|
|
6
|
+
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
7
|
+
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
8
|
+
* observations and contributions from the community
|
|
9
|
+
*/
|
|
10
|
+
let EnergyAccumulationType = /* @__PURE__ */ function(EnergyAccumulationType) {
|
|
11
|
+
EnergyAccumulationType[EnergyAccumulationType["ENERGY_ACCUMULATION_TYPE_INVALID"] = 0] = "ENERGY_ACCUMULATION_TYPE_INVALID";
|
|
12
|
+
EnergyAccumulationType[EnergyAccumulationType["ENERGY_ACCUMULATION_TYPE_LIFETIME"] = 1] = "ENERGY_ACCUMULATION_TYPE_LIFETIME";
|
|
13
|
+
EnergyAccumulationType[EnergyAccumulationType["ENERGY_ACCUMULATION_TYPE_TODAY"] = 2] = "ENERGY_ACCUMULATION_TYPE_TODAY";
|
|
14
|
+
EnergyAccumulationType[EnergyAccumulationType["ENERGY_ACCUMULATION_TYPE_SESSION"] = 3] = "ENERGY_ACCUMULATION_TYPE_SESSION";
|
|
15
|
+
EnergyAccumulationType[EnergyAccumulationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
16
|
+
return EnergyAccumulationType;
|
|
17
|
+
}({});
|
|
18
|
+
function energyAccumulationTypeFromJSON(object) {
|
|
19
|
+
switch (object) {
|
|
20
|
+
case 0:
|
|
21
|
+
case "ENERGY_ACCUMULATION_TYPE_INVALID": return 0;
|
|
22
|
+
case 1:
|
|
23
|
+
case "ENERGY_ACCUMULATION_TYPE_LIFETIME": return 1;
|
|
24
|
+
case 2:
|
|
25
|
+
case "ENERGY_ACCUMULATION_TYPE_TODAY": return 2;
|
|
26
|
+
case 3:
|
|
27
|
+
case "ENERGY_ACCUMULATION_TYPE_SESSION": return 3;
|
|
28
|
+
default: return -1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function energyAccumulationTypeToJSON(object) {
|
|
32
|
+
switch (object) {
|
|
33
|
+
case 0: return "ENERGY_ACCUMULATION_TYPE_INVALID";
|
|
34
|
+
case 1: return "ENERGY_ACCUMULATION_TYPE_LIFETIME";
|
|
35
|
+
case 2: return "ENERGY_ACCUMULATION_TYPE_TODAY";
|
|
36
|
+
case 3: return "ENERGY_ACCUMULATION_TYPE_SESSION";
|
|
37
|
+
default: return "UNRECOGNIZED";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
let GridState = /* @__PURE__ */ function(GridState) {
|
|
41
|
+
GridState[GridState["GRID_STATE_INVALID"] = 0] = "GRID_STATE_INVALID";
|
|
42
|
+
GridState[GridState["GRID_STATE_UNCOMPLIANT"] = 1] = "GRID_STATE_UNCOMPLIANT";
|
|
43
|
+
GridState[GridState["GRID_STATE_QUALIFYING"] = 2] = "GRID_STATE_QUALIFYING";
|
|
44
|
+
GridState[GridState["GRID_STATE_COMPLIANT"] = 3] = "GRID_STATE_COMPLIANT";
|
|
45
|
+
GridState[GridState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
46
|
+
return GridState;
|
|
47
|
+
}({});
|
|
48
|
+
function gridStateFromJSON(object) {
|
|
49
|
+
switch (object) {
|
|
50
|
+
case 0:
|
|
51
|
+
case "GRID_STATE_INVALID": return 0;
|
|
52
|
+
case 1:
|
|
53
|
+
case "GRID_STATE_UNCOMPLIANT": return 1;
|
|
54
|
+
case 2:
|
|
55
|
+
case "GRID_STATE_QUALIFYING": return 2;
|
|
56
|
+
case 3:
|
|
57
|
+
case "GRID_STATE_COMPLIANT": return 3;
|
|
58
|
+
default: return -1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function gridStateToJSON(object) {
|
|
62
|
+
switch (object) {
|
|
63
|
+
case 0: return "GRID_STATE_INVALID";
|
|
64
|
+
case 1: return "GRID_STATE_UNCOMPLIANT";
|
|
65
|
+
case 2: return "GRID_STATE_QUALIFYING";
|
|
66
|
+
case 3: return "GRID_STATE_COMPLIANT";
|
|
67
|
+
default: return "UNRECOGNIZED";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function createBaseAccumulatedEnergy() {
|
|
71
|
+
return {
|
|
72
|
+
energyWh: 0,
|
|
73
|
+
accumulationType: 0,
|
|
74
|
+
periodS: void 0
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const AccumulatedEnergy = {
|
|
78
|
+
encode(message, writer = new BinaryWriter()) {
|
|
79
|
+
if (message.energyWh !== 0) writer.uint32(13).float(message.energyWh);
|
|
80
|
+
if (message.accumulationType !== 0) writer.uint32(16).int32(message.accumulationType);
|
|
81
|
+
if (message.periodS !== void 0) UInt64Value.encode({ value: message.periodS }, writer.uint32(26).fork()).join();
|
|
82
|
+
return writer;
|
|
83
|
+
},
|
|
84
|
+
decode(input, length) {
|
|
85
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
86
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
87
|
+
const message = createBaseAccumulatedEnergy();
|
|
88
|
+
while (reader.pos < end) {
|
|
89
|
+
const tag = reader.uint32();
|
|
90
|
+
switch (tag >>> 3) {
|
|
91
|
+
case 1:
|
|
92
|
+
if (tag !== 13) break;
|
|
93
|
+
message.energyWh = reader.float();
|
|
94
|
+
continue;
|
|
95
|
+
case 2:
|
|
96
|
+
if (tag !== 16) break;
|
|
97
|
+
message.accumulationType = reader.int32();
|
|
98
|
+
continue;
|
|
99
|
+
case 3:
|
|
100
|
+
if (tag !== 26) break;
|
|
101
|
+
message.periodS = UInt64Value.decode(reader, reader.uint32()).value;
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
105
|
+
reader.skip(tag & 7);
|
|
106
|
+
}
|
|
107
|
+
return message;
|
|
108
|
+
},
|
|
109
|
+
fromJSON(object) {
|
|
110
|
+
return {
|
|
111
|
+
energyWh: isSet(object.energyWh) ? globalThis.Number(object.energyWh) : 0,
|
|
112
|
+
accumulationType: isSet(object.accumulationType) ? energyAccumulationTypeFromJSON(object.accumulationType) : 0,
|
|
113
|
+
periodS: isSet(object.periodS) ? Number(object.periodS) : void 0
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
toJSON(message) {
|
|
117
|
+
const obj = {};
|
|
118
|
+
if (message.energyWh !== void 0) obj.energyWh = message.energyWh;
|
|
119
|
+
if (message.accumulationType !== void 0) obj.accumulationType = energyAccumulationTypeToJSON(message.accumulationType);
|
|
120
|
+
if (message.periodS !== void 0) obj.periodS = message.periodS;
|
|
121
|
+
return obj;
|
|
122
|
+
},
|
|
123
|
+
create(base) {
|
|
124
|
+
return AccumulatedEnergy.fromPartial(base ?? {});
|
|
125
|
+
},
|
|
126
|
+
fromPartial(object) {
|
|
127
|
+
const message = createBaseAccumulatedEnergy();
|
|
128
|
+
message.energyWh = object.energyWh ?? 0;
|
|
129
|
+
message.accumulationType = object.accumulationType ?? 0;
|
|
130
|
+
message.periodS = object.periodS ?? void 0;
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
function createBaseGridComplianceStatus() {
|
|
135
|
+
return {
|
|
136
|
+
gridState: 0,
|
|
137
|
+
qualifiyingTimeRemainingS: void 0
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const GridComplianceStatus = {
|
|
141
|
+
encode(message, writer = new BinaryWriter()) {
|
|
142
|
+
if (message.gridState !== 0) writer.uint32(8).int32(message.gridState);
|
|
143
|
+
if (message.qualifiyingTimeRemainingS !== void 0) FloatValue.encode({ value: message.qualifiyingTimeRemainingS }, writer.uint32(18).fork()).join();
|
|
144
|
+
return writer;
|
|
145
|
+
},
|
|
146
|
+
decode(input, length) {
|
|
147
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
148
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
149
|
+
const message = createBaseGridComplianceStatus();
|
|
150
|
+
while (reader.pos < end) {
|
|
151
|
+
const tag = reader.uint32();
|
|
152
|
+
switch (tag >>> 3) {
|
|
153
|
+
case 1:
|
|
154
|
+
if (tag !== 8) break;
|
|
155
|
+
message.gridState = reader.int32();
|
|
156
|
+
continue;
|
|
157
|
+
case 2:
|
|
158
|
+
if (tag !== 18) break;
|
|
159
|
+
message.qualifiyingTimeRemainingS = FloatValue.decode(reader, reader.uint32()).value;
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
163
|
+
reader.skip(tag & 7);
|
|
164
|
+
}
|
|
165
|
+
return message;
|
|
166
|
+
},
|
|
167
|
+
fromJSON(object) {
|
|
168
|
+
return {
|
|
169
|
+
gridState: isSet(object.gridState) ? gridStateFromJSON(object.gridState) : 0,
|
|
170
|
+
qualifiyingTimeRemainingS: isSet(object.qualifiyingTimeRemainingS) ? Number(object.qualifiyingTimeRemainingS) : void 0
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
toJSON(message) {
|
|
174
|
+
const obj = {};
|
|
175
|
+
if (message.gridState !== void 0) obj.gridState = gridStateToJSON(message.gridState);
|
|
176
|
+
if (message.qualifiyingTimeRemainingS !== void 0) obj.qualifiyingTimeRemainingS = message.qualifiyingTimeRemainingS;
|
|
177
|
+
return obj;
|
|
178
|
+
},
|
|
179
|
+
create(base) {
|
|
180
|
+
return GridComplianceStatus.fromPartial(base ?? {});
|
|
181
|
+
},
|
|
182
|
+
fromPartial(object) {
|
|
183
|
+
const message = createBaseGridComplianceStatus();
|
|
184
|
+
message.gridState = object.gridState ?? 0;
|
|
185
|
+
message.qualifiyingTimeRemainingS = object.qualifiyingTimeRemainingS ?? void 0;
|
|
186
|
+
return message;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
function createBaseInstACMeasurement() {
|
|
190
|
+
return {
|
|
191
|
+
voltageVrms: 0,
|
|
192
|
+
frequencyHz: 0,
|
|
193
|
+
currentArms: void 0,
|
|
194
|
+
realPowerW: void 0,
|
|
195
|
+
reactivePowerVar: void 0,
|
|
196
|
+
apparentPowerVa: void 0
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const InstACMeasurement = {
|
|
200
|
+
encode(message, writer = new BinaryWriter()) {
|
|
201
|
+
if (message.voltageVrms !== 0) writer.uint32(13).float(message.voltageVrms);
|
|
202
|
+
if (message.frequencyHz !== 0) writer.uint32(21).float(message.frequencyHz);
|
|
203
|
+
if (message.currentArms !== void 0) FloatValue.encode({ value: message.currentArms }, writer.uint32(26).fork()).join();
|
|
204
|
+
if (message.realPowerW !== void 0) FloatValue.encode({ value: message.realPowerW }, writer.uint32(34).fork()).join();
|
|
205
|
+
if (message.reactivePowerVar !== void 0) FloatValue.encode({ value: message.reactivePowerVar }, writer.uint32(42).fork()).join();
|
|
206
|
+
if (message.apparentPowerVa !== void 0) FloatValue.encode({ value: message.apparentPowerVa }, writer.uint32(50).fork()).join();
|
|
207
|
+
return writer;
|
|
208
|
+
},
|
|
209
|
+
decode(input, length) {
|
|
210
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
211
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
212
|
+
const message = createBaseInstACMeasurement();
|
|
213
|
+
while (reader.pos < end) {
|
|
214
|
+
const tag = reader.uint32();
|
|
215
|
+
switch (tag >>> 3) {
|
|
216
|
+
case 1:
|
|
217
|
+
if (tag !== 13) break;
|
|
218
|
+
message.voltageVrms = reader.float();
|
|
219
|
+
continue;
|
|
220
|
+
case 2:
|
|
221
|
+
if (tag !== 21) break;
|
|
222
|
+
message.frequencyHz = reader.float();
|
|
223
|
+
continue;
|
|
224
|
+
case 3:
|
|
225
|
+
if (tag !== 26) break;
|
|
226
|
+
message.currentArms = FloatValue.decode(reader, reader.uint32()).value;
|
|
227
|
+
continue;
|
|
228
|
+
case 4:
|
|
229
|
+
if (tag !== 34) break;
|
|
230
|
+
message.realPowerW = FloatValue.decode(reader, reader.uint32()).value;
|
|
231
|
+
continue;
|
|
232
|
+
case 5:
|
|
233
|
+
if (tag !== 42) break;
|
|
234
|
+
message.reactivePowerVar = FloatValue.decode(reader, reader.uint32()).value;
|
|
235
|
+
continue;
|
|
236
|
+
case 6:
|
|
237
|
+
if (tag !== 50) break;
|
|
238
|
+
message.apparentPowerVa = FloatValue.decode(reader, reader.uint32()).value;
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
242
|
+
reader.skip(tag & 7);
|
|
243
|
+
}
|
|
244
|
+
return message;
|
|
245
|
+
},
|
|
246
|
+
fromJSON(object) {
|
|
247
|
+
return {
|
|
248
|
+
voltageVrms: isSet(object.voltageVrms) ? globalThis.Number(object.voltageVrms) : 0,
|
|
249
|
+
frequencyHz: isSet(object.frequencyHz) ? globalThis.Number(object.frequencyHz) : 0,
|
|
250
|
+
currentArms: isSet(object.currentArms) ? Number(object.currentArms) : void 0,
|
|
251
|
+
realPowerW: isSet(object.realPowerW) ? Number(object.realPowerW) : void 0,
|
|
252
|
+
reactivePowerVar: isSet(object.reactivePowerVar) ? Number(object.reactivePowerVar) : void 0,
|
|
253
|
+
apparentPowerVa: isSet(object.apparentPowerVa) ? Number(object.apparentPowerVa) : void 0
|
|
254
|
+
};
|
|
255
|
+
},
|
|
256
|
+
toJSON(message) {
|
|
257
|
+
const obj = {};
|
|
258
|
+
if (message.voltageVrms !== void 0) obj.voltageVrms = message.voltageVrms;
|
|
259
|
+
if (message.frequencyHz !== void 0) obj.frequencyHz = message.frequencyHz;
|
|
260
|
+
if (message.currentArms !== void 0) obj.currentArms = message.currentArms;
|
|
261
|
+
if (message.realPowerW !== void 0) obj.realPowerW = message.realPowerW;
|
|
262
|
+
if (message.reactivePowerVar !== void 0) obj.reactivePowerVar = message.reactivePowerVar;
|
|
263
|
+
if (message.apparentPowerVa !== void 0) obj.apparentPowerVa = message.apparentPowerVa;
|
|
264
|
+
return obj;
|
|
265
|
+
},
|
|
266
|
+
create(base) {
|
|
267
|
+
return InstACMeasurement.fromPartial(base ?? {});
|
|
268
|
+
},
|
|
269
|
+
fromPartial(object) {
|
|
270
|
+
const message = createBaseInstACMeasurement();
|
|
271
|
+
message.voltageVrms = object.voltageVrms ?? 0;
|
|
272
|
+
message.frequencyHz = object.frequencyHz ?? 0;
|
|
273
|
+
message.currentArms = object.currentArms ?? void 0;
|
|
274
|
+
message.realPowerW = object.realPowerW ?? void 0;
|
|
275
|
+
message.reactivePowerVar = object.reactivePowerVar ?? void 0;
|
|
276
|
+
message.apparentPowerVa = object.apparentPowerVa ?? void 0;
|
|
277
|
+
return message;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
function createBaseInstDCMeasurement() {
|
|
281
|
+
return {
|
|
282
|
+
voltageV: 0,
|
|
283
|
+
currentA: void 0
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
const InstDCMeasurement = {
|
|
287
|
+
encode(message, writer = new BinaryWriter()) {
|
|
288
|
+
if (message.voltageV !== 0) writer.uint32(13).float(message.voltageV);
|
|
289
|
+
if (message.currentA !== void 0) FloatValue.encode({ value: message.currentA }, writer.uint32(18).fork()).join();
|
|
290
|
+
return writer;
|
|
291
|
+
},
|
|
292
|
+
decode(input, length) {
|
|
293
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
294
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
295
|
+
const message = createBaseInstDCMeasurement();
|
|
296
|
+
while (reader.pos < end) {
|
|
297
|
+
const tag = reader.uint32();
|
|
298
|
+
switch (tag >>> 3) {
|
|
299
|
+
case 1:
|
|
300
|
+
if (tag !== 13) break;
|
|
301
|
+
message.voltageV = reader.float();
|
|
302
|
+
continue;
|
|
303
|
+
case 2:
|
|
304
|
+
if (tag !== 18) break;
|
|
305
|
+
message.currentA = FloatValue.decode(reader, reader.uint32()).value;
|
|
306
|
+
continue;
|
|
307
|
+
}
|
|
308
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
309
|
+
reader.skip(tag & 7);
|
|
310
|
+
}
|
|
311
|
+
return message;
|
|
312
|
+
},
|
|
313
|
+
fromJSON(object) {
|
|
314
|
+
return {
|
|
315
|
+
voltageV: isSet(object.voltageV) ? globalThis.Number(object.voltageV) : 0,
|
|
316
|
+
currentA: isSet(object.currentA) ? Number(object.currentA) : void 0
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
toJSON(message) {
|
|
320
|
+
const obj = {};
|
|
321
|
+
if (message.voltageV !== void 0) obj.voltageV = message.voltageV;
|
|
322
|
+
if (message.currentA !== void 0) obj.currentA = message.currentA;
|
|
323
|
+
return obj;
|
|
324
|
+
},
|
|
325
|
+
create(base) {
|
|
326
|
+
return InstDCMeasurement.fromPartial(base ?? {});
|
|
327
|
+
},
|
|
328
|
+
fromPartial(object) {
|
|
329
|
+
const message = createBaseInstDCMeasurement();
|
|
330
|
+
message.voltageV = object.voltageV ?? 0;
|
|
331
|
+
message.currentA = object.currentA ?? void 0;
|
|
332
|
+
return message;
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
function createBaseAlertLog() {
|
|
336
|
+
return { data: void 0 };
|
|
337
|
+
}
|
|
338
|
+
const AlertLog = {
|
|
339
|
+
encode(message, writer = new BinaryWriter()) {
|
|
340
|
+
if (message.data !== void 0) writer.uint32(8).uint64(message.data);
|
|
341
|
+
return writer;
|
|
342
|
+
},
|
|
343
|
+
decode(input, length) {
|
|
344
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
345
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
346
|
+
const message = createBaseAlertLog();
|
|
347
|
+
while (reader.pos < end) {
|
|
348
|
+
const tag = reader.uint32();
|
|
349
|
+
switch (tag >>> 3) {
|
|
350
|
+
case 1:
|
|
351
|
+
if (tag !== 8) break;
|
|
352
|
+
message.data = longToNumber(reader.uint64());
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
356
|
+
reader.skip(tag & 7);
|
|
357
|
+
}
|
|
358
|
+
return message;
|
|
359
|
+
},
|
|
360
|
+
fromJSON(object) {
|
|
361
|
+
return { data: isSet(object.data) ? globalThis.Number(object.data) : void 0 };
|
|
362
|
+
},
|
|
363
|
+
toJSON(message) {
|
|
364
|
+
const obj = {};
|
|
365
|
+
if (message.data !== void 0) obj.data = Math.round(message.data);
|
|
366
|
+
return obj;
|
|
367
|
+
},
|
|
368
|
+
create(base) {
|
|
369
|
+
return AlertLog.fromPartial(base ?? {});
|
|
370
|
+
},
|
|
371
|
+
fromPartial(object) {
|
|
372
|
+
const message = createBaseAlertLog();
|
|
373
|
+
message.data = object.data ?? void 0;
|
|
374
|
+
return message;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
function createBaseAlertMatrix() {
|
|
378
|
+
return { data: void 0 };
|
|
379
|
+
}
|
|
380
|
+
const AlertMatrix = {
|
|
381
|
+
encode(message, writer = new BinaryWriter()) {
|
|
382
|
+
if (message.data !== void 0) writer.uint32(8).uint64(message.data);
|
|
383
|
+
return writer;
|
|
384
|
+
},
|
|
385
|
+
decode(input, length) {
|
|
386
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
387
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
388
|
+
const message = createBaseAlertMatrix();
|
|
389
|
+
while (reader.pos < end) {
|
|
390
|
+
const tag = reader.uint32();
|
|
391
|
+
switch (tag >>> 3) {
|
|
392
|
+
case 1:
|
|
393
|
+
if (tag !== 8) break;
|
|
394
|
+
message.data = longToNumber(reader.uint64());
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
398
|
+
reader.skip(tag & 7);
|
|
399
|
+
}
|
|
400
|
+
return message;
|
|
401
|
+
},
|
|
402
|
+
fromJSON(object) {
|
|
403
|
+
return { data: isSet(object.data) ? globalThis.Number(object.data) : void 0 };
|
|
404
|
+
},
|
|
405
|
+
toJSON(message) {
|
|
406
|
+
const obj = {};
|
|
407
|
+
if (message.data !== void 0) obj.data = Math.round(message.data);
|
|
408
|
+
return obj;
|
|
409
|
+
},
|
|
410
|
+
create(base) {
|
|
411
|
+
return AlertMatrix.fromPartial(base ?? {});
|
|
412
|
+
},
|
|
413
|
+
fromPartial(object) {
|
|
414
|
+
const message = createBaseAlertMatrix();
|
|
415
|
+
message.data = object.data ?? void 0;
|
|
416
|
+
return message;
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
function longToNumber(int64) {
|
|
420
|
+
const num = globalThis.Number(int64.toString());
|
|
421
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
422
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
423
|
+
return num;
|
|
424
|
+
}
|
|
425
|
+
function isSet(value) {
|
|
426
|
+
return value !== null && value !== void 0;
|
|
427
|
+
}
|
|
428
|
+
//#endregion
|
|
429
|
+
export { AccumulatedEnergy, AlertLog, AlertMatrix, EnergyAccumulationType, GridComplianceStatus, GridState, InstACMeasurement, InstDCMeasurement, energyAccumulationTypeFromJSON, energyAccumulationTypeToJSON, gridStateFromJSON, gridStateToJSON, protobufPackage };
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/energy_device/energy_site_net.ts
|
|
3
|
+
const protobufPackage = "tesla.proto.energy_device.v1";
|
|
4
|
+
/**
|
|
5
|
+
* TESLEMETRY SOURCE-OF-RECORD - no upstream.
|
|
6
|
+
* Provenance: Tesla Energy gateway (TEG) local API, from our own
|
|
7
|
+
* observations and contributions from the community
|
|
8
|
+
*/
|
|
9
|
+
let EnergySiteNetAdditionStatus = /* @__PURE__ */ function(EnergySiteNetAdditionStatus) {
|
|
10
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_INVALID"] = 0] = "ENERGY_SITE_NET_ADDITION_STATUS_INVALID";
|
|
11
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_IN_PROGRESS"] = 1] = "ENERGY_SITE_NET_ADDITION_STATUS_IN_PROGRESS";
|
|
12
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_ADDED"] = 2] = "ENERGY_SITE_NET_ADDITION_STATUS_ADDED";
|
|
13
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_FOUND"] = 3] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_FOUND";
|
|
14
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CANNOT_JOIN"] = 4] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CANNOT_JOIN";
|
|
15
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NO_RESPONSE"] = 5] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NO_RESPONSE";
|
|
16
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_BAD_RESPONSE"] = 6] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_BAD_RESPONSE";
|
|
17
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_INTERNAL_ERROR"] = 7] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_INTERNAL_ERROR";
|
|
18
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CHANGES_PROHIBITED"] = 8] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CHANGES_PROHIBITED";
|
|
19
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_MAX_DEVICES"] = 9] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_MAX_DEVICES";
|
|
20
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_LEADER"] = 10] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_LEADER";
|
|
21
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_EXISTS"] = 11] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_EXISTS";
|
|
22
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["ENERGY_SITE_NET_ADDITION_STATUS_FAILED_PROOF_OF_PRESENCE"] = 12] = "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_PROOF_OF_PRESENCE";
|
|
23
|
+
EnergySiteNetAdditionStatus[EnergySiteNetAdditionStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
24
|
+
return EnergySiteNetAdditionStatus;
|
|
25
|
+
}({});
|
|
26
|
+
function energySiteNetAdditionStatusFromJSON(object) {
|
|
27
|
+
switch (object) {
|
|
28
|
+
case 0:
|
|
29
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_INVALID": return 0;
|
|
30
|
+
case 1:
|
|
31
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_IN_PROGRESS": return 1;
|
|
32
|
+
case 2:
|
|
33
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_ADDED": return 2;
|
|
34
|
+
case 3:
|
|
35
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_FOUND": return 3;
|
|
36
|
+
case 4:
|
|
37
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CANNOT_JOIN": return 4;
|
|
38
|
+
case 5:
|
|
39
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NO_RESPONSE": return 5;
|
|
40
|
+
case 6:
|
|
41
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_BAD_RESPONSE": return 6;
|
|
42
|
+
case 7:
|
|
43
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_INTERNAL_ERROR": return 7;
|
|
44
|
+
case 8:
|
|
45
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CHANGES_PROHIBITED": return 8;
|
|
46
|
+
case 9:
|
|
47
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_MAX_DEVICES": return 9;
|
|
48
|
+
case 10:
|
|
49
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_LEADER": return 10;
|
|
50
|
+
case 11:
|
|
51
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_EXISTS": return 11;
|
|
52
|
+
case 12:
|
|
53
|
+
case "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_PROOF_OF_PRESENCE": return 12;
|
|
54
|
+
default: return -1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function energySiteNetAdditionStatusToJSON(object) {
|
|
58
|
+
switch (object) {
|
|
59
|
+
case 0: return "ENERGY_SITE_NET_ADDITION_STATUS_INVALID";
|
|
60
|
+
case 1: return "ENERGY_SITE_NET_ADDITION_STATUS_IN_PROGRESS";
|
|
61
|
+
case 2: return "ENERGY_SITE_NET_ADDITION_STATUS_ADDED";
|
|
62
|
+
case 3: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_FOUND";
|
|
63
|
+
case 4: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CANNOT_JOIN";
|
|
64
|
+
case 5: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NO_RESPONSE";
|
|
65
|
+
case 6: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_BAD_RESPONSE";
|
|
66
|
+
case 7: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_INTERNAL_ERROR";
|
|
67
|
+
case 8: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_CHANGES_PROHIBITED";
|
|
68
|
+
case 9: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_MAX_DEVICES";
|
|
69
|
+
case 10: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_NOT_LEADER";
|
|
70
|
+
case 11: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_EXISTS";
|
|
71
|
+
case 12: return "ENERGY_SITE_NET_ADDITION_STATUS_FAILED_PROOF_OF_PRESENCE";
|
|
72
|
+
default: return "UNRECOGNIZED";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
let EnergySiteNetNetworkType = /* @__PURE__ */ function(EnergySiteNetNetworkType) {
|
|
76
|
+
EnergySiteNetNetworkType[EnergySiteNetNetworkType["ENERGY_SITE_NET_NETWORK_TYPE_INVALID"] = 0] = "ENERGY_SITE_NET_NETWORK_TYPE_INVALID";
|
|
77
|
+
EnergySiteNetNetworkType[EnergySiteNetNetworkType["ENERGY_SITE_NET_NETWORK_TYPE_POWERWALL3"] = 1] = "ENERGY_SITE_NET_NETWORK_TYPE_POWERWALL3";
|
|
78
|
+
EnergySiteNetNetworkType[EnergySiteNetNetworkType["ENERGY_SITE_NET_NETWORK_TYPE_SMART_CHARGING"] = 2] = "ENERGY_SITE_NET_NETWORK_TYPE_SMART_CHARGING";
|
|
79
|
+
EnergySiteNetNetworkType[EnergySiteNetNetworkType["ENERGY_SITE_NET_NETWORK_TYPE_LOAD_SHARING"] = 3] = "ENERGY_SITE_NET_NETWORK_TYPE_LOAD_SHARING";
|
|
80
|
+
EnergySiteNetNetworkType[EnergySiteNetNetworkType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
81
|
+
return EnergySiteNetNetworkType;
|
|
82
|
+
}({});
|
|
83
|
+
function energySiteNetNetworkTypeFromJSON(object) {
|
|
84
|
+
switch (object) {
|
|
85
|
+
case 0:
|
|
86
|
+
case "ENERGY_SITE_NET_NETWORK_TYPE_INVALID": return 0;
|
|
87
|
+
case 1:
|
|
88
|
+
case "ENERGY_SITE_NET_NETWORK_TYPE_POWERWALL3": return 1;
|
|
89
|
+
case 2:
|
|
90
|
+
case "ENERGY_SITE_NET_NETWORK_TYPE_SMART_CHARGING": return 2;
|
|
91
|
+
case 3:
|
|
92
|
+
case "ENERGY_SITE_NET_NETWORK_TYPE_LOAD_SHARING": return 3;
|
|
93
|
+
default: return -1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function energySiteNetNetworkTypeToJSON(object) {
|
|
97
|
+
switch (object) {
|
|
98
|
+
case 0: return "ENERGY_SITE_NET_NETWORK_TYPE_INVALID";
|
|
99
|
+
case 1: return "ENERGY_SITE_NET_NETWORK_TYPE_POWERWALL3";
|
|
100
|
+
case 2: return "ENERGY_SITE_NET_NETWORK_TYPE_SMART_CHARGING";
|
|
101
|
+
case 3: return "ENERGY_SITE_NET_NETWORK_TYPE_LOAD_SHARING";
|
|
102
|
+
default: return "UNRECOGNIZED";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
let EnergySiteNetPairStatus = /* @__PURE__ */ function(EnergySiteNetPairStatus) {
|
|
106
|
+
EnergySiteNetPairStatus[EnergySiteNetPairStatus["ENERGY_SITE_NET_PAIR_STATUS_INVALID"] = 0] = "ENERGY_SITE_NET_PAIR_STATUS_INVALID";
|
|
107
|
+
EnergySiteNetPairStatus[EnergySiteNetPairStatus["ENERGY_SITE_NET_PAIR_STATUS_PENDING"] = 1] = "ENERGY_SITE_NET_PAIR_STATUS_PENDING";
|
|
108
|
+
EnergySiteNetPairStatus[EnergySiteNetPairStatus["ENERGY_SITE_NET_PAIR_STATUS_FAILED_INTERNAL_ERROR"] = 2] = "ENERGY_SITE_NET_PAIR_STATUS_FAILED_INTERNAL_ERROR";
|
|
109
|
+
EnergySiteNetPairStatus[EnergySiteNetPairStatus["ENERGY_SITE_NET_PAIR_STATUS_PROOF_OF_PRESENCE_TIMEOUT"] = 3] = "ENERGY_SITE_NET_PAIR_STATUS_PROOF_OF_PRESENCE_TIMEOUT";
|
|
110
|
+
EnergySiteNetPairStatus[EnergySiteNetPairStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
111
|
+
return EnergySiteNetPairStatus;
|
|
112
|
+
}({});
|
|
113
|
+
function energySiteNetPairStatusFromJSON(object) {
|
|
114
|
+
switch (object) {
|
|
115
|
+
case 0:
|
|
116
|
+
case "ENERGY_SITE_NET_PAIR_STATUS_INVALID": return 0;
|
|
117
|
+
case 1:
|
|
118
|
+
case "ENERGY_SITE_NET_PAIR_STATUS_PENDING": return 1;
|
|
119
|
+
case 2:
|
|
120
|
+
case "ENERGY_SITE_NET_PAIR_STATUS_FAILED_INTERNAL_ERROR": return 2;
|
|
121
|
+
case 3:
|
|
122
|
+
case "ENERGY_SITE_NET_PAIR_STATUS_PROOF_OF_PRESENCE_TIMEOUT": return 3;
|
|
123
|
+
default: return -1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function energySiteNetPairStatusToJSON(object) {
|
|
127
|
+
switch (object) {
|
|
128
|
+
case 0: return "ENERGY_SITE_NET_PAIR_STATUS_INVALID";
|
|
129
|
+
case 1: return "ENERGY_SITE_NET_PAIR_STATUS_PENDING";
|
|
130
|
+
case 2: return "ENERGY_SITE_NET_PAIR_STATUS_FAILED_INTERNAL_ERROR";
|
|
131
|
+
case 3: return "ENERGY_SITE_NET_PAIR_STATUS_PROOF_OF_PRESENCE_TIMEOUT";
|
|
132
|
+
default: return "UNRECOGNIZED";
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
let EnergySiteNetRemovalStatus = /* @__PURE__ */ function(EnergySiteNetRemovalStatus) {
|
|
136
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_INVALID"] = 0] = "ENERGY_SITE_NET_REMOVAL_STATUS_INVALID";
|
|
137
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_IN_PROGRESS"] = 1] = "ENERGY_SITE_NET_REMOVAL_STATUS_IN_PROGRESS";
|
|
138
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_REMOVED"] = 2] = "ENERGY_SITE_NET_REMOVAL_STATUS_REMOVED";
|
|
139
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NO_SUCH_DEVICE"] = 3] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NO_SUCH_DEVICE";
|
|
140
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_INTERNAL_ERROR"] = 4] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_INTERNAL_ERROR";
|
|
141
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_CHANGES_PROHIBITED"] = 5] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_CHANGES_PROHIBITED";
|
|
142
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_LEADER"] = 6] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_LEADER";
|
|
143
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_SOLO"] = 7] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_SOLO";
|
|
144
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NOT_LEADER"] = 8] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NOT_LEADER";
|
|
145
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_LEADER_AVAILABLE"] = 9] = "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_LEADER_AVAILABLE";
|
|
146
|
+
EnergySiteNetRemovalStatus[EnergySiteNetRemovalStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
147
|
+
return EnergySiteNetRemovalStatus;
|
|
148
|
+
}({});
|
|
149
|
+
function energySiteNetRemovalStatusFromJSON(object) {
|
|
150
|
+
switch (object) {
|
|
151
|
+
case 0:
|
|
152
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_INVALID": return 0;
|
|
153
|
+
case 1:
|
|
154
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_IN_PROGRESS": return 1;
|
|
155
|
+
case 2:
|
|
156
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_REMOVED": return 2;
|
|
157
|
+
case 3:
|
|
158
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NO_SUCH_DEVICE": return 3;
|
|
159
|
+
case 4:
|
|
160
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_INTERNAL_ERROR": return 4;
|
|
161
|
+
case 5:
|
|
162
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_CHANGES_PROHIBITED": return 5;
|
|
163
|
+
case 6:
|
|
164
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_LEADER": return 6;
|
|
165
|
+
case 7:
|
|
166
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_SOLO": return 7;
|
|
167
|
+
case 8:
|
|
168
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NOT_LEADER": return 8;
|
|
169
|
+
case 9:
|
|
170
|
+
case "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_LEADER_AVAILABLE": return 9;
|
|
171
|
+
default: return -1;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function energySiteNetRemovalStatusToJSON(object) {
|
|
175
|
+
switch (object) {
|
|
176
|
+
case 0: return "ENERGY_SITE_NET_REMOVAL_STATUS_INVALID";
|
|
177
|
+
case 1: return "ENERGY_SITE_NET_REMOVAL_STATUS_IN_PROGRESS";
|
|
178
|
+
case 2: return "ENERGY_SITE_NET_REMOVAL_STATUS_REMOVED";
|
|
179
|
+
case 3: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NO_SUCH_DEVICE";
|
|
180
|
+
case 4: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_INTERNAL_ERROR";
|
|
181
|
+
case 5: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_CHANGES_PROHIBITED";
|
|
182
|
+
case 6: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_LEADER";
|
|
183
|
+
case 7: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_AM_SOLO";
|
|
184
|
+
case 8: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_NOT_LEADER";
|
|
185
|
+
case 9: return "ENERGY_SITE_NET_REMOVAL_STATUS_FAILED_LEADER_AVAILABLE";
|
|
186
|
+
default: return "UNRECOGNIZED";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
let IntraSiteServiceType = /* @__PURE__ */ function(IntraSiteServiceType) {
|
|
190
|
+
IntraSiteServiceType[IntraSiteServiceType["INTRA_SITE_SERVICE_TYPE_INVALID"] = 0] = "INTRA_SITE_SERVICE_TYPE_INVALID";
|
|
191
|
+
IntraSiteServiceType[IntraSiteServiceType["INTRA_SITE_SERVICE_TYPE_MULTI_PW3_FOLLOWER"] = 1] = "INTRA_SITE_SERVICE_TYPE_MULTI_PW3_FOLLOWER";
|
|
192
|
+
IntraSiteServiceType[IntraSiteServiceType["INTRA_SITE_SERVICE_TYPE_WC_LOAD_SHARING_FOLLOWER"] = 2] = "INTRA_SITE_SERVICE_TYPE_WC_LOAD_SHARING_FOLLOWER";
|
|
193
|
+
IntraSiteServiceType[IntraSiteServiceType["INTRA_SITE_SERVICE_TYPE_WC_CURRENT_CONTROL"] = 3] = "INTRA_SITE_SERVICE_TYPE_WC_CURRENT_CONTROL";
|
|
194
|
+
IntraSiteServiceType[IntraSiteServiceType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
195
|
+
return IntraSiteServiceType;
|
|
196
|
+
}({});
|
|
197
|
+
function intraSiteServiceTypeFromJSON(object) {
|
|
198
|
+
switch (object) {
|
|
199
|
+
case 0:
|
|
200
|
+
case "INTRA_SITE_SERVICE_TYPE_INVALID": return 0;
|
|
201
|
+
case 1:
|
|
202
|
+
case "INTRA_SITE_SERVICE_TYPE_MULTI_PW3_FOLLOWER": return 1;
|
|
203
|
+
case 2:
|
|
204
|
+
case "INTRA_SITE_SERVICE_TYPE_WC_LOAD_SHARING_FOLLOWER": return 2;
|
|
205
|
+
case 3:
|
|
206
|
+
case "INTRA_SITE_SERVICE_TYPE_WC_CURRENT_CONTROL": return 3;
|
|
207
|
+
default: return -1;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function intraSiteServiceTypeToJSON(object) {
|
|
211
|
+
switch (object) {
|
|
212
|
+
case 0: return "INTRA_SITE_SERVICE_TYPE_INVALID";
|
|
213
|
+
case 1: return "INTRA_SITE_SERVICE_TYPE_MULTI_PW3_FOLLOWER";
|
|
214
|
+
case 2: return "INTRA_SITE_SERVICE_TYPE_WC_LOAD_SHARING_FOLLOWER";
|
|
215
|
+
case 3: return "INTRA_SITE_SERVICE_TYPE_WC_CURRENT_CONTROL";
|
|
216
|
+
default: return "UNRECOGNIZED";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
exports.EnergySiteNetAdditionStatus = EnergySiteNetAdditionStatus;
|
|
221
|
+
exports.EnergySiteNetNetworkType = EnergySiteNetNetworkType;
|
|
222
|
+
exports.EnergySiteNetPairStatus = EnergySiteNetPairStatus;
|
|
223
|
+
exports.EnergySiteNetRemovalStatus = EnergySiteNetRemovalStatus;
|
|
224
|
+
exports.IntraSiteServiceType = IntraSiteServiceType;
|
|
225
|
+
exports.energySiteNetAdditionStatusFromJSON = energySiteNetAdditionStatusFromJSON;
|
|
226
|
+
exports.energySiteNetAdditionStatusToJSON = energySiteNetAdditionStatusToJSON;
|
|
227
|
+
exports.energySiteNetNetworkTypeFromJSON = energySiteNetNetworkTypeFromJSON;
|
|
228
|
+
exports.energySiteNetNetworkTypeToJSON = energySiteNetNetworkTypeToJSON;
|
|
229
|
+
exports.energySiteNetPairStatusFromJSON = energySiteNetPairStatusFromJSON;
|
|
230
|
+
exports.energySiteNetPairStatusToJSON = energySiteNetPairStatusToJSON;
|
|
231
|
+
exports.energySiteNetRemovalStatusFromJSON = energySiteNetRemovalStatusFromJSON;
|
|
232
|
+
exports.energySiteNetRemovalStatusToJSON = energySiteNetRemovalStatusToJSON;
|
|
233
|
+
exports.intraSiteServiceTypeFromJSON = intraSiteServiceTypeFromJSON;
|
|
234
|
+
exports.intraSiteServiceTypeToJSON = intraSiteServiceTypeToJSON;
|
|
235
|
+
exports.protobufPackage = protobufPackage;
|