Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtyping StructureWithOptionalFields does not extend EncodingMask #207

Open
HUmgnad opened this issue Jan 28, 2025 · 1 comment
Open

Subtyping StructureWithOptionalFields does not extend EncodingMask #207

HUmgnad opened this issue Jan 28, 2025 · 1 comment
Labels

Comments

@HUmgnad
Copy link

HUmgnad commented Jan 28, 2025

I am not sure but this may be related to #202

I want to subtype the DataType "ResultMetaDataType" from the Result namespace.
So basically subtype a StructureWithOptionalFields.

For me it looks like the model compiler does not create the encoding for the subtype.

I have tried the same with the Siemens OpcUA Modeling Editor and it creates the "HasEncoding" References.

We are using the open62541 stack and the included XML NodeSet compiler that generates C code.
For the ResultMetaData it is correctly implementing the optional fields.
But for the subtype ExtendMetaDataType all fields are taken over as non optional.

My assumption is that the EncodingMask is missing in the NodeSet2 xml.

I am unsure what exactly wents wrong.

ModelDesign xml
<?xml version="1.0" encoding="utf-8"?>

<opc:ModelDesign
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ua="http://opcfoundation.org/UA/"
  xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd"
  xmlns:di="http://opcfoundation.org/UA/DI/"
  xmlns:ia="http://opcfoundation.org/UA/IA/"
  xmlns:irdi="http://opcfoundation.org/UA/Dictionary/IRDI"
  xmlns:padim="http://opcfoundation.org/UA/PADIM/"
  xmlns:machinery="http://opcfoundation.org/UA/Machinery/"
  xmlns:processvalue="http://opcfoundation.org/UA/Machinery/ProcessValues/"
  xmlns:result="http://opcfoundation.org/UA/Machinery/Result/"
  xmlns:opc="http://opcfoundation.org/UA/ModelDesign.xsd"
  xmlns:test="http://test.com/UA/test/"
  xsi:schemaLocation="http://opcfoundation.org/UA/2008/02/Types.xsd https://files.opcfoundation.org/schemas/UA/1.05/Opc.Ua.Types.xsd
                      http://opcfoundation.org/UA/DI/ UA-Nodeset/DI/Opc.Ua.Di.Types.xsd
                      http://opcfoundation.org/UA/IA/ UA-Nodeset/IA/Opc.Ua.IA.NodeSet2.xsd
                      http://opcfoundation.org/UA/Machinery/Result/ UA-Nodeset/Machinery/Result/Opc.Ua.Machinery.Result.NodeSet2.xsd
                      http://opcfoundation.org/UA/ModelDesign.xsd UAModelDesign.xsd"
  TargetNamespace="http://test.com/UA/test/"
  TargetXmlNamespace="http://test.com/UA/test/"
  xmlns="http://test.com/UA/test/">

  <opc:Namespaces>
    <opc:Namespace Name="ua" Version="1.05.03" XmlNamespace="http://opcfoundation.org/UA/2008/02/Types.xsd">http://opcfoundation.org/UA/</opc:Namespace>
    <opc:Namespace Name="di" Version="1.04.0" FilePath="UA-Nodeset/DI/Opc.Ua.Di.NodeSet2.xml">http://opcfoundation.org/UA/DI/</opc:Namespace>
    <opc:Namespace Name="ia" Version="1.01.2" FilePath="UA-Nodeset/IA/Opc.Ua.IA.NodeSet2.xml">http://opcfoundation.org/UA/IA/</opc:Namespace>
    <opc:Namespace Name="machinery" Version="1.03.0" FilePath="UA-Nodeset/Machinery/Opc.Ua.Machinery.NodeSet2.xml">http://opcfoundation.org/UA/Machinery/</opc:Namespace>
    <opc:Namespace Name="irdi" Version="1.01.0" FilePath="UA-Nodeset/PADIM/Opc.Ua.IRDI.NodeSet2.xml">http://opcfoundation.org/UA/Dictionary/IRDI</opc:Namespace>
    <opc:Namespace Name="padim" Version="1.01.0" FilePath="UA-Nodeset/PADIM/Opc.Ua.PADIM.NodeSet2.xml">http://opcfoundation.org/UA/PADIM/</opc:Namespace>
    <opc:Namespace Name="processvalue" Version="1.00.0" FilePath="UA-Nodeset/Machinery/ProcessValues/Opc.Ua.Machinery.ProcessValues.NodeSet2.xml">http://opcfoundation.org/UA/Machinery/ProcessValues/</opc:Namespace>
    <opc:Namespace Name="result" Version="1.00.0" FilePath="UA-Nodeset/Machinery/Result/Opc.Ua.Machinery.Result.NodeSet2.xsd">http://opcfoundation.org/UA/Machinery/Result/</opc:Namespace>
    <opc:Namespace Name="test" Prefix="test">http://test.com/UA/test/</opc:Namespace>
  </opc:Namespaces>

  <opc:DataType SymbolicName="test:ExtendMetaDataType" BaseType="result:ResultMetaDataType">
    <opc:Fields>
      <opc:Field Name="MyAdditionalItem" DataType="ua:UInt32" ValueRank="Scalar">
      </opc:Field>
    </opc:Fields>
  </opc:DataType>

</opc:ModelDesign>

Model compiler NodeSet2 xml
<?xml version="1.0" encoding="utf-8"?>
<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" LastModified="2025-01-28T09:59:46.3701556Z" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd">
  <NamespaceUris>
    <Uri>http://opcfoundation.org/UA/DI/</Uri>
    <Uri>http://opcfoundation.org/UA/IA/</Uri>
    <Uri>http://opcfoundation.org/UA/Machinery/</Uri>
    <Uri>http://opcfoundation.org/UA/Dictionary/IRDI</Uri>
    <Uri>http://opcfoundation.org/UA/PADIM/</Uri>
    <Uri>http://opcfoundation.org/UA/Machinery/ProcessValues/</Uri>
    <Uri>http://opcfoundation.org/UA/Machinery/Result/</Uri>
    <Uri>http://test.com/UA/test/</Uri>
  </NamespaceUris>
  <Models>
    <Model ModelUri="http://test.com/UA/test/" Version="1.0.0" PublicationDate="2025-01-28T09:59:46.3701556Z" ModelVersion="1.0.0">
      <RequiredModel ModelUri="http://opcfoundation.org/UA/" XmlSchemaUri="http://opcfoundation.org/UA/2008/02/Types.xsd" Version="1.05.03" ModelVersion="1.5.3" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/DI/" Version="1.04.0" ModelVersion="1.4.0" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/IA/" Version="1.01.2" ModelVersion="1.1.2" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/" Version="1.03.0" ModelVersion="1.3.0" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/Dictionary/IRDI" Version="1.01.0" ModelVersion="1.1.0" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/PADIM/" Version="1.01.0" ModelVersion="1.1.0" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/ProcessValues/" Version="1.00.0" ModelVersion="1.0.0" />
      <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/Result/" Version="1.00.0" ModelVersion="1.0.0" />
    </Model>
  </Models>
  <Aliases>
    <Alias Alias="Boolean">i=1</Alias>
    <Alias Alias="SByte">i=2</Alias>
    <Alias Alias="Byte">i=3</Alias>
    <Alias Alias="Int16">i=4</Alias>
    <Alias Alias="UInt16">i=5</Alias>
    <Alias Alias="Int32">i=6</Alias>
    <Alias Alias="UInt32">i=7</Alias>
    <Alias Alias="Int64">i=8</Alias>
    <Alias Alias="UInt64">i=9</Alias>
    <Alias Alias="Float">i=10</Alias>
    <Alias Alias="Double">i=11</Alias>
    <Alias Alias="DateTime">i=13</Alias>
    <Alias Alias="String">i=12</Alias>
    <Alias Alias="ByteString">i=15</Alias>
    <Alias Alias="Guid">i=14</Alias>
    <Alias Alias="XmlElement">i=16</Alias>
    <Alias Alias="NodeId">i=17</Alias>
    <Alias Alias="ExpandedNodeId">i=18</Alias>
    <Alias Alias="QualifiedName">i=20</Alias>
    <Alias Alias="LocalizedText">i=21</Alias>
    <Alias Alias="StatusCode">i=19</Alias>
    <Alias Alias="Structure">i=22</Alias>
    <Alias Alias="Number">i=26</Alias>
    <Alias Alias="Integer">i=27</Alias>
    <Alias Alias="UInteger">i=28</Alias>
    <Alias Alias="HasComponent">i=47</Alias>
    <Alias Alias="HasProperty">i=46</Alias>
    <Alias Alias="Organizes">i=35</Alias>
    <Alias Alias="HasEventSource">i=36</Alias>
    <Alias Alias="HasNotifier">i=48</Alias>
    <Alias Alias="HasSubtype">i=45</Alias>
    <Alias Alias="HasTypeDefinition">i=40</Alias>
    <Alias Alias="HasModellingRule">i=37</Alias>
    <Alias Alias="HasEncoding">i=38</Alias>
    <Alias Alias="HasDescription">i=39</Alias>
    <Alias Alias="HasCause">i=53</Alias>
    <Alias Alias="ToState">i=52</Alias>
    <Alias Alias="FromState">i=51</Alias>
    <Alias Alias="HasEffect">i=54</Alias>
    <Alias Alias="HasTrueSubState">i=9004</Alias>
    <Alias Alias="HasFalseSubState">i=9005</Alias>
    <Alias Alias="HasDictionaryEntry">i=17597</Alias>
    <Alias Alias="HasCondition">i=9006</Alias>
    <Alias Alias="HasGuard">i=15112</Alias>
    <Alias Alias="HasAddIn">i=17604</Alias>
    <Alias Alias="HasInterface">i=17603</Alias>
  </Aliases>
  <UADataType NodeId="ns=8;i=51" BrowseName="8:ExtendMetaDataType">
    <DisplayName>ExtendMetaDataType</DisplayName>
    <References>
      <Reference ReferenceType="HasSubtype" IsForward="false">ns=7;i=3007</Reference>
    </References>
    <Definition Name="8:ExtendMetaDataType">
      <Field Name="MyAdditionalItem" DataType="i=7" />
    </Definition>
  </UADataType>
  <UAObject NodeId="ns=8;i=52" BrowseName="Default Binary" SymbolicName="DefaultBinary">
    <DisplayName>Default Binary</DisplayName>
    <References>
      <Reference ReferenceType="HasEncoding" IsForward="false">ns=8;i=51</Reference>
      <Reference ReferenceType="HasDescription">ns=8;i=53</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=76</Reference>
    </References>
  </UAObject>
  <UAVariable NodeId="ns=8;i=5" BrowseName="8:test" SymbolicName="test_BinarySchema" ReleaseStatus="Deprecated" DataType="ByteString">
    <DisplayName>test</DisplayName>
    <References>
      <Reference ReferenceType="HasProperty">ns=8;i=7</Reference>
      <Reference ReferenceType="HasProperty">ns=8;i=8</Reference>
      <Reference ReferenceType="HasComponent">ns=8;i=53</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">i=93</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=72</Reference>
    </References>
    <Value>
      <ByteString xmlns="http://opcfoundation.org/UA/2008/02/Types.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VsdDpS
ZXN1bHRNZXRhRGF0YVR5cGUiIC8+DQogICAgPG9wYzpGaWVsZCBOYW1lPSJSZXN1bHRFdmFsdWF0
aW9uQ29kZSIgVHlwZU5hbWU9Im9wYzpJbnQ2NCIgU291cmNlVHlwZT0iT3BjLlVhLk1hY2hpbmVy
eS5SZXN1bHQ6UmVzdWx0TWV0YURhdGFUeXBlIiAvPg0KICAgIDxvcGM6RmllbGQgTmFtZT0iUmVz
dWx0RXZhbHVhdGlvbkRldGFpbHMiIFR5cGVOYW1lPSJ1YTpMb2NhbGl6ZWRUZXh0IiBTb3VyY2VU
eXBlPSJPcGMuVWEuTWFjaGluZXJ5LlJlc3VsdDpSZXN1bHRNZXRhRGF0YVR5cGUiIC8+DQogICAg
PG9wYzpGaWVsZCBOYW1lPSJOb09mRmlsZUZvcm1hdCIgVHlwZU5hbWU9Im9wYzpJbnQzMiIgLz4N
CiAgICA8b3BjOkZpZWxkIE5hbWU9IkZpbGVGb3JtYXQiIFR5cGVOYW1lPSJvcGM6U3RyaW5nIiBM
ZW5ndGhGaWVsZD0iTm9PZkZpbGVGb3JtYXQiIC8+DQogICAgPG9wYzpGaWVsZCBOYW1lPSJNeUFk
ZGl0aW9uYWxJdGVtIiBUeXBlTmFtZT0ib3BjOlVJbnQzMiIgLz4NCiAgPC9vcGM6U3RydWN0dXJl
ZFR5cGU+DQoNCjwvb3BjOlR5cGVEaWN0aW9uYXJ5Pg==</ByteString>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=7" BrowseName="NamespaceUri" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=5" DataType="String">
    <DisplayName>NamespaceUri</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
      <Reference ReferenceType="HasProperty" IsForward="false">ns=8;i=5</Reference>
    </References>
    <Value>
      <String xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">http://test.com/UA/test/</String>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=8" BrowseName="Deprecated" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=5" DataType="Boolean">
    <DisplayName>Deprecated</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
      <Reference ReferenceType="HasProperty" IsForward="false">ns=8;i=5</Reference>
    </References>
    <Value>
      <Boolean xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">true</Boolean>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=53" BrowseName="8:ExtendMetaDataType" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=5" DataType="String">
    <DisplayName>ExtendMetaDataType</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=69</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">ns=8;i=5</Reference>
    </References>
    <Value>
      <String xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">ExtendMetaDataType</String>
    </Value>
  </UAVariable>
  <UAObject NodeId="ns=8;i=56" BrowseName="Default XML" SymbolicName="DefaultXml">
    <DisplayName>Default XML</DisplayName>
    <References>
      <Reference ReferenceType="HasEncoding" IsForward="false">ns=8;i=51</Reference>
      <Reference ReferenceType="HasDescription">ns=8;i=57</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=76</Reference>
    </References>
  </UAObject>
  <UAVariable NodeId="ns=8;i=13" BrowseName="8:test" SymbolicName="test_XmlSchema" ReleaseStatus="Deprecated" DataType="ByteString">
    <DisplayName>test</DisplayName>
    <References>
      <Reference ReferenceType="HasProperty">ns=8;i=15</Reference>
      <Reference ReferenceType="HasProperty">ns=8;i=16</Reference>
      <Reference ReferenceType="HasComponent">ns=8;i=57</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">i=92</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=72</Reference>
    </References>
    <Value>
      <ByteString xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">PHhzOnNjaGVtYQ0KICB4bWxuczpPcGMuVWEuRGk9Imh0dHA6Ly9vcGN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eS5SZXN1bHQ6UmVzdWx0TWV0YURhdGFUeXBlIj4NCiAgICAgICAg
PHhzOnNlcXVlbmNlPg0KICAgICAgICAgIDx4czplbGVtZW50IG5hbWU9Ik15QWRkaXRpb25hbEl0
ZW0iIHR5cGU9InhzOnVuc2lnbmVkSW50IiBtaW5PY2N1cnM9IjAiIC8+DQogICAgICAgIDwveHM6
c2VxdWVuY2U+DQogICAgICA8L3hzOmV4dGVuc2lvbj4NCiAgICA8L3hzOmNvbXBsZXhDb250ZW50
Pg0KICA8L3hzOmNvbXBsZXhUeXBlPg0KICA8eHM6ZWxlbWVudCBuYW1lPSJFeHRlbmRNZXRhRGF0
YVR5cGUiIHR5cGU9InRuczpFeHRlbmRNZXRhRGF0YVR5cGUiIC8+DQoNCiAgPHhzOmNvbXBsZXhU
eXBlIG5hbWU9Ikxpc3RPZkV4dGVuZE1ldGFEYXRhVHlwZSI+DQogICAgPHhzOnNlcXVlbmNlPg0K
ICAgICAgPHhzOmVsZW1lbnQgbmFtZT0iRXh0ZW5kTWV0YURhdGFUeXBlIiB0eXBlPSJ0bnM6RXh0
ZW5kTWV0YURhdGFUeXBlIiBtaW5PY2N1cnM9IjAiIG1heE9jY3Vycz0idW5ib3VuZGVkIiBuaWxs
YWJsZT0idHJ1ZSIgLz4NCiAgICA8L3hzOnNlcXVlbmNlPg0KICA8L3hzOmNvbXBsZXhUeXBlPg0K
ICA8eHM6ZWxlbWVudCBuYW1lPSJMaXN0T2ZFeHRlbmRNZXRhRGF0YVR5cGUiIHR5cGU9InRuczpM
aXN0T2ZFeHRlbmRNZXRhRGF0YVR5cGUiIG5pbGxhYmxlPSJ0cnVlIj48L3hzOmVsZW1lbnQ+DQoN
CjwveHM6c2NoZW1hPg==</ByteString>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=15" BrowseName="NamespaceUri" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=13" DataType="String">
    <DisplayName>NamespaceUri</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
      <Reference ReferenceType="HasProperty" IsForward="false">ns=8;i=13</Reference>
    </References>
    <Value>
      <String xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">http://test.com/UA/test/</String>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=16" BrowseName="Deprecated" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=13" DataType="Boolean">
    <DisplayName>Deprecated</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
      <Reference ReferenceType="HasProperty" IsForward="false">ns=8;i=13</Reference>
    </References>
    <Value>
      <Boolean xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">true</Boolean>
    </Value>
  </UAVariable>
  <UAVariable NodeId="ns=8;i=57" BrowseName="8:ExtendMetaDataType" ReleaseStatus="Deprecated" ParentNodeId="ns=8;i=13" DataType="String">
    <DisplayName>ExtendMetaDataType</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=69</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">ns=8;i=13</Reference>
    </References>
    <Value>
      <String xmlns="http://opcfoundation.org/UA/2008/02/Types.xsd">//xs:element[@name='ExtendMetaDataType']</String>
    </Value>
  </UAVariable>
  <UAObject NodeId="ns=8;i=60" BrowseName="Default JSON" SymbolicName="DefaultJson">
    <DisplayName>Default JSON</DisplayName>
    <References>
      <Reference ReferenceType="HasEncoding" IsForward="false">ns=8;i=51</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=76</Reference>
    </References>
  </UAObject>
</UANodeSet>
Siemens OPCUA Modeling Editor NodeSet2 xml
<?xml version="1.0" encoding="utf-8"?>
<UANodeSet LastModified="2025-01-28T09:55:53.372Z" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:si="http://www.siemens.com/OPCUA/2017/SimaticNodeSetExtensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <NamespaceUris>
        <Uri>http://opcfoundation.org/UA/Machinery/Result/</Uri>
        <Uri>http://testy</Uri>
    </NamespaceUris>
    <Models>
        <Model ModelUri="http://testy" PublicationDate="2025-01-28T10:51:33+01:00" Version="1.00">
            <RequiredModel ModelUri="http://opcfoundation.org/UA/" PublicationDate="2023-12-15T00:00:00Z" Version="1.05.03"/>
            <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/Result/" PublicationDate="2023-01-01T00:00:00Z" Version="1.00.0"/>
        </Model>
    </Models>
    <Aliases>
        <Alias Alias="Boolean">i=1</Alias>
        <Alias Alias="UInt32">i=7</Alias>
        <Alias Alias="DateTime">i=13</Alias>
        <Alias Alias="String">i=12</Alias>
        <Alias Alias="ByteString">i=15</Alias>
        <Alias Alias="HasComponent">i=47</Alias>
        <Alias Alias="HasProperty">i=46</Alias>
        <Alias Alias="HasSubtype">i=45</Alias>
        <Alias Alias="HasTypeDefinition">i=40</Alias>
        <Alias Alias="HasEncoding">i=38</Alias>
        <Alias Alias="HasDescription">i=39</Alias>
        <Alias Alias="IdType">i=256</Alias>
        <Alias Alias="NumericRange">i=291</Alias>
    </Aliases>
    <Extensions>
        <Extension>
            <si:Generator Product="SiOME" Edition="Standard" Version="3.0.0"/>
        </Extension>
        <Extension>
            <si:GeneratorExtension Hash="6b2ec50b8686d94ca265c456f89933f3"/>
        </Extension>
    </Extensions>
    <UAObject SymbolicName="http___testy" NodeId="ns=2;i=5000" BrowseName="2:http://testy" ParentNodeId="i=11715">
        <DisplayName>http://testy</DisplayName>
        <References>
            <Reference ReferenceType="HasComponent" IsForward="false">i=11715</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=11616</Reference>
        </References>
    </UAObject>
    <UAVariable DataType="Boolean" NodeId="ns=2;i=6000" BrowseName="IsNamespaceSubset" ParentNodeId="ns=2;i=5000">
        <DisplayName>IsNamespaceSubset</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UAVariable DataType="DateTime" NodeId="ns=2;i=6001" BrowseName="NamespacePublicationDate" ParentNodeId="ns=2;i=5000">
        <DisplayName>NamespacePublicationDate</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
        <Value>
            <uax:DateTime>2025-01-28T10:51:33+01:00</uax:DateTime>
        </Value>
    </UAVariable>
    <UAVariable DataType="String" NodeId="ns=2;i=6002" BrowseName="NamespaceUri" ParentNodeId="ns=2;i=5000">
        <DisplayName>NamespaceUri</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
        <Value>
            <uax:String>http://testy</uax:String>
        </Value>
    </UAVariable>
    <UAVariable DataType="String" NodeId="ns=2;i=6003" BrowseName="NamespaceVersion" ParentNodeId="ns=2;i=5000">
        <DisplayName>NamespaceVersion</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
        <Value>
            <uax:String>1.00</uax:String>
        </Value>
    </UAVariable>
    <UAVariable DataType="IdType" ValueRank="1" NodeId="ns=2;i=6004" BrowseName="StaticNodeIdTypes" ParentNodeId="ns=2;i=5000">
        <DisplayName>StaticNodeIdTypes</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UAVariable DataType="NumericRange" ValueRank="1" NodeId="ns=2;i=6005" BrowseName="StaticNumericNodeIdRange" ParentNodeId="ns=2;i=5000">
        <DisplayName>StaticNumericNodeIdRange</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UAVariable DataType="String" NodeId="ns=2;i=6006" BrowseName="StaticStringNodeIdPattern" ParentNodeId="ns=2;i=5000">
        <DisplayName>StaticStringNodeIdPattern</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UAVariable DataType="i=96" ValueRank="1" NodeId="ns=2;i=6007" BrowseName="DefaultRolePermissions" ParentNodeId="ns=2;i=5000">
        <DisplayName>DefaultRolePermissions</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UAVariable DataType="i=95" NodeId="ns=2;i=6008" BrowseName="DefaultAccessRestrictions" ParentNodeId="ns=2;i=5000">
        <DisplayName>DefaultAccessRestrictions</DisplayName>
        <References>
            <Reference ReferenceType="HasProperty" IsForward="false">ns=2;i=5000</Reference>
            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
        </References>
    </UAVariable>
    <UADataType NodeId="ns=2;i=3000" BrowseName="2:ExtendMetaDataType">
        <DisplayName>ExtendMetaDataType</DisplayName>
        <References>
            <Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=3007</Reference>
            <Reference ReferenceType="HasEncoding">ns=2;i=5001</Reference>
            <Reference ReferenceType="HasEncoding">ns=2;i=5002</Reference>
        </References>
        <Definition Name="2:ExtendMetaDataType">
            <Field DataType="UInt32" Name="MyAdditionalItem"/>
        </Definition>
    </UADataType>
    <UAObject SymbolicName="DefaultBinary" NodeId="ns=2;i=5001" BrowseName="Default Binary">
        <DisplayName>Default Binary</DisplayName>
        <References>
            <Reference ReferenceType="HasTypeDefinition">i=76</Reference>
        </References>
    </UAObject>
    <UAObject SymbolicName="DefaultXML" NodeId="ns=2;i=5002" BrowseName="Default XML">
        <DisplayName>Default XML</DisplayName>
        <References>
            <Reference ReferenceType="HasTypeDefinition">i=76</Reference>
        </References>
    </UAObject>
</UANodeSet>
@HUmgnad
Copy link
Author

HUmgnad commented Jan 29, 2025

I have taken a look at the NodeSet2 again.
Could it be that the ModelCompiler just adds the encodings as a inverse reference instead of a forward one at the type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants