8.7.3 Package metadata

The package metadata file describes the identity of the Software Package, the target for the installation, the compatibility to the device and optionally the usage of individual files within the Software Package. The package_metadata.json is stored in the META folder.

The JSON schema for the package_metadata.json file associated with this version of the specification can be found here:

https://reference.opcfoundation.org/files/uamodel.di.packagemetadata.jsonschema.json?u=http://opcfoundation.org/UA/DI/&v=1.05.0

The JSON schema associated with the latest version of the specification can be found here:

https://reference.opcfoundation.org/files/uamodel.di.packagemetadata.jsonschema.json?u=http://opcfoundation.org/UA/DI/

The JSON schema follows the conventions for the Compact DataEncoding defined in OPC 10000-6.

The elements of the JSON schema are described in Table 120, Table 124, Table 126, Table 128, Table 130, Table 132, Table 134, Table 136, Table 138 and Table 140.

A Software Package is uniquely defined with the ManufacturerUri, PackageType, TargetProductCodes, PackageRevision and Name.

The PackageMetadata structure and all contained types are encoded using the JSON VerboseEncoding.

Note: The following tables describe the package_metadata.json with structures and enumerations as a separate OPC UA namespace. These types typically do not show up in the AddressSpace of an OPC UA Server.

Table 120 – PackageMetadata structure
Name Type Description Optional
PackageMetadata0:Structure
Name0:StringNames the package (the package file name can be changed)False
Description0:StringDescription of the content of the Software Package.True
ManufacturerUri0:StringIdentification of the manufacturer of the package (used with PackageType and SoftwareRevision to uniquely identify the package)False
Manufacturer0:StringManufacturer of the package (for display purposes)False
PackageRevision0:StringVersion of the software packageFalse
PackageType2:PackageTypeType of the Software Package.
Other values are reserved for future use.
False
SoftwareSubClass0:StringName of the application (in case of SoftwareClass Application)True
DeployCompletePackage0:BooleanIf true the complete package shall be sent to the device. Otherwise only the contained files that are marked as DeploymentItem are deployed (default: false).True
SoftwareRevision0:StringVersion of the software in the package. Optional for solution packages.True
ReleaseDate0:DateTimeAdditional information for the userTrue
TargetManufacturerUri0:StringIdentification of the target Node on the device. Used to find suitable Software Packages for a device.True
TargetManufacturer0:StringManufacturer of the target (for display purposes). Used to find suitable Software Packages for a device.True
UpdateTargets[]2:UpdateTargetIdentification of the target Node on the device
Used to find suitable Software Packages for a device.
Optional for solution packages.
True
Files[]2:FileDescriptorDescribes the files that require special treatment by the update client.True
Compatibilities[]2:CompatibilityOptionList of options: At least one of them must match to be compatible.True
Assignments[]2:AssignmentAssignments of Software Packages to components that support SoftwareUpdate Only for solution packages (see 8.7.5)True
Table 121 – PackageMetadata definition
Attribute Value
BrowseName2:PackageMetadata
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of 0:Structure defined in OPC 10000-3
Table 122 – UpdateTarget structure
Name Type Description Optional
UpdateTarget0:Structure
ProductCode0:String ProductCode of the target Node on the device.False
Model0:String Model of the target Node on the device.False
Table 123 – UpdateTarget definition
Attribute Value
BrowseName2:UpdateTarget
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of 0:Structure defined in OPC 10000-3
Table 124 – FileDescriptor structure
Name Type Description Optional
FileDescriptor0:Structure
FileType2:FileTypeDescribes how the client shall use the file.False
FileName0:StringRelative path and file name to the file in the ZIP packageFalse
MimeType0:StringMachine understandable type of file (default: “application/octet-stream”)True
Language0:StringUsed to support multiple languages of the same documentTrue
Table 125 – FileDescriptor definition
Attribute Value
BrowseName2:FileDescriptor
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of 0:Structure defined in OPC 10000-3
Table 126 – CompatibilityOption structure
Name Type Description Optional
CompatibilityOption0:StructureOne set of compatibility requirements
CompatibilityRequirements[]2:CompatibilityRequirementList of requirements: All of them must match to be compatibleFalse
Table 127 – CompatibilityOption definition
Attribute Value
BrowseName2:CompatibilityOption
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of 0:Structure defined in OPC 10000-3
Table 128 – CompatibilityRequirement structure
Name Type Description Optional
CompatibilityRequirement0:Structure
Variable0:StringPath to a variable to compare with
Examples: variable of a component or its Identification functional group or its parent device or an application on that device…
False
Values[]0:BaseDataTypeComparison values (zero, one or more values depending on the comparison operator). Can be any Integer or String type.False
Operation2:ComparisonOperationOperation that is used to compare Variable and Values.False
Table 129 – CompatibilityRequirement definition
Attribute Value
BrowseName2:CompatibilityRequirement
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of 0:Structure defined in OPC 10000-3
Table 130 – PackageType Items
Name Value Description
Firmware0The Software Package contains the firmware of a physical device.
Application1The Software Package contains an executable software.
Configuration2The Software Package contains the configuration of a device or application.
Solution3The Software Package contains a solution with several software package.
Table 131 – PackageType definition
Attribute Value
BrowseName2:PackageType
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of the 0:Enumeration type defined in OPC 10000-5
0:HasPropertyVariable0:EnumStrings0:LocalizedText []0:PropertyType
Table 132 – FileType Items
Name Value Description
DeploymentItem0

This file shall be deployed to the device.

If Cached-Loading or Direct-Loading is used at most one file can be marked as DeploymentItem.

If File System based Loading is used all files that are marked as DeploymentItem shall be copied to the server using the same file name.

If the complete Software Package is deployed to the device the individual files are not marked explicitly.

ReleaseNotes1

E.g. link for user to open the document

LicenseInfo2

E.g. link for user to open the document

PreInstallNote3Text that shall be shown to the user at least once before installation
Table 133 – FileType definition
Attribute Value
BrowseName2:FileType
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of the 0:Enumeration type defined in OPC 10000-5
0:HasPropertyVariable0:EnumStrings0:LocalizedText []0:PropertyType
Table 134 – ComparisonOperation Items
Name Value Description
EqualTo0 Value[0] = Variable
GreaterThan1 Value[0] > Variable (proper comparison for SemanticVersionString shall be supported)
GreaterEqual2 Value[0] >= Variable (proper comparison for SemanticVersionString shall be supported)
LessThen3 Value[0] < Variable (proper comparison for SemanticVersionString shall be supported)
LessEqual4 Value[0] <= Variable (proper comparison for SemanticVersionString shall be supported)
RegularExpression5 Value[0] contains a regular expression which must match the value of the Variable
OneOf6The Values array must contain the value of the Variable
Exist7The Node that is described by the Variable must exist. The Values array shall be empty.
Table 135 – ComparisonOperation definition
Attribute Value
BrowseName2:ComparisonOperation
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of the 0:Enumeration type defined in OPC 10000-5
0:HasPropertyVariable0:EnumStrings0:LocalizedText []0:PropertyType

The compatibility declaration describes the compatibility of a Software Package with a component on the server that supports the SoftwareUpdate AddIn.

This can be simple terms like a minimum SoftwareRevision or a specific HardwareRevision of the component. Or relations to other objects in the AddressSpace e.g. to describe the existence and version of an attached hardware or to restrict the use of an application to a specific firmware version of a device.

Typically, the compatibility declaration outlines the relationship between variables and the corresponding component on the server. However, certain compatibilities can only be articulated through associated components e.g. the device hosting the application or a necessarily attached hardware. For those cases the compatibility declaration can incorporate paths following the UpdateParentReferenceType references (see 8.6.1).

The UpdateParentReferenceType enables the definition of a tree of object on the server which is utilized to describe compatibility. Parent objects are referenced as “..” while child objects are indicated by the BrowseName of the node being referenced. The elements within this path are interconnected using a slash (“/”).

Examples:

“ManufacturerUri”, “ProductCode”, “SoftwareRevision” identify properties of the component that should be updated.

“../ManufacturerUri” and “../ProductCode” identify a specific parent component (e.g. the device that hosts the application).

“../ProfinetExtension/SoftwareRevision” can identify the firmware version of a hardware which is connected to the parent.