Hello,

this mailing list is for topics around the development of Qt itself, 
https://lists.qt-project.org/listinfo/interest is the list for questions 
regarding the usage of Qt.


According to Part 4, 5.10.4.2 of the OPC UA specification, the status code 
returned by the write operation is used if the server does not support writing 
the index range for the node.
Are there already values on the server for the range you are trying to write? 
Usually, servers fail to update a range if there is no previous value for one 
or more elements.


If you were just trying to write the entire array, use writeAttribute() with a 
QVariantList.

Best regards
Jannis


 From:   "AGAYEV, LEVON" <[email protected]> 
 To:   <[email protected]> 
 Sent:   28.07.2020 16:41 
 Subject:   [Development] Writing to upc ua server with 
QOpcUaNode::writeAttributeRange 


Hello,
I apologise for my bad english in advance..

After searching for a while and not finding any solution i have to bother you 
here.



I am trying to read and write to an array of doubles in my opcua server.
Reading works good but I have troubles with the use of  
QOpcUaNode::writeAttributeRange methode.


this is what i try 
QList<QVariant> myList;
   for(int i=0;i<10;i++){
      myList.append(static_cast<double>(i));
     }
// QVariant myList("0,1,2,3,4,5,6,7,8,9");  
m_listNode->writeAttributeRange(QOpcUa::NodeAttribute::Value, myList, "0:9", 
QOpcUa::Types::Double);


In my slot connected to  QOpcUaNode::attributeWritten  signal i get  this status
"BadWriteNotSupported" 
Can someone please tell me what could cause this issue ? 


I use Qt 5.15 and mingw81_64  on windows10
my server is an opcua server embedded in Beckhoffs Twincat 3 running on the 
same pc


Thank you very much in advance 
Best regards
Levon





 



 

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to