View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009829 | 10000-004: Services | Spec | public | 2024-09-11 08:57 | 2024-09-22 18:46 |
Reporter | Jouni Aro | Assigned To | Matthias Damm | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 1.05.03 | ||||
Summary | 0009829: Contradiction between SourceTimestamp and DataChangeTrigger definitions | ||||
Description | DataChangeTrigger (https://reference.opcfoundation.org/Core/Part4/v105/docs/7.10) defines STATUS_VALUE_TIMESTAMP option as "Report a notification if either StatusCode, value or the SourceTimestamp change." However, SoucreTimestamp (https://reference.opcfoundation.org/Core/Part4/v105/docs/7.11.3) is defined as "The sourceTimestamp shall be UTC time and should indicate the time of the last change of the value or statusCode." Meaning that the SourceTimestamp can only change if value or status change. Therefore, STATUS_VALUE_TIMESTAMP will aways equal to STATUS_VALUE, in practice. I think, the intention is, however, that with DataChangeTrigger=STATUS_VALUE_TIMESTAMP the server should watch ServerTimestamp instead of SourceTimestamp and therefore notify clients whenever a new value is sampled, even if it equals to the previous sample. The SourceTimestamp definition could also be clarified with an example to really say that it should not change, if the new sample equals to the previous sample. It seems that I was able to discuss the interpretation with my colleagues although, I thought the definition is clear enough. | ||||
Tags | No tags attached. | ||||
Commit Version | |||||
Fix Due Date | |||||
|
One of the colleague here. I do agree that the SourceTimestamp definition conflicts with the DataChangeTrigger definition, at least when spec interpreted in a certain way. The main issue is what 'last change of the value' actually means. Spec says: There is no example in SourceTimestamp, if one would be added, it hopefully would clear any ambiguity in words. Thus, there are (at least) 2 ways to interpret 'last change of the value', and for sake of example assume a numeric DataType: The SourceTimestamp text Jouni mentioned: To me if the "true data source" of an OPC UA Server has a concept of a timestamp, then that timestamp should always become the SourceTimestamp every time the server sources the data even if the numeric value would remain the same (lets say a temperature sensor that also has it's own timestamp would measure e.g. '10' twice in a row). IF the datasource however doesn't have the concept of a timestamp, it is more complicated. I think it should then be updated every sourcing time, though this does basically make it equivalent to the ServerTimestamp and then a STATUS_VALUE_TIMESTAMP will get a new notification each time (but it would still be the choice of a client to use that filter). In the latter case, the ServerTimestamp is sort of useless unless there is an aggregation Server, but probably that is ok. If 1. would be the correct choice, then there is a new issue that one cannot anymore know properly when the device made a measurement. Also, it would mean one isn't allowed to use 1:1 the devices timestamp as the UA SourceTimestamp (because the device could get the same measurement more than once in a row). |
|
Additionally, if we look at this from an another angle. A Write https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.4 can include a SourceTimestamp. And in Table 59 it does say "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." Thus here if a Client does Write the same numeric value that already is in the node, I think the SourceTimestamp would be the one the Client did Write i.e. that specific SourceTimestamp would be obtained by Read to this node after the Write is completed. Thus, it is more likely that the SourceTimestamp definition in https://reference.opcfoundation.org/Core/Part4/v105/docs/7.11.3 should be written in a way that makes it clear that it is allowed to have the same value and status, but with a different SourceTimestamps. Though, it would possibly be a separate case what the SourceTimestamp should be in the cases where it is not defined by a Client in Write or when sourcing a data source that doesn't have the concept of a timestamp. P.S. |
|
There is nothing wrong in the specification. It is true that the SourceTimeStamp can only change if the value changes but a value can change two times between two samples which changes the SourceTimeStamp. This can also happen if a client writes a new value and the data source changes is back to original value before the next sample happens. This was actually the main use case for the trigger to help clients that write values, keep the written value in the display and then want to get a notification if the value was changed back to the old value. The only potential enhancement would be to descibe this more explicit. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-11 08:57 | Jouni Aro | New Issue | |
2024-09-11 10:58 | BjarneBostrom | Note Added: 0021705 | |
2024-09-11 11:38 | BjarneBostrom | Note Added: 0021706 | |
2024-09-22 18:46 | Matthias Damm | Assigned To | => Matthias Damm |
2024-09-22 18:46 | Matthias Damm | Status | new => resolved |
2024-09-22 18:46 | Matthias Damm | Resolution | open => no change required |
2024-09-22 18:46 | Matthias Damm | Note Added: 0021776 |