@microtronics/studio-cli 0.3.5 → 0.4.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/CHANGELOG.md +23 -0
- package/dist/studio-cli.d.ts +1267 -0
- package/out/api.d.ts.map +1 -1
- package/out/api.js +11 -1
- package/out/dde/coreDefinitions.d.ts.map +1 -0
- package/out/dde/coreDefinitions.js +533 -0
- package/out/dde/dde.d.ts.map +1 -0
- package/out/dde/dde.js +178 -0
- package/out/dde/dynamic-dde.schema.json +835 -0
- package/out/dde/fileGenerators/xml.d.ts.map +1 -0
- package/out/dde/fileGenerators/xml.js +205 -0
- package/out/dde/yamlDdePreCompiler.d.ts.map +1 -0
- package/out/dde/yamlDdePreCompiler.js +900 -0
- package/out/defaultFiles.d.ts.map +1 -0
- package/out/defaultFiles.js +84 -0
- package/out/dependencies.d.ts.map +1 -1
- package/out/dependencies.js +41 -6
- package/out/diagnostics.d.ts.map +1 -0
- package/out/diagnostics.js +10 -0
- package/out/helper.d.ts.map +1 -0
- package/out/helper.js +22 -0
- package/out/main.js +13 -0
- package/out/manifest.d.ts.map +1 -1
- package/out/manifest.js +7 -0
- package/package.json +69 -63
package/dist/studio-cli.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LineCounter } from 'yaml';
|
|
2
|
+
import { Range as Range_2 } from 'yaml';
|
|
1
3
|
import { SemVer } from 'semver';
|
|
2
4
|
import { URI } from 'vscode-uri';
|
|
3
5
|
|
|
@@ -223,7 +225,1144 @@ declare interface components {
|
|
|
223
225
|
pathItems: never;
|
|
224
226
|
}
|
|
225
227
|
|
|
228
|
+
export declare namespace DDE {
|
|
229
|
+
import DDEJson = DDE_Core.DDEJson;
|
|
230
|
+
/**
|
|
231
|
+
* The json schema to validate the dde structure
|
|
232
|
+
*/
|
|
233
|
+
const DDE_SCHEMA: {
|
|
234
|
+
$schema: string;
|
|
235
|
+
title: string;
|
|
236
|
+
description: string;
|
|
237
|
+
type: string;
|
|
238
|
+
additionalProperties: boolean;
|
|
239
|
+
properties: {
|
|
240
|
+
dde: {
|
|
241
|
+
type: string;
|
|
242
|
+
default: string;
|
|
243
|
+
readOnly: boolean;
|
|
244
|
+
description: string;
|
|
245
|
+
};
|
|
246
|
+
cloudProject: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
constants: {
|
|
250
|
+
type: string;
|
|
251
|
+
description: string;
|
|
252
|
+
};
|
|
253
|
+
state: {
|
|
254
|
+
$ref: string;
|
|
255
|
+
};
|
|
256
|
+
result: {
|
|
257
|
+
$ref: string;
|
|
258
|
+
};
|
|
259
|
+
volatile: {
|
|
260
|
+
$ref: string;
|
|
261
|
+
};
|
|
262
|
+
timeseries: {
|
|
263
|
+
type: string;
|
|
264
|
+
description: string;
|
|
265
|
+
additionalProperties: boolean;
|
|
266
|
+
maxProperties: number;
|
|
267
|
+
properties: {
|
|
268
|
+
_id: boolean;
|
|
269
|
+
id: boolean;
|
|
270
|
+
_stamp: boolean;
|
|
271
|
+
stamp: boolean;
|
|
272
|
+
tag: boolean;
|
|
273
|
+
_uid: boolean;
|
|
274
|
+
customer_id: boolean;
|
|
275
|
+
site_id: boolean;
|
|
276
|
+
_rec_flags__: boolean;
|
|
277
|
+
applog: boolean;
|
|
278
|
+
};
|
|
279
|
+
patternProperties: {
|
|
280
|
+
"^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
|
|
281
|
+
$ref: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
aloha: {
|
|
286
|
+
type: string;
|
|
287
|
+
description: string;
|
|
288
|
+
$ref: string;
|
|
289
|
+
};
|
|
290
|
+
setting: {
|
|
291
|
+
$ref: string;
|
|
292
|
+
};
|
|
293
|
+
command: {
|
|
294
|
+
$ref: string;
|
|
295
|
+
};
|
|
296
|
+
storage: {
|
|
297
|
+
$ref: string;
|
|
298
|
+
};
|
|
299
|
+
relations: {
|
|
300
|
+
$ref: string;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
patternProperties: {
|
|
304
|
+
"^(?!.*^field\\d+$)(?!.*^ch\\d+$)(?!(dde|cloudProject|constants|state|result|volatile|timeseries|aloha|setting|command|storage|relations))[a-zA-Z_][0-9a-zA-Z_]*$": {
|
|
305
|
+
type: string;
|
|
306
|
+
$ref: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
allOf: {
|
|
310
|
+
if: {
|
|
311
|
+
properties: {
|
|
312
|
+
cloudProject: {
|
|
313
|
+
const: boolean;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
then: {
|
|
318
|
+
type: string;
|
|
319
|
+
additionalProperties: boolean;
|
|
320
|
+
properties: {
|
|
321
|
+
dde: {
|
|
322
|
+
type: string;
|
|
323
|
+
default: string;
|
|
324
|
+
readOnly: boolean;
|
|
325
|
+
description: string;
|
|
326
|
+
};
|
|
327
|
+
cloudProject: {
|
|
328
|
+
type: string;
|
|
329
|
+
};
|
|
330
|
+
constants: {
|
|
331
|
+
type: string;
|
|
332
|
+
description: string;
|
|
333
|
+
};
|
|
334
|
+
state: {
|
|
335
|
+
$ref: string;
|
|
336
|
+
};
|
|
337
|
+
result: {
|
|
338
|
+
$ref: string;
|
|
339
|
+
};
|
|
340
|
+
volatile: {
|
|
341
|
+
$ref: string;
|
|
342
|
+
};
|
|
343
|
+
timeseries: {
|
|
344
|
+
type: string;
|
|
345
|
+
description: string;
|
|
346
|
+
additionalProperties: boolean;
|
|
347
|
+
maxProperties: number;
|
|
348
|
+
properties: {
|
|
349
|
+
_id: boolean;
|
|
350
|
+
id: boolean;
|
|
351
|
+
_stamp: boolean;
|
|
352
|
+
stamp: boolean;
|
|
353
|
+
tag: boolean;
|
|
354
|
+
_uid: boolean;
|
|
355
|
+
customer_id: boolean;
|
|
356
|
+
site_id: boolean;
|
|
357
|
+
_rec_flags__: boolean;
|
|
358
|
+
applog: boolean;
|
|
359
|
+
};
|
|
360
|
+
patternProperties: {
|
|
361
|
+
"^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
|
|
362
|
+
$ref: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
aloha: {
|
|
367
|
+
type: string;
|
|
368
|
+
description: string;
|
|
369
|
+
$ref: string;
|
|
370
|
+
};
|
|
371
|
+
setting: {
|
|
372
|
+
$ref: string;
|
|
373
|
+
};
|
|
374
|
+
command: {
|
|
375
|
+
$ref: string;
|
|
376
|
+
};
|
|
377
|
+
storage: {
|
|
378
|
+
$ref: string;
|
|
379
|
+
};
|
|
380
|
+
relations: {
|
|
381
|
+
$ref: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
}[];
|
|
386
|
+
$defs: {
|
|
387
|
+
stateContainer: {
|
|
388
|
+
type: string;
|
|
389
|
+
title: string;
|
|
390
|
+
description: string;
|
|
391
|
+
$ref: string;
|
|
392
|
+
};
|
|
393
|
+
resultContainer: {
|
|
394
|
+
type: string;
|
|
395
|
+
title: string;
|
|
396
|
+
description: string;
|
|
397
|
+
$ref: string;
|
|
398
|
+
};
|
|
399
|
+
volatileContainer: {
|
|
400
|
+
type: string;
|
|
401
|
+
title: string;
|
|
402
|
+
description: string;
|
|
403
|
+
$ref: string;
|
|
404
|
+
};
|
|
405
|
+
alohaContainer: {
|
|
406
|
+
type: string;
|
|
407
|
+
title: string;
|
|
408
|
+
description: string;
|
|
409
|
+
$ref: string;
|
|
410
|
+
};
|
|
411
|
+
settingContainer: {
|
|
412
|
+
type: string;
|
|
413
|
+
title: string;
|
|
414
|
+
description: string;
|
|
415
|
+
$ref: string;
|
|
416
|
+
};
|
|
417
|
+
commandContainer: {
|
|
418
|
+
type: string;
|
|
419
|
+
title: string;
|
|
420
|
+
description: string;
|
|
421
|
+
$ref: string;
|
|
422
|
+
};
|
|
423
|
+
serverStorageContainer: {
|
|
424
|
+
type: string;
|
|
425
|
+
title: string;
|
|
426
|
+
description: string;
|
|
427
|
+
$ref: string;
|
|
428
|
+
};
|
|
429
|
+
serverRelationsContainer: {
|
|
430
|
+
type: string;
|
|
431
|
+
title: string;
|
|
432
|
+
description: string;
|
|
433
|
+
$ref: string;
|
|
434
|
+
};
|
|
435
|
+
configurationFields: {
|
|
436
|
+
type: string;
|
|
437
|
+
description: string;
|
|
438
|
+
additionalProperties: boolean;
|
|
439
|
+
$ref: string;
|
|
440
|
+
properties: {};
|
|
441
|
+
patternProperties: {
|
|
442
|
+
"^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
|
|
443
|
+
allOf: {
|
|
444
|
+
$ref: string;
|
|
445
|
+
}[];
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
timeseriesFields: {
|
|
450
|
+
type: string;
|
|
451
|
+
description: string;
|
|
452
|
+
additionalProperties: boolean;
|
|
453
|
+
$ref: string;
|
|
454
|
+
patternProperties: {
|
|
455
|
+
"^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
|
|
456
|
+
allOf: ({
|
|
457
|
+
$ref: string;
|
|
458
|
+
type?: undefined;
|
|
459
|
+
properties?: undefined;
|
|
460
|
+
dependencies?: undefined;
|
|
461
|
+
} | {
|
|
462
|
+
type: string;
|
|
463
|
+
properties: {
|
|
464
|
+
channelMode: {
|
|
465
|
+
type: string[];
|
|
466
|
+
description: string;
|
|
467
|
+
anyOf: ({
|
|
468
|
+
const: string;
|
|
469
|
+
description: string;
|
|
470
|
+
$ref?: undefined;
|
|
471
|
+
} | {
|
|
472
|
+
$ref: string;
|
|
473
|
+
const?: undefined;
|
|
474
|
+
description?: undefined;
|
|
475
|
+
})[];
|
|
476
|
+
};
|
|
477
|
+
chartAlarmLow: {
|
|
478
|
+
title: string;
|
|
479
|
+
$ref: string;
|
|
480
|
+
};
|
|
481
|
+
chartAlarmHigh: {
|
|
482
|
+
title: string;
|
|
483
|
+
$ref: string;
|
|
484
|
+
};
|
|
485
|
+
chartWarningLow: {
|
|
486
|
+
title: string;
|
|
487
|
+
$ref: string;
|
|
488
|
+
};
|
|
489
|
+
chartWarningHigh: {
|
|
490
|
+
title: string;
|
|
491
|
+
$ref: string;
|
|
492
|
+
};
|
|
493
|
+
chartHysteresis: {
|
|
494
|
+
title: string;
|
|
495
|
+
type: string[];
|
|
496
|
+
description: string;
|
|
497
|
+
$ref: string;
|
|
498
|
+
};
|
|
499
|
+
chartTriggerThreshold: {
|
|
500
|
+
title: string;
|
|
501
|
+
type: string[];
|
|
502
|
+
description: string;
|
|
503
|
+
$ref: string;
|
|
504
|
+
};
|
|
505
|
+
chartTriggerRelation: {
|
|
506
|
+
title: string;
|
|
507
|
+
type: string[];
|
|
508
|
+
description: string;
|
|
509
|
+
anyOf: ({
|
|
510
|
+
title: string;
|
|
511
|
+
description: string;
|
|
512
|
+
const: string;
|
|
513
|
+
$ref?: undefined;
|
|
514
|
+
} | {
|
|
515
|
+
$ref: string;
|
|
516
|
+
title?: undefined;
|
|
517
|
+
description?: undefined;
|
|
518
|
+
const?: undefined;
|
|
519
|
+
})[];
|
|
520
|
+
};
|
|
521
|
+
chartSetPoint: {
|
|
522
|
+
title: string;
|
|
523
|
+
type: string[];
|
|
524
|
+
description: string;
|
|
525
|
+
$ref: string;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
dependencies: {
|
|
529
|
+
chartTriggerRelation: string[];
|
|
530
|
+
};
|
|
531
|
+
$ref?: undefined;
|
|
532
|
+
})[];
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
reservedNamesFieldNames: {
|
|
537
|
+
type: string;
|
|
538
|
+
properties: {
|
|
539
|
+
_id: boolean;
|
|
540
|
+
id: boolean;
|
|
541
|
+
_stamp: boolean;
|
|
542
|
+
stamp: boolean;
|
|
543
|
+
tag: boolean;
|
|
544
|
+
_uid: boolean;
|
|
545
|
+
customer_id: boolean;
|
|
546
|
+
site_id: boolean;
|
|
547
|
+
_rec_flags__: boolean;
|
|
548
|
+
applog: boolean;
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
defaultFieldProperties: {
|
|
552
|
+
type: string;
|
|
553
|
+
additionalProperties: boolean;
|
|
554
|
+
properties: {
|
|
555
|
+
type: {
|
|
556
|
+
$ref: string;
|
|
557
|
+
};
|
|
558
|
+
title: {
|
|
559
|
+
type: string;
|
|
560
|
+
description: string;
|
|
561
|
+
};
|
|
562
|
+
description: {
|
|
563
|
+
type: string;
|
|
564
|
+
description: string;
|
|
565
|
+
};
|
|
566
|
+
array: {
|
|
567
|
+
type: string;
|
|
568
|
+
description: string;
|
|
569
|
+
minimum: number;
|
|
570
|
+
inclusiveMaximum: number;
|
|
571
|
+
};
|
|
572
|
+
unit: {
|
|
573
|
+
type: string;
|
|
574
|
+
description: string;
|
|
575
|
+
};
|
|
576
|
+
hex: {
|
|
577
|
+
type: string;
|
|
578
|
+
description: string;
|
|
579
|
+
};
|
|
580
|
+
decimalPlaces: {
|
|
581
|
+
$ref: string;
|
|
582
|
+
};
|
|
583
|
+
writePermission: {
|
|
584
|
+
description: string;
|
|
585
|
+
anyOf: ({
|
|
586
|
+
$ref: string;
|
|
587
|
+
const?: undefined;
|
|
588
|
+
title?: undefined;
|
|
589
|
+
description?: undefined;
|
|
590
|
+
} | {
|
|
591
|
+
const: string;
|
|
592
|
+
title: string;
|
|
593
|
+
description: string;
|
|
594
|
+
$ref?: undefined;
|
|
595
|
+
})[];
|
|
596
|
+
};
|
|
597
|
+
readPermission: {
|
|
598
|
+
description: string;
|
|
599
|
+
$ref: string;
|
|
600
|
+
};
|
|
601
|
+
bytes: boolean;
|
|
602
|
+
fields: boolean;
|
|
603
|
+
length: boolean;
|
|
604
|
+
defaultValue: boolean;
|
|
605
|
+
channelMode: boolean;
|
|
606
|
+
scale: boolean;
|
|
607
|
+
offset: boolean;
|
|
608
|
+
chartMinimum: boolean;
|
|
609
|
+
chartMaximum: boolean;
|
|
610
|
+
chartAlarmLow: boolean;
|
|
611
|
+
chartAlarmHigh: boolean;
|
|
612
|
+
chartWarningLow: boolean;
|
|
613
|
+
chartWarningHigh: boolean;
|
|
614
|
+
chartHysteresis: boolean;
|
|
615
|
+
chartTriggerThreshold: boolean;
|
|
616
|
+
chartTriggerRelation: boolean;
|
|
617
|
+
chartSetPoint: boolean;
|
|
618
|
+
utilsTransferInterval: boolean;
|
|
619
|
+
shadowFields: {
|
|
620
|
+
type: string;
|
|
621
|
+
deprecated: boolean;
|
|
622
|
+
title: string;
|
|
623
|
+
description: string;
|
|
624
|
+
$ref: string;
|
|
625
|
+
};
|
|
626
|
+
bitmask: {
|
|
627
|
+
type: string;
|
|
628
|
+
title: string;
|
|
629
|
+
description: string;
|
|
630
|
+
anyOf: {
|
|
631
|
+
default: string;
|
|
632
|
+
pattern: string;
|
|
633
|
+
description: string;
|
|
634
|
+
}[];
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
required: string[];
|
|
638
|
+
allOf: ({
|
|
639
|
+
if: {
|
|
640
|
+
description: string;
|
|
641
|
+
properties: {
|
|
642
|
+
type: {
|
|
643
|
+
enum: string[];
|
|
644
|
+
};
|
|
645
|
+
title?: undefined;
|
|
646
|
+
unit?: undefined;
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
then: {
|
|
650
|
+
properties: {
|
|
651
|
+
bytes: {
|
|
652
|
+
type: string;
|
|
653
|
+
description: string;
|
|
654
|
+
};
|
|
655
|
+
defaultValue: {
|
|
656
|
+
type: string;
|
|
657
|
+
description: string;
|
|
658
|
+
pattern: string;
|
|
659
|
+
};
|
|
660
|
+
length?: undefined;
|
|
661
|
+
decimalPlaces?: undefined;
|
|
662
|
+
chartMinimum?: undefined;
|
|
663
|
+
chartMaximum?: undefined;
|
|
664
|
+
scale?: undefined;
|
|
665
|
+
offset?: undefined;
|
|
666
|
+
utilsTransferInterval?: undefined;
|
|
667
|
+
title?: undefined;
|
|
668
|
+
unit?: undefined;
|
|
669
|
+
};
|
|
670
|
+
required: string[];
|
|
671
|
+
};
|
|
672
|
+
else: {
|
|
673
|
+
properties: {
|
|
674
|
+
bytes: boolean;
|
|
675
|
+
decimalPlaces?: undefined;
|
|
676
|
+
chartMinimum?: undefined;
|
|
677
|
+
chartMaximum?: undefined;
|
|
678
|
+
scale?: undefined;
|
|
679
|
+
offset?: undefined;
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
} | {
|
|
683
|
+
if: {
|
|
684
|
+
description: string;
|
|
685
|
+
properties: {
|
|
686
|
+
type: {
|
|
687
|
+
enum: string[];
|
|
688
|
+
};
|
|
689
|
+
title?: undefined;
|
|
690
|
+
unit?: undefined;
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
then: {
|
|
694
|
+
properties: {
|
|
695
|
+
length: {
|
|
696
|
+
type: string;
|
|
697
|
+
description: string;
|
|
698
|
+
minimum: number;
|
|
699
|
+
};
|
|
700
|
+
defaultValue: {
|
|
701
|
+
type: string;
|
|
702
|
+
description?: undefined;
|
|
703
|
+
pattern?: undefined;
|
|
704
|
+
};
|
|
705
|
+
bytes?: undefined;
|
|
706
|
+
decimalPlaces?: undefined;
|
|
707
|
+
chartMinimum?: undefined;
|
|
708
|
+
chartMaximum?: undefined;
|
|
709
|
+
scale?: undefined;
|
|
710
|
+
offset?: undefined;
|
|
711
|
+
utilsTransferInterval?: undefined;
|
|
712
|
+
title?: undefined;
|
|
713
|
+
unit?: undefined;
|
|
714
|
+
};
|
|
715
|
+
required: string[];
|
|
716
|
+
};
|
|
717
|
+
else?: undefined;
|
|
718
|
+
} | {
|
|
719
|
+
if: {
|
|
720
|
+
properties: {
|
|
721
|
+
type: {
|
|
722
|
+
enum: string[];
|
|
723
|
+
};
|
|
724
|
+
title?: undefined;
|
|
725
|
+
unit?: undefined;
|
|
726
|
+
};
|
|
727
|
+
description?: undefined;
|
|
728
|
+
};
|
|
729
|
+
then: {
|
|
730
|
+
properties: {
|
|
731
|
+
decimalPlaces: {
|
|
732
|
+
$ref: string;
|
|
733
|
+
};
|
|
734
|
+
defaultValue: {
|
|
735
|
+
type: string[];
|
|
736
|
+
description: string;
|
|
737
|
+
pattern: string;
|
|
738
|
+
};
|
|
739
|
+
chartMinimum: {
|
|
740
|
+
type: string[];
|
|
741
|
+
description: string;
|
|
742
|
+
$ref: string;
|
|
743
|
+
};
|
|
744
|
+
chartMaximum: {
|
|
745
|
+
type: string[];
|
|
746
|
+
description: string;
|
|
747
|
+
$ref: string;
|
|
748
|
+
};
|
|
749
|
+
scale: {
|
|
750
|
+
type: string[];
|
|
751
|
+
title: string;
|
|
752
|
+
description: string;
|
|
753
|
+
$ref: string;
|
|
754
|
+
};
|
|
755
|
+
offset: {
|
|
756
|
+
type: string[];
|
|
757
|
+
title: string;
|
|
758
|
+
description: string;
|
|
759
|
+
$ref: string;
|
|
760
|
+
};
|
|
761
|
+
utilsTransferInterval: {
|
|
762
|
+
title: string;
|
|
763
|
+
type: string[];
|
|
764
|
+
description: string;
|
|
765
|
+
};
|
|
766
|
+
bytes?: undefined;
|
|
767
|
+
length?: undefined;
|
|
768
|
+
title?: undefined;
|
|
769
|
+
unit?: undefined;
|
|
770
|
+
};
|
|
771
|
+
required?: undefined;
|
|
772
|
+
};
|
|
773
|
+
else: {
|
|
774
|
+
properties: {
|
|
775
|
+
decimalPlaces: boolean;
|
|
776
|
+
chartMinimum: boolean;
|
|
777
|
+
chartMaximum: boolean;
|
|
778
|
+
scale: boolean;
|
|
779
|
+
offset: boolean;
|
|
780
|
+
bytes?: undefined;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
} | {
|
|
784
|
+
if: {
|
|
785
|
+
description: string;
|
|
786
|
+
properties: {
|
|
787
|
+
title: {
|
|
788
|
+
pattern: string;
|
|
789
|
+
};
|
|
790
|
+
type?: undefined;
|
|
791
|
+
unit?: undefined;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
then: {
|
|
795
|
+
properties: {
|
|
796
|
+
title: {
|
|
797
|
+
$ref: string;
|
|
798
|
+
};
|
|
799
|
+
bytes?: undefined;
|
|
800
|
+
defaultValue?: undefined;
|
|
801
|
+
length?: undefined;
|
|
802
|
+
decimalPlaces?: undefined;
|
|
803
|
+
chartMinimum?: undefined;
|
|
804
|
+
chartMaximum?: undefined;
|
|
805
|
+
scale?: undefined;
|
|
806
|
+
offset?: undefined;
|
|
807
|
+
utilsTransferInterval?: undefined;
|
|
808
|
+
unit?: undefined;
|
|
809
|
+
};
|
|
810
|
+
required?: undefined;
|
|
811
|
+
};
|
|
812
|
+
else?: undefined;
|
|
813
|
+
} | {
|
|
814
|
+
if: {
|
|
815
|
+
description: string;
|
|
816
|
+
properties: {
|
|
817
|
+
unit: {
|
|
818
|
+
pattern: string;
|
|
819
|
+
};
|
|
820
|
+
type?: undefined;
|
|
821
|
+
title?: undefined;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
then: {
|
|
825
|
+
properties: {
|
|
826
|
+
unit: {
|
|
827
|
+
$ref: string;
|
|
828
|
+
};
|
|
829
|
+
bytes?: undefined;
|
|
830
|
+
defaultValue?: undefined;
|
|
831
|
+
length?: undefined;
|
|
832
|
+
decimalPlaces?: undefined;
|
|
833
|
+
chartMinimum?: undefined;
|
|
834
|
+
chartMaximum?: undefined;
|
|
835
|
+
scale?: undefined;
|
|
836
|
+
offset?: undefined;
|
|
837
|
+
utilsTransferInterval?: undefined;
|
|
838
|
+
title?: undefined;
|
|
839
|
+
};
|
|
840
|
+
required?: undefined;
|
|
841
|
+
};
|
|
842
|
+
else?: undefined;
|
|
843
|
+
})[];
|
|
844
|
+
};
|
|
845
|
+
dataTypes: {
|
|
846
|
+
type: string;
|
|
847
|
+
description: string;
|
|
848
|
+
anyOf: ({
|
|
849
|
+
const: string;
|
|
850
|
+
title: string;
|
|
851
|
+
description: string;
|
|
852
|
+
} | {
|
|
853
|
+
const: string;
|
|
854
|
+
title: string;
|
|
855
|
+
description?: undefined;
|
|
856
|
+
})[];
|
|
857
|
+
};
|
|
858
|
+
userLevel: {
|
|
859
|
+
type: string;
|
|
860
|
+
description: string;
|
|
861
|
+
anyOf: ({
|
|
862
|
+
const: string;
|
|
863
|
+
title: string;
|
|
864
|
+
description: string;
|
|
865
|
+
pattern?: undefined;
|
|
866
|
+
} | {
|
|
867
|
+
pattern: string;
|
|
868
|
+
const?: undefined;
|
|
869
|
+
title?: undefined;
|
|
870
|
+
description?: undefined;
|
|
871
|
+
})[];
|
|
872
|
+
};
|
|
873
|
+
configArrayDefinition: {
|
|
874
|
+
if: {
|
|
875
|
+
description: string;
|
|
876
|
+
properties: {
|
|
877
|
+
type: {
|
|
878
|
+
const: string;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
then: {
|
|
883
|
+
properties: {
|
|
884
|
+
fields: {
|
|
885
|
+
$ref: string;
|
|
886
|
+
};
|
|
887
|
+
length: {
|
|
888
|
+
type: string;
|
|
889
|
+
description: string;
|
|
890
|
+
minimum: number;
|
|
891
|
+
inclusiveMaximum: number;
|
|
892
|
+
};
|
|
893
|
+
array: boolean;
|
|
894
|
+
title: boolean;
|
|
895
|
+
};
|
|
896
|
+
required: string[];
|
|
897
|
+
};
|
|
898
|
+
else: {
|
|
899
|
+
properties: {
|
|
900
|
+
fields: boolean;
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
timeseriesArrayDefinition: {
|
|
905
|
+
if: {
|
|
906
|
+
description: string;
|
|
907
|
+
properties: {
|
|
908
|
+
type: {
|
|
909
|
+
const: string;
|
|
910
|
+
};
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
then: {
|
|
914
|
+
properties: {
|
|
915
|
+
fields: {
|
|
916
|
+
$ref: string;
|
|
917
|
+
};
|
|
918
|
+
length: {
|
|
919
|
+
type: string;
|
|
920
|
+
description: string;
|
|
921
|
+
minimum: number;
|
|
922
|
+
inclusiveMaximum: number;
|
|
923
|
+
};
|
|
924
|
+
array: boolean;
|
|
925
|
+
title: boolean;
|
|
926
|
+
};
|
|
927
|
+
required: string[];
|
|
928
|
+
};
|
|
929
|
+
else: {
|
|
930
|
+
properties: {
|
|
931
|
+
fields: boolean;
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
decimalPlaces: {
|
|
936
|
+
type: string[];
|
|
937
|
+
description: string;
|
|
938
|
+
minimum: number;
|
|
939
|
+
$ref: string;
|
|
940
|
+
};
|
|
941
|
+
relationLinkPattern: {
|
|
942
|
+
anyOf: {
|
|
943
|
+
pattern: string;
|
|
944
|
+
}[];
|
|
945
|
+
};
|
|
946
|
+
setPointRelationPattern: {
|
|
947
|
+
anyOf: ({
|
|
948
|
+
pattern: string;
|
|
949
|
+
const?: undefined;
|
|
950
|
+
description?: undefined;
|
|
951
|
+
title?: undefined;
|
|
952
|
+
} | {
|
|
953
|
+
const: string;
|
|
954
|
+
description: string;
|
|
955
|
+
title: string;
|
|
956
|
+
pattern?: undefined;
|
|
957
|
+
})[];
|
|
958
|
+
};
|
|
959
|
+
chartAlarmWarn: {
|
|
960
|
+
type: string[];
|
|
961
|
+
description: string;
|
|
962
|
+
$ref: string;
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
export function readYamlFile(filePath: URI, fs: LocalFS): Promise<string>;
|
|
967
|
+
/**
|
|
968
|
+
* Validate all dde files if they are valid based on the json schema
|
|
969
|
+
* @param cwd
|
|
970
|
+
* @param fs
|
|
971
|
+
* @param fileName
|
|
972
|
+
*/
|
|
973
|
+
export function validate(cwd: URI, fs: LocalFS, fileName?: string): Promise<{
|
|
974
|
+
manifest: Manifest.Manifest;
|
|
975
|
+
libraryFiles: DDE_Core.LibraryFile[];
|
|
976
|
+
main: {
|
|
977
|
+
path: URI;
|
|
978
|
+
yaml: string;
|
|
979
|
+
};
|
|
980
|
+
}>;
|
|
981
|
+
/**
|
|
982
|
+
* Run dde compiler in the given studio directory
|
|
983
|
+
* @param cwd
|
|
984
|
+
* @param fs
|
|
985
|
+
* @param fileName
|
|
986
|
+
*/
|
|
987
|
+
export function compileDDE(cwd: URI, fs: LocalFS, fileName?: string): Promise<{
|
|
988
|
+
ddeJSON: DDEJson | null;
|
|
989
|
+
diagnostics: Diagnostics.File[];
|
|
990
|
+
}>;
|
|
991
|
+
/**
|
|
992
|
+
* Validate a given dde file against the dynamic dde schema
|
|
993
|
+
* @param ddeFilePath
|
|
994
|
+
* @param yaml
|
|
995
|
+
*/
|
|
996
|
+
export function validateJsonSchema(ddeFilePath: URI, yaml: string): Promise<void>;
|
|
997
|
+
/**
|
|
998
|
+
* Creates and returns a new precompiler instance
|
|
999
|
+
* @param manifest
|
|
1000
|
+
* @param libraries
|
|
1001
|
+
* @param ddeHistory
|
|
1002
|
+
* @constructor
|
|
1003
|
+
*/
|
|
1004
|
+
const PreCompiler: (manifest: Manifest.Manifest, libraries: DDE_Core.LibraryFile[], ddeHistory: any) => YamlPreCompiler.PreCompiler;
|
|
1005
|
+
/**
|
|
1006
|
+
* File Generators
|
|
1007
|
+
*/
|
|
1008
|
+
/**
|
|
1009
|
+
* Generate the needed xml for the myDatanet application
|
|
1010
|
+
* @param ddeJSON
|
|
1011
|
+
*/
|
|
1012
|
+
export function generateMyDatanetXML(ddeJSON: DDEJson): string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Generate the xml dde notation and write it to the correct dist directory
|
|
1015
|
+
* @param cwd
|
|
1016
|
+
* @param fs
|
|
1017
|
+
* @param ddeJSON
|
|
1018
|
+
*/
|
|
1019
|
+
export function exportMyDatanetXML(cwd: URI, fs: LocalFS, ddeJSON: DDEJson): Promise<void>;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export declare namespace DDE_Core {
|
|
1023
|
+
export interface DDEJson {
|
|
1024
|
+
containers: {
|
|
1025
|
+
[key: string]: DDEJsonContainer;
|
|
1026
|
+
};
|
|
1027
|
+
setPointList: DDESetpointList;
|
|
1028
|
+
}
|
|
1029
|
+
export interface DDESetpointList {
|
|
1030
|
+
[key: string]: number;
|
|
1031
|
+
}
|
|
1032
|
+
export interface DDEJsonContainer {
|
|
1033
|
+
name: ContainerName;
|
|
1034
|
+
containerType: ContainerType;
|
|
1035
|
+
volatile: boolean;
|
|
1036
|
+
title: string;
|
|
1037
|
+
previousTitle?: string;
|
|
1038
|
+
libraries: string[];
|
|
1039
|
+
knownNames: string[];
|
|
1040
|
+
transferDirection: TransferDirection;
|
|
1041
|
+
size: number;
|
|
1042
|
+
fieldCount: number;
|
|
1043
|
+
arrays: {
|
|
1044
|
+
[key: string]: ArrayInfo;
|
|
1045
|
+
};
|
|
1046
|
+
shadows: {
|
|
1047
|
+
[key: string]: ShadowInfo;
|
|
1048
|
+
};
|
|
1049
|
+
fields: DDEJsonField[];
|
|
1050
|
+
fieldIndex: number;
|
|
1051
|
+
}
|
|
1052
|
+
export interface ArrayInfo {
|
|
1053
|
+
name: string;
|
|
1054
|
+
length: number;
|
|
1055
|
+
library: null | string;
|
|
1056
|
+
fields?: ArrayRefField[];
|
|
1057
|
+
}
|
|
1058
|
+
export interface ShadowInfo {
|
|
1059
|
+
name: string;
|
|
1060
|
+
byteSize: number;
|
|
1061
|
+
byteOffset: number;
|
|
1062
|
+
}
|
|
1063
|
+
export interface YamlDDEField {
|
|
1064
|
+
type: string;
|
|
1065
|
+
title?: null | string;
|
|
1066
|
+
description?: string;
|
|
1067
|
+
unit?: string;
|
|
1068
|
+
hex?: boolean;
|
|
1069
|
+
decimalPlaces?: number;
|
|
1070
|
+
writePermission?: number;
|
|
1071
|
+
readPermission?: number;
|
|
1072
|
+
channelMode?: number | string;
|
|
1073
|
+
defaultValue?: number | string;
|
|
1074
|
+
scale?: number | string;
|
|
1075
|
+
offset?: number | string;
|
|
1076
|
+
chartMinimum?: number | string;
|
|
1077
|
+
chartMaximum?: number | string;
|
|
1078
|
+
chartAlarmLow?: number | string;
|
|
1079
|
+
chartAlarmHigh?: number | string;
|
|
1080
|
+
chartWarningLow?: number | string;
|
|
1081
|
+
chartWarningHigh?: number | string;
|
|
1082
|
+
chartHysteresis?: number | string;
|
|
1083
|
+
chartTriggerThreshold?: number | string;
|
|
1084
|
+
chartTriggerRelation?: number | string;
|
|
1085
|
+
chartSetPoint?: number | string;
|
|
1086
|
+
utilsTransferInterval?: boolean;
|
|
1087
|
+
bitmask?: string;
|
|
1088
|
+
bytes?: number;
|
|
1089
|
+
array?: number;
|
|
1090
|
+
length?: number;
|
|
1091
|
+
}
|
|
1092
|
+
export interface DDEJsonField extends YamlDDEField {
|
|
1093
|
+
name: string;
|
|
1094
|
+
index: number;
|
|
1095
|
+
id: string;
|
|
1096
|
+
library: null | string;
|
|
1097
|
+
byteOffset: number;
|
|
1098
|
+
byteSize: number;
|
|
1099
|
+
arrayRef: null | ArrayRef;
|
|
1100
|
+
shadowRef: null | string;
|
|
1101
|
+
defaultDloDefine?: string;
|
|
1102
|
+
}
|
|
1103
|
+
export interface ArrayRef {
|
|
1104
|
+
name: string;
|
|
1105
|
+
index: number;
|
|
1106
|
+
}
|
|
1107
|
+
export interface ArrayRefField {
|
|
1108
|
+
name: string;
|
|
1109
|
+
type: string;
|
|
1110
|
+
byteSize: number;
|
|
1111
|
+
}
|
|
1112
|
+
export enum DDEContainerName {
|
|
1113
|
+
/** @description low frequent - from device to server */
|
|
1114
|
+
state = "state",
|
|
1115
|
+
/** @description high frequent - from device to server */
|
|
1116
|
+
result = "result",
|
|
1117
|
+
/** @description aloha - from device to server */
|
|
1118
|
+
aloha = "aloha",
|
|
1119
|
+
/** @description volatile - from device to server */
|
|
1120
|
+
volatile = "volatile",
|
|
1121
|
+
/** @description low frequent - from server to device */
|
|
1122
|
+
setting = "setting",
|
|
1123
|
+
/** @description high frequent - from server to device */
|
|
1124
|
+
command = "command",
|
|
1125
|
+
/** @description server only */
|
|
1126
|
+
storage = "storage",
|
|
1127
|
+
/** @description server only */
|
|
1128
|
+
relations = "relations"
|
|
1129
|
+
}
|
|
1130
|
+
export enum ContainerName {
|
|
1131
|
+
configA = "configA",
|
|
1132
|
+
configB = "configB",
|
|
1133
|
+
configC = "configC",
|
|
1134
|
+
config0 = "config0",
|
|
1135
|
+
config1 = "config1",
|
|
1136
|
+
config2 = "config2",
|
|
1137
|
+
config3 = "config3",
|
|
1138
|
+
config4 = "config4",
|
|
1139
|
+
config5 = "config5",
|
|
1140
|
+
config6 = "config6",
|
|
1141
|
+
config7 = "config7",
|
|
1142
|
+
config8 = "config8",
|
|
1143
|
+
config9 = "config9",
|
|
1144
|
+
histdata0 = "histdata0",
|
|
1145
|
+
histdata1 = "histdata1",
|
|
1146
|
+
histdata2 = "histdata2",
|
|
1147
|
+
histdata3 = "histdata3",
|
|
1148
|
+
histdata4 = "histdata4",
|
|
1149
|
+
histdata5 = "histdata5",
|
|
1150
|
+
histdata6 = "histdata6",
|
|
1151
|
+
histdata7 = "histdata7",
|
|
1152
|
+
histdata8 = "histdata8",
|
|
1153
|
+
histdata9 = "histdata9",
|
|
1154
|
+
aloha = "aloha",
|
|
1155
|
+
alerts = "alerts",
|
|
1156
|
+
applog = "applog"
|
|
1157
|
+
}
|
|
1158
|
+
export enum ContainerType {
|
|
1159
|
+
/**
|
|
1160
|
+
* @description config0 - 9
|
|
1161
|
+
*/
|
|
1162
|
+
cx = "cx",
|
|
1163
|
+
/**
|
|
1164
|
+
* @description histdata0 - 9
|
|
1165
|
+
*/
|
|
1166
|
+
hx = "hx",
|
|
1167
|
+
/**
|
|
1168
|
+
* @description configA - B
|
|
1169
|
+
*/
|
|
1170
|
+
cb = "cb",
|
|
1171
|
+
aloha = "aloha",
|
|
1172
|
+
applog = "applog"
|
|
1173
|
+
}
|
|
1174
|
+
export enum TransferDirection {
|
|
1175
|
+
up = "up",
|
|
1176
|
+
down = "down",
|
|
1177
|
+
upPlus = "up+",
|
|
1178
|
+
downPlus = "down+",
|
|
1179
|
+
none = "none",
|
|
1180
|
+
backendOnly = "backend-only",
|
|
1181
|
+
deviceOnly = "device-only",
|
|
1182
|
+
both = "both",
|
|
1183
|
+
bothPlus = "both+",
|
|
1184
|
+
/** @deprecated replaced with backendOnly*/
|
|
1185
|
+
noneBackend = "none-be"
|
|
1186
|
+
}
|
|
1187
|
+
export function CONTAINER_DEF_DLO_CID_BASE(containerType: ContainerType, xmit: TransferDirection): "DDE_CID_CONFIG" | "DDE_CID_HISTDATA" | "DDE_CID_ALOHA" | null;
|
|
1188
|
+
export interface ContainerDefinition {
|
|
1189
|
+
ctype: ContainerType | undefined;
|
|
1190
|
+
cnum: 'a' | 'b' | 'c' | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
|
|
1191
|
+
alias: string;
|
|
1192
|
+
flds: 'field' | 'ch' | null;
|
|
1193
|
+
xmits: TransferDirection[];
|
|
1194
|
+
}
|
|
1195
|
+
export type ContainerDefinitions = {
|
|
1196
|
+
[key in ContainerName]: ContainerDefinition;
|
|
1197
|
+
};
|
|
1198
|
+
const CONTAINER_DEFS: ContainerDefinitions;
|
|
1199
|
+
const HISTDATA_CONTAINER: ContainerName[];
|
|
1200
|
+
const CONFIG_CONTAINER: ContainerName[];
|
|
1201
|
+
const SERVER_CONTAINER: ContainerName[];
|
|
1202
|
+
const regexRelation: RegExp;
|
|
1203
|
+
/**
|
|
1204
|
+
* Defines what fields allow relations and the allowed target field type.
|
|
1205
|
+
*/
|
|
1206
|
+
const allowedRelationTypes: {
|
|
1207
|
+
title: string[];
|
|
1208
|
+
unit: string[];
|
|
1209
|
+
chartMinimum: string[];
|
|
1210
|
+
chartMaximum: string[];
|
|
1211
|
+
scale: string[];
|
|
1212
|
+
offset: string[];
|
|
1213
|
+
decimalPlaces: string[];
|
|
1214
|
+
channelMode: string[];
|
|
1215
|
+
chartAlarmLow: string[];
|
|
1216
|
+
chartAlarmHigh: string[];
|
|
1217
|
+
chartWarningLow: string[];
|
|
1218
|
+
chartWarningHigh: string[];
|
|
1219
|
+
chartHysteresis: string[];
|
|
1220
|
+
chartTriggerThreshold: string[];
|
|
1221
|
+
chartTriggerRelation: string[];
|
|
1222
|
+
chartSetPoint: string[];
|
|
1223
|
+
};
|
|
1224
|
+
export type AllowedRelationTypse = keyof typeof allowedRelationTypes;
|
|
1225
|
+
/**
|
|
1226
|
+
* Parse the given value and resolve any container relation
|
|
1227
|
+
* @param attribute
|
|
1228
|
+
* @param field
|
|
1229
|
+
* @param ddeMap
|
|
1230
|
+
*/
|
|
1231
|
+
export function parseXMLValueWithRelation(attribute: AllowedRelationTypse, field: DDEJsonField, ddeMap: DDEJson): any;
|
|
1232
|
+
export function parseXMLBitmask(field: DDEJsonField): string | undefined;
|
|
1233
|
+
export function parseXMLDefaultValue(field: DDEJsonField): string | number | undefined;
|
|
1234
|
+
const TDEF_NUMBER: {
|
|
1235
|
+
xmlOut(xml: XMLField, jsonField: DDEJsonField, ddeMap: DDEJson): void;
|
|
1236
|
+
};
|
|
1237
|
+
const TYPE_DEFS: any;
|
|
1238
|
+
const fieldTypeDefinitions: {
|
|
1239
|
+
uint8: any;
|
|
1240
|
+
uint16: any;
|
|
1241
|
+
uint32: any;
|
|
1242
|
+
int8: any;
|
|
1243
|
+
int16: any;
|
|
1244
|
+
int32: any;
|
|
1245
|
+
int64: any;
|
|
1246
|
+
float16: any;
|
|
1247
|
+
float32: any;
|
|
1248
|
+
float64: any;
|
|
1249
|
+
stamp32: any;
|
|
1250
|
+
stamp40: any;
|
|
1251
|
+
binary: any;
|
|
1252
|
+
astring: any;
|
|
1253
|
+
nstring: any;
|
|
1254
|
+
wstring: any;
|
|
1255
|
+
ustring: any;
|
|
1256
|
+
cstring: any;
|
|
1257
|
+
};
|
|
1258
|
+
export function checkForReservedFieldName(fieldName: string): boolean;
|
|
1259
|
+
export interface LibraryFile {
|
|
1260
|
+
/**
|
|
1261
|
+
* Name of the library this file comes from
|
|
1262
|
+
*/
|
|
1263
|
+
libraryName: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* The original filepath of the file
|
|
1266
|
+
*/
|
|
1267
|
+
path: URI;
|
|
1268
|
+
/**
|
|
1269
|
+
* The content of the included file
|
|
1270
|
+
*/
|
|
1271
|
+
yaml: string;
|
|
1272
|
+
}
|
|
1273
|
+
{};
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
export declare namespace DefaultFiles {
|
|
1277
|
+
const fileNames: {
|
|
1278
|
+
projectSettings: string;
|
|
1279
|
+
mainAmx: string;
|
|
1280
|
+
mainAmxReport: string;
|
|
1281
|
+
ddeXml: string;
|
|
1282
|
+
ddeOpenApi: string;
|
|
1283
|
+
ddeJson: string;
|
|
1284
|
+
mainDDE: string;
|
|
1285
|
+
autoInc: string;
|
|
1286
|
+
defaultInc: string;
|
|
1287
|
+
autoUplinkInc: string;
|
|
1288
|
+
autoDdeInc: string;
|
|
1289
|
+
mainDdeInc: string;
|
|
1290
|
+
legacyAutoInc: string;
|
|
1291
|
+
legacyAutoDdeInc: string;
|
|
1292
|
+
legacyAutoUplinkInc: string;
|
|
1293
|
+
reportTemplate: string;
|
|
1294
|
+
};
|
|
1295
|
+
const filePaths: {
|
|
1296
|
+
studio: {
|
|
1297
|
+
initFile: string;
|
|
1298
|
+
auto: {
|
|
1299
|
+
path: string;
|
|
1300
|
+
dlo: {
|
|
1301
|
+
path: string;
|
|
1302
|
+
autoInc: string;
|
|
1303
|
+
defaultInc: string;
|
|
1304
|
+
autoUplinkInc: string;
|
|
1305
|
+
autoDdeInc: string;
|
|
1306
|
+
mainDdeInc: string;
|
|
1307
|
+
legacyAutoInc: string;
|
|
1308
|
+
legacyAutoDdeInc: string;
|
|
1309
|
+
legacyAutoUplinkInc: string;
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
libdeps: string;
|
|
1313
|
+
};
|
|
1314
|
+
dist: {
|
|
1315
|
+
path: string;
|
|
1316
|
+
mainAmxPath: string;
|
|
1317
|
+
mainAmxReportPath: string;
|
|
1318
|
+
ddeXmlPath: string;
|
|
1319
|
+
ddeApiPath: string;
|
|
1320
|
+
ddeApi: string;
|
|
1321
|
+
ddeJson: string;
|
|
1322
|
+
povPath: string;
|
|
1323
|
+
povDetailsPath: string;
|
|
1324
|
+
dfilesPath: string;
|
|
1325
|
+
dfilesProperties: string;
|
|
1326
|
+
bloPath: string;
|
|
1327
|
+
reportTemplate: string;
|
|
1328
|
+
};
|
|
1329
|
+
dlo: {
|
|
1330
|
+
path: string;
|
|
1331
|
+
mainDLO: string;
|
|
1332
|
+
mainINI: string;
|
|
1333
|
+
};
|
|
1334
|
+
dde: {
|
|
1335
|
+
path: string;
|
|
1336
|
+
mainDDE: string;
|
|
1337
|
+
};
|
|
1338
|
+
dfiles: {
|
|
1339
|
+
path: string;
|
|
1340
|
+
mainDFILES: string;
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
|
|
226
1345
|
export declare namespace Dependencies {
|
|
1346
|
+
/**
|
|
1347
|
+
* Just combine all dependencies in one object
|
|
1348
|
+
* Optional devDependencies can be excluded
|
|
1349
|
+
* @param manifest
|
|
1350
|
+
* @param production - set to true if devDependencies should be excluded
|
|
1351
|
+
*/
|
|
1352
|
+
export function getAll(manifest: Manifest.Manifest, production?: boolean): Promise<Manifest.Dependencies>;
|
|
1353
|
+
/**
|
|
1354
|
+
* get the library name from the dependency id
|
|
1355
|
+
* eg. Microtronics/dlo-core -> dlo-core
|
|
1356
|
+
* @param dependencyId
|
|
1357
|
+
*/
|
|
1358
|
+
export function dependencyIdToName(dependencyId: string): string;
|
|
1359
|
+
/**
|
|
1360
|
+
* convert a dependency id to the libdeps path
|
|
1361
|
+
* eg. Microtronics/dlo-core would result into <cwd>/.studio/libdeps/dlo-core
|
|
1362
|
+
* @param cwd
|
|
1363
|
+
* @param dependencyId
|
|
1364
|
+
*/
|
|
1365
|
+
export function dependencyToPath(cwd: URI, dependencyId: string): URI;
|
|
227
1366
|
/**
|
|
228
1367
|
* Removes the caret-range constraint from the version
|
|
229
1368
|
* @public
|
|
@@ -298,6 +1437,25 @@ export declare namespace Dependencies {
|
|
|
298
1437
|
export function uninstallDependency(cwd: URI, fs: LocalFS, publisherId: string, libraryName: string): Promise<void>;
|
|
299
1438
|
}
|
|
300
1439
|
|
|
1440
|
+
export declare namespace Diagnostics {
|
|
1441
|
+
const CODE: {
|
|
1442
|
+
ddeFieldLength: string;
|
|
1443
|
+
};
|
|
1444
|
+
export type Level = 'error' | 'warning' | 'hint' | 'info';
|
|
1445
|
+
/**
|
|
1446
|
+
* Generic diagnostic type for unified responses
|
|
1447
|
+
*/
|
|
1448
|
+
export interface File {
|
|
1449
|
+
file: URI;
|
|
1450
|
+
level: Level;
|
|
1451
|
+
code?: string;
|
|
1452
|
+
line: number;
|
|
1453
|
+
startCharacter?: number;
|
|
1454
|
+
endCharacter?: number;
|
|
1455
|
+
message: string;
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
|
|
301
1459
|
/**
|
|
302
1460
|
* Permissions of a file.
|
|
303
1461
|
*/
|
|
@@ -376,6 +1534,19 @@ declare enum FileType {
|
|
|
376
1534
|
SymbolicLink = 64
|
|
377
1535
|
}
|
|
378
1536
|
|
|
1537
|
+
export declare namespace Helper {
|
|
1538
|
+
/**
|
|
1539
|
+
* Convert yaml range to an valid vscode line information
|
|
1540
|
+
* @param lineCounter
|
|
1541
|
+
* @param fieldRange
|
|
1542
|
+
*/
|
|
1543
|
+
export function yamlRangeToLineInformation(lineCounter: LineCounter, fieldRange: Range_2): {
|
|
1544
|
+
line: number;
|
|
1545
|
+
startCharacter: number;
|
|
1546
|
+
endCharacter: number;
|
|
1547
|
+
};
|
|
1548
|
+
}
|
|
1549
|
+
|
|
379
1550
|
declare interface LocalFS {
|
|
380
1551
|
/**
|
|
381
1552
|
* Filesystem rm function. It has to remove files or paths recursive
|
|
@@ -455,6 +1626,10 @@ export declare namespace Manifest {
|
|
|
455
1626
|
* @param manifest
|
|
456
1627
|
*/
|
|
457
1628
|
export function write(cwd: URI, fs: LocalFS, manifest: Manifest): Promise<Manifest>;
|
|
1629
|
+
/**
|
|
1630
|
+
* Check if the current project is a library project
|
|
1631
|
+
*/
|
|
1632
|
+
export function isLibraryProject(manifest: Manifest.Manifest): boolean;
|
|
458
1633
|
}
|
|
459
1634
|
|
|
460
1635
|
export declare namespace Registry {
|
|
@@ -476,4 +1651,96 @@ export declare namespace Registry {
|
|
|
476
1651
|
export function fetchLibraryContent(token: string | null, contentURL: string, json?: boolean): Promise<any>;
|
|
477
1652
|
}
|
|
478
1653
|
|
|
1654
|
+
declare interface XMLField {
|
|
1655
|
+
alias: string;
|
|
1656
|
+
byteofs?: string;
|
|
1657
|
+
index?: string;
|
|
1658
|
+
title: string;
|
|
1659
|
+
name: string;
|
|
1660
|
+
upload?: '0';
|
|
1661
|
+
download?: '0';
|
|
1662
|
+
decpl?: number | string;
|
|
1663
|
+
param0?: string;
|
|
1664
|
+
units?: string;
|
|
1665
|
+
editmask?: string;
|
|
1666
|
+
view?: number;
|
|
1667
|
+
edit?: number;
|
|
1668
|
+
chmode?: number | string;
|
|
1669
|
+
default?: string | number;
|
|
1670
|
+
vscale?: number | string;
|
|
1671
|
+
vofs?: number | string;
|
|
1672
|
+
min?: number | string;
|
|
1673
|
+
max?: number | string;
|
|
1674
|
+
ialarm_low?: number | string;
|
|
1675
|
+
ialarm_high?: number | string;
|
|
1676
|
+
iwarn_low?: number | string;
|
|
1677
|
+
iwarn_high?: number | string;
|
|
1678
|
+
hysterese?: number | string;
|
|
1679
|
+
itrigger?: number | string;
|
|
1680
|
+
itriggerus?: number | string;
|
|
1681
|
+
setpoint?: string;
|
|
1682
|
+
bitmask?: string;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
declare namespace YamlPreCompiler {
|
|
1686
|
+
class PreCompiler {
|
|
1687
|
+
private manifest;
|
|
1688
|
+
private libraryFiles;
|
|
1689
|
+
private ddeHistory;
|
|
1690
|
+
private readonly fieldNamesPerContainer;
|
|
1691
|
+
private readonly usedContainerNames;
|
|
1692
|
+
private fileDiagnostics;
|
|
1693
|
+
private readonly libraryDDE;
|
|
1694
|
+
constructor(manifest: Manifest.Manifest, libraryFiles: DDE_Core.LibraryFile[], ddeHistory: any);
|
|
1695
|
+
/**
|
|
1696
|
+
* Parse the given library files and return the diagnostics
|
|
1697
|
+
*/
|
|
1698
|
+
parseLibraries(): Diagnostics.File[];
|
|
1699
|
+
private get previousVersion();
|
|
1700
|
+
private getContainerOfPreviousVersion;
|
|
1701
|
+
parseMainDDE(filePath: URI, yaml: string): {
|
|
1702
|
+
ddeJSON: DDEJson | null;
|
|
1703
|
+
diagnostics: Diagnostics.File[];
|
|
1704
|
+
};
|
|
1705
|
+
/**
|
|
1706
|
+
* Parse a given yaml file
|
|
1707
|
+
* @param filePath
|
|
1708
|
+
* @param yaml
|
|
1709
|
+
* @param libraryName
|
|
1710
|
+
*/
|
|
1711
|
+
parseYamlFile(filePath: URI, yaml: string, libraryName?: string): {
|
|
1712
|
+
parsedDDE: DDEJson;
|
|
1713
|
+
diagnostics: Diagnostics.File[];
|
|
1714
|
+
};
|
|
1715
|
+
private yamlDocToDdeJson;
|
|
1716
|
+
private getRealContainerInformation;
|
|
1717
|
+
private findNextFreeContainer;
|
|
1718
|
+
private findPreviousUsedContainer;
|
|
1719
|
+
private createDDEJsonFields;
|
|
1720
|
+
private buildDDEJsonField;
|
|
1721
|
+
private resolvePossibleAlias;
|
|
1722
|
+
private validateContainerDefinition;
|
|
1723
|
+
private parseUserLevel;
|
|
1724
|
+
private parseChannelMode;
|
|
1725
|
+
private parseTriggerUndershoot;
|
|
1726
|
+
private validateAllowedContainer;
|
|
1727
|
+
private validateContainerFields;
|
|
1728
|
+
private checkForContainerRelation;
|
|
1729
|
+
private validateFieldName;
|
|
1730
|
+
private checkFieldNameLength;
|
|
1731
|
+
private validateContainerRelation;
|
|
1732
|
+
private findRelatedShadowField;
|
|
1733
|
+
private mergeAndFormat;
|
|
1734
|
+
private combineDDE;
|
|
1735
|
+
private initialContainerByteOffset;
|
|
1736
|
+
private updateShadowFieldInformation;
|
|
1737
|
+
private sortContainerFields;
|
|
1738
|
+
private sortFields;
|
|
1739
|
+
private sortPreviousContainerFields;
|
|
1740
|
+
private generatePlaceholderFieldIfNeeded;
|
|
1741
|
+
private generateSetPointList;
|
|
1742
|
+
private getNextSetpointValue;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
|
|
479
1746
|
export { }
|