OPC UA File Transfer concepts

From OPC Labs Knowledge Base
Revision as of 10:13, 22 May 2021 by User (talk | contribs)
Jump to navigation Jump to search

The OPC UA File Transfer is a set of functionality in OPC UA, built on top of core OPC UA, which defines operation on files and directories residing in the OPC UA server that supports it, similar to file system functionality in operating systems. The OPC UA files and directories can be just a temporarily or persistent storage for arbitrary data, with no added intrinsic semantics, but in many cases they will have a specific meaning defined by the OPC server. For example, files with a predefined name and location can be used to upload a new firmware to the PLC. Files provided by the OPC UA server can also be "virtual", i.e. they do not have to be physically stored inside the server, and the file transfer mechanism can be used to facilitate access to large bodies data that would otherwise be impossible to read or write in a single call (files can be read from or written to in pieces). Some OPC UA "higher-level" specifications use the File Transfer mechanism as well. For example, files are used in Certificate Management to transfer application certificates in their binary form.

Note2-icon.png

Note: The "file transfer" in the name corresponds to how the related OPC UA specification part is titled. In reality, the functionality covers more than just file transfer - it can represent a file system in OPC UA, and provides file access and manipulation operations.

Two basic types of objects are defined in OPC UA File Transfer:

  • files
  • directories

Files and directories are represented as nodes in the OPC UA address space, in the same way as any other type of object. A file contains data that can be accessed. A directory is a collection of files and directories. If you start with a directory, files and directories can be seen as organized in a hierarchical structure (tree).

The OPC UA server can contain multiple such hierarchical structures; there is no "one and only root" of a file system in OPC UA. In general, a file or directory node can be located anywhere in OPC server's address space, and there can be more of them. A file node can also be completely standalone - be not part of any directory.

In addition, any OPC UA node can aggregate a file system, and there is a predefined way for doing so in the OPC UA specification. The server can do this extending the node by adding a HasComponent reference to a directory object (for the root), with the browse name FileSystem.