The PackageLoadingTypeprovides information about the Current Versionand allows transfer of a Software Packageto and from the Server.
The PackageLoadingType is illustrated in Figure 42and formally defined in Table 73.
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 Objectprovides ManufacturerUri, SoftwareRevisionand PatchIdentifiersalong with other information that allows the user to identify the currently used software. With this information the Clientcan determine a suitable update.
Note: This version information is about the installed software. The Manufactureris not necessarily the same as the Manufacturerof the physical device that executes the software.
The FileTransfer Objectis of type TemporaryFileTransferTypeas defined in OPC 10000-5. It is used to create temporary files for download and upload of the software.
In the TemporaryFileTransferTypetype the GenerateFileForReadand GenerateFileForWrite Methodstake an unspecified generateOptions Parameter. For the FileTransfer Objectan Enumerationof type SoftwareVersionFileTypeis 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 Codesof the GenerateFileForReadand GenerateFileForWrite Methodsare specified in Table 74.
Table 74– TemporaryFileTransferType Result Codes
Result Code |
Description |
Bad_InvalidState |
If the PrepareForUpdateis available, the UpdateBehaviorrequires preparation and the PrepareForUpdatestate 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 theErrorMessage Variableshould provide an error message for the user.
It is implementation dependent which version (see SoftwareVersionFileTypein 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 WriteBlockSizeis supported, the Clientshall 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,theCloseAndCommit Methodor an asynchronous completion of the file transfer. If the validation is performed synchronous, the Methodreturns Bad_InvalidArgument; if the validation is performed asynchronous, the error is indicated by the Errorstate of the FileTransferStateMachineType. If the ErrorMessage Variableis provided, it shall contain an error message representing the validation error.
The FileTransfer Objectmay optionally support the transfer of a Software Packagefrom the device to the Client.
If this transfer is not supported, the Servershall return the Result Code Bad_NotSupported. If it is supported but there is currently no data, the Result Code Bad_NotFoundshall 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 Variableshould 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 Clientshall write to the file. The client shall write the Software Packagein chunks of this size to the FileTypeobject (the last block may be smaller).