View Issue Details

IDProjectCategoryView StatusLast Update
0008984CTT UA Scripts1 - Script Issuepublic2023-07-21 16:26
ReporterJochen Baier Assigned ToSebastian Allmendinger  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.04.503 
Summary0008984: library\Base\Objects\monitoredItem.js: function setValue() wrong for Array of BuiltInType.ByteString:
Description

library\Base\Objects\monitoredItem.js: 488ff:

function: setValue()

For arrays of BuiltInType.ByteString the creating of UaByteStrings() is missing:

current:
<code>
case BuiltInType.ByteString:
node.Value.Value.setByteStringArray( newValue );
break;
</code>

proposed fix:

<code>
case BuiltInType.ByteString:
var x = new UaByteStrings();
for( var i=0; i<newValue.length; i++ ){ x[i] = newValue[i]; }
node.Value.Value.setByteStringArray( x );
break;
</code>

TagsNo tags attached.
Files Affected

Activities

Paul Hunkar

2023-05-26 15:33

administrator   ~0019437

Confirm proposed change is correct - if so update

Alexander Allmendinger

2023-07-21 16:25

developer   ~0019707

If the function is called with an array of ByteStrings, it fails because there is some code missing for this DataType.
During the investigation, some more problems were identified:
setDuration is not defined and must be replaced with setDouble
The same code as for ByteString-Arrays is also missing for arrays of Durations and ExtensionObjects.

Paul Hunkar

2023-07-21 16:26

administrator   ~0019708

Reviewed changes in call, agreed and closed issue

Issue History

Date Modified Username Field Change
2023-05-26 12:56 Jochen Baier New Issue
2023-05-26 15:32 Paul Hunkar Assigned To => Alexander Allmendinger
2023-05-26 15:32 Paul Hunkar Status new => assigned
2023-05-26 15:32 Paul Hunkar Assigned To Alexander Allmendinger => Sebastian Allmendinger
2023-05-26 15:33 Paul Hunkar Note Added: 0019437
2023-07-21 16:25 Alexander Allmendinger Status assigned => resolved
2023-07-21 16:25 Alexander Allmendinger Resolution open => fixed
2023-07-21 16:25 Alexander Allmendinger Note Added: 0019707
2023-07-21 16:26 Paul Hunkar Status resolved => closed
2023-07-21 16:26 Paul Hunkar Fixed in Version => 1.04.503
2023-07-21 16:26 Paul Hunkar Note Added: 0019708