The InstallationStateMachineTypemay be used if the device supports explicit installation (Cached-Loadingor File System based Loading). This supports the installation option of 8.3.4.6. It is illustrated in Figure 49and Figure 50and formally defined in Table 88. The transitions are formally defined in Table 90.

image052.png

Figure 49– Installation state machine

image053.png

Figure 50– InstallationStateMachine

Table 88– InstallationStateMachineType definition

Attribute

Value

BrowseName

InstallationStateMachineType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

Subtype of the FiniteStateMachineTypedefined in OPC 10000-5.

0:HasComponent

Variable

PercentComplete

0:Byte

0:BaseDataVariableType

O

0:HasComponent

Variable

InstallationDelay

0:Duration

0:BaseDataVariableType

O

0:HasComponent

Method

InstallSoftwarePackage

O

0:HasComponent

Method

InstallFiles

O

0:HasComponent

Method

Resume

M

0:HasComponent

Object

Idle

0:InitialStateType

0:HasComponent

Object

Installing

0:StateType

0:HasComponent

Object

Error

0:StateType

0:HasComponent

Object

IdleToInstalling

0:TransitionType

0:HasComponent

Object

InstallingToIdle

0:TransitionType

0:HasComponent

Object

InstallingToError

0:TransitionType

0:HasComponent

Object

ErrorToIdle

0:TransitionType

Conformance Units

DI SU Software Update

The component Variablesof the InstallationStateMachineTypehave additional Attributesdefined in Table 89.

Table 89– InstallationStateMachineType Attribute values for child Nodes

BrowsePath

Value Attribute

Idle

0:StateNumber

1

Installing

0:StateNumber

2

Error

0:StateNumber

3

IdleToInstalling

0:TransitionNumber

12

InstallingToIdle

0:TransitionNumber

21

InstallingToError

0:TransitionNumber

23

ErrorToIdle

0:TransitionNumber

31

Table 90– InstallationStateMachineType Additional References

SourceBrowsePath

Reference Type

Is Forward

TargetBrowsePath

Transitions

IdleToInstalling

0:FromState

True

Idle

0:ToState

True

Installing

0:HasEffect

True

0:TransitionEventType

InstallingToIdle

0:FromState

True

Installing

0:ToState

True

Idle

0:HasEffect

True

0:TransitionEventType

InstallingToError

0:FromState

True

Installing

0:ToState

True

Error

0:HasEffect

True

0:TransitionEventType

ErrorToIdle

0:FromState

True

Error

0:ToState

True

Idle

0:HasEffect

True

0:TransitionEventType

This percentage is a number between 0 and 100 that informs the user about the progress of an installation. It should be used whenever an update activity takes longer and the user should be informed about the completion. If the state machine is in Idle Stateit shall have the value 0. In case of an error the last value should be kept until the Resumeis called.

Note: This information is for the user only. It shall not be used to detect completion of the installation.

The optional InstallationDelaycan be set by a Clientto delay the actual installation after the call to InstallSoftwarePackageor InstallFilesis returned by the Server. This can be used when the installation is started on several devices in parallel and there is a risk that a reboot of one device could harm the connection to other devices. With a delay the install methods can be called on all devices before the devices actually start the installation. The InstallationDelaydoes not delay the transition from Idleto Installing.

This value could be preconfigured. If a Clientwants to set this value it has to be done before the install method is called.

The Serveris expected to stay operational at least during the delay.

With this Methodthe Clientrequests the installation of a Software Package. The package can be either the previously transferred Pending Versionor the alternative Fallback Version. To identify the version and to prevent conflicts with a second Clientthat transfers a different version, the InstallSoftwarePackage Methodneeds the ManufacturerUri, the SoftwareRevision and PatchIdentifiers Propertiesof the SoftwareVersionType.

Optionally an additional hash value may be passed to the Method. This hash could be calculated by the Clientor taken from a trusted source. Before installation the Servermay compare the hash against the calculated hash of the Software Package. This mechanism can be used if there is a risk that the Software Packageis altered during the transfer to the device and if the Serverhas no other mechanism to ensure that the Software Packageis from a trustworthy source.

If the installation succeeds but the software cannot run properly this should not be treated as an error of the installation. Instead, this should be indicated using the IDeviceHealthType Interface of the device / component.

This Methodshall not return before the state has changed to the Installingstate.

Signature

InstallSoftwarePackage(

[in] 0:String ManufacturerUri,

[in] 0:String SoftwareRevision,

[in] 0:String[] PatchIdentifiers,

[in] 0:ByteString Hash);

Table 91– InstallSoftwarePackage Method Arguments

Argument

Description

ManufacturerUri

ManufacturerUri Property of either the Pendingor Fallback SoftwareVersionTypethat should be installed.

SoftwareRevision

SoftwareRevision Property of either the Pendingor Fallback SoftwareVersionTypethat should be installed.

PatchIdentifiers

PatchIdentifiers Property of either the Pendingor Fallback SoftwareVersionTypethat should be installed. (or empty array if not supported on the SoftwareVersionType instance).

Hash

Hash of the Software Packagethat should be installed (or empty if not used).

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the InstallationStateMachineTypeis not in Idlestate or if the PrepareForUpdate Objectis available and the PrepareForUpdatestate machine is not in the state PreparedForUpdate.

Bad_NotFound

If the specified Software Packagedoes not exist.

Bad_InvalidArgument

If the Hash does not match the calculated hash of the Software Package.

Table 92– InstallSoftwarePackage Method AddressSpace definition

Attribute

Value

BrowseName

InstallSoftwarePackage

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

0:HasProperty

Variable

InputArguments

0:Argument[]

0:PropertyType

M

Conformance Units

DI SU Software Update

This Methodmay be called to request the installation of one or more files. The files are identified by the NodeIdof their FileTypeinstance in the FileSystem.

If the installation succeeds but the software cannot run properly this should not be treated as an error of the installation. Instead, this should be indicated using the IDeviceHealthType Interface of the device / component.

Signature

InstallFiles(

[in] 0:NodeId[] NodeIds);

Table 93– InstallFiles Method Arguments

Argument

Description

NodeIds

NodeIds of the files to install.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the InstallationStateMachineTypeis not in Idlestate or if the PrepareForUpdate Objectis available and the PrepareForUpdatestate machine is not in the state PreparedForUpdate.

Bad_NotFound

If one or more NodeIds are not found.

Table 94– InstallFiles Method AddressSpace definition

Attribute

Value

BrowseName

InstallFiles

References

NodeClass

BrowseName

DataType

TypeDefinition

Other

0:HasProperty

Variable

InputArguments

0:Argument[]

0:PropertyType

M

Conformance Units

DI SU Software Update

This Methodmay be called to resume from the Errorstate. The Errorstate can be reached if there are issues during the installation. The state machine remains in this state until the Clientcalls the Resume Methodto get back to the Idlestate immediately.

Signature

Resume();

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the InstallationStateMachineTypeis not in Error state.