Hi,
In my OPC UA server, I have implemented a custom NodeManager derived from NodeManagerBase. I also have a custom implementation of the readValues() which overrides the IOManagerUaNode readValues(). However, the readValues function is only executed when I try to read a nodeId of type Variables. If the nodeId is of type Property, the code execution won't reach readValues(). Do you know why this is the case (even though variables and properties are essentially the same type)?
The way I check is to put a break point on the readValues() function and have the UaExpert selects a nodeId to read from. If I'm selecting a variable, the readValues() function gets executed. If I'm selecting a property type, the readValues() function won't get executed.
The reason I need this is because I need to change the status code (data quality) of some properties type depending on the status of the device it's connected to when an Opc Ua client tries to request a read. So far, i could only change the status code of variables type in the readValues() function.
Do you have an example on how to do this? Thank You!
-Will
Modifying Opc Ua status code during Read operation
Moderator: uasdkcpp
-
- Full Member
- Posts: 6
- Joined: 18 Aug 2017, 03:44
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Modifying Opc Ua status code during Read operation
Hello Will,
readValues() and writeValues() is only called for VariableNodes (this includes Properties) where the valueHandling is set to UaVariable_Value_Cache or UaVariable_Value_CacheIsUpdatedOnRequest.
At some point in your code you already set that for the Variables - just do the same for the Properties.
readValues() and writeValues() is only called for VariableNodes (this includes Properties) where the valueHandling is set to UaVariable_Value_Cache or UaVariable_Value_CacheIsUpdatedOnRequest.
At some point in your code you already set that for the Variables - just do the same for the Properties.
Best regards
Unified Automation Support Team
Unified Automation Support Team