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

Creation of TDs seems to merge @type and type #15

Open
danielpeintner opened this issue Nov 26, 2024 · 1 comment
Open

Creation of TDs seems to merge @type and type #15

danielpeintner opened this issue Nov 26, 2024 · 1 comment

Comments

@danielpeintner
Copy link
Member

For example, If I try to add the following TD
(Note: the terms @type and type for the property lampStatus are separated)

{
  "@context": [
    "https://www.w3.org/2019/wot/td/v1",
    {
      "opc": "http://opcfoundation.org/UA/",
      "iec61360": "https://webstore.iec.ch/publication/5381",
      "eclass": "https://www.eclasscontent.com/owl/v11.1",
      "@language": "en"
    }
  ],
  "id": "urn:siemens:demo:case:lamp",
  "title": "Demo Lamp Case",
  "@type": "eclass:IRDI_0173-1#01-ADP410#010",
  "securityDefinitions": {
    "nosec_sc": {
      "scheme": "nosec"
    }
  },
  "security": "nosec_sc",
  "base": "opc.tcp://192.168.120.237:4840/",
  "properties": {
    "lampStatus": {
      "title": "Provides lamp status",
      "description": "True=Lamp is on; False=Lamp is off",
      "readOnly": true,
      "type": "boolean",
      "@type": [
        "opc:Boolean",
        "iec61360:BooleanType"
      ],
      "forms": [
        {
          "op": "readproperty",
          "href": "ns=3;s=\"LED\".\"State\"",
          "opcua:nodeId": "ns=3;s=\"LED\".\"State\"",
          "opc:method": "READ"
        }
      ]
    }
  }
}

and later on I try to retrieve it again I get it back looking like the following

{ 
   //...
   "lampStatus": {
      "type": [
        "iec61360:BooleanType",
        "opc:Boolean",
        "boolean"
      ],
      "readOnly": true,
      "description": "True=Lamp is on; False=Lamp is off",
      "forms": [
        {
          "opc:method": "READ",
          "op": "readproperty",
          "href": "ns=3;s=\"LED\".\"State\"",
          "opcua:nodeId": "ns=3;s=\"LED\".\"State\""
        }
      ],
      "title": "Provides lamp status"
    }
}

The problem is that the container for @type and type are now mixed together in type

@mahdanoura
Copy link

We are working on this issue here

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

No branches or pull requests

2 participants