Data types

The OPC UA API utilizes different data types. Some of the data types are defined by the OPC UA Foundation and use the OPC UA Foundation JSON serializers. The documentation will list the data types used and show the corresponding JSON and default values. The default values are used when they are not set.

Note that the JSON is case-sensitive

SignalR and RESTFul API Data types

The following types are exposed directly in the API. They consist of smaller data types which are referenced further down in the document.

Connection

Used when creating a connection.

MembersData typeDescriptionDefault value
UrlStringThe address of the ua server. E.g. opc.tcp://10.100.12.43:7653
AuthenticationTypeUInt32AnonymousUnsecure = 1, AnonymousSecure = 2

ReadValuesRequest

Used when reading values (i.e. value of attributes with id = 13).

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
NodeIdsArray of NodeIdContains the node ids to read.

ReadValuesResponse

This the response when reading values of nodes.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
ValuesArray of DataValueAn array containing the values of the node. The order is the same as in the Request

WriteValuesRequest

Used when writing values (i.e. value of attributes with id = 13).

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
WriteValuesArray of WriteNodeValueContains the node ids and values to be written.

WriteNodeValue

Contains a NodeId and a DataValue. Is used when writing values.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe id of the node to write to.
ValueDataValueContains the value to be written.

WriteValuesResponse

This the response when writing values to a node.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were written.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
ValuesArray of StatusCodeAn array status of the write operation. The order is the same as in the Request

ReadDataTypesRequest

Used when reading datatypes

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
NodeIdsArray of NodeIdContains the node ids to read.

ReadDataTypesResponse

This the response when reading data types of nodes.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
ValuesArray of DataTypeInfoAn array containing the values of the node. The order is the same as in the Request

DataTypeInfo

MembersData typeDescriptionDefault value
StatusCodeStatusCodeStatus code of the read.
DataTypeIdNodeIdOnly present if StatusCode is good, and contains the node id of the data type.
BrowseNameQualifiedNameOnly present if StatusCode is good, and contains the browse name of the data type.

ReadAttributesRequest

Used when reading attributes. The ReadValueIds is an array of node ids and the attribute id it will read.

See Attributes.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ReadValueIdsArray of ReadValueIdContains the node ids and the attributes to read.

ReadAttributesResponse

This the response when reading attributes.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no attributes were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
ValuesArray of DataValueAn array containing the values of the attributes. The order is the same as in the Request

WriteAttributesRequest

Used when writing attributes.

See Attributes.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
WriteValuesArray of WriteValueContains the node id, the attributes and the values to be written.

WriteAttributesResponse

This the response when writing attributes.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were written.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
ValuesArray of StatusCodeAn array status of the write operation. The order is the same as in the Request

ReadHistoryRawValuesRequest

Used when reading raw history data.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
IsReadModifiedBooleanfalse
StartTimeDateTimeThe start time of the query
EndTimeDateTimeThe end time of the query
ReturnBoundsBooleanReturn bounds if truefalse
TimestampsToReturnInt32See TimestampsToReturn
ReadValueIdsArray of HistoryReadValueIdThe nodes to read history for
LimitLimitLimit the number of vales returned from the request

ReadHistoryRawValuesResponse

Response when reading raw history.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
HistoryReadResultsArray of HistoryDataValueResultAn array of historical values. The array is in the same order as the Request

HistoryReadValueId

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id of the node to read history from.
IndexRangeStringThe index reange.null
DataEncodingQualifiedNameThe data encoding.null

HistoryDataValueResult

Represents a historical read result for one node id.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe id of the node which was read.
StatusCodeStatusCodeContains the status code of the historical read operations.
DataValuesArray of DataValueThe historical values.

ReadHistoryProcessedValuesRequest

Used when reading processed history data.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
StartTimeDateTimeThe start time of the query
EndTimeDateTimeThe end time of the query
ProcessingIntervaldoubleInterval between returned Aggregate values. The value 0 indicates that there is no ProcessingInterval defined. The value is given in milliseconds.
AggregateTypeNodeIdThe NodeId of the HistoryAggregate object that is to be used when retrieving the processed history.
AggregateNameStringThe name of the aggregate. Only one of AggregateName and AggregateType should be set simultaneously. AttributeType has precedence
TimestampsToReturnInt32See TimestampsToReturn
ReadValueIdsArray of HistoryAggregateReadValueIdThe nodes to read history for

HistoryAggregateReadValueId

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id of the node to read history from.
IndexRangeStringThe index reange.null
DataEncodingQualifiedNameThe data encoding.null
AggregateTypeNodeIdThe NodeId of the HistoryAggregate object that is to be used when retrieving the processed history.
AggregateNameStringThe name of the aggregate. Only one of AggregateName and AggregateType should be set simultaneously. AttributeType has precedence

ReadHistoryProcessedValuesResponse

Response when reading processed history.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
HistoryReadResultsArray of HistoryDataValueResultAn array of historical values. The array is in the same order as the Request

HistoryAggregateRequest

Used when getting aggregates from a server.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.

HistoryAggregateResponse

Response when reading history aggregates.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if aggregates could not be read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
AggregatesArray of HistoryAggregateAn array of aggregates available in the server.

HistoryAggregate

Represents one aggregate option.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe id of the node representing the aggregate.
NameStringThe name of the aggregate.

HistoryWriteRequest

Used when writing historical data to an OPC UA Server.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
UpdateDataDetailsArray of UpdateDataDetailsThe connection info.

UpdateDataDetails

MembersData typeDescriptionDefault value
PerformInsertReplacePerformUpdateTypeDecides whether the data shall be inserted, updated or replaced.null
UpdateValuesArray of DataValueThe values to be written.

HistoryWriteResponse

Response when writing historical data.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if aggregates could not be read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
HistoryUpdateResultsArray of HistoryUpdateResultThe result of the write operation.

HistoryUpdateResult

MembersData typeDescriptionDefault value
StatusCodeStatusCodeThe result of the operation.
OperationResultsarray of StatusCode
DiagnosticInfosArray of DiagnosticInfo

ReadEventHistoryRequest

Used when reading event history.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
StartTimeDateTimeThe start time of the query
EndTimeDateTimeThe end time of the query
FieldsArray of StringThe event fields to include in the response
WhereClauseSimpleWhereClauseThe where clause used in the query
ReadValueIdsArray of HistoryReadValueIdThe nodes to read events history for
LimitLimitLimit the number of events returned from the request

SimpleWhereClause

Represents a where clause in an event history query.

MembersData typeDescriptionDefault value
EventTypeNodedIdNodeIdThe node id of the event type of the events which shall be returned in the response. If null BaseEventType (i.e. all events) is used.null
AndWhereArray of SimpleExpressionA list of expressions which must all be true for the event to be returned.

SimpleExpression

Represents a logical expression used in an event history query.

MembersData typeDescriptionDefault value
FieldStringThe node id of the event type of the events which shall be returned in the response. If null BaseEventType (i.e. all events) is used.null
OpInt32The operator in the expression. See FilterOperator for options
ValueVariantThe value which the field is compared against.

ReadEventHistoryResponse

Response when reading event history.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
EventsResultArray of HistoryEventResultAn array of events

HistoryEventResult

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id of the Request .
StatusCodeStatusCodeThe status of the query for this node.
HistoryEventsArray of EventMessageContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null

EventMessage

Represents a single event. The fields may not be present if the Request does not include the field.

MembersData typeDescriptionDefault value
TimeDateTimeThe time of the event.null
MessageStringThe message of the event.null
SourceNameStringThe name of the source where the event occurred.null
EventTypeNodeIdThe node id of the event type of the event.null
SeverityInt32The severity of the event. The higher the value the more severe the event.null
SourceNodeNodeIdThe node id of the source where the event occurred.null
ReceiveTimeDateTimenull
ActiveTimeDateTimenull
BranchIdNodeIdnull
ClientUserIdStringThe id of the user attached with the event for instance through an acknowledgenull
ActiveBooleanIndicates whether the event was active.null
AcknowledgedBooleanIndicates whether the event was acknowleged.null
EnabledBooleanIndicates whether the event was enabled.null
ConfirmedBooleanIndicates whether the event was confirmed.null
ConditionClassIdNodeIdnull
ConditionClassNameStringnull
ConditionNameStringThe name of the condition if the event is of ConditionTypenull
ConditionSubClassIdNodeIdnull
ConditionSubClassNameStringnull
CommentStringComment attached to the eventnull
QualityStatusCodenull
EventTypeNameStringThe name of the event type this event belongs tonull
QualityTextStringThe quality represented as textnull

WriteEventHistoryRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
UpdatesArray of EventHistoryUpdateThe connection info.

EventHistoryUpdate

MembersData typeDescriptionDefault value
NodeIdNodeIdTODOnull
PerformInsertReplacePerformUpdateTypeTODOnull
FieldsArray of StringThe fields to writenull
WhereClauseSimpleWhereClauseThe where clausenull
EventsArray of EventMessageThe events to writenull

WriteEventHistoryResponse

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
HistoryUpdateResultsArray of HistoryUpdateResultThe results of the write operation.

ReadEventHistoryExtendedRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
StartTimeDateTimeThe start time of the query
EndTimeDateTimeThe end time of the query
FilterEventFilterThe filter of the query. Decides which fields are returned, and the condition for returning an event.
ReadValueIdsArray of HistoryReadValueIdThe nodes to read events history for
LimitLimitLimit the number of events returned from the request

ReadEventHistoryExtendedResponse

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
EventsResultArray of HistoryEventExtendedResultThe result of the read operation

HistoryEventExtendedResult

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id of the Request .
StatusCodeStatusCodeThe status of the query for this node.
HistoryEventsArray of HistoryEventFieldListAn array of events

HistoryEventFieldList

MembersData typeDescriptionDefault value
EventFieldsArray of VariantThe values of the event. The index of the collection corresponds to the index of the select clause in the query.

WriteEventHistoryExtendedRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
UpdateEventDetailsArray of UpdateEventDetailsThe events to write

WriteEventHistoryExtendedResponse

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
HistoryUpdateResultsArray of HistoryUpdateResultThe results of the write operation.

EventFieldDefinition

Represents a predefined event field.

MembersData typeDescriptionDefault value
NameStringThe name of the event field.
EventTypeIdNodeIdThe node id of the event type this field belongs to.
BrowsePathStringThe browse path of the field.
AttributeIdUInt32The attribute id of the event field.

GetEventTypesRequest

Used when getting event types.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
BaseEventTypeNodeIdThe event type to get the inherited event types from.null means the BaseEventType (Node Id: 2041).
RecursiveBooleanGets all inherited event types recursively.True.
IncludeBaseEventTypeInResponseBooleanGets event type information of BaseEventType.True.

GetEventTypesResponse

The response when getting event types.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if no values were read.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
EventTypesArray of EventTypeContains the event types

EventType

MembersData typeDescriptionDefault value
BrowseNameQualifiedNameThe qualified name of the event type.
DisplayNameStringThe display name of the event type.
NodeIdNodeIdThe node id of the event type.

AddCommentRequest

This is used when adding a comment to an event.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ObjectIdNodeIdnull
EventIdStringThe id of the event. See EventMessagenull
MessageLocalizedTextThe commentnull

AddCommentResponse

The response when adding a comment.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if operation was successful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
StatusCodeStatusCodeContains status code of the add comment operation.

ConfirmRequest

This is used when confirming an event.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ObjectIdNodeIdnull
EventIdStringThe id of the event. See EventMessagenull
MessageLocalizedTextThe commentnull

ConfirmResponse

The response when confirming an event.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if operation was successful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
StatusCodeStatusCodeContains status code of the confirm operation.

AcknowledgeRequest

This is used when acknowledging an event.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ObjectIdNodeIdnull
EventIdStringThe id of the event. See EventMessagenull
MessageLocalizedTextThe commentnull

AcknowledgeResponse

The response when acknowledging an event.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if operation was successful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
StatusCodeStatusCodeContains status code of the acknowledge operation.

CreateEventSubscriptionRequest

This is used when creating a subscription for events.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
SourceNodeIdNodeIdThe id of the node from where the events must occur. This includes nodes "below" this node in the hierarchy.
DisplayNameStringnull
PublishingIntervalInt32This interval defines the cyclic rate that the Subscription is being requested to return Notifications to the Client. This interval is expressed in milliseconds.100
KeepAliveCountUInt32Requested lifetime count. The lifetime count shall be a minimum of three times the keep keep-alive count. When the publishing timer has expired this number of times without a Publish request being available to send a NotificationMessage, then the Subscription shall be deleted by the Server.100
LifetimeCountUInt32Requested maximum keep-alive count. When the publishing timer has expired this number of times without requiring any NotificationMessage to be sent, the Subscription sends a keep-alive Message to the Client.100
MaxNotificationsPerPublishUInt32The maximum number of notifications that the Client wishes to receive in a single Publish response. A value of zero indicates that there is no limit.1000
FieldsArray of StringThe fields to be returned when an event occurs
WhereClauseSimpleWhereClauseThe condition that must be met for an event to be returned.

CreateEventSubscriptionResponse

The response when creating an event.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if subscription was created.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
SubscriptionIdStringIf success this string contains the subscription id.

EventsChangedResponse

The response when an event occurs.

MembersData typeDescriptionDefault value
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
SubscriptionIdStringThe id of the subscription.
EventsArray of EventMessageThe events.

CloseEventSubscriptionRequest

This is used when closing a subscription for events.

MembersData typeDescriptionDefault value
ConnectionConnectionThe connection info.
SubscriptionIdStringThe id of the subscription to close.

CloseEventSubscriptionResponse

The response when closing an event subscription.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if subscription was closed successfully.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
SubscriptionIdStringThe id of the subscription.

CreateDataValueSubscriptionRequest

This is used when creating a data value subscription

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
DisplayNameString
PublishingIntervalInt32This interval defines the cyclic rate that the Subscription is being requested to return Notifications to the Client. This interval is expressed in milliseconds.
KeepAliveCountUInt32Requested lifetime count. The lifetime count shall be a minimum of three times the keep keep-alive count. When the publishing timer has expired this number of times without a Publish request being available to send a NotificationMessage, then the Subscription shall be deleted by the Server.
LifetimeCountUInt32Requested maximum keep-alive count. When the publishing timer has expired this number of times without requiring any NotificationMessage to be sent, the Subscription sends a keep-alive Message to the Client.
MaxNotificationsPerPublishUInt32The maximum number of notifications that the Client wishes to receive in a single Publish response. A value of zero indicates that there is no limit.
NodesArray of DataValueMonitoredItemThe nodes to subscribe to

DataValueMonitoredItem

This data type contains information regarding subscription of an item. The ClientHandle must set to a unique string for each node.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe id of the node to subscribe to.
IndexRangestringnull
SamplingIntervalInt32null
QueueSizeUInt32null
DiscardOldestBooleannull
RelativePathStringnull
DataChangeFilterDataChangeFilternull
ClientHandlestringId representing this node.

DataChangeFilter

This filter decides when a data value is deemed to have changed.

MembersData typeDescriptionDefault value
TriggerInt32Decides when to trigger an data value changed event. See DataChangeTrigger
DeadbandTypeUInt32Decides which kind of dead band check to use. See DeadbandType
DeadbandValueDoubleThe dead band value.

CreateDataValueSubscriptionResponse

The response when querying for namespaces.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if subscription was created successfully.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
SubscriptionIdStringIf success: the subscription id.

DataValuesChangedResponse

When data values have changed this is sent to the subscriber.

MembersData typeDescriptionDefault value
ServerNamespacesArray of StringContains the namespaces on the server.
SubscriptionIdStringThe subscription id.
ValuesArray of NodeIdDataValueThe subscribed values which have changed.

NodeIdDataValue

Represents a change value. The ClientHandle corresponds to the ClientHandle in DataValueMonitoredItem.

MembersData typeDescriptionDefault value
ClientHandlestringThe handle given in DataValueMonitoredItem.
ValueVariantThe actual data value
StatusCodeStatusCodeThe status code
SourceTimestampDateTime
SourcePicosecondsNumeric0
ServerTimestampDateTime
ServerPicosecondsNumeric0

CloseDataValueSubscriptionRequest

This is used when a data value subscription shall be closed.

MembersData typeDescriptionDefault value
ConnectionConnectionThe connection info.
SubscriptionIdStringThe subscription id.

CloseDataValueSubscriptionResponse

Returend when data value subscription has been called.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if closed successfully.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.
SubscriptionIdStringThe subscription id.

StartDataValueSubscriptionResponse

Returned when data value subscription has been started.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if closed successfully.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.

NamespacesRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.

NamespaceResponse

The response when querying for namespaces.

MembersData typeDescriptionDefault value
SuccessBooleanTrue if namespaces were read successfully.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
NamespacesArray of StringThe namespaces in the OPC UA server.

BrowseRequest

This is used when browsing for nodes.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ViewViewDescriptionThe view to browse. Is usually null.null
NodeToBrowseNodeIdThe id of the node to browse.
BrowseDirectionInt32The direction to browse. See BrowseDirection
ReferenceTypeIdNodeIdThe reference types to follow.
IncludeSubtypesBooleanInclude sub types of the specified ReferenceTypeId.
NodeClassMaskUInt32A mask indicating what kind of nodes to browse for. The node classes can be OR'ed'

BrowseMultiRequest

This is used when browsing for nodes.

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ViewViewDescriptionThe view to browse. Is usually null.null
NodesArray of BrowseNodesThe nodes to browse.

BrowseNodes

MembersData typeDescriptionDefault value
NodeToBrowseNodeIdThe id of the node to browse.
BrowseDirectionInt32The direction to browse. See BrowseDirection
ReferenceTypeIdNodeIdThe reference types to follow.
IncludeSubtypesBooleanInclude sub types of the specified ReferenceTypeId.
NodeClassMaskUInt32A mask indicating what kind of nodes to browse for. The node classes can be OR'ed'

BrowseResponse

The response after a Browse, BrowseNext or GetChildren call.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if browse was unsuccesful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
BrowseResultBrowseResultThe result of a browse call

BrowseResult

MembersData typeDescriptionDefault value
ReferencesArray of ReferenceDescriptionThe references found.
StatusCodeStatusCodeThe status code of the browse.

MultiBrowseResponse

The response after a BrowseMulti, BrowsePropertiesMulti call.

MembersData typeDescriptionDefault value
SuccessBooleanFalse if browse was unsuccesful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
BrowseResultsArray of BrowseResultThe result of a browse call

ChildrenRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
ParentNodeIdThe parent for which we want to browse for children.

BrowsePropertiesRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
NodeIdNodeIdThe node for which we want to browse for properties.

BrowsePropertiesMultiRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
NodeIdsArray of NodeIdThe nodes for which we want to browse for properties.

TranslateBrowsePathsRequest

MembersData typeDescriptionDefault value
ClientNamespacesArray of StringContains the namespaces the client uses.null
ConnectionConnectionThe connection info.
BrowsePathsArray of QualifiedNamePathThe browse paths to find node ids for.

QualifiedNamePath

MembersData typeDescriptionDefault value
StartingNodeNodeIdThe node id of the starting node of the relative path.null
RelativePathArray of QualifiedNameThe relative path described by browse names.

TranslateBrowsePathsResponse

MembersData typeDescriptionDefault value
SuccessBooleanFalse if browse was unsuccesful.
ErrorMessageStringOnly present if Success is false, and contains error message.
ErrorCodeInt32Only present if Success is false, and contains the error code.
ServerNamespacesArray of StringContains the namespaces on the server.null if the corresponding request's' ClientNamespaces was null
BrowsePathResultsArray of BrowsePathResultContains the node ids of the browse path request

BrowsePathResult

MembersData typeDescriptionDefault value
StatusCodeStatusCodeIndicating whether the request was successful
TargetsArray of BrowsePathTargetThe targets of the browse paths.

BrowsePathTarget

MembersData typeDescriptionDefault value
TargetIdExpandedNodeIdThe node id of the target
RemainingPathIndexUInt32The index of the first unprocessed element in the RelativePath. This value shall be equal to the maximum value of Index data type if all elements were processed .

EventFilter

MembersData typeDescriptionDefault value
SelectClausesArray of SimpleAttributeOperandFields to be selected
WhereClauseContentFilterThe condition an event must meet to be returned in a query.

SimpleAttributeOperand

MembersData typeDescriptionDefault value
TypeDefinitionIdNodeIdThe event type id.
BrowsePathArray of QualifiedNameThe browsepath for the field.
AttributeIdUInt32The attribute id of value of the field.
IndexRangestringThe index range of the value.null

ContentFilter

From the OPC Foundation's OPC UA specification:

The ContentFilter structure defines a collection of elements that define filtering criteria. Each element in the collection describes an operator and an array of operands to be used by the operator. The operators that can be used in a ContentFilter are described in FilterOperator. The filter is evaluated by evaluating the first entry in the element array starting with the first operand in the operand array. The operands of an element may contain References to sub-elements resulting in the evaluation continuing to the referenced elements in the element array. The evaluation shall not introduce loops. For example evaluation starting from element A shall never be able to return to element A. However there may be more than one path leading to another element B.If an element cannot be traced back to the starting element it is ignored. Extra operands for any operator will result in an error.

MembersData typeDescriptionDefault value
ElementsArray of ContentFilterElementAn array of content filter elements making up the where clause.

ContentFilterElement

MembersData typeDescriptionDefault value
FilterOperatorFilterOperatorThe filter operator.
FilterOperandsArray of ExtensionObjectThe operands in the filter expression.

OPC UA Data types

ByteString

ByteString is a sequence of bytes.
A ByteString is represented by a base64 encoded string in JavaScript.

XmlElement

Represents an XML element.
Not supported

NodeId

The NodeId data type represents an OPC UA Node.

MembersData typeDescriptionDefault value
IdNumeric, String, Guid, OpaqueThe id of the node
IdTypeUInt16The id type of the node. Numeric = 0, String = 1, Guid = 2, Opaque = 30
NamespaceUInt16The namspace index of the namespace the node id belongs to0

JSON Examples

Below are listed some JSON examples and the corresponding values.

IdTypeIdNamespaceJson
0453450{"Id":45345}
1"idxyz"0{"IdType":1,"Id":"idxyz"}
2"f114f6cf-31e0-43c8-9c22-399570312496"0{"IdType":2,"Id":"f114f6cf-31e0-43c8-9c22-399570312496"}
3"IB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgE="0{"IdType":3,"Id":"IB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgE="}
1"ixyz"3{"IdType":1,"Id":"idxyz","Namespace":3}

ExpandedNodeId

A node id that stores the namespace URI instead of the namespace index.
TODO: Add

StatusCode

A StatusCode in OPC UA is numerical value that is used to report the outcome of an operation performed by an OPC UA Server. The StatusCode is a 32-bit unsigned integer. The top 16 bits represent the numeric value of the code that shall be used for detecting specific errors or conditions. The bottom 16 bits are bit flags that contain additional information but do not affect the meaning of the StatusCode.

See Status codes for possible status codes.

MembersData typeDescriptionDefault value
CodeUInt32The status code
SymbolStringThe textual representation

JSON Examples

CodeJson
0{}
2147483648{"Code":2147483648,"Symbol":"Bad"}

QualifiedName

A string qualified with a namespace.

MembersData typeDescriptionDefault value
NameStringThe text portion of the QualifiedName
UriUInt16Index that identifies the namespace that defines the name.0

JSON Examples

NameUriJson
"Valve1"0{"Name":"Valve1"}
"Valve2"4{"Name":"Valve2","Uri":4}

LocalizedText

A localized text string with a locale identifier

MembersData typeDescriptionDefault value
TextStringThe text
LocaleStringThe locale for the localized text.""

JSON Examples

TextLocaleJson
"mytext"{"Text":"mytext"}
"Valve2""nb-NO"{"Text":"mytext","Locale":"nb-NO"}

ExtensionObject

An opaque object with a syntax that may be unknown to the receiver Not supported

DiagnosticInfo

A diagnostic information associated with a result code

MembersData typeDescriptionDefault value
SymbolicIdInt32The index of the symbolic id in the string table.
NamespaceUriInt32The index of the namespace uri in the string table.""
LocaleInt32The index of the locale associated with the localized text.""
LocalizedTextInt32The index of the localized text in the string table.""
AdditionalInfoStringThe additional debugging or trace information.""
InnerStatusCodeStatusCodeThe status code returned from an underlying system.""
InnerDiagnosticInfoDiagnosticInfoThe diagnostic info returned from a underlying system.""

Limit

The Limit data type defines the structure to limit the request to a certain number of values.

MembersData typeDescriptionDefault value
StartIndexInt32The index from where to return elements
NumRecordsUInt16THe number of elements to return

ReadValueId

The ReadValueId data type is used when reading attributes.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id to read
AttributeIdUInt32The id of the attribute to read
IndexRangeStringnull

JSON Examples

{"NodeId":{"IdType":1,"Id":"idxyz","Namespace":3},"AttributeId":13}

Variant

The variant represents a value. The value can be of a number of data types. The variant will be serialized differently depending on the actual data type it represents.
The different data types which can be represented by a variant is listed below.

IdNameDescription
0NullAn invalid or unspecified value.
1BooleanA boolean logic value (true or false)
2SByteAn 8 bit signed integer value.
3ByteAn 8 bit unsigned integer value.
4Int16A 16 bit signed integer value
5UInt16A 16 bit unsigned integer value
6Int32A 32 bit signed integer value
7UInt32A 32 bit unsigned integer value
8Int64A 64 bit signed integer value
9UInt64A 64 bit unsigned integer value
10FloatAn IEEE single precision (32 bit) floating point value
11DoubleAn IEEE double precision (64 bit) floating point value
12StringA sequence of Unicode characters
13DateTimeAn instance in time
14GuidA 128-bit globally unique identifier
15ByteStringA sequence of bytes
16XmlElementAn XML element
17NodeIdAn identifier for a node in the address space of a UA server
18ExpandedNodeIdA node id that stores the namespace URI instead of the namespace index
19StatusCodeA structured result code
20QualifiedNameA string qualified with a namespace
21LocalizedTextA localized text string with an locale identifier
22ExtensionObjectAn opaque object with a syntax that may be unknown to the receiver
23DataValueA data value with an associated quality and timestamp
24VariantAny of the other built-in types
25DiagnosticInfoA diagnostic information associated with a result code

The JavaScript data structure will look like this:

MembersData typeDescriptionDefault value
TypeByteThe Variant type (Id)
BodyAnyDepends on the Type

JSON Examples

TypeValueJson
Float (10)87.34{"Type":10,"Body":87.34}
Guid (14)f114f6cf-31e0-43c8-9c22-399570312496{"Type":14,"Body":"f114f6cf-31e0-43c8-9c22-399570312496"}

DataValue

The data value is returned when reading an attribute.

MembersData typeDescriptionDefault value
ValueVariantThe actual data value
StatusCodeStatusCodeThe status code
SourceTimestampDateTime
SourcePicosecondsNumeric0
ServerTimestampDateTime
ServerPicosecondsNumeric0

WriteValue

The write value is used when writing an attribute.

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id
AttributeIdInt32The attribute id
ValueDataValueThe value to be written

JSON Examples

{"NodeId":{"IdType":1,"Id":"V|Worker.Write","Namespace":2},"AttributeId":13,"Value":{"Value":{"Type":8,"Body":"637709221331900544"}}}

ReferenceDescription

MembersData typeDescriptionDefault value
NodeIdNodeIdThe node id of the reference
IsForwardBooleanTrue if forward reference
ValueDataValueThe value to be written
ReferenceTypeIdNodeIdThe node id of the reference type
BrowseNameQualifiedNameThe browse name of the referenced node
DisplayNameLocalizedTextThe display name of the referenced node
NodeClassNodeClassThe node class of the referenced node
TypeDefinitionNodeIdThe node id of the type definition of the reference node

FilterOperator

The list below contains all the available filter operators used in SimpleExpression.

Note that not all of the operators make sense in a SimpleExpression.

DescriptionValue
Equals0
IsNull1
GreaterThan2
LessThan3
GreaterThanOrEqual4
LessThanOrEqual5
Like6
Not7
Between8
InList9
And10
Or11
Cast12
InView13
OfType14
RelatedTo15
BitwiseAnd16
BitwiseOr17

TimestampsToReturn

This int can be 4 values:

DescriptionValue
Return the source timestamp0
Return the Server timestamp1
Return both the source and Server timestamps2
Return neither timestamp3

BrowseDirection

This int can be 3 values:

DescriptionValue
Forward0
Inverse1
Both2

NodeClass

A node class is represented by an int:

DescriptionValue
Object1
Variable2
Method4
ObjectType8
VariableType16
ReferenceType32
DataType64
View128

DataChangeTrigger

DescriptionValue
Status0
StatusValue1
StatusValueTimestamp2

DeadbandType

DescriptionValue
None0
Absolute1
Percent2

PerformUpdateType

DescriptionValue
Insert1
Replace2
Update3
Remove4

Primitive Data types

The common data types are the building blocks of the more complex data types. The data types are mapped to their corresponding JavaScript data types.

String

A string is a sequence of characters.
String is native to JavaScript.

Boolean

A boolean logic value (true or false).
Boolean is native to JavaScript.

SByte

An 8 bit signed integer value.
SByte is represented as a Numeric in JavaScript.

Byte

An 8 bit unsigned integer value.
Byte is represented as a Numeric in JavaScript.

Int16

A 16 bit signed integer value.
Int16 is represented as a Numeric in JavaScript.

UInt16

A 16 bit unsigned integer value.
UInt16 is represented as a Numeric in JavaScript.

Int32

A 32 bit signed integer value.
Int32 is represented as a Numeric in JavaScript.

UInt32

A 32 bit unsigned integer value.
UInt32 is represented as a Numeric in JavaScript.

Int64

A 64 bit signed integer value.
Int64 is represented as a Numeric in JavaScript.

UInt64

A 64 bit unsigned integer value.
UInt64 is represented as a Numeric in JavaScript.

Float

An IEEE single precision (32 bit) floating point value.
Float is represented as a Numeric in JavaScript.

Double

An IEEE double precision (64 bit) floating point value.
Double is represented as a Numeric in JavaScript.

GUID

A GUID is a 128-bit globally unique identifier.
A GUID will be represented as a string in a JavaScript-object.

Example:
"f114f6cf-31e0-43c8-9c22-399570312496"

DateTime

A DateTime represents a point in time.
A DateTime will be represented as a string in a JavaScript-object.

Example:

2021-11-11T16:00:00Z