From 0bff5aa448bdfd94956aa602b74a3f44099facd1 Mon Sep 17 00:00:00 2001 From: Jarrad Raumati Date: Wed, 13 Sep 2023 00:05:02 +1200 Subject: [PATCH 1/2] fix(wizards/foundation): Added missing DAI bTypes (#1320) * Added missing DAI bTypes from IEC 61850-6 ed. 2.1 * Updated test snapshots to include added bTypes * Octet assumed to be no zero padding, no space hexadecimal string value --- src/wizards/foundation/dai-field-type.ts | 10 ++++ src/wizards/foundation/enums.ts | 3 ++ .../bda-wizarding-editing.test.snap.js | 54 +++++++++++++++++++ .../da-wizarding-editing.test.snap.js | 54 +++++++++++++++++++ .../__snapshots__/abstractda.test.snap.js | 24 +++++++++ 5 files changed, 145 insertions(+) diff --git a/src/wizards/foundation/dai-field-type.ts b/src/wizards/foundation/dai-field-type.ts index 0933c9e62..27470ba5c 100644 --- a/src/wizards/foundation/dai-field-type.ts +++ b/src/wizards/foundation/dai-field-type.ts @@ -38,6 +38,11 @@ const daiFieldTypes = [ 'VisString65', 'VisString129', 'VisString255', + 'ObjRef', + 'Currency', + 'Octet64', + 'Octet6', + 'Octet16', ] as const; export type DaiFieldTypes = typeof daiFieldTypes[number]; const emptyIfNull = (item: T | null, value: string): string => { @@ -65,6 +70,11 @@ export function getCustomField(): Record { VisString65: stringField('VisString65', 65), VisString129: stringField('VisString129', 129), VisString255: stringField('VisString255', 255), + ObjRef: stringField('VisString129', 129), + Currency: stringField('Currency', 3), + Octet64: stringField('Octet64', 64 * 2), + Octet6: stringField('Octet6', 6 * 2), + Octet16: stringField('Octet16', 16 * 2), }; function booleanField(): CustomField { diff --git a/src/wizards/foundation/enums.ts b/src/wizards/foundation/enums.ts index be6002bf8..b6a23954a 100644 --- a/src/wizards/foundation/enums.ts +++ b/src/wizards/foundation/enums.ts @@ -49,7 +49,10 @@ export const predefinedBasicTypeEnum = [ 'TrgOps', 'OptFlds', 'SvOptFlds', + 'LogOptFlds', 'EntryID', + 'Octet6', + 'Octet16', ]; export const valKindEnum = ['Spec', 'Conf', 'RO', 'Set']; diff --git a/test/integration/wizards/__snapshots__/bda-wizarding-editing.test.snap.js b/test/integration/wizards/__snapshots__/bda-wizarding-editing.test.snap.js index f227656fd..aad0783d3 100644 --- a/test/integration/wizards/__snapshots__/bda-wizarding-editing.test.snap.js +++ b/test/integration/wizards/__snapshots__/bda-wizarding-editing.test.snap.js @@ -366,6 +366,15 @@ snapshots["BDA wizarding editing integration defines a editBDaWizard to edit an > SvOptFlds + + LogOptFlds + EntryID + + Octet6 + + + Octet16 + SvOptFlds + + LogOptFlds + EntryID + + Octet6 + + + Octet16 + SvOptFlds + + LogOptFlds + EntryID + + Octet6 + + + Octet16 + SvOptFlds + + LogOptFlds + EntryID + + Octet6 + + + Octet16 + SvOptFlds + + LogOptFlds + EntryID + + Octet6 + + + Octet16 + Date: Wed, 13 Sep 2023 12:41:11 +0200 Subject: [PATCH 2/2] fix: added editcount to reflect made changes (#1321) Signed-off-by: Stef3st --- src/editors/substation/ied-editor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/editors/substation/ied-editor.ts b/src/editors/substation/ied-editor.ts index 6c3106f2a..f77f153b7 100644 --- a/src/editors/substation/ied-editor.ts +++ b/src/editors/substation/ied-editor.ts @@ -27,6 +27,8 @@ export class IedEditor extends LitElement { /** The document being edited as provided to editor by [[`Zeroline`]]. */ @property({ attribute: false }) doc!: XMLDocument; + @property({ type: Number }) + editCount = -1; /** SCL element IED */ @property({ attribute: false }) element!: Element;