Add custom property in UaVariableNode

Hi,

I'm creating a new node/tag in this way.

        UaVariableNode node = UaVariableNode.builder(getNodeContext())
                .setNodeId(m_deviceContext.nodeId(parentName + "/" + tagName))
                .setBrowseName(m_deviceContext.qualifiedName(tagName))
                .setDisplayName(new LocalizedText(tagName))
                .setDataType(nodeType)
                .setTypeDefinition(Identifiers.BaseDataVariableType)
                .setAccessLevel(accessLevel)
                .setUserAccessLevel(userAccessLevel)
                .build();

In this node I'm trying to add a new custom property, as I can do in the designer.

Is it possibile code side?
Because I'm trying with this code

        final QualifiedProperty<String> fooProperty =
                new QualifiedProperty<>(
                        getNodeContext().getNamespaceTable().getUri(node.getNodeId().getNamespaceIndex()),
                        "foo",
                        Identifiers.String.expanded(),
                        ValueRanks.Scalar,
                        String.class
                );

        node.setProperty(fooProperty, "value");

but I can't see the foo custom property in the tag in designer.

Is this the correct way to do that?

How can I read the value the user fill in the new custom property...is this way is possibile.

Thanks,
Stefano

Ignition tag properties have nothing to do with the OPC UA concept of properties. There is no link between them.

An OPC UA PropertyNode is just another Node that will show up when browsing in the OPC browser, underneath whatever Node you add it to, if done correctly.

Ok, there is no way to see in the designer a property added in node.
But there is a way to use in code the custom properties added in the designer?

Thanks,
Stefano

You can read the value of those properties like any other property by calling TagManager::readAsync, but you have to be able to construct the the necessary tag path, and there's no link between Ignition tags and whatever you might be doing down at the OPC UA level (other than OPC UA NodeId == OPC Item Path of an Ignition OPC tag).

Thanks.

ok . maybe I have the wrong approach.

I have to create a TCP driver module that read a specific address and put the 4 byte result as int in the node tag.
But I don't know the address at development time in module. The Designer developer have to give me it when he add tehe node tag to get the value.

The only way I found for the moment is to add a folder with 2 node the Address in RW and the Value in RO.

Are there other ways?