The Dialog Model is an extension of the Conditionmodel used by a Serverto request user input. It provides functionality similar to the standard Messagedialogs found in most operating systems. The model can easily be customized by providing Serverspecific response options in the ResponseOptionSetand by adding additional functionality to derived Condition Types.

The DialogConditionTypeis used to represent Conditionsas dialogs. It is illustrated in Figure 12and formally defined in Table 26and Table 27.

image015.png

Figure 12– DialogConditionType Overview

Table 26– DialogConditionType definition

Attribute

Value

BrowseName

DialogConditionType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ConditionType defined in clause 5.5.2

HasComponent

Variable

DialogState

LocalizedText

TwoStateVariableType

Mandatory

HasProperty

Variable

Prompt

LocalizedText

PropertyType

Mandatory

HasProperty

Variable

ResponseOptionSet

LocalizedText [ ]

PropertyType

Mandatory

HasProperty

Variable

DefaultResponse

Int32

PropertyType

Mandatory

HasProperty

Variable

LastResponse

Int32

PropertyType

Mandatory

HasProperty

Variable

OkResponse

Int32

PropertyType

Mandatory

HasProperty

Variable

CancelResponse

Int32

PropertyType

Mandatory

HasComponent

Method

Respond

Defined in Clause 5.6.3.

Mandatory

HasComponent

Method

Respond2

Defined in Clause 5.6.4.

Optional

ConformanceUnits

A & C Dialog

Table 27– DialogConditionType Additional Subcomponents

BrowsePath

References

NodeClass

BrowseName

DataType

TypeDefinition

Others

DialogState

HasProperty

Variable

TrueState

LocalizedText

PropertyType

DialogState

HasProperty

Variable

FalseState

LocalizedText

PropertyType

The emptyOthers” column indicates that no ModellingRuleapplies.

The DialogConditionTypeinherits all Propertiesof the ConditionType.

DialogState/Idwhen set to True indicates that the Dialogis active and waiting for a response. Recommended state names are described in A.2.

Promptis a dialog prompt to be shown to the user.

ResponseOptionSetspecifies the desired set of responses as array of LocalizedText. The index in this array is used for the corresponding fields like DefaultResponse, LastResponseand SelectedOptionin the Respond Method. The recommended localized names for the common options are described in A.1.

Typical combinations of response options are

  • OK
  • OK, Cancel
  • Yes, No, Cancel
  • Abort, Retry, Ignore
  • Retry, Cancel
  • Yes, No

DefaultResponseidentifies the response option that should be shown as default to the user. It is the index in the ResponseOptionSetarray. If no response option is the default, the value of the Propertyis -1.

LastResponsecontains the last response provided by a Clientin the Respond Method. If no previous response exists, then the value of the Propertyis -1.

OkResponseprovides the index of the OK option in the ResponseOptionSetarray. This choice is the response that will allow the system to proceed with the operation described by the prompt. This allows a Clientto identify the OK option if a special handling for this option is available. If no OK option is available, the value of this Propertyis -1.

CancelResponseprovides the index of the response in the ResponseOptionSetarray that will cause the Dialog to go into the inactive state without proceeding with the operation described by the prompt. This allows a Clientto identify the Cancel option if a special handling for this option is available. If no Cancel option is available, the value of this Propertyis -1.

Respondis used to pass the selected response option and end the dialog. DialogState/Idwill return to False.

Signature

Respond(

[in] Int32 SelectedResponse

);

The parameters are defined in Table 28

Table 28– Respond parameters

Argument

Description

SelectedResponse

Selected index of the ResponseOptionSetarray.

Methodresult codes in Table 29(defined in Call Service)

Table 29– Respond Result Codes

Result Code

Description

Bad_DialogNotActive

See Table 137for the description of this result code.

Bad_DialogResponseInvalid

See Table 137for the description of this result code.

Table 30specifies the AddressSpacerepresentation for the Respond Method.

Table 30– Respond Method AddressSpace definition

Attribute

Value

BrowseName

Respond

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

AuditConditionRespondEventType

Defined in 5.10.5

ConformanceUnits

A & C Dialog

If Auditingis supported, this Methodshall generate an Eventof AuditConditionRespondEventTypefor all invocations of the Method.

Respond2Method extends the respond method by adding a comment field. For other functionality see the Respond Method definition.

Signature

Respond2(

[in] Int32 SelectedResponse

[in] LocalizedTextComment

);

The parameters are defined in Table 31

Table 31– Respond2 parameters

Argument

Description

SelectedResponse

Selected index of the ResponseOptionSetarray.

Comment

A localized text to be applied to the Dialog.

If the Commentargument is NULL (both locale and text are empty) it will be ignored and any existing comments will remain unchanged. If the comment is to be reset, an empty text with a locale shall be provided.

Methodresult codes in Table 32(defined in Call Service)

Table 32– Respond2 Result Codes

Result Code

Description

Bad_DialogNotActive

See Table 137for the description of this result code.

Bad_DialogResponseInvalid

See Table 137for the description of this result code.

Table 33specifies the AddressSpacerepresentation for the Respond2 Method.

Table 33– Respond2 Method AddressSpace definition

Attribute

Value

BrowseName

Respond2

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

AuditConditionRespondEventType

Defined in 5.10.5

ConformanceUnits

A & C Dialog2

If Auditingis supported, this Methodshall generate an Eventof AuditConditionRespondEventTypefor all invocations of the Method.