skyeye-sdk-js 1.4.17 → 1.4.19
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/src/SkyEyeClient.d.ts +1 -1
- package/dist/src/SkyEyeClient.js +1 -9
- package/dist/src/proto/line_chart_pb.js +394 -57
- package/dist/src/proto/skyeye_rpc_grpc_pb.js +1 -1
- package/package.json +4 -4
- package/scripts/copy-proto.js +47 -0
- package/src/SkyEyeClient.ts +1 -9
- package/src/proto/line_chart_pb.js +394 -57
- package/src/proto/skyeye_rpc_grpc_pb.js +1 -1
|
@@ -91,7 +91,7 @@ export declare class SkyEyeClient extends JSONTransmissionClient {
|
|
|
91
91
|
getPort(): string;
|
|
92
92
|
initSkyEyeAndRun(pathSkyEye: string, fileName: string, port: string, skyeyeDir: string): void;
|
|
93
93
|
private childProcess;
|
|
94
|
-
initSkyEyeAndRun2(pathSkyEye: string, fileName: string, port: string, skyeyeDir: string
|
|
94
|
+
initSkyEyeAndRun2(pathSkyEye: string, fileName: string, port: string, skyeyeDir: string): Promise<boolean>;
|
|
95
95
|
private checkModule;
|
|
96
96
|
private checkState;
|
|
97
97
|
private startSkyEye;
|
package/dist/src/SkyEyeClient.js
CHANGED
|
@@ -1171,7 +1171,7 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
1171
1171
|
});
|
|
1172
1172
|
}, 2000);
|
|
1173
1173
|
}
|
|
1174
|
-
initSkyEyeAndRun2(pathSkyEye, fileName, port, skyeyeDir
|
|
1174
|
+
initSkyEyeAndRun2(pathSkyEye, fileName, port, skyeyeDir) {
|
|
1175
1175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1176
1176
|
try {
|
|
1177
1177
|
console.log('runExample');
|
|
@@ -1186,14 +1186,6 @@ class SkyEyeClient extends skyeye_rpc_grpc_pb_1.JSONTransmissionClient {
|
|
|
1186
1186
|
ackObj.result = false;
|
|
1187
1187
|
throw new Error(ackObj.error);
|
|
1188
1188
|
}
|
|
1189
|
-
if (!disableRun) {
|
|
1190
|
-
response = yield this.runScript(fileName, port);
|
|
1191
|
-
ackObj = JSON.parse(response.toString()).ack;
|
|
1192
|
-
if (ackObj.result === "false") {
|
|
1193
|
-
ackObj.result = false;
|
|
1194
|
-
throw new Error(ackObj.error);
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
1189
|
return true;
|
|
1198
1190
|
}
|
|
1199
1191
|
catch (error) {
|
|
@@ -24,6 +24,28 @@ var global = (function() {
|
|
|
24
24
|
goog.exportSymbol('proto.Series', null, global);
|
|
25
25
|
goog.exportSymbol('proto.SeriesData', null, global);
|
|
26
26
|
goog.exportSymbol('proto.TimeData', null, global);
|
|
27
|
+
goog.exportSymbol('proto.Value', null, global);
|
|
28
|
+
/**
|
|
29
|
+
* Generated by JsPbCodeGenerator.
|
|
30
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
31
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
32
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
33
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
34
|
+
* valid.
|
|
35
|
+
* @extends {jspb.Message}
|
|
36
|
+
* @constructor
|
|
37
|
+
*/
|
|
38
|
+
proto.Value = function(opt_data) {
|
|
39
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
40
|
+
};
|
|
41
|
+
goog.inherits(proto.Value, jspb.Message);
|
|
42
|
+
if (goog.DEBUG && !COMPILED) {
|
|
43
|
+
/**
|
|
44
|
+
* @public
|
|
45
|
+
* @override
|
|
46
|
+
*/
|
|
47
|
+
proto.Value.displayName = 'proto.Value';
|
|
48
|
+
}
|
|
27
49
|
/**
|
|
28
50
|
* Generated by JsPbCodeGenerator.
|
|
29
51
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -90,6 +112,226 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
90
112
|
|
|
91
113
|
|
|
92
114
|
|
|
115
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
116
|
+
/**
|
|
117
|
+
* Creates an object representation of this proto.
|
|
118
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
119
|
+
* Optional fields that are not set will be set to undefined.
|
|
120
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
121
|
+
* For the list of reserved names please see:
|
|
122
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
123
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
124
|
+
* JSPB instance for transitional soy proto support:
|
|
125
|
+
* http://goto/soy-param-migration
|
|
126
|
+
* @return {!Object}
|
|
127
|
+
*/
|
|
128
|
+
proto.Value.prototype.toObject = function(opt_includeInstance) {
|
|
129
|
+
return proto.Value.toObject(opt_includeInstance, this);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Static version of the {@see toObject} method.
|
|
135
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
136
|
+
* the JSPB instance for transitional soy proto support:
|
|
137
|
+
* http://goto/soy-param-migration
|
|
138
|
+
* @param {!proto.Value} msg The msg instance to transform.
|
|
139
|
+
* @return {!Object}
|
|
140
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
141
|
+
*/
|
|
142
|
+
proto.Value.toObject = function(includeInstance, msg) {
|
|
143
|
+
var f, obj = {
|
|
144
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
145
|
+
doublevalue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
|
|
146
|
+
intvalue: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
147
|
+
stringvalue: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
if (includeInstance) {
|
|
151
|
+
obj.$jspbMessageInstance = msg;
|
|
152
|
+
}
|
|
153
|
+
return obj;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Deserializes binary data (in protobuf wire format).
|
|
160
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
161
|
+
* @return {!proto.Value}
|
|
162
|
+
*/
|
|
163
|
+
proto.Value.deserializeBinary = function(bytes) {
|
|
164
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
165
|
+
var msg = new proto.Value;
|
|
166
|
+
return proto.Value.deserializeBinaryFromReader(msg, reader);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
172
|
+
* given reader into the given message object.
|
|
173
|
+
* @param {!proto.Value} msg The message object to deserialize into.
|
|
174
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
175
|
+
* @return {!proto.Value}
|
|
176
|
+
*/
|
|
177
|
+
proto.Value.deserializeBinaryFromReader = function(msg, reader) {
|
|
178
|
+
while (reader.nextField()) {
|
|
179
|
+
if (reader.isEndGroup()) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
var field = reader.getFieldNumber();
|
|
183
|
+
switch (field) {
|
|
184
|
+
case 1:
|
|
185
|
+
var value = /** @type {string} */ (reader.readString());
|
|
186
|
+
msg.setType(value);
|
|
187
|
+
break;
|
|
188
|
+
case 2:
|
|
189
|
+
var value = /** @type {number} */ (reader.readDouble());
|
|
190
|
+
msg.setDoublevalue(value);
|
|
191
|
+
break;
|
|
192
|
+
case 3:
|
|
193
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
194
|
+
msg.setIntvalue(value);
|
|
195
|
+
break;
|
|
196
|
+
case 4:
|
|
197
|
+
var value = /** @type {string} */ (reader.readString());
|
|
198
|
+
msg.setStringvalue(value);
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
reader.skipField();
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return msg;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
211
|
+
* @return {!Uint8Array}
|
|
212
|
+
*/
|
|
213
|
+
proto.Value.prototype.serializeBinary = function() {
|
|
214
|
+
var writer = new jspb.BinaryWriter();
|
|
215
|
+
proto.Value.serializeBinaryToWriter(this, writer);
|
|
216
|
+
return writer.getResultBuffer();
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
222
|
+
* format), writing to the given BinaryWriter.
|
|
223
|
+
* @param {!proto.Value} message
|
|
224
|
+
* @param {!jspb.BinaryWriter} writer
|
|
225
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
226
|
+
*/
|
|
227
|
+
proto.Value.serializeBinaryToWriter = function(message, writer) {
|
|
228
|
+
var f = undefined;
|
|
229
|
+
f = message.getType();
|
|
230
|
+
if (f.length > 0) {
|
|
231
|
+
writer.writeString(
|
|
232
|
+
1,
|
|
233
|
+
f
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
f = message.getDoublevalue();
|
|
237
|
+
if (f !== 0.0) {
|
|
238
|
+
writer.writeDouble(
|
|
239
|
+
2,
|
|
240
|
+
f
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
f = message.getIntvalue();
|
|
244
|
+
if (f !== 0) {
|
|
245
|
+
writer.writeInt64(
|
|
246
|
+
3,
|
|
247
|
+
f
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
f = message.getStringvalue();
|
|
251
|
+
if (f.length > 0) {
|
|
252
|
+
writer.writeString(
|
|
253
|
+
4,
|
|
254
|
+
f
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* optional string type = 1;
|
|
262
|
+
* @return {string}
|
|
263
|
+
*/
|
|
264
|
+
proto.Value.prototype.getType = function() {
|
|
265
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @param {string} value
|
|
271
|
+
* @return {!proto.Value} returns this
|
|
272
|
+
*/
|
|
273
|
+
proto.Value.prototype.setType = function(value) {
|
|
274
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* optional double doubleValue = 2;
|
|
280
|
+
* @return {number}
|
|
281
|
+
*/
|
|
282
|
+
proto.Value.prototype.getDoublevalue = function() {
|
|
283
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @param {number} value
|
|
289
|
+
* @return {!proto.Value} returns this
|
|
290
|
+
*/
|
|
291
|
+
proto.Value.prototype.setDoublevalue = function(value) {
|
|
292
|
+
return jspb.Message.setProto3FloatField(this, 2, value);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* optional int64 intValue = 3;
|
|
298
|
+
* @return {number}
|
|
299
|
+
*/
|
|
300
|
+
proto.Value.prototype.getIntvalue = function() {
|
|
301
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @param {number} value
|
|
307
|
+
* @return {!proto.Value} returns this
|
|
308
|
+
*/
|
|
309
|
+
proto.Value.prototype.setIntvalue = function(value) {
|
|
310
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* optional string stringValue = 4;
|
|
316
|
+
* @return {string}
|
|
317
|
+
*/
|
|
318
|
+
proto.Value.prototype.getStringvalue = function() {
|
|
319
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @param {string} value
|
|
325
|
+
* @return {!proto.Value} returns this
|
|
326
|
+
*/
|
|
327
|
+
proto.Value.prototype.setStringvalue = function(value) {
|
|
328
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
93
335
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
94
336
|
/**
|
|
95
337
|
* Creates an object representation of this proto.
|
|
@@ -119,9 +361,9 @@ proto.TimeData.prototype.toObject = function(opt_includeInstance) {
|
|
|
119
361
|
*/
|
|
120
362
|
proto.TimeData.toObject = function(includeInstance, msg) {
|
|
121
363
|
var f, obj = {
|
|
122
|
-
realtime:
|
|
123
|
-
simulationtime:
|
|
124
|
-
customtime:
|
|
364
|
+
realtime: (f = msg.getRealtime()) && proto.Value.toObject(includeInstance, f),
|
|
365
|
+
simulationtime: (f = msg.getSimulationtime()) && proto.Value.toObject(includeInstance, f),
|
|
366
|
+
customtime: (f = msg.getCustomtime()) && proto.Value.toObject(includeInstance, f)
|
|
125
367
|
};
|
|
126
368
|
|
|
127
369
|
if (includeInstance) {
|
|
@@ -159,15 +401,18 @@ proto.TimeData.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
159
401
|
var field = reader.getFieldNumber();
|
|
160
402
|
switch (field) {
|
|
161
403
|
case 1:
|
|
162
|
-
var value =
|
|
404
|
+
var value = new proto.Value;
|
|
405
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
163
406
|
msg.setRealtime(value);
|
|
164
407
|
break;
|
|
165
408
|
case 2:
|
|
166
|
-
var value =
|
|
409
|
+
var value = new proto.Value;
|
|
410
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
167
411
|
msg.setSimulationtime(value);
|
|
168
412
|
break;
|
|
169
413
|
case 3:
|
|
170
|
-
var value =
|
|
414
|
+
var value = new proto.Value;
|
|
415
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
171
416
|
msg.setCustomtime(value);
|
|
172
417
|
break;
|
|
173
418
|
default:
|
|
@@ -200,80 +445,140 @@ proto.TimeData.prototype.serializeBinary = function() {
|
|
|
200
445
|
proto.TimeData.serializeBinaryToWriter = function(message, writer) {
|
|
201
446
|
var f = undefined;
|
|
202
447
|
f = message.getRealtime();
|
|
203
|
-
if (f
|
|
204
|
-
writer.
|
|
448
|
+
if (f != null) {
|
|
449
|
+
writer.writeMessage(
|
|
205
450
|
1,
|
|
206
|
-
f
|
|
451
|
+
f,
|
|
452
|
+
proto.Value.serializeBinaryToWriter
|
|
207
453
|
);
|
|
208
454
|
}
|
|
209
455
|
f = message.getSimulationtime();
|
|
210
|
-
if (f
|
|
211
|
-
writer.
|
|
456
|
+
if (f != null) {
|
|
457
|
+
writer.writeMessage(
|
|
212
458
|
2,
|
|
213
|
-
f
|
|
459
|
+
f,
|
|
460
|
+
proto.Value.serializeBinaryToWriter
|
|
214
461
|
);
|
|
215
462
|
}
|
|
216
463
|
f = message.getCustomtime();
|
|
217
|
-
if (f
|
|
218
|
-
writer.
|
|
464
|
+
if (f != null) {
|
|
465
|
+
writer.writeMessage(
|
|
219
466
|
3,
|
|
220
|
-
f
|
|
467
|
+
f,
|
|
468
|
+
proto.Value.serializeBinaryToWriter
|
|
221
469
|
);
|
|
222
470
|
}
|
|
223
471
|
};
|
|
224
472
|
|
|
225
473
|
|
|
226
474
|
/**
|
|
227
|
-
* optional
|
|
228
|
-
* @return {
|
|
475
|
+
* optional Value realTime = 1;
|
|
476
|
+
* @return {?proto.Value}
|
|
229
477
|
*/
|
|
230
478
|
proto.TimeData.prototype.getRealtime = function() {
|
|
231
|
-
return /** @type
|
|
479
|
+
return /** @type{?proto.Value} */ (
|
|
480
|
+
jspb.Message.getWrapperField(this, proto.Value, 1));
|
|
232
481
|
};
|
|
233
482
|
|
|
234
483
|
|
|
235
484
|
/**
|
|
236
|
-
* @param {
|
|
485
|
+
* @param {?proto.Value|undefined} value
|
|
237
486
|
* @return {!proto.TimeData} returns this
|
|
238
|
-
|
|
487
|
+
*/
|
|
239
488
|
proto.TimeData.prototype.setRealtime = function(value) {
|
|
240
|
-
return jspb.Message.
|
|
489
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
241
490
|
};
|
|
242
491
|
|
|
243
492
|
|
|
244
493
|
/**
|
|
245
|
-
*
|
|
246
|
-
* @return {
|
|
494
|
+
* Clears the message field making it undefined.
|
|
495
|
+
* @return {!proto.TimeData} returns this
|
|
496
|
+
*/
|
|
497
|
+
proto.TimeData.prototype.clearRealtime = function() {
|
|
498
|
+
return this.setRealtime(undefined);
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Returns whether this field is set.
|
|
504
|
+
* @return {boolean}
|
|
505
|
+
*/
|
|
506
|
+
proto.TimeData.prototype.hasRealtime = function() {
|
|
507
|
+
return jspb.Message.getField(this, 1) != null;
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* optional Value simulationTime = 2;
|
|
513
|
+
* @return {?proto.Value}
|
|
247
514
|
*/
|
|
248
515
|
proto.TimeData.prototype.getSimulationtime = function() {
|
|
249
|
-
return /** @type
|
|
516
|
+
return /** @type{?proto.Value} */ (
|
|
517
|
+
jspb.Message.getWrapperField(this, proto.Value, 2));
|
|
250
518
|
};
|
|
251
519
|
|
|
252
520
|
|
|
253
521
|
/**
|
|
254
|
-
* @param {
|
|
522
|
+
* @param {?proto.Value|undefined} value
|
|
255
523
|
* @return {!proto.TimeData} returns this
|
|
256
|
-
|
|
524
|
+
*/
|
|
257
525
|
proto.TimeData.prototype.setSimulationtime = function(value) {
|
|
258
|
-
return jspb.Message.
|
|
526
|
+
return jspb.Message.setWrapperField(this, 2, value);
|
|
259
527
|
};
|
|
260
528
|
|
|
261
529
|
|
|
262
530
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @return {
|
|
531
|
+
* Clears the message field making it undefined.
|
|
532
|
+
* @return {!proto.TimeData} returns this
|
|
533
|
+
*/
|
|
534
|
+
proto.TimeData.prototype.clearSimulationtime = function() {
|
|
535
|
+
return this.setSimulationtime(undefined);
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Returns whether this field is set.
|
|
541
|
+
* @return {boolean}
|
|
542
|
+
*/
|
|
543
|
+
proto.TimeData.prototype.hasSimulationtime = function() {
|
|
544
|
+
return jspb.Message.getField(this, 2) != null;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* optional Value customTime = 3;
|
|
550
|
+
* @return {?proto.Value}
|
|
265
551
|
*/
|
|
266
552
|
proto.TimeData.prototype.getCustomtime = function() {
|
|
267
|
-
return /** @type
|
|
553
|
+
return /** @type{?proto.Value} */ (
|
|
554
|
+
jspb.Message.getWrapperField(this, proto.Value, 3));
|
|
268
555
|
};
|
|
269
556
|
|
|
270
557
|
|
|
271
558
|
/**
|
|
272
|
-
* @param {
|
|
559
|
+
* @param {?proto.Value|undefined} value
|
|
273
560
|
* @return {!proto.TimeData} returns this
|
|
274
|
-
|
|
561
|
+
*/
|
|
275
562
|
proto.TimeData.prototype.setCustomtime = function(value) {
|
|
276
|
-
return jspb.Message.
|
|
563
|
+
return jspb.Message.setWrapperField(this, 3, value);
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Clears the message field making it undefined.
|
|
569
|
+
* @return {!proto.TimeData} returns this
|
|
570
|
+
*/
|
|
571
|
+
proto.TimeData.prototype.clearCustomtime = function() {
|
|
572
|
+
return this.setCustomtime(undefined);
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Returns whether this field is set.
|
|
578
|
+
* @return {boolean}
|
|
579
|
+
*/
|
|
580
|
+
proto.TimeData.prototype.hasCustomtime = function() {
|
|
581
|
+
return jspb.Message.getField(this, 3) != null;
|
|
277
582
|
};
|
|
278
583
|
|
|
279
584
|
|
|
@@ -283,7 +588,7 @@ proto.TimeData.prototype.setCustomtime = function(value) {
|
|
|
283
588
|
* @private {!Array<number>}
|
|
284
589
|
* @const
|
|
285
590
|
*/
|
|
286
|
-
proto.SeriesData.repeatedFields_ = [
|
|
591
|
+
proto.SeriesData.repeatedFields_ = [3];
|
|
287
592
|
|
|
288
593
|
|
|
289
594
|
|
|
@@ -316,8 +621,10 @@ proto.SeriesData.prototype.toObject = function(opt_includeInstance) {
|
|
|
316
621
|
*/
|
|
317
622
|
proto.SeriesData.toObject = function(includeInstance, msg) {
|
|
318
623
|
var f, obj = {
|
|
319
|
-
|
|
320
|
-
|
|
624
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
625
|
+
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
626
|
+
valueList: jspb.Message.toObjectList(msg.getValueList(),
|
|
627
|
+
proto.Value.toObject, includeInstance)
|
|
321
628
|
};
|
|
322
629
|
|
|
323
630
|
if (includeInstance) {
|
|
@@ -356,13 +663,16 @@ proto.SeriesData.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
356
663
|
switch (field) {
|
|
357
664
|
case 1:
|
|
358
665
|
var value = /** @type {string} */ (reader.readString());
|
|
359
|
-
msg.
|
|
666
|
+
msg.setId(value);
|
|
360
667
|
break;
|
|
361
668
|
case 2:
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
669
|
+
var value = /** @type {string} */ (reader.readString());
|
|
670
|
+
msg.setName(value);
|
|
671
|
+
break;
|
|
672
|
+
case 3:
|
|
673
|
+
var value = new proto.Value;
|
|
674
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
675
|
+
msg.addValue(value);
|
|
366
676
|
break;
|
|
367
677
|
default:
|
|
368
678
|
reader.skipField();
|
|
@@ -393,28 +703,36 @@ proto.SeriesData.prototype.serializeBinary = function() {
|
|
|
393
703
|
*/
|
|
394
704
|
proto.SeriesData.serializeBinaryToWriter = function(message, writer) {
|
|
395
705
|
var f = undefined;
|
|
396
|
-
f = message.
|
|
706
|
+
f = message.getId();
|
|
397
707
|
if (f.length > 0) {
|
|
398
708
|
writer.writeString(
|
|
399
709
|
1,
|
|
400
710
|
f
|
|
401
711
|
);
|
|
402
712
|
}
|
|
403
|
-
f = message.
|
|
713
|
+
f = message.getName();
|
|
404
714
|
if (f.length > 0) {
|
|
405
|
-
writer.
|
|
715
|
+
writer.writeString(
|
|
406
716
|
2,
|
|
407
717
|
f
|
|
408
718
|
);
|
|
409
719
|
}
|
|
720
|
+
f = message.getValueList();
|
|
721
|
+
if (f.length > 0) {
|
|
722
|
+
writer.writeRepeatedMessage(
|
|
723
|
+
3,
|
|
724
|
+
f,
|
|
725
|
+
proto.Value.serializeBinaryToWriter
|
|
726
|
+
);
|
|
727
|
+
}
|
|
410
728
|
};
|
|
411
729
|
|
|
412
730
|
|
|
413
731
|
/**
|
|
414
|
-
* optional string
|
|
732
|
+
* optional string id = 1;
|
|
415
733
|
* @return {string}
|
|
416
734
|
*/
|
|
417
|
-
proto.SeriesData.prototype.
|
|
735
|
+
proto.SeriesData.prototype.getId = function() {
|
|
418
736
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
419
737
|
};
|
|
420
738
|
|
|
@@ -423,36 +741,55 @@ proto.SeriesData.prototype.getName = function() {
|
|
|
423
741
|
* @param {string} value
|
|
424
742
|
* @return {!proto.SeriesData} returns this
|
|
425
743
|
*/
|
|
426
|
-
proto.SeriesData.prototype.
|
|
744
|
+
proto.SeriesData.prototype.setId = function(value) {
|
|
427
745
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
428
746
|
};
|
|
429
747
|
|
|
430
748
|
|
|
431
749
|
/**
|
|
432
|
-
*
|
|
433
|
-
* @return {
|
|
750
|
+
* optional string name = 2;
|
|
751
|
+
* @return {string}
|
|
434
752
|
*/
|
|
435
|
-
proto.SeriesData.prototype.
|
|
436
|
-
return /** @type {
|
|
753
|
+
proto.SeriesData.prototype.getName = function() {
|
|
754
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
437
755
|
};
|
|
438
756
|
|
|
439
757
|
|
|
440
758
|
/**
|
|
441
|
-
* @param {
|
|
759
|
+
* @param {string} value
|
|
442
760
|
* @return {!proto.SeriesData} returns this
|
|
443
761
|
*/
|
|
762
|
+
proto.SeriesData.prototype.setName = function(value) {
|
|
763
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* repeated Value value = 3;
|
|
769
|
+
* @return {!Array<!proto.Value>}
|
|
770
|
+
*/
|
|
771
|
+
proto.SeriesData.prototype.getValueList = function() {
|
|
772
|
+
return /** @type{!Array<!proto.Value>} */ (
|
|
773
|
+
jspb.Message.getRepeatedWrapperField(this, proto.Value, 3));
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* @param {!Array<!proto.Value>} value
|
|
779
|
+
* @return {!proto.SeriesData} returns this
|
|
780
|
+
*/
|
|
444
781
|
proto.SeriesData.prototype.setValueList = function(value) {
|
|
445
|
-
return jspb.Message.
|
|
782
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
446
783
|
};
|
|
447
784
|
|
|
448
785
|
|
|
449
786
|
/**
|
|
450
|
-
* @param {
|
|
787
|
+
* @param {!proto.Value=} opt_value
|
|
451
788
|
* @param {number=} opt_index
|
|
452
|
-
* @return {!proto.
|
|
789
|
+
* @return {!proto.Value}
|
|
453
790
|
*/
|
|
454
|
-
proto.SeriesData.prototype.addValue = function(
|
|
455
|
-
return jspb.Message.
|
|
791
|
+
proto.SeriesData.prototype.addValue = function(opt_value, opt_index) {
|
|
792
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Value, opt_index);
|
|
456
793
|
};
|
|
457
794
|
|
|
458
795
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skyeye-sdk-js",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.19",
|
|
4
4
|
"description": "gRPC to SkyEye",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"dev": "tsc
|
|
11
|
-
"release": "tsc && npm publish"
|
|
9
|
+
"build": "tsc && node ./scripts/copy-proto.js",
|
|
10
|
+
"dev": "tsc && node ./scripts/copy-proto.js && node --max-old-space-size=4096 dist/test.js",
|
|
11
|
+
"release": "tsc && node ./scripts/copy-proto.js && npm publish"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function copyRecursiveSync(src, dest) {
|
|
5
|
+
const exists = fs.existsSync(src);
|
|
6
|
+
const stats = exists && fs.statSync(src);
|
|
7
|
+
const isDirectory = exists && stats.isDirectory();
|
|
8
|
+
if (isDirectory) {
|
|
9
|
+
if (!fs.existsSync(dest)) {
|
|
10
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
fs.readdirSync(src).forEach(function(childItemName) {
|
|
13
|
+
copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
const destDir = path.dirname(dest);
|
|
17
|
+
if (!fs.existsSync(destDir)) {
|
|
18
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
19
|
+
}
|
|
20
|
+
// read file and replace legacy grpc require with @grpc/grpc-js
|
|
21
|
+
try {
|
|
22
|
+
const content = fs.readFileSync(src, 'utf8');
|
|
23
|
+
const replaced = content.replace(/require\(\'grpc\'\)/g, "require('@grpc/grpc-js')");
|
|
24
|
+
fs.writeFileSync(dest, replaced, 'utf8');
|
|
25
|
+
} catch (e) {
|
|
26
|
+
// fallback to binary copy for non-text files
|
|
27
|
+
fs.copyFileSync(src, dest);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const projectRoot = path.resolve(__dirname, '..');
|
|
33
|
+
const srcProto = path.join(projectRoot, 'src', 'proto');
|
|
34
|
+
const destProto = path.join(projectRoot, 'dist', 'src', 'proto');
|
|
35
|
+
|
|
36
|
+
if (!fs.existsSync(srcProto)) {
|
|
37
|
+
console.error('Source proto directory not found:', srcProto);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
copyRecursiveSync(srcProto, destProto);
|
|
43
|
+
console.log('Copied proto files to', destProto);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.error('Failed to copy proto files:', err);
|
|
46
|
+
process.exit(2);
|
|
47
|
+
}
|
package/src/SkyEyeClient.ts
CHANGED
|
@@ -1080,7 +1080,7 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
1080
1080
|
|
|
1081
1081
|
private childProcess: cp.ChildProcess | null = null;
|
|
1082
1082
|
|
|
1083
|
-
public async initSkyEyeAndRun2(pathSkyEye: string, fileName: string, port: string, skyeyeDir: string
|
|
1083
|
+
public async initSkyEyeAndRun2(pathSkyEye: string, fileName: string, port: string, skyeyeDir: string) {
|
|
1084
1084
|
try {
|
|
1085
1085
|
console.log('runExample');
|
|
1086
1086
|
|
|
@@ -1095,14 +1095,6 @@ export class SkyEyeClient extends JSONTransmissionClient {
|
|
|
1095
1095
|
ackObj.result = false
|
|
1096
1096
|
throw new Error(ackObj.error)
|
|
1097
1097
|
}
|
|
1098
|
-
if (!disableRun) {
|
|
1099
|
-
response = await this.runScript(fileName, port);
|
|
1100
|
-
ackObj = JSON.parse(response.toString()).ack;
|
|
1101
|
-
if (ackObj.result === "false") {
|
|
1102
|
-
ackObj.result = false
|
|
1103
|
-
throw new Error(ackObj.error)
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
1098
|
return true;
|
|
1107
1099
|
} catch (error) {
|
|
1108
1100
|
console.error("initSkyEyeAndRun error:", error);
|
|
@@ -24,6 +24,28 @@ var global = (function() {
|
|
|
24
24
|
goog.exportSymbol('proto.Series', null, global);
|
|
25
25
|
goog.exportSymbol('proto.SeriesData', null, global);
|
|
26
26
|
goog.exportSymbol('proto.TimeData', null, global);
|
|
27
|
+
goog.exportSymbol('proto.Value', null, global);
|
|
28
|
+
/**
|
|
29
|
+
* Generated by JsPbCodeGenerator.
|
|
30
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
31
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
32
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
33
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
34
|
+
* valid.
|
|
35
|
+
* @extends {jspb.Message}
|
|
36
|
+
* @constructor
|
|
37
|
+
*/
|
|
38
|
+
proto.Value = function(opt_data) {
|
|
39
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
40
|
+
};
|
|
41
|
+
goog.inherits(proto.Value, jspb.Message);
|
|
42
|
+
if (goog.DEBUG && !COMPILED) {
|
|
43
|
+
/**
|
|
44
|
+
* @public
|
|
45
|
+
* @override
|
|
46
|
+
*/
|
|
47
|
+
proto.Value.displayName = 'proto.Value';
|
|
48
|
+
}
|
|
27
49
|
/**
|
|
28
50
|
* Generated by JsPbCodeGenerator.
|
|
29
51
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -90,6 +112,226 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
90
112
|
|
|
91
113
|
|
|
92
114
|
|
|
115
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
116
|
+
/**
|
|
117
|
+
* Creates an object representation of this proto.
|
|
118
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
119
|
+
* Optional fields that are not set will be set to undefined.
|
|
120
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
121
|
+
* For the list of reserved names please see:
|
|
122
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
123
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
124
|
+
* JSPB instance for transitional soy proto support:
|
|
125
|
+
* http://goto/soy-param-migration
|
|
126
|
+
* @return {!Object}
|
|
127
|
+
*/
|
|
128
|
+
proto.Value.prototype.toObject = function(opt_includeInstance) {
|
|
129
|
+
return proto.Value.toObject(opt_includeInstance, this);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Static version of the {@see toObject} method.
|
|
135
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
136
|
+
* the JSPB instance for transitional soy proto support:
|
|
137
|
+
* http://goto/soy-param-migration
|
|
138
|
+
* @param {!proto.Value} msg The msg instance to transform.
|
|
139
|
+
* @return {!Object}
|
|
140
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
141
|
+
*/
|
|
142
|
+
proto.Value.toObject = function(includeInstance, msg) {
|
|
143
|
+
var f, obj = {
|
|
144
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
145
|
+
doublevalue: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
|
|
146
|
+
intvalue: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
147
|
+
stringvalue: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
if (includeInstance) {
|
|
151
|
+
obj.$jspbMessageInstance = msg;
|
|
152
|
+
}
|
|
153
|
+
return obj;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Deserializes binary data (in protobuf wire format).
|
|
160
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
161
|
+
* @return {!proto.Value}
|
|
162
|
+
*/
|
|
163
|
+
proto.Value.deserializeBinary = function(bytes) {
|
|
164
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
165
|
+
var msg = new proto.Value;
|
|
166
|
+
return proto.Value.deserializeBinaryFromReader(msg, reader);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
172
|
+
* given reader into the given message object.
|
|
173
|
+
* @param {!proto.Value} msg The message object to deserialize into.
|
|
174
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
175
|
+
* @return {!proto.Value}
|
|
176
|
+
*/
|
|
177
|
+
proto.Value.deserializeBinaryFromReader = function(msg, reader) {
|
|
178
|
+
while (reader.nextField()) {
|
|
179
|
+
if (reader.isEndGroup()) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
var field = reader.getFieldNumber();
|
|
183
|
+
switch (field) {
|
|
184
|
+
case 1:
|
|
185
|
+
var value = /** @type {string} */ (reader.readString());
|
|
186
|
+
msg.setType(value);
|
|
187
|
+
break;
|
|
188
|
+
case 2:
|
|
189
|
+
var value = /** @type {number} */ (reader.readDouble());
|
|
190
|
+
msg.setDoublevalue(value);
|
|
191
|
+
break;
|
|
192
|
+
case 3:
|
|
193
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
194
|
+
msg.setIntvalue(value);
|
|
195
|
+
break;
|
|
196
|
+
case 4:
|
|
197
|
+
var value = /** @type {string} */ (reader.readString());
|
|
198
|
+
msg.setStringvalue(value);
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
reader.skipField();
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return msg;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
211
|
+
* @return {!Uint8Array}
|
|
212
|
+
*/
|
|
213
|
+
proto.Value.prototype.serializeBinary = function() {
|
|
214
|
+
var writer = new jspb.BinaryWriter();
|
|
215
|
+
proto.Value.serializeBinaryToWriter(this, writer);
|
|
216
|
+
return writer.getResultBuffer();
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
222
|
+
* format), writing to the given BinaryWriter.
|
|
223
|
+
* @param {!proto.Value} message
|
|
224
|
+
* @param {!jspb.BinaryWriter} writer
|
|
225
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
226
|
+
*/
|
|
227
|
+
proto.Value.serializeBinaryToWriter = function(message, writer) {
|
|
228
|
+
var f = undefined;
|
|
229
|
+
f = message.getType();
|
|
230
|
+
if (f.length > 0) {
|
|
231
|
+
writer.writeString(
|
|
232
|
+
1,
|
|
233
|
+
f
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
f = message.getDoublevalue();
|
|
237
|
+
if (f !== 0.0) {
|
|
238
|
+
writer.writeDouble(
|
|
239
|
+
2,
|
|
240
|
+
f
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
f = message.getIntvalue();
|
|
244
|
+
if (f !== 0) {
|
|
245
|
+
writer.writeInt64(
|
|
246
|
+
3,
|
|
247
|
+
f
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
f = message.getStringvalue();
|
|
251
|
+
if (f.length > 0) {
|
|
252
|
+
writer.writeString(
|
|
253
|
+
4,
|
|
254
|
+
f
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* optional string type = 1;
|
|
262
|
+
* @return {string}
|
|
263
|
+
*/
|
|
264
|
+
proto.Value.prototype.getType = function() {
|
|
265
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* @param {string} value
|
|
271
|
+
* @return {!proto.Value} returns this
|
|
272
|
+
*/
|
|
273
|
+
proto.Value.prototype.setType = function(value) {
|
|
274
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* optional double doubleValue = 2;
|
|
280
|
+
* @return {number}
|
|
281
|
+
*/
|
|
282
|
+
proto.Value.prototype.getDoublevalue = function() {
|
|
283
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @param {number} value
|
|
289
|
+
* @return {!proto.Value} returns this
|
|
290
|
+
*/
|
|
291
|
+
proto.Value.prototype.setDoublevalue = function(value) {
|
|
292
|
+
return jspb.Message.setProto3FloatField(this, 2, value);
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* optional int64 intValue = 3;
|
|
298
|
+
* @return {number}
|
|
299
|
+
*/
|
|
300
|
+
proto.Value.prototype.getIntvalue = function() {
|
|
301
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @param {number} value
|
|
307
|
+
* @return {!proto.Value} returns this
|
|
308
|
+
*/
|
|
309
|
+
proto.Value.prototype.setIntvalue = function(value) {
|
|
310
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* optional string stringValue = 4;
|
|
316
|
+
* @return {string}
|
|
317
|
+
*/
|
|
318
|
+
proto.Value.prototype.getStringvalue = function() {
|
|
319
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @param {string} value
|
|
325
|
+
* @return {!proto.Value} returns this
|
|
326
|
+
*/
|
|
327
|
+
proto.Value.prototype.setStringvalue = function(value) {
|
|
328
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
93
335
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
94
336
|
/**
|
|
95
337
|
* Creates an object representation of this proto.
|
|
@@ -119,9 +361,9 @@ proto.TimeData.prototype.toObject = function(opt_includeInstance) {
|
|
|
119
361
|
*/
|
|
120
362
|
proto.TimeData.toObject = function(includeInstance, msg) {
|
|
121
363
|
var f, obj = {
|
|
122
|
-
realtime:
|
|
123
|
-
simulationtime:
|
|
124
|
-
customtime:
|
|
364
|
+
realtime: (f = msg.getRealtime()) && proto.Value.toObject(includeInstance, f),
|
|
365
|
+
simulationtime: (f = msg.getSimulationtime()) && proto.Value.toObject(includeInstance, f),
|
|
366
|
+
customtime: (f = msg.getCustomtime()) && proto.Value.toObject(includeInstance, f)
|
|
125
367
|
};
|
|
126
368
|
|
|
127
369
|
if (includeInstance) {
|
|
@@ -159,15 +401,18 @@ proto.TimeData.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
159
401
|
var field = reader.getFieldNumber();
|
|
160
402
|
switch (field) {
|
|
161
403
|
case 1:
|
|
162
|
-
var value =
|
|
404
|
+
var value = new proto.Value;
|
|
405
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
163
406
|
msg.setRealtime(value);
|
|
164
407
|
break;
|
|
165
408
|
case 2:
|
|
166
|
-
var value =
|
|
409
|
+
var value = new proto.Value;
|
|
410
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
167
411
|
msg.setSimulationtime(value);
|
|
168
412
|
break;
|
|
169
413
|
case 3:
|
|
170
|
-
var value =
|
|
414
|
+
var value = new proto.Value;
|
|
415
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
171
416
|
msg.setCustomtime(value);
|
|
172
417
|
break;
|
|
173
418
|
default:
|
|
@@ -200,80 +445,140 @@ proto.TimeData.prototype.serializeBinary = function() {
|
|
|
200
445
|
proto.TimeData.serializeBinaryToWriter = function(message, writer) {
|
|
201
446
|
var f = undefined;
|
|
202
447
|
f = message.getRealtime();
|
|
203
|
-
if (f
|
|
204
|
-
writer.
|
|
448
|
+
if (f != null) {
|
|
449
|
+
writer.writeMessage(
|
|
205
450
|
1,
|
|
206
|
-
f
|
|
451
|
+
f,
|
|
452
|
+
proto.Value.serializeBinaryToWriter
|
|
207
453
|
);
|
|
208
454
|
}
|
|
209
455
|
f = message.getSimulationtime();
|
|
210
|
-
if (f
|
|
211
|
-
writer.
|
|
456
|
+
if (f != null) {
|
|
457
|
+
writer.writeMessage(
|
|
212
458
|
2,
|
|
213
|
-
f
|
|
459
|
+
f,
|
|
460
|
+
proto.Value.serializeBinaryToWriter
|
|
214
461
|
);
|
|
215
462
|
}
|
|
216
463
|
f = message.getCustomtime();
|
|
217
|
-
if (f
|
|
218
|
-
writer.
|
|
464
|
+
if (f != null) {
|
|
465
|
+
writer.writeMessage(
|
|
219
466
|
3,
|
|
220
|
-
f
|
|
467
|
+
f,
|
|
468
|
+
proto.Value.serializeBinaryToWriter
|
|
221
469
|
);
|
|
222
470
|
}
|
|
223
471
|
};
|
|
224
472
|
|
|
225
473
|
|
|
226
474
|
/**
|
|
227
|
-
* optional
|
|
228
|
-
* @return {
|
|
475
|
+
* optional Value realTime = 1;
|
|
476
|
+
* @return {?proto.Value}
|
|
229
477
|
*/
|
|
230
478
|
proto.TimeData.prototype.getRealtime = function() {
|
|
231
|
-
return /** @type
|
|
479
|
+
return /** @type{?proto.Value} */ (
|
|
480
|
+
jspb.Message.getWrapperField(this, proto.Value, 1));
|
|
232
481
|
};
|
|
233
482
|
|
|
234
483
|
|
|
235
484
|
/**
|
|
236
|
-
* @param {
|
|
485
|
+
* @param {?proto.Value|undefined} value
|
|
237
486
|
* @return {!proto.TimeData} returns this
|
|
238
|
-
|
|
487
|
+
*/
|
|
239
488
|
proto.TimeData.prototype.setRealtime = function(value) {
|
|
240
|
-
return jspb.Message.
|
|
489
|
+
return jspb.Message.setWrapperField(this, 1, value);
|
|
241
490
|
};
|
|
242
491
|
|
|
243
492
|
|
|
244
493
|
/**
|
|
245
|
-
*
|
|
246
|
-
* @return {
|
|
494
|
+
* Clears the message field making it undefined.
|
|
495
|
+
* @return {!proto.TimeData} returns this
|
|
496
|
+
*/
|
|
497
|
+
proto.TimeData.prototype.clearRealtime = function() {
|
|
498
|
+
return this.setRealtime(undefined);
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Returns whether this field is set.
|
|
504
|
+
* @return {boolean}
|
|
505
|
+
*/
|
|
506
|
+
proto.TimeData.prototype.hasRealtime = function() {
|
|
507
|
+
return jspb.Message.getField(this, 1) != null;
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* optional Value simulationTime = 2;
|
|
513
|
+
* @return {?proto.Value}
|
|
247
514
|
*/
|
|
248
515
|
proto.TimeData.prototype.getSimulationtime = function() {
|
|
249
|
-
return /** @type
|
|
516
|
+
return /** @type{?proto.Value} */ (
|
|
517
|
+
jspb.Message.getWrapperField(this, proto.Value, 2));
|
|
250
518
|
};
|
|
251
519
|
|
|
252
520
|
|
|
253
521
|
/**
|
|
254
|
-
* @param {
|
|
522
|
+
* @param {?proto.Value|undefined} value
|
|
255
523
|
* @return {!proto.TimeData} returns this
|
|
256
|
-
|
|
524
|
+
*/
|
|
257
525
|
proto.TimeData.prototype.setSimulationtime = function(value) {
|
|
258
|
-
return jspb.Message.
|
|
526
|
+
return jspb.Message.setWrapperField(this, 2, value);
|
|
259
527
|
};
|
|
260
528
|
|
|
261
529
|
|
|
262
530
|
/**
|
|
263
|
-
*
|
|
264
|
-
* @return {
|
|
531
|
+
* Clears the message field making it undefined.
|
|
532
|
+
* @return {!proto.TimeData} returns this
|
|
533
|
+
*/
|
|
534
|
+
proto.TimeData.prototype.clearSimulationtime = function() {
|
|
535
|
+
return this.setSimulationtime(undefined);
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Returns whether this field is set.
|
|
541
|
+
* @return {boolean}
|
|
542
|
+
*/
|
|
543
|
+
proto.TimeData.prototype.hasSimulationtime = function() {
|
|
544
|
+
return jspb.Message.getField(this, 2) != null;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* optional Value customTime = 3;
|
|
550
|
+
* @return {?proto.Value}
|
|
265
551
|
*/
|
|
266
552
|
proto.TimeData.prototype.getCustomtime = function() {
|
|
267
|
-
return /** @type
|
|
553
|
+
return /** @type{?proto.Value} */ (
|
|
554
|
+
jspb.Message.getWrapperField(this, proto.Value, 3));
|
|
268
555
|
};
|
|
269
556
|
|
|
270
557
|
|
|
271
558
|
/**
|
|
272
|
-
* @param {
|
|
559
|
+
* @param {?proto.Value|undefined} value
|
|
273
560
|
* @return {!proto.TimeData} returns this
|
|
274
|
-
|
|
561
|
+
*/
|
|
275
562
|
proto.TimeData.prototype.setCustomtime = function(value) {
|
|
276
|
-
return jspb.Message.
|
|
563
|
+
return jspb.Message.setWrapperField(this, 3, value);
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Clears the message field making it undefined.
|
|
569
|
+
* @return {!proto.TimeData} returns this
|
|
570
|
+
*/
|
|
571
|
+
proto.TimeData.prototype.clearCustomtime = function() {
|
|
572
|
+
return this.setCustomtime(undefined);
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Returns whether this field is set.
|
|
578
|
+
* @return {boolean}
|
|
579
|
+
*/
|
|
580
|
+
proto.TimeData.prototype.hasCustomtime = function() {
|
|
581
|
+
return jspb.Message.getField(this, 3) != null;
|
|
277
582
|
};
|
|
278
583
|
|
|
279
584
|
|
|
@@ -283,7 +588,7 @@ proto.TimeData.prototype.setCustomtime = function(value) {
|
|
|
283
588
|
* @private {!Array<number>}
|
|
284
589
|
* @const
|
|
285
590
|
*/
|
|
286
|
-
proto.SeriesData.repeatedFields_ = [
|
|
591
|
+
proto.SeriesData.repeatedFields_ = [3];
|
|
287
592
|
|
|
288
593
|
|
|
289
594
|
|
|
@@ -316,8 +621,10 @@ proto.SeriesData.prototype.toObject = function(opt_includeInstance) {
|
|
|
316
621
|
*/
|
|
317
622
|
proto.SeriesData.toObject = function(includeInstance, msg) {
|
|
318
623
|
var f, obj = {
|
|
319
|
-
|
|
320
|
-
|
|
624
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
625
|
+
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
626
|
+
valueList: jspb.Message.toObjectList(msg.getValueList(),
|
|
627
|
+
proto.Value.toObject, includeInstance)
|
|
321
628
|
};
|
|
322
629
|
|
|
323
630
|
if (includeInstance) {
|
|
@@ -356,13 +663,16 @@ proto.SeriesData.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
356
663
|
switch (field) {
|
|
357
664
|
case 1:
|
|
358
665
|
var value = /** @type {string} */ (reader.readString());
|
|
359
|
-
msg.
|
|
666
|
+
msg.setId(value);
|
|
360
667
|
break;
|
|
361
668
|
case 2:
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
669
|
+
var value = /** @type {string} */ (reader.readString());
|
|
670
|
+
msg.setName(value);
|
|
671
|
+
break;
|
|
672
|
+
case 3:
|
|
673
|
+
var value = new proto.Value;
|
|
674
|
+
reader.readMessage(value,proto.Value.deserializeBinaryFromReader);
|
|
675
|
+
msg.addValue(value);
|
|
366
676
|
break;
|
|
367
677
|
default:
|
|
368
678
|
reader.skipField();
|
|
@@ -393,28 +703,36 @@ proto.SeriesData.prototype.serializeBinary = function() {
|
|
|
393
703
|
*/
|
|
394
704
|
proto.SeriesData.serializeBinaryToWriter = function(message, writer) {
|
|
395
705
|
var f = undefined;
|
|
396
|
-
f = message.
|
|
706
|
+
f = message.getId();
|
|
397
707
|
if (f.length > 0) {
|
|
398
708
|
writer.writeString(
|
|
399
709
|
1,
|
|
400
710
|
f
|
|
401
711
|
);
|
|
402
712
|
}
|
|
403
|
-
f = message.
|
|
713
|
+
f = message.getName();
|
|
404
714
|
if (f.length > 0) {
|
|
405
|
-
writer.
|
|
715
|
+
writer.writeString(
|
|
406
716
|
2,
|
|
407
717
|
f
|
|
408
718
|
);
|
|
409
719
|
}
|
|
720
|
+
f = message.getValueList();
|
|
721
|
+
if (f.length > 0) {
|
|
722
|
+
writer.writeRepeatedMessage(
|
|
723
|
+
3,
|
|
724
|
+
f,
|
|
725
|
+
proto.Value.serializeBinaryToWriter
|
|
726
|
+
);
|
|
727
|
+
}
|
|
410
728
|
};
|
|
411
729
|
|
|
412
730
|
|
|
413
731
|
/**
|
|
414
|
-
* optional string
|
|
732
|
+
* optional string id = 1;
|
|
415
733
|
* @return {string}
|
|
416
734
|
*/
|
|
417
|
-
proto.SeriesData.prototype.
|
|
735
|
+
proto.SeriesData.prototype.getId = function() {
|
|
418
736
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
419
737
|
};
|
|
420
738
|
|
|
@@ -423,36 +741,55 @@ proto.SeriesData.prototype.getName = function() {
|
|
|
423
741
|
* @param {string} value
|
|
424
742
|
* @return {!proto.SeriesData} returns this
|
|
425
743
|
*/
|
|
426
|
-
proto.SeriesData.prototype.
|
|
744
|
+
proto.SeriesData.prototype.setId = function(value) {
|
|
427
745
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
428
746
|
};
|
|
429
747
|
|
|
430
748
|
|
|
431
749
|
/**
|
|
432
|
-
*
|
|
433
|
-
* @return {
|
|
750
|
+
* optional string name = 2;
|
|
751
|
+
* @return {string}
|
|
434
752
|
*/
|
|
435
|
-
proto.SeriesData.prototype.
|
|
436
|
-
return /** @type {
|
|
753
|
+
proto.SeriesData.prototype.getName = function() {
|
|
754
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
437
755
|
};
|
|
438
756
|
|
|
439
757
|
|
|
440
758
|
/**
|
|
441
|
-
* @param {
|
|
759
|
+
* @param {string} value
|
|
442
760
|
* @return {!proto.SeriesData} returns this
|
|
443
761
|
*/
|
|
762
|
+
proto.SeriesData.prototype.setName = function(value) {
|
|
763
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* repeated Value value = 3;
|
|
769
|
+
* @return {!Array<!proto.Value>}
|
|
770
|
+
*/
|
|
771
|
+
proto.SeriesData.prototype.getValueList = function() {
|
|
772
|
+
return /** @type{!Array<!proto.Value>} */ (
|
|
773
|
+
jspb.Message.getRepeatedWrapperField(this, proto.Value, 3));
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* @param {!Array<!proto.Value>} value
|
|
779
|
+
* @return {!proto.SeriesData} returns this
|
|
780
|
+
*/
|
|
444
781
|
proto.SeriesData.prototype.setValueList = function(value) {
|
|
445
|
-
return jspb.Message.
|
|
782
|
+
return jspb.Message.setRepeatedWrapperField(this, 3, value);
|
|
446
783
|
};
|
|
447
784
|
|
|
448
785
|
|
|
449
786
|
/**
|
|
450
|
-
* @param {
|
|
787
|
+
* @param {!proto.Value=} opt_value
|
|
451
788
|
* @param {number=} opt_index
|
|
452
|
-
* @return {!proto.
|
|
789
|
+
* @return {!proto.Value}
|
|
453
790
|
*/
|
|
454
|
-
proto.SeriesData.prototype.addValue = function(
|
|
455
|
-
return jspb.Message.
|
|
791
|
+
proto.SeriesData.prototype.addValue = function(opt_value, opt_index) {
|
|
792
|
+
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Value, opt_index);
|
|
456
793
|
};
|
|
457
794
|
|
|
458
795
|
|