Add protection domain foundation
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import type { ProtectionDeviceConfiguration } from "../models/protection-device.model.js";
|
||||
import type { CircuitGroupCategory } from "../../shared/constants/circuit-group.js";
|
||||
|
||||
const defaultCircuitProtectionByCategory = {
|
||||
lighting: {
|
||||
type: "LS",
|
||||
ratedCurrentA: 10,
|
||||
tripCharacteristic: "B",
|
||||
},
|
||||
single_phase: {
|
||||
type: "FI_LS",
|
||||
ratedCurrentA: 16,
|
||||
tripCharacteristic: "B",
|
||||
rcdType: "A",
|
||||
ratedResidualCurrentMa: 30,
|
||||
},
|
||||
three_phase: {
|
||||
type: "FI_LS",
|
||||
ratedCurrentA: 16,
|
||||
tripCharacteristic: "B",
|
||||
rcdType: "A",
|
||||
ratedResidualCurrentMa: 30,
|
||||
},
|
||||
} as const satisfies Record<CircuitGroupCategory, ProtectionDeviceConfiguration>;
|
||||
|
||||
const defaultGroupRcd = {
|
||||
type: "FI",
|
||||
ratedCurrentA: 40,
|
||||
rcdType: "A",
|
||||
ratedResidualCurrentMa: 30,
|
||||
} as const satisfies ProtectionDeviceConfiguration;
|
||||
|
||||
export function createDefaultCircuitProtection(
|
||||
category: CircuitGroupCategory
|
||||
): ProtectionDeviceConfiguration {
|
||||
return { ...defaultCircuitProtectionByCategory[category] };
|
||||
}
|
||||
|
||||
export function createDefaultGroupRcd(): ProtectionDeviceConfiguration {
|
||||
return { ...defaultGroupRcd };
|
||||
}
|
||||
Reference in New Issue
Block a user