The PackageLoadingType provides information about the Current Version and allows transfer of a Software Package to and from the Server.

The PackageLoadingType is illustrated in Figure 42 and formally defined in Table 73.

image045.png

Figure 42 – PackageLoadingType

Table 73 – PackageLoadingType definition

Attribute

Value

BrowseName

PackageLoadingType

IsAbstract

True

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of the SoftwareLoadingType

0:HasComponent

Object

CurrentVersion

SoftwareVersionType

M

0:HasComponent

Object

FileTransfer

TemporaryFileTransferType

M

0:HasComponent

Variable

ErrorMessage

0:LocalizedText

0:BaseDataVariableType

M

0:HasProperty

Variable

WriteBlockSize

0:UInt32

0:PropertyType

O

0:HasSubtype

ObjectType

DirectLoadingType

0:HasSubtype

ObjectType

CachedLoadingType

Conformance Units

DI SU Software Update

To identify the Current Version, the CurrentVersion Object provides ManufacturerUri, SoftwareRevision and PatchIdentifiers along with other information that allows the user to identify the currently used software. With this information the Client can determine a suitable update.

Note: This version information is about the installed software. The Manufacturer is not necessarily the same as the Manufacturer of the physical device that executes the software.

The FileTransfer Object is of type TemporaryFileTransferType as defined in OPC 10000-5. It is used to create temporary files for download and upload of the software.

In the TemporaryFileTransferType type the GenerateFileForRead and GenerateFileForWrite Methods take an unspecified generateOptions Parameter. For the FileTransfer Object an Enumeration of type SoftwareVersionFileType is used for this Parameter. It is used to select the file to upload or download. All allowed values are defined in Table 101. Additional Result Codes of the GenerateFileForRead and GenerateFileForWrite Methods are specified in Table 74.

Table 74 – TemporaryFileTransferType Result Codes

Result Code

Description

Bad_InvalidState

If the PrepareForUpdate is available, the UpdateBehavior requires preparation and the PrepareForUpdate state machine is not in the state PreparedForUpdate.

Bad_NotFound

If there is no file to read from the device.

Bad_NotSupported

If the device does not support to upload / download of the Software Package.

For all errors that occur during the file transfer the ErrorMessage Variable should provide an error message for the user.

It is implementation dependent which version (see SoftwareVersionFileType in 8.5.1) is readable and which one is writable. Additional restrictions are defined in the concrete sub-types of PackageLoadingType.

The software is transferred as a single package. File type and content are device specific. If WriteBlockSize is supported, the Client shall write the file in chunks of this size.

The software should be validated during the transfer process. Errors shall be indicated either in the Write Method, the CloseAndCommit Method or an asynchronous completion of the file transfer. If the validation is performed synchronous, the Method returns Bad_InvalidArgument; if the validation is performed asynchronous, the error is indicated by the Error state of the FileTransferStateMachineType. If the ErrorMessage Variable is provided, it shall contain an error message representing the validation error.

The FileTransfer Object may optionally support the transfer of a Software Package from the device to the Client.

If this transfer is not supported, the Server shall return the Result Code Bad_NotSupported. If it is supported but there is currently no data, the Result Code Bad_NotFound shall be used instead.

This is a textual information about errors that can occur with the file transfer. Whenever a method of the TemporaryFileTransferType returns an error, the ErrorMessage Variable should provide a localized error message for the user. For every new file transfer the value should be reset to an empty string.

Optional size of the blocks (number of bytes) that a Client shall write to the file. The client shall write the Software Package in chunks of this size to the FileType object (the last block may be smaller).