View Issue Details

IDProjectCategoryView StatusLast Update
000480710000-004: ServicesSpecpublic2019-12-11 22:55
ReporterV. Monfort Assigned ToMatthias Damm  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
Summary0004807: Write service: BadWriteNotSupported cases unclear
Description

The specification (part 4) seems to indicate that BadWriteNotSupported shall be returned when the client attempts to write combination of value / status / timestamp and server does not support the combination. But the binary encoding (part 6) of data values provided with a write request do not provide the in information on what the client wanted to write since when status / timestamp are not provided some default value shall be used instead. Therefore the server is not capable to determine what the client attempted, default value can either indicate it wanted to write the default value or it does not want to write the value.

IMHO the consequence is that the server should only return a BadWriteNotSupported when a node access level indicate it is authorized to write status / timestamp and it is actually impossible for the server to write those meta data. It can only occur when the configured address space (access level of nodes) is not coherent with the capabilities of the serveur instance (impossibility to actually write status / timestamp). But it cannot really depends on the client request since it has no way to indicate if he tries to actually write those values or not.

Moreover, the foundation ANSI C implementation of the stack does not provide the data value mask into the C structure which seems to mean it should not be used for that purpose. And finally UACTT tests does not clarify at all this aspect since tests are just skipped when BadWriteNotSupported is not supported.

Details:

In part 4:
Table 59:
If the SourceTimestamp or the ServerTimestamp is specified, the Server shall
use these values. The Server returns a Bad_WriteNotSupported error if it does
not support writing of timestamps.

Table 61:
Bad_WriteNotSupported: The requested write operation is not supported.
If a Client attempts to write any value, status code, timestamp combination and the Server
does not support the requested combination (which could be a single quantity such as just
timestamp); than the Server shall not perform any write on this Node and shall return this
StatusCode for this Node. It is also used if writing an IndexRange is not supported for a
Node.

Part 6:
Table 16:
0x02 False if the StatusCode is Good.
0x04 False if the Source Timestamp is DateTime.MinValue.
0x08 False if the Server Timestamp is DateTime.MinValue.

=> Good or MinValue is not the same thing as no value. It is therefore quite impossible to know what the client want to do or not as it seems to be the case in Part 4

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Jim Luth

2019-08-06 16:43

administrator   ~0010690

We can't find any flaw in the spec. Please propose requested changes or join the UA call to discuss.

V. Monfort

2019-08-09 13:14

reporter   ~0010726

Here are the proposed changes:

Delete the following sentence since the DataValue definition (7.7) describes no way to not indicate the UtcTime fields shall be considered Null. Since UtcTime are DateTime they only have earliest/latest date/time values which is not specified to mean "null" or "unspecified" value.
In part 4:
Table 59:
If the SourceTimestamp or the ServerTimestamp is specified, the Server shall
use these values. The Server returns a Bad_WriteNotSupported error if it does
not support writing of timestamps.

Fix the following sentence for the same reason, there is no specified way to indicate Utc timestamps as "null" value, nor to indicate status code as "null" in the DataValue. Therefore those values are always specified at least with default values (earliest timestamps for timestamps, "Good" status code for status) and there is no way to know if the client "attempted" to write those metadata or not. Except for the Variant which can be Null there is no real "combination" possible due to absence of Null values defined for metadata fields, as a consequence it seems to me only the IndexRange case should be kept (last sentence).
Table 61:
Bad_WriteNotSupported: The requested write operation is not supported.
If a Client attempts to write any value, status code, timestamp combination and the Server
does not support the requested combination (which could be a single quantity such as just
timestamp); than the Server shall not perform any write on this Node and shall return this
StatusCode for this Node. It is also used if writing an IndexRange is not supported for a
Node.

Matthias Damm

2019-12-10 03:59

developer   ~0011304

A server should always be able to detect a null DateTime value since there is not timestamp transported in the DataValue if the client does not write a timestamp and the null DateTime is created by the local stack.

If the DateTime value for the timestamp is not null and the server does not support writing the timestamp, the server must return the status BadWriteNotSupported.

This is a necessary feature and it makes no sense to change this..

V. Monfort

2019-12-10 09:02

reporter   ~0011307

As stated in my previous comments, there is no such way to have null DateTime in the encoding of DateValue, only minimum values are set and not null values.

It might be solved if the fix for the following issue is to change the meaning of the encoding in specification part 6:
https://opcfoundation-onlineapplications.org/mantis/view.php?id=4651

Best regards

Matthias Damm

2019-12-11 22:54

developer   ~0011334

An OPC UA application must be able to identify a null DateTime that was created by itself.

See the following detailed definition on how to handle this in OPC UA Part 6
https://reference.opcfoundation.org/v104/Core/docs/Part6/5.2.2/#5.2.2.5

Jim Luth

2019-12-11 22:55

administrator   ~0011335

Agreed to no change required.

Issue History

Date Modified Username Field Change
2019-07-05 08:10 V. Monfort New Issue
2019-07-08 18:53 Jim Luth Project UA Specification => 10000-004: Services
2019-08-06 16:43 Jim Luth Status new => feedback
2019-08-06 16:43 Jim Luth Note Added: 0010690
2019-08-09 13:14 V. Monfort Note Added: 0010726
2019-08-09 13:14 V. Monfort Status feedback => new
2019-11-26 17:34 Jim Luth Assigned To => Matthias Damm
2019-11-26 17:34 Jim Luth Status new => assigned
2019-12-10 03:59 Matthias Damm Status assigned => resolved
2019-12-10 03:59 Matthias Damm Resolution open => no change required
2019-12-10 03:59 Matthias Damm Note Added: 0011304
2019-12-10 09:02 V. Monfort Status resolved => feedback
2019-12-10 09:02 V. Monfort Resolution no change required => reopened
2019-12-10 09:02 V. Monfort Note Added: 0011307
2019-12-11 22:54 Matthias Damm Status feedback => resolved
2019-12-11 22:54 Matthias Damm Resolution reopened => no change required
2019-12-11 22:54 Matthias Damm Note Added: 0011334
2019-12-11 22:55 Jim Luth Status resolved => closed
2019-12-11 22:55 Jim Luth Note Added: 0011335