View Issue Details

IDProjectCategoryView StatusLast Update
000919710000-020: File TransferSpecpublic2023-12-06 20:57
ReporterAlen Galinec Assigned ToJim Luth  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Product Version1.05.02 
Summary0009197: FileType property "Size" and "Read" method data type inconsistent
Description

The property "Size" is of type UInt64, whereas the "Read" method expects an Int32 for the length/size of the file as the second parameter.
Is this intentional or an oversight?

Using the UA-.NETStandard framework to read from a file node causes an exception if the second parameter is passed in as an UInt64. (Please refer to the steps to reproduce)

The only way to get around this is to cast the UInt64 to an Int32. On Windows, the maximum value of Int32 would equal to a file size of about 2GB.
I suppose the files being transfered via OPC UA will probably never be so large and casting UInt64 to Int32 is not problematic, but I still find it awkward to use two different data types for the same thing. It would be better to have the "Read" method use UInt64 as well, even if the intention was to read files in chunks (buffered).

Steps To Reproduce

I used the "ConsoleReferenceClient.Net6" to test our server implementation, i.e. I found a place to inject a small snippet of code without having to implement a client app from scratch.
You can see the code in the attached screenshot.

TagsNo tags attached.
Attached Files
grafik.png (101,239 bytes)   
grafik.png (101,239 bytes)   
Commit Version
Fix Due Date

Activities

Jim Luth

2023-12-06 20:57

administrator   ~0020501

size of ByteString is defiened as Int32 and that is what is used for the file buffer and ByteString is a built-in datatype that we cannot change.

Issue History

Date Modified Username Field Change
2023-10-11 12:33 Alen Galinec New Issue
2023-10-11 12:33 Alen Galinec File Added: grafik.png
2023-12-06 20:57 Jim Luth Note Added: 0020501
2023-12-06 20:57 Jim Luth Assigned To => Jim Luth
2023-12-06 20:57 Jim Luth Status new => closed
2023-12-06 20:57 Jim Luth Resolution open => no change required