In the Ignition documentation I found an enum called AttrubuteType.
How can I use it ?
My purpose is to set some my node as ReadOnly, and Historized.
I suppose I should get the UANode and call writeAttribute, but I have found no example of how to do.
I tried on my own but only got exception.
Is this enum the way to change Node properties ?
If yes how to use it.
If this enum is not the way, how to have read-only and Historized Nodes ?
The API you’re working with here is intended to create drivers for the OPC server, and the drivers exist to provide real time values for the nodes they manage.
History should be taken care of in Ignition. You can enable history on any tag once it has been added to Ignition or you can use the SQLBridge module to create a transaction group that logs values to a database. None of this has anything to do with whether or not a node has the historizing attribute set.
In the Modbus example you’ll find usage of the NodeBuilderFactory in the buildNode() function.
I had a look at the Modbus example, but did not found where Build Node is called from.
It fact I do not understand where the modbus example creates OPC nodes.
I overrode buildNode in my own project @Override
public void buildNode(String address, NodeId nodeId) throws AddressNotFoundException {
super.buildNode(address, nodeId);
}
And it is called from another thread than the thread I use to create my nodes…