SetSubscriptionDurable Methodis used to set a Subscriptioninto a mode where MonitoredItemdata and event queues are stored and delivered even if an OPC UA Clientwas disconnected for a longer time or the OPC UA Serverwas restarted. Its intended use is defined in OPC 10000-4.

Signature

SetSubscriptionDurable(

[in] UInt32 subscriptionId

[in] UInt32 lifetimeInHours

[out] UInt32 revisedLifetimeInHours

);

Argument

Description

subscriptionId

Identifier of the Subscription.

lifetimeInHours

The requested lifetime in hours for the durable Subscription.

revisedLifetimeInHours

The revised lifetime in hours the Serverapplied to the durable Subscription.

Method Result Codes (defined in Call Service)

Result Code

Description

Bad_SubscriptionIdInvalid

Defined in OPC 10000-4

Bad_InvalidState

Defined in OPC 10000-4

This is returned when a Subscriptionalready contains MonitoredItems.

Bad_UserAccessDenied

Defined in OPC 10000-4

The Methodwas not called in the context of the Sessionthat owns the Subscription.

Table 114specifies the AddressSpacerepresentation for the SetSubscriptionDurable Method.

Table 114– SetSubscriptionDurable Method AddressSpace definition

Attribute

Value

BrowseName

SetSubscriptionDurable

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

Conformance Units

Base Info ServerType