The PrepareForUpdateStateMachineTypemay be used if the device requires to be prepared before the update. Another option is to delay the resuming of normal operation until all update actions are executed. This supports to prepare for update option of 8.3.4.2.

If a Serverimplements this state machine, a Clientshall use it except if the UpdateBehaviorindicates that this is not necessary for the transferred software. If preparation is required, the installation is only allowed if the PrepareForUpdateStateMachineis in the PreparedForUpdatestate.

The state machine is illustrated in Figure 47, Figure 48and formally defined in Table 85. The transitions are formally defined in Table 87.

image050.png

Figure 47– PrepareForUpdate state machine

image051.png

Figure 48– PrepareForUpdateStateMachineType

Table 85– PrepareForUpdateStateMachineType definition

Attribute

Value

BrowseName

PrepareForUpdateStateMachineType

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

Method

Prepare

M

0:HasComponent

Method

Abort

M

0:HasComponent

Method

Resume

O

0:HasComponent

Object

Idle

0:InitialStateType

0:HasComponent

Object

Preparing

0:StateType

0:HasComponent

Object

PreparedForUpdate

0:StateType

0:HasComponent

Object

Resuming

0:StateType

0:HasComponent

Object

IdleToPreparing

0:TransitionType

0:HasComponent

Object

PreparingToIdle

0:TransitionType

0:HasComponent

Object

PreparingToPreparedForUpdate

0:TransitionType

0:HasComponent

Object

PreparedForUpdateToResuming

0:TransitionType

0:HasComponent

Object

ResumingToIdle

0:TransitionType

Conformance Units

DI SU PrepareForUpdate

The component Variablesof the PrepareForUpdateStateMachineTypehave additional Attributesdefined in Table 86.

Table 86– PrepareForUpdateStateMachineType Attribute values for child Nodes

BrowsePath

Value Attribute

Idle

0:StateNumber

1

Preparing

0:StateNumber

2

PreparedForUpdate

0:StateNumber

3

Resuming

0:StateNumber

4

IdleToPreparing

0:TransitionNumber

12

PreparingToIdle

0:TransitionNumber

21

PreparingToPreparedForUpdate

0:TransitionNumber

23

PreparedForUpdateToResuming

0:TransitionNumber

34

ResumingToIdle

0:TransitionNumber

41

Table 87– PrepareForUpdateStateMachineType Additional References

SourceBrowsePath

Reference Type

Is Forward

TargetBrowsePath

Transitions

IdleToPreparing

0:FromState

True

Idle

0:ToState

True

Preparing

0:HasEffect

True

0:TransitionEventType

PreparingToIdle

0:FromState

True

Preparing

0:ToState

True

Idle

0:HasEffect

True

0:TransitionEventType

PreparingToPreparedForUpdate

0:FromState

True

Preparing

0:ToState

True

PreparedForUpdate

0:HasEffect

True

0:TransitionEventType

PreparedForUpdateToResuming

0:FromState

True

PreparedForUpdate

0:ToState

True

Resuming

0:HasEffect

True

0:TransitionEventType

ResumingToIdle

0:FromState

True

Resuming

0:ToState

True

Idle

0:HasEffect

True

0:TransitionEventType

This percentage is a number between 0 and 100 that informs about the progress in the Preparingor the Resuming States. It may be used whenever the activity takes longer and the user should be informed about the completion. If the state machine is in Idleor PreparedForUpdate Stateit shall have the value 0.

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

The Prepare Methodmay be called to prepare a device for an update. This call transitions the device into the state Preparing.

After the preparation is complete the state machine may perform an automatic transition to the state PreparedForUpdate.

If the preparation cannot complete and the device does not get prepared for update the state machine transitions back to Idle. In this case a message with the reason should be provided to the user via the UpdateStatus.

Signature

Prepare();

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the PrepareForUpdateStateMachineType is not in Idle state.

If the preparation takes too long or does not complete at all because the required internal conditions are not met the Abort Methodmay be called to abort the preparation. This call transitions the device back to the Idlestate.

Note: If the transition from Preparingto Idlecannot complete instantly a Clientneeds to subscribe for the events or the state variable of the PrepareForUpdateStateMachine.

Signature

Abort();

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the PrepareForUpdateStateMachineType is not in Preparing state.

A call to the optional Resume Methodtransitions the device into the state Resuming. After the resuming is complete the state machine performs an automatic transition to the Idlestate. If the method is not supported, the transitions to Resumingand back to Idleshall be done by the Serverautomatically. If the method is supported, there shall not be an automatic transition to Resuming.Supporting this method enables the Clientto group several activities like backup, install, restore on a single device or group the update of multiple devices before the devices are allowed to Resume their operation again.

Signature

Resume();

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_InvalidState

If the PrepareForUpdateStateMachineType is not in PreparedForUpdate state or if the InstallationStateMachine is still in the state Installing.