@yarkivaev/scada 2.17.0 → 2.18.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/index.js +1 -2
- package/package.json +3 -2
- package/src/application/deploy/collectorSourcePlan.js +97 -0
- package/src/application/deploy/compileCollectorTasks.js +31 -0
- package/src/application/deploy/compileControlCatalog.js +66 -0
- package/src/application/deploy/controlPlan.js +16 -0
- package/src/application/deploy/controlPlaneConfiguration.js +62 -0
- package/src/application/deploy/controlReaderSpecs.js +37 -0
- package/src/application/deploy/liveReleaseOverlay.js +17 -0
- package/src/application/deploy/projectControlPlane.js +48 -0
- package/src/application/deploy/projectTopology.js +41 -0
- package/src/infrastructure/deploy/brokerReplicaTopology.js +34 -12
- package/src/infrastructure/deploy/brokerSecurity.js +89 -0
- package/src/infrastructure/deploy/brokerSecurityInput.js +85 -0
- package/src/infrastructure/deploy/brokerTopology.js +125 -0
- package/src/infrastructure/deploy/centralTelemetry.js +51 -0
- package/src/infrastructure/deploy/clickhouseTelemetryPolicy.js +64 -0
- package/src/infrastructure/deploy/collectorChartPlan.js +68 -0
- package/src/infrastructure/deploy/configuredHistorySeed.js +54 -0
- package/src/infrastructure/deploy/configuredPostgresMaintenance.js +23 -0
- package/src/infrastructure/deploy/databaseSecurity.js +39 -0
- package/src/infrastructure/deploy/deploymentRecovery.js +49 -0
- package/src/infrastructure/deploy/deploymentTemplate.js +67 -0
- package/src/infrastructure/deploy/executeConfiguredChartDeployment.js +65 -0
- package/src/infrastructure/deploy/executeManagedDeployment.js +46 -0
- package/src/infrastructure/deploy/highAvailability/brokerOwnership.js +19 -0
- package/src/infrastructure/deploy/highAvailability/catalogReconciler.js +61 -0
- package/src/infrastructure/deploy/highAvailability/classifyFederation.js +57 -0
- package/src/infrastructure/deploy/highAvailability/classifyGate.js +114 -0
- package/src/infrastructure/deploy/highAvailability/classifyLoop.js +139 -0
- package/src/infrastructure/deploy/highAvailability/classifyShovels.js +70 -0
- package/src/infrastructure/deploy/highAvailability/classifyWatermark.js +45 -0
- package/src/infrastructure/deploy/highAvailability/compileClassifierRules.js +21 -0
- package/src/infrastructure/deploy/highAvailability/controllerReconcile.js +14 -0
- package/src/infrastructure/deploy/highAvailability/historyReceiver.js +49 -0
- package/src/infrastructure/deploy/highAvailability/historyWatermark.js +42 -0
- package/src/infrastructure/deploy/highAvailability/index.js +14 -0
- package/src/infrastructure/deploy/highAvailability/reconcileBrokerThroughController.js +18 -0
- package/src/infrastructure/deploy/highAvailability/reconciliationBundle.js +28 -0
- package/src/infrastructure/deploy/highAvailability/segmentAdmit.js +24 -0
- package/src/infrastructure/deploy/highAvailability/segmentPublish.js +27 -0
- package/src/infrastructure/deploy/highAvailability/supervisorReplica.js +36 -0
- package/src/infrastructure/deploy/index.js +27 -2
- package/src/infrastructure/deploy/projectClassification.js +42 -0
- package/src/infrastructure/deploy/securityPolicy.js +16 -0
- package/src/infrastructure/ingest/telemetry/centralPolicy.js +29 -8
- package/src/infrastructure/management/kiosk/kioskDeployment.js +60 -0
- package/src/infrastructure/mdmesh/bootstrapMdmeshCredentials.js +47 -0
- package/src/infrastructure/mdmesh/index.js +2 -0
- package/src/infrastructure/mdmesh/mdmeshServerRelease.js +58 -0
- package/src/infrastructure/messaging/rabbitmq/definitions.js +12 -6
- package/src/infrastructure/opcua/projectSources.js +36 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { validateConnections } from './config.js';
|
|
2
|
+
|
|
3
|
+
/** Selects sampling policy by stream path while the fan-in remains the source inventory. */
|
|
4
|
+
function timing(name, config) {
|
|
5
|
+
const match = (config.sampling || []).find((item) => {
|
|
6
|
+
const parts = item.name.split('/');
|
|
7
|
+
const path = name.split('/');
|
|
8
|
+
return parts.length === path.length && parts.every((part, index) => {
|
|
9
|
+
return part === '*' || part === path[index];
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
const healthRequired = match?.healthRequired === undefined ? true : match.healthRequired;
|
|
13
|
+
if (typeof healthRequired !== 'boolean') { throw new TypeError('OPC UA healthRequired must be boolean'); }
|
|
14
|
+
return { publishMs: match?.publishMs ?? config.publishMs, heartbeatMs: match?.heartbeatMs ?? config.heartbeatMs, healthRequired };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Groups DSL point mappings by physical endpoint; machine identity belongs to each channel. */
|
|
18
|
+
export default function projectOpcuaSources(rows, config, deviceFor) {
|
|
19
|
+
const connections = new Map();
|
|
20
|
+
rows.forEach((row) => {
|
|
21
|
+
const intervals = timing(row.name, config);
|
|
22
|
+
const connection = connections.get(row.from) || { url: row.from, ...intervals, channels: [] };
|
|
23
|
+
if (connection.publishMs !== intervals.publishMs || connection.heartbeatMs !== intervals.heartbeatMs || connection.healthRequired !== intervals.healthRequired) {
|
|
24
|
+
throw new Error(`incompatible OPC UA sampling policies at ${row.from}`);
|
|
25
|
+
}
|
|
26
|
+
if (!row.mapping || !Object.keys(row.mapping).length) {
|
|
27
|
+
throw new Error(`OPC UA stream ${row.name} requires a point mapping`);
|
|
28
|
+
}
|
|
29
|
+
const device = deviceFor(row);
|
|
30
|
+
connection.channels.push(...Object.entries(row.mapping).map(([key, nodeId]) => {
|
|
31
|
+
return { nodeId, key, device };
|
|
32
|
+
}));
|
|
33
|
+
connections.set(row.from, connection);
|
|
34
|
+
});
|
|
35
|
+
return validateConnections([...connections.values()]);
|
|
36
|
+
}
|