Request for C# Sample Code – Temporary File Transfer in OPC UA|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Request for C# Sample Code – Temporary File Transfer in OPC UA
Avatar
Prashant kumar p
New Member
Members
Forum Posts: 1
Member Since:
05/15/2025
sp_UserOfflineSmall Offline
1
05/15/2025 - 23:11
sp_Permalink sp_Print

Dear Members,

I am currently working on implementing an OPC UA server using C#.

As part of the project requirements, I need to support temporary file transfer from an OPC UA client to the server.

According to the OPC UA specification (UA Part 20: File Transfer, Section 4.4) UA Part 20: File Transfer - 4.4 Temporary file transfer, temporary file transfer is supported. I also noticed that the OPC UA .NET NuGet package includes a TemporaryFileTransferState class, that seems relevant for this functionality.

Could anyone kindly share a sample C# implementation or provide guidance on how to correctly use this class to enable temporary file transfer?

Your help would be greatly appreciated.

Best regards,

prashant

============================================================

public class TemporaryFileTransferState : BaseObjectState
{
private PropertyState<double> m_clientProcessingTimeout;

private GenerateFileForReadMethodState m_generateFileForReadMethod;

private GenerateFileForWriteMethodState m_generateFileForWriteMethod;

private CloseAndCommitMethodState m_closeAndCommitMethod;

}

Avatar
Randy Armstrong
Admin
Forum Posts: 1671
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
05/16/2025 - 06:59
sp_Permalink sp_Print

This is an example of code that should download:

https://github.com/OPCFoundati.....Manager.cs

I am not sure it works completely at this time but it is close enough for your purposes.

Forum Timezone: America/Phoenix
Most Users Ever Online: 975
Currently Online:
Guest(s) 16
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1519
Posts: 5141