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: 518
Currently Online:
16 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
hbrackel: 135
pramanj: 86
Francesco Zambon: 81
rocket science: 75
ibrahim: 75
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
fred: 41
Member Stats:
Guest Posters: 0
Members: 707
Moderators: 16
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1465
Posts: 6252
Newest Members:
christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer, shanonhumphreys, KupimotoblokfuB, tamhollander5, paulinafcf, bridgette18lModerators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 982, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 319, Lusetti: 0, Ari-Pekka Soikkeli: 5
Administrators: admin: 1