@m4l/gclick-realtime 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/constants.d.ts +2 -1
- package/contracts/constants.d.ts.map +1 -1
- package/contracts/constants.js +1 -1
- package/contracts/deviceData.d.ts +30 -20
- package/contracts/deviceData.d.ts.map +1 -1
- package/contracts/deviceDetail.d.ts +71 -0
- package/contracts/deviceDetail.d.ts.map +1 -0
- package/contracts/index.d.ts +3 -2
- package/contracts/index.d.ts.map +1 -1
- package/contracts/vpts.d.ts +84 -27
- package/contracts/vpts.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.d.ts +1 -1
- package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.js +14 -10
- package/dummy/catalogs/blueprints.d.ts +8 -8
- package/dummy/catalogs/blueprints.js +40 -40
- package/dummy/catalogs/plans.d.ts +14 -0
- package/dummy/catalogs/plans.d.ts.map +1 -1
- package/dummy/catalogs/plans.js +34 -6
- package/dummy/catalogs/scenarios.d.ts +73 -0
- package/dummy/catalogs/scenarios.d.ts.map +1 -1
- package/dummy/catalogs/scenarios.js +80 -0
- package/dummy/runtime/dummy.d.ts.map +1 -1
- package/dummy/runtime/dummy.js +27 -24
- package/dummy/runtime/simulation.d.ts.map +1 -1
- package/dummy/runtime/simulation.js +349 -325
- package/dummy/shared/types.d.ts +6 -1
- package/dummy/shared/types.d.ts.map +1 -1
- package/fixtures/constants.d.ts +11 -2
- package/fixtures/constants.d.ts.map +1 -1
- package/fixtures/constants.js +15 -2
- package/fixtures/scenarios.d.ts +36 -0
- package/fixtures/scenarios.d.ts.map +1 -1
- package/fixtures/scenarios.js +36 -0
- package/fixtures/types.d.ts +2 -1
- package/fixtures/types.d.ts.map +1 -1
- package/fixtures/types.js +1 -1
- package/package.json +1 -1
- package/payload/getVptValueWithGuard.js +1 -1
- package/web/host/hostRuntime.d.ts.map +1 -1
- package/web/host/hostRuntime.js +13 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { group3 as
|
|
1
|
+
import { group3 as r, group7 as n, group6 as a, group5 as i, group4 as c, group2 as _, group1 as l, groupForest as p } from "./group.js";
|
|
2
2
|
import { REAL_TIME_DUMMY_DEFAULT_ICON_ID as d } from "./baseDeviceTemplate.js";
|
|
3
|
-
const
|
|
4
|
-
HEAVY_TRUCK: "
|
|
3
|
+
const e = {
|
|
4
|
+
HEAVY_TRUCK: "i_common_devices_type_heavy_truck",
|
|
5
5
|
LIGHT_TRUCK: d,
|
|
6
|
-
MOTORCYCLE: "
|
|
7
|
-
SEDAN: "
|
|
8
|
-
TRUCK_TRACTOR: "
|
|
9
|
-
VAN: "
|
|
10
|
-
},
|
|
6
|
+
MOTORCYCLE: "i_common_devices_type_motorcycle",
|
|
7
|
+
SEDAN: "i_common_devices_type_sedan",
|
|
8
|
+
TRUCK_TRACTOR: "i_common_devices_type_truck_tractor",
|
|
9
|
+
VAN: "i_common_devices_type_van"
|
|
10
|
+
}, g = [
|
|
11
11
|
1e4,
|
|
12
12
|
10001,
|
|
13
13
|
10002,
|
|
@@ -24,7 +24,7 @@ function o(t) {
|
|
|
24
24
|
name: t.name
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
const
|
|
27
|
+
const C = {
|
|
28
28
|
forest_truck: {
|
|
29
29
|
active: !1,
|
|
30
30
|
alias: "North ridge",
|
|
@@ -32,7 +32,7 @@ const s = {
|
|
|
32
32
|
department: o(p),
|
|
33
33
|
group: p,
|
|
34
34
|
iconBgColor: p.bgColor,
|
|
35
|
-
iconId:
|
|
35
|
+
iconId: e.HEAVY_TRUCK,
|
|
36
36
|
name: "Atlas 01",
|
|
37
37
|
settingsPatch: {
|
|
38
38
|
properties: {
|
|
@@ -46,37 +46,37 @@ const s = {
|
|
|
46
46
|
orchid_van: {
|
|
47
47
|
alias: "Industrial belt",
|
|
48
48
|
blueprintId: "orchid_van",
|
|
49
|
-
department: o(
|
|
50
|
-
group:
|
|
51
|
-
iconBgColor:
|
|
52
|
-
iconId:
|
|
49
|
+
department: o(l),
|
|
50
|
+
group: l,
|
|
51
|
+
iconBgColor: l.bgColor,
|
|
52
|
+
iconId: e.VAN,
|
|
53
53
|
name: "Orchid Van"
|
|
54
54
|
},
|
|
55
55
|
teal_pickup: {
|
|
56
56
|
alias: "Delivery east",
|
|
57
57
|
blueprintId: "teal_pickup",
|
|
58
|
-
department: o(
|
|
59
|
-
group:
|
|
60
|
-
iconBgColor:
|
|
61
|
-
iconId:
|
|
58
|
+
department: o(_),
|
|
59
|
+
group: _,
|
|
60
|
+
iconBgColor: _.bgColor,
|
|
61
|
+
iconId: e.LIGHT_TRUCK,
|
|
62
62
|
name: "Teal Pickup"
|
|
63
63
|
},
|
|
64
64
|
charcoal_sedan: {
|
|
65
65
|
alias: "Central commute",
|
|
66
66
|
blueprintId: "charcoal_sedan",
|
|
67
|
-
department: o(
|
|
68
|
-
group:
|
|
69
|
-
iconBgColor:
|
|
70
|
-
iconId:
|
|
67
|
+
department: o(r),
|
|
68
|
+
group: r,
|
|
69
|
+
iconBgColor: r.bgColor,
|
|
70
|
+
iconId: e.SEDAN,
|
|
71
71
|
name: "Charcoal Sedan"
|
|
72
72
|
},
|
|
73
73
|
sand_box_truck: {
|
|
74
74
|
alias: "Warehouse south",
|
|
75
75
|
blueprintId: "sand_box_truck",
|
|
76
|
-
department: o(
|
|
77
|
-
group:
|
|
78
|
-
iconBgColor:
|
|
79
|
-
iconId:
|
|
76
|
+
department: o(c),
|
|
77
|
+
group: c,
|
|
78
|
+
iconBgColor: c.bgColor,
|
|
79
|
+
iconId: e.HEAVY_TRUCK,
|
|
80
80
|
name: "Sand Box"
|
|
81
81
|
},
|
|
82
82
|
yellow_service: {
|
|
@@ -85,38 +85,38 @@ const s = {
|
|
|
85
85
|
department: o(i),
|
|
86
86
|
group: i,
|
|
87
87
|
iconBgColor: i.bgColor,
|
|
88
|
-
iconId:
|
|
88
|
+
iconId: e.MOTORCYCLE,
|
|
89
89
|
name: "Service 07"
|
|
90
90
|
},
|
|
91
91
|
red_tractor: {
|
|
92
92
|
alias: "Yard cycle",
|
|
93
93
|
blueprintId: "red_tractor",
|
|
94
|
-
department: o(
|
|
95
|
-
group:
|
|
96
|
-
iconBgColor:
|
|
97
|
-
iconId:
|
|
94
|
+
department: o(a),
|
|
95
|
+
group: a,
|
|
96
|
+
iconBgColor: a.bgColor,
|
|
97
|
+
iconId: e.TRUCK_TRACTOR,
|
|
98
98
|
name: "Red Tractor"
|
|
99
99
|
},
|
|
100
100
|
blue_city_car: {
|
|
101
101
|
alias: "City shuttle",
|
|
102
102
|
blueprintId: "blue_city_car",
|
|
103
|
-
department: o(
|
|
104
|
-
group:
|
|
105
|
-
iconBgColor:
|
|
106
|
-
iconId:
|
|
103
|
+
department: o(n),
|
|
104
|
+
group: n,
|
|
105
|
+
iconBgColor: n.bgColor,
|
|
106
|
+
iconId: e.SEDAN,
|
|
107
107
|
name: "Blue City"
|
|
108
108
|
},
|
|
109
109
|
bootstrap_pending_icon: {
|
|
110
110
|
alias: "Catalog pending",
|
|
111
111
|
blueprintId: "bootstrap_pending_icon",
|
|
112
|
-
department: o(
|
|
113
|
-
group:
|
|
114
|
-
iconBgColor:
|
|
112
|
+
department: o(r),
|
|
113
|
+
group: r,
|
|
114
|
+
iconBgColor: r.bgColor,
|
|
115
115
|
name: "Bootstrap Pending",
|
|
116
116
|
omitDeviceIcon: !0
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
C as REAL_TIME_DUMMY_DEVICE_BLUEPRINTS,
|
|
121
|
+
g as REAL_TIME_DUMMY_DEVICE_IDS
|
|
122
122
|
};
|
|
@@ -46,6 +46,20 @@ export declare const REAL_TIME_DUMMY_EXECUTION_PLANS: {
|
|
|
46
46
|
google_envigado_status_cycle_beta: RealTimeDummyExecutionPlan;
|
|
47
47
|
google_envigado_status_cycle_gamma: RealTimeDummyExecutionPlan;
|
|
48
48
|
google_envigado_status_cycle_delta: RealTimeDummyExecutionPlan;
|
|
49
|
+
always_not_detectable_preview: {
|
|
50
|
+
description: string;
|
|
51
|
+
intendedUseCase: string;
|
|
52
|
+
name: string;
|
|
53
|
+
phases: {
|
|
54
|
+
description: string;
|
|
55
|
+
durationSeconds: number;
|
|
56
|
+
ignition: false;
|
|
57
|
+
motionStatus: GNSSEnumMotionStatus.notDetectable;
|
|
58
|
+
signal: GNSSEnumSignal.noSignal;
|
|
59
|
+
type: "idle";
|
|
60
|
+
}[];
|
|
61
|
+
planId: string;
|
|
62
|
+
};
|
|
49
63
|
single_marker_motion_probe: {
|
|
50
64
|
description: string;
|
|
51
65
|
intendedUseCase: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/plans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,cAAc,EACf,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/plans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAyH/B;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkXU,CAAC;AAEvD,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,+BAA+B,CAAC"}
|
package/dummy/catalogs/plans.js
CHANGED
|
@@ -2,14 +2,14 @@ import { GNSSEnumMotionStatus as e, GNSSEnumSignal as t } from "../../contracts/
|
|
|
2
2
|
function i({
|
|
3
3
|
description: n,
|
|
4
4
|
durations: o,
|
|
5
|
-
intendedUseCase:
|
|
6
|
-
name:
|
|
5
|
+
intendedUseCase: a,
|
|
6
|
+
name: s,
|
|
7
7
|
planId: r
|
|
8
8
|
}) {
|
|
9
9
|
return {
|
|
10
10
|
description: n,
|
|
11
|
-
intendedUseCase:
|
|
12
|
-
name:
|
|
11
|
+
intendedUseCase: a,
|
|
12
|
+
name: s,
|
|
13
13
|
phases: [
|
|
14
14
|
{
|
|
15
15
|
description: "Leave the local staging point and enter the first urban leg at a moderate movement speed.",
|
|
@@ -65,6 +65,14 @@ function i({
|
|
|
65
65
|
motionStatus: e.powerSaving,
|
|
66
66
|
type: "idle"
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
description: "Keep the unit parked with no reliable GPS detectability so filters, chips, and panel indicators can inspect the explicit fallback state.",
|
|
70
|
+
durationSeconds: o.notDetectableSeconds,
|
|
71
|
+
ignition: !1,
|
|
72
|
+
motionStatus: e.notDetectable,
|
|
73
|
+
signal: t.noSignal,
|
|
74
|
+
type: "idle"
|
|
75
|
+
},
|
|
68
76
|
{
|
|
69
77
|
description: "Move briefly in towing mode with ignition off so the map and panel can show that exceptional motion state.",
|
|
70
78
|
durationSeconds: o.towingSeconds,
|
|
@@ -86,7 +94,7 @@ function i({
|
|
|
86
94
|
planId: r
|
|
87
95
|
};
|
|
88
96
|
}
|
|
89
|
-
const
|
|
97
|
+
const l = {
|
|
90
98
|
corridor_express: {
|
|
91
99
|
description: "Long corridor drive with one brief scheduled stop before the final approach.",
|
|
92
100
|
intendedUseCase: "Validate steady movement, heading updates, and one short stop on faster avenues.",
|
|
@@ -164,6 +172,7 @@ const p = {
|
|
|
164
172
|
movingApproachSeconds: 66,
|
|
165
173
|
movingDepartureSeconds: 84,
|
|
166
174
|
movingRecoverySeconds: 81,
|
|
175
|
+
notDetectableSeconds: 12,
|
|
167
176
|
offSeconds: 18,
|
|
168
177
|
powerSavingSeconds: 15,
|
|
169
178
|
stoppedExcesiveRalentiSeconds: 21,
|
|
@@ -182,6 +191,7 @@ const p = {
|
|
|
182
191
|
movingApproachSeconds: 72,
|
|
183
192
|
movingDepartureSeconds: 75,
|
|
184
193
|
movingRecoverySeconds: 78,
|
|
194
|
+
notDetectableSeconds: 12,
|
|
185
195
|
offSeconds: 15,
|
|
186
196
|
powerSavingSeconds: 12,
|
|
187
197
|
stoppedExcesiveRalentiSeconds: 27,
|
|
@@ -200,6 +210,7 @@ const p = {
|
|
|
200
210
|
movingApproachSeconds: 84,
|
|
201
211
|
movingDepartureSeconds: 90,
|
|
202
212
|
movingRecoverySeconds: 87,
|
|
213
|
+
notDetectableSeconds: 9,
|
|
203
214
|
offSeconds: 12,
|
|
204
215
|
powerSavingSeconds: 12,
|
|
205
216
|
stoppedExcesiveRalentiSeconds: 18,
|
|
@@ -218,6 +229,7 @@ const p = {
|
|
|
218
229
|
movingApproachSeconds: 60,
|
|
219
230
|
movingDepartureSeconds: 69,
|
|
220
231
|
movingRecoverySeconds: 72,
|
|
232
|
+
notDetectableSeconds: 18,
|
|
221
233
|
offSeconds: 24,
|
|
222
234
|
powerSavingSeconds: 24,
|
|
223
235
|
stoppedExcesiveRalentiSeconds: 24,
|
|
@@ -229,6 +241,22 @@ const p = {
|
|
|
229
241
|
name: "Envigado state cycle delta",
|
|
230
242
|
planId: "google_envigado_status_cycle_delta"
|
|
231
243
|
}),
|
|
244
|
+
always_not_detectable_preview: {
|
|
245
|
+
description: "Single-device preview plan that keeps one marker parked with valid coordinates while staying permanently not detectable.",
|
|
246
|
+
intendedUseCase: "Guarantee that the default multi-zone manual-review preset always exposes the explicit no-GPS-positioning state without waiting for a rotating fleet dwell.",
|
|
247
|
+
name: "Always not-detectable preview",
|
|
248
|
+
phases: [
|
|
249
|
+
{
|
|
250
|
+
description: "Keep the preview vehicle parked with coordinates intact while GNSS remains explicitly not detectable and without signal.",
|
|
251
|
+
durationSeconds: 720,
|
|
252
|
+
ignition: !1,
|
|
253
|
+
motionStatus: e.notDetectable,
|
|
254
|
+
signal: t.noSignal,
|
|
255
|
+
type: "idle"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
planId: "always_not_detectable_preview"
|
|
259
|
+
},
|
|
232
260
|
single_marker_motion_probe: {
|
|
233
261
|
description: "Single-marker probe plan with continuous movement only, calibrated for deterministic browser fluency tests focused on marker motion and comet quality.",
|
|
234
262
|
intendedUseCase: "Validate one selected device end to end in Chrome or Playwright without stops, idle windows, or motion-state transitions contaminating the comet and interpolation analysis.",
|
|
@@ -438,5 +466,5 @@ const p = {
|
|
|
438
466
|
}
|
|
439
467
|
};
|
|
440
468
|
export {
|
|
441
|
-
|
|
469
|
+
l as REAL_TIME_DUMMY_EXECUTION_PLANS
|
|
442
470
|
};
|
|
@@ -195,6 +195,79 @@ export declare const REAL_TIME_DUMMY_SCENARIOS: {
|
|
|
195
195
|
};
|
|
196
196
|
readonly scenarioId: "google_envigado_swarm_preview";
|
|
197
197
|
};
|
|
198
|
+
readonly missing_position_preview: {
|
|
199
|
+
readonly devices: [{
|
|
200
|
+
readonly alias: "No Position 00";
|
|
201
|
+
readonly blueprintId: "blue_city_car";
|
|
202
|
+
readonly name: "No Position Preview 00";
|
|
203
|
+
readonly omittedGnssFields: {
|
|
204
|
+
readonly gnssLatitude: true;
|
|
205
|
+
readonly gnssLongitude: true;
|
|
206
|
+
};
|
|
207
|
+
readonly planId: "google_envigado_status_cycle_alpha";
|
|
208
|
+
readonly playbackOffsetSeconds: 0;
|
|
209
|
+
readonly resourceSerialId: 9999;
|
|
210
|
+
readonly routeId: "google_envigado_civic_loop_pm";
|
|
211
|
+
}];
|
|
212
|
+
readonly name: "Missing-position preview";
|
|
213
|
+
readonly playback: {
|
|
214
|
+
readonly framesPerTick: 1;
|
|
215
|
+
readonly intervalMs: 3000;
|
|
216
|
+
readonly logicalSampleSeconds: 3;
|
|
217
|
+
readonly loop: true;
|
|
218
|
+
};
|
|
219
|
+
readonly scenarioId: "missing_position_preview";
|
|
220
|
+
};
|
|
221
|
+
readonly not_detectable_preview: {
|
|
222
|
+
readonly devices: [{
|
|
223
|
+
readonly alias: "No GPS 00";
|
|
224
|
+
readonly blueprintId: "charcoal_sedan";
|
|
225
|
+
readonly name: "Not Detectable Preview 00";
|
|
226
|
+
readonly planId: "always_not_detectable_preview";
|
|
227
|
+
readonly playbackOffsetSeconds: 0;
|
|
228
|
+
readonly resourceSerialId: 9998;
|
|
229
|
+
readonly routeId: "google_envigado_intermedia_loop_pm_parque_start";
|
|
230
|
+
}];
|
|
231
|
+
readonly name: "Not-detectable preview";
|
|
232
|
+
readonly playback: {
|
|
233
|
+
readonly framesPerTick: 1;
|
|
234
|
+
readonly intervalMs: 3000;
|
|
235
|
+
readonly logicalSampleSeconds: 3;
|
|
236
|
+
readonly loop: true;
|
|
237
|
+
};
|
|
238
|
+
readonly scenarioId: "not_detectable_preview";
|
|
239
|
+
};
|
|
240
|
+
readonly selection_no_position_probe: {
|
|
241
|
+
readonly devices: [{
|
|
242
|
+
readonly alias: "Selection Probe 01";
|
|
243
|
+
readonly blueprintId: "forest_truck";
|
|
244
|
+
readonly name: "Selection Follow Probe 01";
|
|
245
|
+
readonly planId: "google_envigado_status_cycle_alpha";
|
|
246
|
+
readonly playbackOffsetSeconds: 0;
|
|
247
|
+
readonly resourceSerialId: 18000;
|
|
248
|
+
readonly routeId: "google_envigado_civic_loop_pm";
|
|
249
|
+
}, {
|
|
250
|
+
readonly alias: "Selection Probe 02";
|
|
251
|
+
readonly blueprintId: "blue_city_car";
|
|
252
|
+
readonly name: "Selection No Position Probe 02";
|
|
253
|
+
readonly omittedGnssFields: {
|
|
254
|
+
readonly gnssLatitude: true;
|
|
255
|
+
readonly gnssLongitude: true;
|
|
256
|
+
};
|
|
257
|
+
readonly planId: "google_envigado_status_cycle_beta";
|
|
258
|
+
readonly playbackOffsetSeconds: 6;
|
|
259
|
+
readonly resourceSerialId: 18001;
|
|
260
|
+
readonly routeId: "google_envigado_intermedia_loop_pm";
|
|
261
|
+
}];
|
|
262
|
+
readonly name: "Selection no-position probe";
|
|
263
|
+
readonly playback: {
|
|
264
|
+
readonly framesPerTick: 1;
|
|
265
|
+
readonly intervalMs: 1000;
|
|
266
|
+
readonly logicalSampleSeconds: 3;
|
|
267
|
+
readonly loop: true;
|
|
268
|
+
};
|
|
269
|
+
readonly scenarioId: "selection_no_position_probe";
|
|
270
|
+
};
|
|
198
271
|
readonly malformed_coordinate_probe: {
|
|
199
272
|
readonly devices: [{
|
|
200
273
|
readonly alias: "Malformed Probe 01";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/scenarios.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,gCAAgC;;;;;CAKQ,CAAC;AAoEtD;;GAEG;AACH,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/catalogs/scenarios.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,gCAAgC;;;;;CAKQ,CAAC;AAoEtD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0VqC,CAAC;AAE5E,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAE7E,eAAO,MAAM,mCAAmC,EAAE,uBAA4C,CAAC"}
|
|
@@ -121,6 +121,86 @@ const r = {
|
|
|
121
121
|
},
|
|
122
122
|
scenarioId: "google_envigado_swarm_preview"
|
|
123
123
|
},
|
|
124
|
+
missing_position_preview: {
|
|
125
|
+
devices: [
|
|
126
|
+
{
|
|
127
|
+
alias: "No Position 00",
|
|
128
|
+
blueprintId: "blue_city_car",
|
|
129
|
+
name: "No Position Preview 00",
|
|
130
|
+
omittedGnssFields: {
|
|
131
|
+
gnssLatitude: !0,
|
|
132
|
+
gnssLongitude: !0
|
|
133
|
+
},
|
|
134
|
+
planId: "google_envigado_status_cycle_alpha",
|
|
135
|
+
playbackOffsetSeconds: 0,
|
|
136
|
+
resourceSerialId: 9999,
|
|
137
|
+
routeId: "google_envigado_civic_loop_pm"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
name: "Missing-position preview",
|
|
141
|
+
playback: {
|
|
142
|
+
framesPerTick: 1,
|
|
143
|
+
intervalMs: 3e3,
|
|
144
|
+
logicalSampleSeconds: 3,
|
|
145
|
+
loop: !0
|
|
146
|
+
},
|
|
147
|
+
scenarioId: "missing_position_preview"
|
|
148
|
+
},
|
|
149
|
+
not_detectable_preview: {
|
|
150
|
+
devices: [
|
|
151
|
+
{
|
|
152
|
+
alias: "No GPS 00",
|
|
153
|
+
blueprintId: "charcoal_sedan",
|
|
154
|
+
name: "Not Detectable Preview 00",
|
|
155
|
+
planId: "always_not_detectable_preview",
|
|
156
|
+
playbackOffsetSeconds: 0,
|
|
157
|
+
resourceSerialId: 9998,
|
|
158
|
+
routeId: "google_envigado_intermedia_loop_pm_parque_start"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
name: "Not-detectable preview",
|
|
162
|
+
playback: {
|
|
163
|
+
framesPerTick: 1,
|
|
164
|
+
intervalMs: 3e3,
|
|
165
|
+
logicalSampleSeconds: 3,
|
|
166
|
+
loop: !0
|
|
167
|
+
},
|
|
168
|
+
scenarioId: "not_detectable_preview"
|
|
169
|
+
},
|
|
170
|
+
selection_no_position_probe: {
|
|
171
|
+
devices: [
|
|
172
|
+
{
|
|
173
|
+
alias: "Selection Probe 01",
|
|
174
|
+
blueprintId: "forest_truck",
|
|
175
|
+
name: "Selection Follow Probe 01",
|
|
176
|
+
planId: "google_envigado_status_cycle_alpha",
|
|
177
|
+
playbackOffsetSeconds: 0,
|
|
178
|
+
resourceSerialId: 18e3,
|
|
179
|
+
routeId: "google_envigado_civic_loop_pm"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
alias: "Selection Probe 02",
|
|
183
|
+
blueprintId: "blue_city_car",
|
|
184
|
+
name: "Selection No Position Probe 02",
|
|
185
|
+
omittedGnssFields: {
|
|
186
|
+
gnssLatitude: !0,
|
|
187
|
+
gnssLongitude: !0
|
|
188
|
+
},
|
|
189
|
+
planId: "google_envigado_status_cycle_beta",
|
|
190
|
+
playbackOffsetSeconds: 6,
|
|
191
|
+
resourceSerialId: 18001,
|
|
192
|
+
routeId: "google_envigado_intermedia_loop_pm"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
name: "Selection no-position probe",
|
|
196
|
+
playback: {
|
|
197
|
+
framesPerTick: 1,
|
|
198
|
+
intervalMs: 1e3,
|
|
199
|
+
logicalSampleSeconds: 3,
|
|
200
|
+
loop: !0
|
|
201
|
+
},
|
|
202
|
+
scenarioId: "selection_no_position_probe"
|
|
203
|
+
},
|
|
124
204
|
malformed_coordinate_probe: {
|
|
125
205
|
devices: [
|
|
126
206
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/runtime/dummy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"dummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/runtime/dummy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAwcvD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IACjD,OAAO,CAAC,kBAAkB,CAAuD;IAEjF,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,eAAe,CAAqC;IAE5D;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA+BjC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAsBtB;;OAEG;IACH,KAAK,IAAI,IAAI;IAgDb;;OAEG;IACH,IAAI,IAAI,IAAI;CASb;AAED,eAAe,eAAe,CAAC"}
|
package/dummy/runtime/dummy.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SourceDataBase as
|
|
2
|
-
import { buildRealTimeDummyRuntimeModel as
|
|
3
|
-
import
|
|
1
|
+
import { SourceDataBase as b } from "@m4l/realtime-runtime";
|
|
2
|
+
import { buildRealTimeDummyRuntimeModel as D } from "./simulation.js";
|
|
3
|
+
import _ from "../../node_modules/lodash-es/cloneDeep.js";
|
|
4
4
|
const y = [
|
|
5
5
|
"gnssCourse",
|
|
6
6
|
"gnssLatitude",
|
|
@@ -8,7 +8,7 @@ const y = [
|
|
|
8
8
|
"gnssSpeed"
|
|
9
9
|
];
|
|
10
10
|
let p = null;
|
|
11
|
-
function
|
|
11
|
+
function S() {
|
|
12
12
|
const e = globalThis;
|
|
13
13
|
return e.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__ || (e.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__ = {
|
|
14
14
|
getState() {
|
|
@@ -22,8 +22,8 @@ function k() {
|
|
|
22
22
|
}
|
|
23
23
|
}), e.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
p = e,
|
|
25
|
+
function m(e) {
|
|
26
|
+
p = e, S();
|
|
27
27
|
}
|
|
28
28
|
function u(e, t) {
|
|
29
29
|
return {
|
|
@@ -122,7 +122,10 @@ function f(e, t, s) {
|
|
|
122
122
|
a.value,
|
|
123
123
|
s
|
|
124
124
|
);
|
|
125
|
-
}), e.vpts?.
|
|
125
|
+
}), e.vpts?.vptNetwork && (e.vpts.vptNetwork.lastConnection && (e.vpts.vptNetwork.lastConnection = i), e.vpts.vptNetwork.lastEvent && (e.vpts.vptNetwork.lastEvent = {
|
|
126
|
+
...e.vpts.vptNetwork.lastEvent,
|
|
127
|
+
date: i
|
|
128
|
+
})), e;
|
|
126
129
|
}
|
|
127
130
|
function I(e, t, s) {
|
|
128
131
|
if (e.type === "delete")
|
|
@@ -140,10 +143,10 @@ function I(e, t, s) {
|
|
|
140
143
|
function d(e, t) {
|
|
141
144
|
return e.initialHashResources?.[t.resourceSerialId] ? t.initialMessageIndex : 0;
|
|
142
145
|
}
|
|
143
|
-
function
|
|
146
|
+
function P(e, t) {
|
|
144
147
|
return e.emissionOffsetMs <= 0 ? t : e.emissionOffsetMs;
|
|
145
148
|
}
|
|
146
|
-
function
|
|
149
|
+
function E(e, t, s, i, r) {
|
|
147
150
|
const a = [];
|
|
148
151
|
let n = s.get(t.resourceSerialId) ?? d(e, t);
|
|
149
152
|
for (let o = 0; o < i; o += 1) {
|
|
@@ -155,15 +158,15 @@ function P(e, t, s, i, r) {
|
|
|
155
158
|
const c = t.messages[n];
|
|
156
159
|
if (!c)
|
|
157
160
|
break;
|
|
158
|
-
a.push(
|
|
161
|
+
a.push(_(c)), n += 1;
|
|
159
162
|
}
|
|
160
163
|
return s.set(t.resourceSerialId, n), a;
|
|
161
164
|
}
|
|
162
|
-
function
|
|
165
|
+
function M(e, t) {
|
|
163
166
|
return e.every((s) => (t.get(s.resourceSerialId) ?? 0) >= s.messages.length);
|
|
164
167
|
}
|
|
165
168
|
function T(e, t, s, i, r, a, n) {
|
|
166
|
-
const o = Date.now(), c =
|
|
169
|
+
const o = Date.now(), c = E(
|
|
167
170
|
e,
|
|
168
171
|
t,
|
|
169
172
|
s,
|
|
@@ -171,18 +174,18 @@ function T(e, t, s, i, r, a, n) {
|
|
|
171
174
|
a
|
|
172
175
|
);
|
|
173
176
|
if (c.length) {
|
|
174
|
-
const
|
|
177
|
+
const v = i.get(t.resourceSerialId);
|
|
175
178
|
n(
|
|
176
179
|
e.resourceTypeId,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
v ? c.map((k) => I(
|
|
181
|
+
k,
|
|
182
|
+
v,
|
|
180
183
|
o
|
|
181
184
|
)) : c
|
|
182
185
|
);
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
|
-
class
|
|
188
|
+
class K extends b {
|
|
186
189
|
deviceSchedulerIds = /* @__PURE__ */ new Map();
|
|
187
190
|
isPlaybackPaused = !1;
|
|
188
191
|
playbackRuntime = null;
|
|
@@ -229,7 +232,7 @@ class x extends D {
|
|
|
229
232
|
s.runtime.playback.framesPerTick,
|
|
230
233
|
s.runtime.playback.loop,
|
|
231
234
|
this.onMessages
|
|
232
|
-
), !s.runtime.playback.loop &&
|
|
235
|
+
), !s.runtime.playback.loop && M(
|
|
233
236
|
s.runtime.devices,
|
|
234
237
|
s.nextMessageIndexes
|
|
235
238
|
)) {
|
|
@@ -271,7 +274,7 @@ class x extends D {
|
|
|
271
274
|
*/
|
|
272
275
|
start() {
|
|
273
276
|
this.stop();
|
|
274
|
-
const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), i =
|
|
277
|
+
const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), i = D(t.simulation, {
|
|
275
278
|
wallClockStartAtMs: s
|
|
276
279
|
}), r = new Map(
|
|
277
280
|
i.devices.map((n) => [n.resourceSerialId, d(t, n)])
|
|
@@ -289,7 +292,7 @@ class x extends D {
|
|
|
289
292
|
nextMessageIndexes: r,
|
|
290
293
|
runtime: i,
|
|
291
294
|
timestampStates: a
|
|
292
|
-
},
|
|
295
|
+
}, m({
|
|
293
296
|
getState: () => this.getPlaybackDriverState(),
|
|
294
297
|
pause: () => {
|
|
295
298
|
this.pausePlayback();
|
|
@@ -298,7 +301,7 @@ class x extends D {
|
|
|
298
301
|
this.resumePlayback(n);
|
|
299
302
|
}
|
|
300
303
|
}), i.devices.forEach((n) => {
|
|
301
|
-
const o =
|
|
304
|
+
const o = P(n, i.playback.intervalMs);
|
|
302
305
|
this.scheduleRuntimeDeviceTick(n, o);
|
|
303
306
|
});
|
|
304
307
|
}
|
|
@@ -306,10 +309,10 @@ class x extends D {
|
|
|
306
309
|
* Stop the deterministic dummy playback loop.
|
|
307
310
|
*/
|
|
308
311
|
stop() {
|
|
309
|
-
this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null, p?.getState() !== "stopped" &&
|
|
312
|
+
this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null, p?.getState() !== "stopped" && m(null);
|
|
310
313
|
}
|
|
311
314
|
}
|
|
312
315
|
export {
|
|
313
|
-
|
|
314
|
-
|
|
316
|
+
K as SourceDataDummy,
|
|
317
|
+
K as default
|
|
315
318
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/runtime/simulation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAM3E,OAAO,KAAK,EAUV,6BAA6B,EAC7B,+BAA+B,EAC/B,0CAA0C,EAC3C,MAAM,iBAAiB,CAAC;AAkCzB,UAAU,gCAAgC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA0FD,UAAU,4CAA4C;IACpD,cAAc,EAAE,sBAAsB,CAAC;IACvC,UAAU,CAAC,EAAE,6BAA6B,CAAC;CAC5C;AAED,UAAU,sDAAsD;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,sBAAsB,CAAC;IACvC,mBAAmB,CAAC,EAAE,6BAA6B,CAAC;CACrD;AAED,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,+BAA+B,CAAC,CAAC;CACrD;
|
|
1
|
+
{"version":3,"file":"simulation.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/runtime/simulation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAM3E,OAAO,KAAK,EAUV,6BAA6B,EAC7B,+BAA+B,EAC/B,0CAA0C,EAC3C,MAAM,iBAAiB,CAAC;AAkCzB,UAAU,gCAAgC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA0FD,UAAU,4CAA4C;IACpD,cAAc,EAAE,sBAAsB,CAAC;IACvC,UAAU,CAAC,EAAE,6BAA6B,CAAC;CAC5C;AAED,UAAU,sDAAsD;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,sBAAsB,CAAC;IACvC,mBAAmB,CAAC,EAAE,6BAA6B,CAAC;CACrD;AAED,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,cAAc,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,QAAQ,EAAE,QAAQ,CAAC,+BAA+B,CAAC,CAAC;CACrD;AA+mDD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,CAAC,EAAE,6BAA6B,EAC1C,OAAO,CAAC,EAAE,gCAAgC,GACzC,yBAAyB,CA+B3B;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,UAAU,CAAC,EAAE,6BAA6B,EAC1C,OAAO,CAAC,EAAE,gCAAgC,oDAgB3C;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CAAC,EACpD,cAAc,EACd,UAAU,GACX,EAAE,4CAA4C,GAAG,0CAA0C,CAY3F;AAED;;GAEG;AACH,wBAAgB,+CAA+C,CAAC,EAC9D,QAAQ,EACR,cAAc,EACd,mBAAmB,GACpB,EAAE,sDAAsD,GAAG,0CAA0C,CAQrG"}
|