@mchp-mcc/clock-16bit-driver 1.1.0 → 1.2.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/Changelog.md +20 -0
- package/Readme.md +20 -0
- package/output/autoCreator.js +148 -35
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +148 -35
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +148 -35
- package/output/creator.js.map +1 -1
- package/output/index.html +1 -1
- package/output/main.js +1 -1
- package/output/nullPrototype.json +7 -1
- package/output/processor.js +148 -35
- package/output/processor.js.map +1 -1
- package/output/reducer.js +147 -34
- package/output/reducer.js.map +1 -1
- package/package.json +12 -6
- package/src/DerivedData.ts +171 -44
- package/src/catalog.json +2 -0
- package/src/moduleConfig.json +21 -2
- package/tests/itf/Utils.ts +52 -0
- package/tests/itf/clock.test.ts +1165 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mchp-mcc/clock-16bit-driver",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.2.0",
|
4
4
|
"scf": {
|
5
5
|
"reducer": "output/reducer.js",
|
6
6
|
"creator": "output/creator.js",
|
@@ -44,7 +44,9 @@
|
|
44
44
|
"build-run-dir-future": "node config/extract-run-directory-future.js",
|
45
45
|
"profile": "jest profile",
|
46
46
|
"release": "yarn build && yarn test && node -e 'require(\"./config/scf-project-scripts\").releaseProject()'",
|
47
|
-
"postprocess": "node config/appendPrototype.js"
|
47
|
+
"postprocess": "node config/appendPrototype.js",
|
48
|
+
"test-itf-all": "node ./node_modules/@microchip/ccl-itf/lib/index.js --sp=./tests/itf --rd=./run --df=\"dsPIC33CK64MC105|dsPIC33CK256MC506|dsPIC33CDV64MC106|dsPIC33CK64MP105|dsPIC33CDVL64MC106|dsPIC33CDV256MP506|dsPIC33CK512MPT608|dsPIC33CDVC256MP506|dsPIC33CK256MP508|dsPIC33CK512MP608|dsPIC33CK1024MP710|dsPIC33CH512MP508|dsPIC33CH128MP508\"",
|
49
|
+
"test-itf": "node ./node_modules/@microchip/ccl-itf/lib/index.js --sp=./tests/itf --rd=./run --df=\"dsPIC33CH128MP508$\""
|
48
50
|
},
|
49
51
|
"husky": {
|
50
52
|
"hooks": {
|
@@ -59,14 +61,16 @@
|
|
59
61
|
"files": [
|
60
62
|
"output/**/*",
|
61
63
|
"config.json",
|
62
|
-
"src/**/*"
|
64
|
+
"src/**/*",
|
65
|
+
"/tests/itf/"
|
63
66
|
],
|
64
67
|
"jest": {
|
65
68
|
"testPathIgnorePatterns": [
|
66
69
|
"/node_modules/",
|
67
70
|
"/run/",
|
68
71
|
"/generated_module/examples/",
|
69
|
-
"/lib/"
|
72
|
+
"/lib/",
|
73
|
+
"/tests/"
|
70
74
|
],
|
71
75
|
"modulePathIgnorePatterns": [
|
72
76
|
"<rootDir>/run"
|
@@ -78,10 +82,11 @@
|
|
78
82
|
}
|
79
83
|
},
|
80
84
|
"dependencies": {
|
85
|
+
"@mchp-mcc/pic-16bit": "^5.10.0",
|
81
86
|
"@mchp-mcc/pic-8bit-types": "^5.4.1",
|
82
87
|
"@microchip/api-prefix-registration": "^0.1.0",
|
83
88
|
"@microchip/canfd-clock-interface": "^1.0.0",
|
84
|
-
"@microchip/clock-16bit-config-interface": "^1.1.
|
89
|
+
"@microchip/clock-16bit-config-interface": "^1.1.5",
|
85
90
|
"@microchip/clock-16bit-interface": "^1.1.0",
|
86
91
|
"@microchip/fosc-hz": "^0.1.2",
|
87
92
|
"@microchip/pin-standard": "^0.4.1",
|
@@ -97,10 +102,11 @@
|
|
97
102
|
"@babel/preset-env": "^7.9.6",
|
98
103
|
"@babel/preset-react": "^7.9.4",
|
99
104
|
"@babel/preset-typescript": "^7.9.0",
|
105
|
+
"@microchip/ccl-itf": "^1.6.0",
|
100
106
|
"@microchip/initializer-system": "^0.5.3",
|
101
107
|
"@microchip/melody-automodule-interface": "^1.6.2",
|
102
108
|
"@microchip/pic-8bit-types": "^5.0.1",
|
103
|
-
"@microchip/run-directory": "^4.2.
|
109
|
+
"@microchip/run-directory": "^4.2.4",
|
104
110
|
"@microchip/scf-automodule": "^5.6.3",
|
105
111
|
"@microchip/scf-automodule-impl": "^1.8.2",
|
106
112
|
"@microchip/scf-autoview": "^3.26.1",
|
package/src/DerivedData.ts
CHANGED
@@ -20,9 +20,13 @@ const CLOCK_16BIT_CONFIG_INTERFACE = "clock_16bit_config_interface";
|
|
20
20
|
const DIGITS_AFTER_DECIMAL_POINT = 2;
|
21
21
|
const COMPONENT_AUX_CLOCK_SOURCE = "auxClockSource";
|
22
22
|
const COMPONENT_MAIN_CLOCK_SOURCE = "mainClockSource";
|
23
|
+
const COMPONENT_CAN_FD_CLOCK_SOURCE_FREQ = "canfdClkSrcFreq";
|
23
24
|
export const COMPONENT_AUX_CLOCK_INPUT_FREQUENCY = "auxClockInputFrequency_Hz";
|
24
25
|
export const COMPONENT_MAIN_CLOCK_INPUT_FREQUENCY = "mainClockInputFrequency_Hz";
|
25
26
|
const COMPONENT_REF_CLOCK_SOURCE = "refClockSource";
|
27
|
+
const COMPONENT_REF_CLOCK_ENABLE = "refClockEnable";
|
28
|
+
export const COMPONENT_CALCULATED_REF_OUTPUT_FREQUENCY =
|
29
|
+
"calculatedRefOutputFrequency_Hz";
|
26
30
|
const COMPONENT_CANFD_CLOCK_SOURCE = "canfdClockSource";
|
27
31
|
export const COMPONENT_REQUESTED_SYSTEM_FREQUENCY = "requestedSystemFrequency_Hz";
|
28
32
|
const COMPONENT_FVCO_DIVIDER = "fvcoDivider";
|
@@ -102,6 +106,7 @@ class MyDerivedData implements DerivedData {
|
|
102
106
|
requestedCanfdClockOutputFrequency_Hz: this
|
103
107
|
.getRequestedCanfdClockOutputFrequency_Hz,
|
104
108
|
getUiBehavior: this.getUiBehavior,
|
109
|
+
isEnabled: this.isComponentEnabled,
|
105
110
|
mainClockInputFrequency_HzValidator: this.mainClockInputFrequency_HzValidator,
|
106
111
|
auxClockInputFrequency_HzValidator: this.auxClockInputFrequency_HzValidator,
|
107
112
|
requestedAuxClockOutputFrequency_HzValidator: this
|
@@ -113,11 +118,68 @@ class MyDerivedData implements DerivedData {
|
|
113
118
|
getCustomUiErrors: this.getCustomUiErrors,
|
114
119
|
"clock-16bit-drv-interface_payloads": this
|
115
120
|
.getClockApplicationInterfacePayload,
|
121
|
+
"clock-16bit-drv-interface_payload": this
|
122
|
+
.getDefaultClockApplicationInterfacePayload,
|
116
123
|
importName: this.friendlyImportName,
|
117
124
|
exportName: this.friendlyExportName,
|
118
125
|
};
|
119
126
|
};
|
120
127
|
|
128
|
+
private getDeviceName = (): string => {
|
129
|
+
let deviceName = "";
|
130
|
+
const deviceMetaData = this.dataModel?.getImports()?.device_meta?.payload;
|
131
|
+
if (deviceMetaData) {
|
132
|
+
deviceName = deviceMetaData?.deviceName;
|
133
|
+
}
|
134
|
+
return deviceName;
|
135
|
+
};
|
136
|
+
|
137
|
+
private isSecondaryDevice = (): boolean => {
|
138
|
+
const deviceName = this.getDeviceName();
|
139
|
+
// device name ends with "S" followed by a digit
|
140
|
+
if (deviceName.match(/S\d$/)) {
|
141
|
+
return true;
|
142
|
+
}
|
143
|
+
return false;
|
144
|
+
};
|
145
|
+
|
146
|
+
private isComponentEnabled = (componentName: string): boolean => {
|
147
|
+
let isComponentEnabled = false;
|
148
|
+
if (
|
149
|
+
componentName === COMPONENT_REF_CLOCK_SOURCE ||
|
150
|
+
componentName === COMPONENT_REQUESTED_REF_CLOCK_OUTPUT_FREQUENCY
|
151
|
+
) {
|
152
|
+
if (this.dataModel?.getComponentValue(COMPONENT_REF_CLOCK_ENABLE) === true) {
|
153
|
+
isComponentEnabled = true;
|
154
|
+
}
|
155
|
+
} else if (
|
156
|
+
componentName === COMPONENT_REF_CLOCK_ENABLE ||
|
157
|
+
componentName === COMPONENT_MAIN_CLOCK_SOURCE ||
|
158
|
+
componentName === COMPONENT_MAIN_CLOCK_INPUT_FREQUENCY ||
|
159
|
+
componentName === COMPONENT_SET_MAX_FREQUENCY ||
|
160
|
+
componentName === COMPONENT_FVCO_DIVIDER ||
|
161
|
+
componentName === COMPONENT_AUX_CLOCK_SOURCE ||
|
162
|
+
componentName === COMPONENT_CANFD_CLOCK_SOURCE ||
|
163
|
+
componentName === COMPONENT_AFVCO_DIVIDER ||
|
164
|
+
componentName === COMPONENT_AUX_CLOCK_INPUT_FREQUENCY ||
|
165
|
+
componentName === COMPONENT_REQUESTED_AUX_CLOCK_OUTPUT_FREQUENCY
|
166
|
+
) {
|
167
|
+
isComponentEnabled = true;
|
168
|
+
} else if (componentName === COMPONENT_REQUESTED_SYSTEM_FREQUENCY) {
|
169
|
+
if (
|
170
|
+
this.dataModel?.getComponentValue(COMPONENT_SET_MAX_FREQUENCY) === false
|
171
|
+
) {
|
172
|
+
isComponentEnabled = true;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
// Checking whether Secondary Device of Dual Core is being used
|
177
|
+
if (componentName === COMPONENT_MAIN_CLOCK_SOURCE && this.isSecondaryDevice()) {
|
178
|
+
isComponentEnabled = false;
|
179
|
+
}
|
180
|
+
return isComponentEnabled;
|
181
|
+
};
|
182
|
+
|
121
183
|
private getCustomUiErrors = (componentName: string): Error[] | undefined => {
|
122
184
|
let customErrors: Error[];
|
123
185
|
switch (componentName) {
|
@@ -207,6 +269,17 @@ class MyDerivedData implements DerivedData {
|
|
207
269
|
return minClockFrequency;
|
208
270
|
};
|
209
271
|
|
272
|
+
private getClockPropertiesFromPayLoad = (): any => {
|
273
|
+
let clockProperties: unknown;
|
274
|
+
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
275
|
+
CLOCK_16BIT_CONFIG_INTERFACE,
|
276
|
+
);
|
277
|
+
if (interfaceData != undefined) {
|
278
|
+
clockProperties = interfaceData?.clockProperties;
|
279
|
+
}
|
280
|
+
return clockProperties;
|
281
|
+
};
|
282
|
+
|
210
283
|
private getMaxClockFrequency = (): number => {
|
211
284
|
let maxClockFrequency = 0;
|
212
285
|
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
@@ -224,10 +297,24 @@ class MyDerivedData implements DerivedData {
|
|
224
297
|
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
225
298
|
CLOCK_16BIT_CONFIG_INTERFACE,
|
226
299
|
);
|
227
|
-
if (
|
300
|
+
if (
|
301
|
+
interfaceData != undefined &&
|
302
|
+
this.dataModel?.getComponentValue("mainClockSource") !=
|
303
|
+
"FRC Oscillator with Postscaler"
|
304
|
+
) {
|
228
305
|
maxSystemClockFrequency =
|
229
306
|
interfaceData?.mainClockPayload?.maxSystemClockFrequency ?? 0;
|
230
307
|
}
|
308
|
+
if (
|
309
|
+
this.dataModel?.getComponentValue("mainClockSource") ==
|
310
|
+
"FRC Oscillator with Postscaler"
|
311
|
+
) {
|
312
|
+
if (this.getClockPropertiesFromPayLoad()["FRC_CLOCK"] != undefined) {
|
313
|
+
maxSystemClockFrequency = Number(
|
314
|
+
this.getClockPropertiesFromPayLoad()["FRC_CLOCK"]?.value,
|
315
|
+
);
|
316
|
+
}
|
317
|
+
}
|
231
318
|
return maxSystemClockFrequency;
|
232
319
|
};
|
233
320
|
|
@@ -240,7 +327,7 @@ class MyDerivedData implements DerivedData {
|
|
240
327
|
"Requested FCAN frequency can be configured from CAN 2.0/CAN-FD modules in Drivers category",
|
241
328
|
};
|
242
329
|
break;
|
243
|
-
case
|
330
|
+
case COMPONENT_CAN_FD_CLOCK_SOURCE_FREQ:
|
244
331
|
uiBehavior = {
|
245
332
|
["ui:help"]:
|
246
333
|
"CAN FD clock source frequency should be less than or equal to 640 MHz",
|
@@ -275,9 +362,9 @@ class MyDerivedData implements DerivedData {
|
|
275
362
|
const canfdInterfaceRequests:
|
276
363
|
| Processor.Dictionary<any>
|
277
364
|
| undefined = this.dataModel
|
278
|
-
|
279
|
-
|
280
|
-
|
365
|
+
.getExportInterfaces()
|
366
|
+
.getInterface("canfd_clock", canfd_clock_interface.Interface.getInterfaceId())
|
367
|
+
?.args;
|
281
368
|
return canfdInterfaceRequests;
|
282
369
|
};
|
283
370
|
|
@@ -296,17 +383,15 @@ class MyDerivedData implements DerivedData {
|
|
296
383
|
|
297
384
|
private isMainClockInputFrequencyVisible = (): boolean => {
|
298
385
|
let visible = false;
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
if (
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
visible = true;
|
309
|
-
}
|
386
|
+
const mainClockSource = this.dataModel.getComponentValue(
|
387
|
+
COMPONENT_MAIN_CLOCK_SOURCE,
|
388
|
+
);
|
389
|
+
if (mainClockSource != undefined) {
|
390
|
+
if (
|
391
|
+
mainClockSource?.indexOf(PRIMARY) >= 0 ||
|
392
|
+
mainClockSource?.indexOf(EXTERNAL) >= 0
|
393
|
+
) {
|
394
|
+
visible = true;
|
310
395
|
}
|
311
396
|
}
|
312
397
|
return visible;
|
@@ -314,7 +399,7 @@ class MyDerivedData implements DerivedData {
|
|
314
399
|
|
315
400
|
private isRequestedSystemFrequencyVisible = (): boolean => {
|
316
401
|
let visible = false;
|
317
|
-
if (
|
402
|
+
if (this.dataModel?.getComponentValue(COMPONENT_SET_MAX_FREQUENCY) === false) {
|
318
403
|
const mainClockSource = this.dataModel.getComponentValue(
|
319
404
|
COMPONENT_MAIN_CLOCK_SOURCE,
|
320
405
|
);
|
@@ -390,20 +475,17 @@ class MyDerivedData implements DerivedData {
|
|
390
475
|
} else if (
|
391
476
|
componentName === COMPONENT_REF_CLOCK_SOURCE ||
|
392
477
|
componentName === COMPONENT_REQUESTED_REF_CLOCK_OUTPUT_FREQUENCY ||
|
393
|
-
componentName ===
|
478
|
+
componentName === COMPONENT_CALCULATED_REF_OUTPUT_FREQUENCY ||
|
479
|
+
componentName === COMPONENT_REF_CLOCK_ENABLE
|
394
480
|
) {
|
395
481
|
return this.isRefClockSupported();
|
396
482
|
} else if (
|
397
483
|
componentName === COMPONENT_CANFD_CLOCK_SOURCE ||
|
398
484
|
componentName === COMPONENT_REQUESTED_CANFD_CLOCK_OUTPUT_FREQUENCY ||
|
399
485
|
componentName === "calculatedCanfdOutputFrequency_Hz" ||
|
400
|
-
componentName ===
|
486
|
+
componentName === COMPONENT_CAN_FD_CLOCK_SOURCE_FREQ
|
401
487
|
) {
|
402
488
|
return this.isCanfdClockSupported();
|
403
|
-
} else if (componentName === COMPONENT_MAIN_CLOCK_SOURCE) {
|
404
|
-
if (this.dataModel.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) {
|
405
|
-
return false;
|
406
|
-
}
|
407
489
|
}
|
408
490
|
return true;
|
409
491
|
};
|
@@ -472,6 +554,17 @@ class MyDerivedData implements DerivedData {
|
|
472
554
|
});
|
473
555
|
}
|
474
556
|
}
|
557
|
+
if (this.dataModel?.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) {
|
558
|
+
const mainClockSource = this.dataModel?.getComponentValue(
|
559
|
+
COMPONENT_MAIN_CLOCK_SOURCE,
|
560
|
+
);
|
561
|
+
if (mainClockSource != undefined && mainClockSource?.indexOf(PLL) < 0) {
|
562
|
+
alerts.push({
|
563
|
+
type: Processor.AlertTypes.Warning,
|
564
|
+
text: "Please select PLL as clock source.",
|
565
|
+
});
|
566
|
+
}
|
567
|
+
}
|
475
568
|
|
476
569
|
return alerts;
|
477
570
|
};
|
@@ -940,27 +1033,38 @@ class MyDerivedData implements DerivedData {
|
|
940
1033
|
};
|
941
1034
|
|
942
1035
|
private auxClockArg = (): any => {
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
1036
|
+
if (
|
1037
|
+
this.dataModel.getComponentValue(COMPONENT_AUX_CLOCK_SOURCE) !=
|
1038
|
+
"FRC Oscillator"
|
1039
|
+
) {
|
1040
|
+
return {
|
1041
|
+
auxClockSource: this.dataModel.getComponentValue(
|
1042
|
+
COMPONENT_AUX_CLOCK_SOURCE,
|
1043
|
+
),
|
1044
|
+
auxClockInputFrequency_Hz: this.dataModel.getComponentValue(
|
1045
|
+
COMPONENT_AUX_CLOCK_INPUT_FREQUENCY,
|
1046
|
+
),
|
1047
|
+
requestedAuxClockOutputFrequency_Hz: this.dataModel.getComponentValue(
|
1048
|
+
COMPONENT_REQUESTED_AUX_CLOCK_OUTPUT_FREQUENCY,
|
1049
|
+
),
|
1050
|
+
afvcoDivider: Number(
|
1051
|
+
this.dataModel.getComponentValue(COMPONENT_AFVCO_DIVIDER),
|
1052
|
+
),
|
1053
|
+
};
|
1054
|
+
}
|
955
1055
|
};
|
956
1056
|
|
957
1057
|
private refClockArg = (): any => {
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
1058
|
+
if (this.dataModel.getComponentValue(COMPONENT_REF_CLOCK_ENABLE) === true) {
|
1059
|
+
return {
|
1060
|
+
refClockSource: this.dataModel.getComponentValue(
|
1061
|
+
COMPONENT_REF_CLOCK_SOURCE,
|
1062
|
+
),
|
1063
|
+
requestedRefClockOutputFrequency_Hz: this.dataModel.getComponentValue(
|
1064
|
+
COMPONENT_REQUESTED_REF_CLOCK_OUTPUT_FREQUENCY,
|
1065
|
+
),
|
1066
|
+
};
|
1067
|
+
}
|
964
1068
|
};
|
965
1069
|
|
966
1070
|
private canfdClockArg = (): any => {
|
@@ -1104,9 +1208,9 @@ class MyDerivedData implements DerivedData {
|
|
1104
1208
|
const clockApplicationInterfaceRequests:
|
1105
1209
|
| Processor.Dictionary<clock_16bit_drv_interface.Arguments>
|
1106
1210
|
| undefined = this.dataModel
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1211
|
+
.getExportInterfaces()
|
1212
|
+
.getInterface("clock_16bit_drv_interface", this.getClock16bitDrvInterfaceId())
|
1213
|
+
?.args;
|
1110
1214
|
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
1111
1215
|
CLOCK_16BIT_CONFIG_INTERFACE,
|
1112
1216
|
);
|
@@ -1133,6 +1237,29 @@ class MyDerivedData implements DerivedData {
|
|
1133
1237
|
}
|
1134
1238
|
return clockApplicationInterfacePayloads;
|
1135
1239
|
};
|
1240
|
+
|
1241
|
+
private getDefaultClockApplicationInterfacePayload = ():
|
1242
|
+
| clock_16bit_config_interface.ProcessedPayload
|
1243
|
+
| undefined => {
|
1244
|
+
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
1245
|
+
CLOCK_16BIT_CONFIG_INTERFACE,
|
1246
|
+
);
|
1247
|
+
if (interfaceData != undefined) {
|
1248
|
+
return {
|
1249
|
+
mainClockPayload: interfaceData.mainClockPayload,
|
1250
|
+
hasUSB: interfaceData.hasUSB,
|
1251
|
+
hasAuxClock: interfaceData.hasAuxClock,
|
1252
|
+
hasRefClock: interfaceData.hasRefClock,
|
1253
|
+
hasCanfdClock: interfaceData.hasCanfdClock,
|
1254
|
+
hasSecondaryOscillator: interfaceData.hasSecondaryOscillator,
|
1255
|
+
isSecondaryOscillatorEnabled: interfaceData.isSecondaryOscillatorEnabled,
|
1256
|
+
auxClockPayload: interfaceData.auxClockPayload,
|
1257
|
+
refClockPayload: interfaceData.refClockPayload,
|
1258
|
+
canfdClockPayload: interfaceData.canfdClockPayload,
|
1259
|
+
};
|
1260
|
+
}
|
1261
|
+
};
|
1262
|
+
|
1136
1263
|
private friendlyExportName = (exportKey: string): string => {
|
1137
1264
|
let exportName: string;
|
1138
1265
|
switch (exportKey) {
|
package/src/catalog.json
CHANGED
package/src/moduleConfig.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
"false": "disabled"
|
7
7
|
},
|
8
8
|
"help": {
|
9
|
-
"url": "v2/keyword-lookup?keyword=
|
9
|
+
"url": "v2/keyword-lookup?keyword=CLOCK_16BIT_MELODY_DRIVER&version=latest&redirect=true",
|
10
10
|
"tooltip": "Click here to open documentation"
|
11
11
|
},
|
12
12
|
"UIGroups": {
|
@@ -41,10 +41,18 @@
|
|
41
41
|
"import": {
|
42
42
|
"interfaceId": {
|
43
43
|
"name": "clock-16bit-config-interface",
|
44
|
-
"version": "^1.1.
|
44
|
+
"version": "^1.1.5"
|
45
45
|
},
|
46
46
|
"isRequired": true
|
47
47
|
}
|
48
|
+
},
|
49
|
+
"device_meta": {
|
50
|
+
"import": {
|
51
|
+
"interfaceId": {
|
52
|
+
"name": "device-meta",
|
53
|
+
"version": "1.0.0"
|
54
|
+
}
|
55
|
+
}
|
48
56
|
}
|
49
57
|
},
|
50
58
|
"exports": {
|
@@ -335,6 +343,17 @@
|
|
335
343
|
"readonly": true
|
336
344
|
}
|
337
345
|
},
|
346
|
+
"refClockEnable": {
|
347
|
+
"name": "refClockEnable",
|
348
|
+
"description": "Reference Clock Enable",
|
349
|
+
"type": "boolean",
|
350
|
+
"defaultValue": false,
|
351
|
+
"group": "refClock",
|
352
|
+
"tabs": [
|
353
|
+
"main"
|
354
|
+
],
|
355
|
+
"category": "software"
|
356
|
+
},
|
338
357
|
"refClockSource": {
|
339
358
|
"name": "refClockSource",
|
340
359
|
"description": "REFO Clock Source",
|
@@ -0,0 +1,52 @@
|
|
1
|
+
export const getReadOnlyValue = (moduleData: any, tabId:any,property:any): any => {
|
2
|
+
const uiPropertyValueRule = getUISchemaData(moduleData)?.[tabId]?.[property]?.["ui:readonly"];
|
3
|
+
return uiPropertyValueRule;
|
4
|
+
}
|
5
|
+
export const getHiddenProperty = (moduleData: any, tabId:any,property:any): any => {
|
6
|
+
const uiPropertyValueRule = getUISchemaData(moduleData)?.[tabId]?.[property]?.["ui:widget"];
|
7
|
+
return uiPropertyValueRule;
|
8
|
+
}
|
9
|
+
const getUISchemaData = (moduleData:any): any => {
|
10
|
+
const uiSchema = moduleData?.payload?.auto?.main.uiSchema;
|
11
|
+
return uiSchema;
|
12
|
+
}
|
13
|
+
export const getRegisterValue = (moduleData: any, regName:any): any => {
|
14
|
+
const uiRegisterValue =moduleData?.payload?.auto?.register?.schema?.properties?.[regName]?.title;
|
15
|
+
return uiRegisterValue
|
16
|
+
}
|
17
|
+
export const getSettingBit = (moduleData: any, regName:any,settingBit): any => {
|
18
|
+
const uiSettingBit=moduleData?.payload?.auto?.register?.formData?.[regName]?.[settingBit];
|
19
|
+
return uiSettingBit
|
20
|
+
}
|
21
|
+
export const getConfigBitsSettingBit = (moduleData: any, regName:any,settingBit): any => {
|
22
|
+
const uiSettingBit=moduleData?.payload?.auto?.main?.formData?.[regName]?.[settingBit];
|
23
|
+
return uiSettingBit
|
24
|
+
}
|
25
|
+
export const getArgs = (moduleData: any, moduleName:any,property:any): any => {
|
26
|
+
const argValue=moduleData?.imports?.[moduleName]?.args?.[property];
|
27
|
+
return argValue
|
28
|
+
}
|
29
|
+
export const getPayload = (moduleData: any, moduleNameInterface:any,property:any): any => {
|
30
|
+
const argpayLoaddata = moduleData?.exports?.[moduleNameInterface]?.interfaces[0]?.payload?.[property];
|
31
|
+
return argpayLoaddata
|
32
|
+
}
|
33
|
+
export const getClockPayload = (moduleData: any,moduleId:any,moduleNameInterface:any,property:any): any => {
|
34
|
+
const argpayLoaddata = moduleData?.exports?.[moduleNameInterface]?.interfaces[0]?.payloads?.[moduleId]?.[property];
|
35
|
+
return argpayLoaddata
|
36
|
+
}
|
37
|
+
export const getModulepins = (moduleData: any,moduleId:any,pinpath:any): any => {
|
38
|
+
const ModulePinName = moduleData?.payload?.processedRows?.rows?.[moduleId]?.[pinpath];
|
39
|
+
return ModulePinName;
|
40
|
+
}
|
41
|
+
export const getModuleLockedPins = (moduleData: any,moduleId:any,pinpath:any,pinname:any): any => {
|
42
|
+
const pinlockData: any = moduleData?.payload?.processedRows?.rows?.[moduleId]?.[pinpath]?.pins?.[pinname];
|
43
|
+
return pinlockData
|
44
|
+
}
|
45
|
+
export const getResult = (moduleData: any, moduleName:any,property:any): any => {
|
46
|
+
const argValue=moduleData?.imports?.[moduleName]?.results?.[property];
|
47
|
+
return argValue
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|