Hi support team,
I fail to write a empty variant to an variable node whose AccessLevel is Read-Only, StatusWrite and SourceTimestampWrite.
After reading SDK1.5.2, I find the function IOManagerUaNode::beginWrite (...) doesn't check if pWriteValue->Value.Value is empty.
This logic is different from pWriteValue->Value.SourceTimestamp and pWriteValue->Value.StatusCode.
Is it a bug?
I will appreciate it if you could give me some guides.
Thanks!
Server doesn't check if pWriteValue->Value.Value is empty
Moderator: uasdkcpp
-
- Hero Member
- Posts: 24
- Joined: 09 Sep 2016, 04:39
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Server doesn't check if pWriteValue->Value.Value is empt
Hello huazhang,
in the write service you always pass in a DataValue including value, statuscode and timestamp.
The status and timestamp part is optional and can be ommited if you don't want to write status or timestamp.
In other words: You can not write just the timestamp or status without writing the value.
- If the status is Bad you pass in a null variant
- If the status is good or uncertain you write a valid variant value
in the write service you always pass in a DataValue including value, statuscode and timestamp.
The status and timestamp part is optional and can be ommited if you don't want to write status or timestamp.
In other words: You can not write just the timestamp or status without writing the value.
- If the status is Bad you pass in a null variant
- If the status is good or uncertain you write a valid variant value
Best regards
Unified Automation Support Team
Unified Automation Support Team
-
- Hero Member
- Posts: 24
- Joined: 09 Sep 2016, 04:39