Code Monkey home page Code Monkey logo

Comments (6)

zerox1212 avatar zerox1212 commented on July 19, 2024

I tested this and it does have a problem. I'm not sure why it thinks there is an existing node ID though. I have to debug it.

from opcua-modeler.

oroulet avatar oroulet commented on July 19, 2024

from opcua-modeler.

zerox1212 avatar zerox1212 commented on July 19, 2024

He is trying to open this xml that comes with modeler: https://github.com/FreeOpcUa/opcua-modeler/blob/master/example.xml

I remade it and now it works, I don't know why the original example complains, I did not see any duplicated IDs, could be a namespace issue.

Remade example (will PR later):

<?xml version='1.0' encoding='utf-8'?>
<UANodeSet xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Aliases>
    <Alias Alias="HasTypeDefinition">i=40</Alias>
    <Alias Alias="HasSubtype">i=45</Alias>
    <Alias Alias="HasProperty">i=46</Alias>
    <Alias Alias="HasComponent">i=47</Alias>
    <Alias Alias="Organizes">i=35</Alias>
    <Alias Alias="Float">i=10</Alias>
    <Alias Alias="String">i=12</Alias>
  </Aliases>
  <NamespaceUris>
    <Uri>urx:mycompany:myproject</Uri>
  </NamespaceUris>
  <UAObjectType BrowseName="1:MyDevice" NodeId="ns=1;i=2001">
    <DisplayName>MyDevice</DisplayName>
    <Description>MyDevice</Description>
    <References>
      <Reference IsForward="false" ReferenceType="HasSubtype">i=58</Reference>
      <Reference ReferenceType="HasComponent">ns=1;i=2005</Reference>
    </References>
  </UAObjectType>
  <UAObject BrowseName="1:obj1" NodeId="ns=1;i=2002" ParentNodeId="i=85">
    <DisplayName>BaseObjectType</DisplayName>
    <Description>The base type for all object nodes.</Description>
    <References>
      <Reference IsForward="false" ReferenceType="Organizes">i=85</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=58</Reference>
      <Reference ReferenceType="HasComponent">ns=1;i=2003</Reference>
      <Reference ReferenceType="HasProperty">ns=1;i=2004</Reference>
      <Reference ReferenceType="HasComponent">ns=1;i=2006</Reference>
    </References>
  </UAObject>
  <UAVariable BrowseName="1:var1" DataType="Float" NodeId="ns=1;i=2003" ParentNodeId="ns=1;i=2002">
    <DisplayName>var1</DisplayName>
    <Description>var1</Description>
    <Value>
      <uax:Float>9.99</uax:Float>
    </Value>
    <References>
      <Reference IsForward="false" ReferenceType="HasComponent">ns=1;i=2002</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
    </References>
  </UAVariable>
  <UAVariable BrowseName="1:myproperty" DataType="String" NodeId="ns=1;i=2004" ParentNodeId="ns=1;i=2002">
    <DisplayName>myproperty</DisplayName>
    <Description>myproperty</Description>
    <Value>
      <uax:String>property_value</uax:String>
    </Value>
    <References>
      <Reference IsForward="false" ReferenceType="HasProperty">ns=1;i=2002</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
    </References>
  </UAVariable>
  <UAVariable BrowseName="1:DeviceName" DataType="String" NodeId="ns=1;i=2005" ParentNodeId="ns=1;i=2001">
    <DisplayName>DeviceName</DisplayName>
    <Description>DeviceName</Description>
    <Value>
      <uax:String>MyName</uax:String>
    </Value>
    <References>
      <Reference IsForward="false" ReferenceType="HasComponent">ns=1;i=2001</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
    </References>
  </UAVariable>
  <UAVariable ArrayDimensions="3" BrowseName="1:varList" DataType="String" NodeId="ns=1;i=2006" ParentNodeId="ns=1;i=2002">
    <DisplayName>varList</DisplayName>
    <Description>varList</Description>
    <Value>
      <uax:ListOfString>
        <uax:String>one</uax:String>
        <uax:String>two</uax:String>
        <uax:String>three</uax:String>
      </uax:ListOfString>
    </Value>
    <References>
      <Reference IsForward="false" ReferenceType="HasComponent">ns=1;i=2002</Reference>
      <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
    </References>
  </UAVariable>
</UANodeSet>

from opcua-modeler.

oroulet avatar oroulet commented on July 19, 2024

Commit it. This file was outdated anyway

from opcua-modeler.

oroulet avatar oroulet commented on July 19, 2024

from opcua-modeler.

zerox1212 avatar zerox1212 commented on July 19, 2024

We should probably make a few more examples, especially using node sets. However I have never used node sets so would be great if someone could help. #43

from opcua-modeler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.