Daten von CPL bekommen DIA0- DIA2 ISO und RSL
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
// Fetch and update cable monitoring mock data for 32 slots (0-31)
|
||||
// Writes to mocks/device-cgi-simulator/cable-monitoring-data/slot{N}/{isolationswiderstand|schleifenwiderstand}/DIA{0|1|2}.json
|
||||
// Writes to mocks/device-cgi-simulator/chartsData/cable-monitoring-data/slot{N}/{isolationswiderstand|schleifenwiderstand}/DIA{0|1|2}.json
|
||||
// Usage examples (PowerShell):
|
||||
// node mocks/scripts/fetchCableData.mjs --base https://10.10.0.118 --from 2025-07-13 --to 2025-08-12 --insecure
|
||||
// node mocks/scripts/fetchCableData.mjs --slots 0-3 --modes DIA0,DIA1 --types iso --insecure
|
||||
@@ -70,12 +70,15 @@ const fromISO =
|
||||
const toISO =
|
||||
args.to || process.env.CPL_TO_DATE || today.toISOString().slice(0, 10);
|
||||
|
||||
// Default output directory matches Next.js API handler slotDataAPIHandler.ts
|
||||
// (mocks/device-cgi-simulator/chartsData/cable-monitoring-data)
|
||||
const OUT_DIR =
|
||||
args.out ||
|
||||
path.join(
|
||||
process.cwd(),
|
||||
"mocks",
|
||||
"device-cgi-simulator",
|
||||
"chartsData",
|
||||
"cable-monitoring-data"
|
||||
);
|
||||
const INSECURE = Boolean(args.insecure || process.env.CPL_INSECURE);
|
||||
@@ -244,4 +247,8 @@ By default, the script fetches all modes DIA0,DIA1,DIA2; you can restrict with:
|
||||
Output goes to:
|
||||
mocks/device-cgi-simulator/cable-monitoring-data/slot0/isolationswiderstand/DIA{0|1|2}.json
|
||||
The --insecure flag accepts the device’s self‑signed certificate.
|
||||
//----
|
||||
|
||||
npm run mocks:cable--silent , npm wartet bis das fertig ist
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user