13:23, EET
January 16, 2020
Hi
I am new to OPC UA , And as per my understanding if I want to write any attribute except ‘Value’ then we should set bit WriteMask/ UserWriteMask for that attribute.
But when i try to write on WriteMask attribute itself then I am getting following error.
attribute: WriteMask
Writing to node ns=3;s=var10 – var10
Enter the value to write: 1
com.prosysopc.ua.StatusException: Bad_NotWritable (0x803B0000) “The access level does not allow writing to the Node.” StatusCode=Bad_NotWritable (0x803B0000) “The access level does not allow writing to the Node.”
And how can I map that WriteMask to particular attribute so as to write on it.
14:22, EET
April 3, 2012
Hi,
Well, technically yes, however in practice almost no server support this and/or have that feature turned on. That is to say, you can only write to WriteMask, if the WriteMask itself allows you to write to WriteMask. If a server were to support that, it would usually require logging in with “Administrator” or equivalent and requires some internal user-system to control the writes etc. otherwise a client could mess up the server nodes for other clients.
The WriteMask value is UInt32, and the specification tells what bits map to what Attributes. In OPC UA 1.04 it was subtyped to AttributeWriteMask, and SDK has equivalent class. See e.g. ComplianceNodeManager in the sampleconsoleserver example how that could be set in the server side. In the client side you can pass that AttributeWriteMask object to DataValue/Variant/Object in place for write methods of UaClient.
And to reiterate, the samples are samples. I guess in theory it should work, I doubt anyone has ever tried to write to WriteMask with it, but assuming you enter the raw unsignedinteger as number, it should work. Though not very useful. In a real application would need to build some controls for setting the individual bits etc. and in the case of our SDK that would be the equivalent of having control to manipulate AttributeWriteMask.Fields enum, that does list all the bits.
Most Users Ever Online: 1919
Currently Online:
28 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 728
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuartModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1