get BadWriteNotSupport when write node by indexRange

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
stdh94sul3
Sr. Member
Sr. Member
Posts: 12
Joined: 11 Oct 2016, 02:56

get BadWriteNotSupport when write node by indexRange

Post by stdh94sul3 »

Hi Support Team,

I have some array nodes with setValueHandling(UaVariable_Value_CacheIsSource | UaVariable_Value_CacheIsUpdatedOnRequest).
As I use client to write these array node by indexRange, I get error BadWriteNotSupport.
Is any wrong here? Why? Thank you.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: get BadWriteNotSupport when write node by indexRange

Post by Support Team »

Hello stdh94sul3,

if you set these flags you need to provide an implementation for readValues() and writeValues(). However the signature of writeValues() doesn't allow to pass in an IndexRange. That is why the combination of IndexRange and some ValueHandling options is rejected.
You'd need to implement our own IOManager to support this feature.
You find an example here:
http://documentation.unified-automation ... alSdk.html

Hint:
You can still keep your Nodemanager implementation. Just override NodeManagerUaNode::getIOManager and return your IOManager for the ValueAttribute.
Like that you can have the toolkit handle all other attributes (DisplayName, NodeId, ...) and just add special handling for the ValueAtrtibute.
Best regards
Unified Automation Support Team

Post Reply