sprinteins / oscd-plugins

Built OpenSCD Plugins
Apache License 2.0
0 stars 0 forks source link

proposal: Initial data format proposal for type designer #67

Open clepski opened 5 days ago

clepski commented 5 days ago

Do not merge, this is a proposal and the PR is for discussion purposes

Proposals for Type Designer data storing

Relates to #62

<SCL>
    ...
    <DataTypeTemplates>
        <Private name="TBD">
            <BayType description="BusBar">
                ...
            </BayType>
            <IEDType description="Relay">
                ...
            </IEDTYpe>
        </Private>
    </DataTypeTemplates>
</SCL>
<DataTypeTemplates>
    <Private name="TBD">
        <BayType description="BusBar">
            <IED name="Protection A" type="IED_protection_type" />
            <IED name="Protection B" type="IED_protection_type" />
            <IED name="Measurement B" type="IED_measurement_type" />
        <BayType>
        <IEDType id="IED_protection_type">
            ...
        </IEDType>
        <IEDType id="IED_measurement_type">
            ...
        </IEDType>
    </Private>
</DataTypeTemplates>

Full example

Consider the following type structure

Type structure

This should result in the following SCD. Take note that the SCD structure is strongly simplified, for example <LDevice> is not a direct child of <IED>. From <LN> downwards the types can already be created in the templates plugin.

<SCL>
    <OtherStuff>...</OtherStuff>
    <DataTypeTemplates>
        <Private name="TBD">
            <BayType description="BusBar">
                <IED name="Protection A" type="IED_protection_type" />
                <IED name="Protection B" type="IED_protection_type" />
                <IED name="Measurement B" type="IED_measurement_type" />
            <BayType>
            <IEDType id="IED_protection_type">
                <LDevice name="Supervision" type="LDevice_supervision" />
                <LDevice name="ProtInputs" type="LDevice_protection_inputs" />
            </IEDType>
            <IEDType id="IED_measurement_type">
                <LDevice name="ProtInputs" type="LDevice_protection_inputs" />
            </IEDType>
            <LDeviceType id="LDevice_supervision">
                <LN0 desc="ComSupervision_GOOSE/LLN0/LLN0" inst="" lnClass="LLN0" lnType="SIPROTEC5_LNType_LLN0_LDevice_Generic">
                </LN0>
            </LDeviceType>
            <LDeviceType id="LDevice_protection_inputs">
                <LN0 desc="Ln1_AnalogueDis_OC_SOTF/LLN0" inst="" lnClass="LLN0" lnType="SIPROTEC5_LNType_LLN0_LDevice_Generic">
                </LN0>
            </LDeviceType>
        </Private>
        <LNodeType id="SIPROTEC5_LNType_LLN0_LDevice_Generic" lnClass="LLN0">
            <DO name="Beh" type="SIPROTEC5_DOType_ENS_Behavior_V07.80.17_V02.00.00"/>
            <DO name="Health" type="SIPROTEC5_DOType_ENS_Health_V07.80.17_V02.00.00"/>
        </LNodeType>
    </DataTypeTemplates>
</SCL>