Status code to return when writing the value of a read-only variable node | OPC UA Standard | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Status code to return when writing the value of a read-only variable node
Avatar
jgr@hms.se
Halmstad, Sweden
Member
Members
Forum Posts: 10
Member Since:
05/24/2017
sp_UserOfflineSmall Offline
1
10/24/2017 - 01:12
sp_Permalink sp_Print

We have posted a question about this in the OPC Certification and Interoperability Testing forum a while ago and haven’t received any response so I try to post it here (https://opcfoundation.org/forum/opc-certification-and-interoperability-testing/attribute-write-values-for-device-without-writable-variable-nodes/)

My question is what status code to return when a client tries to set the value of a variable node when only the read bit of the AccessLevel attribute is set? The UA CTT expects either Good or BadNotWritable. But in Part 3 table 3 (Bit mask for WriteMask and UserWriteMask), it is stated, for ValueForVariableType, that “It does not apply for Variables since this is handled by the AccessLevel and UserAccessLevel Attributes for the Variable. For Variables this bit shall be set to 0.”

Doesn’t this mean that the accepted status code in addition to Good should be BadUserAccessDenied?

Avatar
Randy Armstrong
Admin
Forum Posts: 28
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
10/25/2017 - 10:21
sp_Permalink sp_Print

When in doubt go with what the CTT does unless the specification directly contradicts the specification or if there is some unique aspect of your system that could justify adjustments to the CTT. Simply returning a different error code does not seem to a big issue.

Avatar
paul.hunkar@opcfoundation.org
Member
Members
Forum Posts: 19
Member Since:
07/05/2017
sp_UserOfflineSmall Offline
3
10/25/2017 - 12:43
sp_Permalink sp_Print

Can you provide the actual CTT test case you are looking at, including the version of the CTT you are using?  This allows us to look at the actual test that you are having an issue with.  Some additional information on what you are asking:

Table 3 Part 3 – Bit mask for WriteMask and UserWriteMask describe what the bits in the writemask/userwritemask apply to.  there is no bit for value, since the value is handle separately.  The ValueForVariableType bit is if the value field is in a VariableType definition – i.e. what it is stating is that this bit is only for a VariableType not a Variable.

The value field is only governed by the fields described in table 8 – i.e. AccessLevel and UserAccessLevel

So an Access level of read is not a user access level restriction, it is just not writeable.  Typically the write operation would check if the variable is even writeable, before it check if the user has write access.  If you provide more information on the actual test case and ctt version we can check if it needs to be updated.

Paul

Avatar
cld@hms.se
New Member
Members
Forum Posts: 2
Member Since:
07/03/2017
sp_UserOfflineSmall Offline
4
10/26/2017 - 01:26
sp_Permalink sp_Print

We agree that there is a difference between user access level and access level and that if a variable is writeable or not should be checked before the access level for the current user. We went ahead and made this change in our implementation and returned an error code that we believe is appropriate in this case (Bad_NotWritable). The CTT expects a different error code though, either Good (0x00000000) or BadWriteNotSupported (0x80730000).

Table 60 – Write Operation Level Result Codes (Part 4 1.03) lists all acceptable StatusCode for the write service. As I understand it Bad_WriteNotSupported (which the CTT suggests) shall be used if the write combination isn’t supported or if writing and IndexRange isn’t supported. If the variable itself isn’t writable I think Bad_NotWritable should be used instead, do you agree?

The underlying problem here though is probably that the CTT expects all nodes specified in “Server Test->NodeIds->Static->All Profiles” to be both readable and writable (as suggested by the tooltip for those nodes). Our implementation doesn’t support any writable nodes so this is a problem for us as we can’t specify such nodes.

You can see the error output from the CTT as well as the relevant test case in the image below (is there a way to export the log in any other way?).

https://imgur.com/a/ZgmQO

Christoffer

Avatar
paul.hunkar@opcfoundation.org
Member
Members
Forum Posts: 19
Member Since:
07/05/2017
sp_UserOfflineSmall Offline
5
10/31/2017 - 20:41
sp_Permalink sp_Print

Christoffer,

We are aware of the issue in the CTT with Servers that are ReadOnly.  There are a number of information models that provide ReadOnly data.  We have a Mantis issue on the CTT.   The test lab can work around this problem and certify a product that only has ReadOnly nodes, but we agree that the CTT should be able to support a ReadOnly configuration. 

https://opcfoundation-onlineapplications.org/mantis/view.php?id=4042

The list of Test cases that need to be fixed is long, thus we are targeting fixing this issue in the 1.04 build of the CTT.

Paul

Avatar
cld@hms.se
New Member
Members
Forum Posts: 2
Member Since:
07/03/2017
sp_UserOfflineSmall Offline
6
11/06/2017 - 02:47
sp_Permalink sp_Print

Thank you for your support. I guess we will have to live with the errors we are getting from the CTT for now and wait for a new version. I have added a note to your Mantis issue regarding periodically changing points.

Christoffer

Forum Timezone: America/Phoenix

Most Users Ever Online: 58

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

mokamadkipli10@gmail.com: 32

ashutoshweb3@gmail.com: 30

Rod Stein: 25

saurabhdeshpande49@gmail.com: 25

sambasiva.a@siemens.com: 24

Martin Lang: 22

Randy Armstrong (Sparhawk): 20

paul.hunkar@opcfoundation.org: 19

zbynekz: 18

fred.loveless@kepware.com: 11

Newest Members:

leixu2@gc.omron.com

blanchehnng3110@tutorkwang.com

yoshinori.fujita.du@oval.co.jp

nkalyanc@hotmail.com

murilosilveirarocha@gmail.com

yatindra.kamath@schneider-electric.com

anette@c.unisexjewelry.org

michael@vernetzen.com.au

tyu86482192@gmail.com

abrmacarde@hotmail.com

Forum Stats:

Groups: 2

Forums: 9

Topics: 300

Posts: 841

 

Member Stats:

Guest Posters: 0

Members: 57611

Moderators: 8

Admins: 3

Administrators: michael.bryant@opcfoundation.org, thomas.burke@opcfoundation.org, Randy Armstrong

Moderators: matthias.damm@ascolab.com, s.hoppe@beckhoff.com, paul.hunkar@dsinteroperability.com, jouni.aro@prosys.fi, tim.fortin@honeywell.com, Jim.Luth@Schneider-Electric.com, Karl-Heinz Deiretsbacher, stefan.hoppe@opcfoundation.org