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
The following types are exposed directly in the API. They consist of smaller data types which are referenced further down in the document.
Used when creating a connection.
Members | Data type | Description | Default value |
Url | String | The address of the ua server. E.g. opc.tcp://10.100.12.43:7653 | |
AuthenticationType | UInt32 | AnonymousUnsecure = 1, AnonymousSecure = 2 | |
Used when reading values (i.e. value of attributes with id = 13).
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
NodeIds | Array of NodeId | Contains the node ids to read. | |
This the response when reading values of nodes.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Values | Array of DataValue | An array containing the values of the node. The order is the same as in the Request | |
Used when writing values (i.e. value of attributes with id = 13).
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
WriteValues | Array of WriteNodeValue | Contains the node ids and values to be written. | |
Contains a NodeId and a DataValue. Is used when writing values.
Members | Data type | Description | Default value |
NodeId | NodeId | The id of the node to write to. | |
Value | DataValue | Contains the value to be written. | |
This the response when writing values to a node.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were written. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Values | Array of StatusCode | An array status of the write operation. The order is the same as in the Request | |
Used when reading datatypes
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
NodeIds | Array of NodeId | Contains the node ids to read. | |
This the response when reading data types of nodes.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Values | Array of DataTypeInfo | An array containing the values of the node. The order is the same as in the Request | |
Members | Data type | Description | Default value |
StatusCode | StatusCode | Status code of the read. | |
DataTypeId | NodeId | Only present if StatusCode is good, and contains the node id of the data type. | |
BrowseName | QualifiedName | Only present if StatusCode is good, and contains the browse name of the data type. | |
Used when reading attributes. The ReadValueIds is an array of node ids and the attribute id it will read.
See Attributes.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
ReadValueIds | Array of ReadValueId | Contains the node ids and the attributes to read. | |
This the response when reading attributes.
Members | Data type | Description | Default value |
Success | Boolean | False if no attributes were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Values | Array of DataValue | An array containing the values of the attributes. The order is the same as in the Request | |
Used when writing attributes.
See Attributes.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
WriteValues | Array of WriteValue | Contains the node id, the attributes and the values to be written. | |
This the response when writing attributes.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were written. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Values | Array of StatusCode | An array status of the write operation. The order is the same as in the Request | |
Used when reading raw history data.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
IsReadModified | Boolean | | false |
StartTime | DateTime | The start time of the query | |
EndTime | DateTime | The end time of the query | |
ReturnBounds | Boolean | Return bounds if true | false |
TimestampsToReturn | Int32 | See TimestampsToReturn | |
ReadValueIds | Array of HistoryReadValueId | The nodes to read history for | |
Limit | Limit | Limit the number of vales returned from the request | |
Response when reading raw history.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
HistoryReadResults | Array of HistoryDataValueResult | An array of historical values. The array is in the same order as the Request | |
Members | Data type | Description | Default value |
NodeId | NodeId | The node id of the node to read history from. | |
IndexRange | String | The index reange. | null |
DataEncoding | QualifiedName | The data encoding. | null |
Represents a historical read result for one node id.
Members | Data type | Description | Default value |
NodeId | NodeId | The id of the node which was read. | |
StatusCode | StatusCode | Contains the status code of the historical read operations. | |
DataValues | Array of DataValue | The historical values. | |
Used when reading processed history data.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
StartTime | DateTime | The start time of the query | |
EndTime | DateTime | The end time of the query | |
ProcessingInterval | double | Interval between returned Aggregate values. The value 0 indicates that there is no ProcessingInterval defined. The value is given in milliseconds. | |
AggregateType | NodeId | The NodeId of the HistoryAggregate object that is to be used when retrieving the processed history. | |
AggregateName | String | The name of the aggregate. Only one of AggregateName and AggregateType should be set simultaneously. AttributeType has precedence | |
TimestampsToReturn | Int32 | See TimestampsToReturn | |
ReadValueIds | Array of HistoryAggregateReadValueId | The nodes to read history for | |
Members | Data type | Description | Default value |
NodeId | NodeId | The node id of the node to read history from. | |
IndexRange | String | The index reange. | null |
DataEncoding | QualifiedName | The data encoding. | null |
AggregateType | NodeId | The NodeId of the HistoryAggregate object that is to be used when retrieving the processed history. | |
AggregateName | String | The name of the aggregate. Only one of AggregateName and AggregateType should be set simultaneously. AttributeType has precedence | |
Response when reading processed history.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
HistoryReadResults | Array of HistoryDataValueResult | An array of historical values. The array is in the same order as the Request | |
Used when getting aggregates from a server.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
Response when reading history aggregates.
Members | Data type | Description | Default value |
Success | Boolean | False if aggregates could not be read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Aggregates | Array of HistoryAggregate | An array of aggregates available in the server. | |
Represents one aggregate option.
Members | Data type | Description | Default value |
NodeId | NodeId | The id of the node representing the aggregate. | |
Name | String | The name of the aggregate. | |
Used when writing historical data to an OPC UA Server.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
UpdateDataDetails | Array of UpdateDataDetails | The connection info. | |
Members | Data type | Description | Default value |
PerformInsertReplace | PerformUpdateType | Decides whether the data shall be inserted, updated or replaced. | null |
UpdateValues | Array of DataValue | The values to be written. | |
Response when writing historical data.
Members | Data type | Description | Default value |
Success | Boolean | False if aggregates could not be read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
HistoryUpdateResults | Array of HistoryUpdateResult | The result of the write operation. | |
Used when reading event history.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
StartTime | DateTime | The start time of the query | |
EndTime | DateTime | The end time of the query | |
Fields | Array of String | The event fields to include in the response | |
WhereClause | SimpleWhereClause | The where clause used in the query | |
ReadValueIds | Array of HistoryReadValueId | The nodes to read events history for | |
Limit | Limit | Limit the number of events returned from the request | |
Represents a where clause in an event history query.
Members | Data type | Description | Default value |
EventTypeNodedId | NodeId | The 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 |
AndWhere | Array of SimpleExpression | A list of expressions which must all be true for the event to be returned. | |
Represents a logical expression used in an event history query.
Members | Data type | Description | Default value |
Field | String | The 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 |
Op | Int32 | The operator in the expression. See FilterOperator for options | |
Value | Variant | The value which the field is compared against. | |
Response when reading event history.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
EventsResult | Array of HistoryEventResult | An array of events | |
Members | Data type | Description | Default value |
NodeId | NodeId | The node id of the Request . | |
StatusCode | StatusCode | The status of the query for this node. | |
HistoryEvents | Array of EventMessage | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
Represents a single event. The fields may not be present if the Request does not include the field.
Members | Data type | Description | Default value |
Time | DateTime | The time of the event. | null |
Message | String | The message of the event. | null |
SourceName | String | The name of the source where the event occurred. | null |
EventType | NodeId | The node id of the event type of the event. | null |
Severity | Int32 | The severity of the event. The higher the value the more severe the event. | null |
SourceNode | NodeId | The node id of the source where the event occurred. | null |
ReceiveTime | DateTime | | null |
ActiveTime | DateTime | | null |
BranchId | NodeId | | null |
ClientUserId | String | The id of the user attached with the event for instance through an acknowledge | null |
Active | Boolean | Indicates whether the event was active. | null |
Acknowledged | Boolean | Indicates whether the event was acknowleged. | null |
Enabled | Boolean | Indicates whether the event was enabled. | null |
Confirmed | Boolean | Indicates whether the event was confirmed. | null |
ConditionClassId | NodeId | | null |
ConditionClassName | String | | null |
ConditionName | String | The name of the condition if the event is of ConditionType | null |
ConditionSubClassId | NodeId | | null |
ConditionSubClassName | String | | null |
Comment | String | Comment attached to the event | null |
Quality | StatusCode | | null |
EventTypeName | String | The name of the event type this event belongs to | null |
QualityText | String | The quality represented as text | null |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
Updates | Array of EventHistoryUpdate | The connection info. | |
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
HistoryUpdateResults | Array of HistoryUpdateResult | The results of the write operation. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
StartTime | DateTime | The start time of the query | |
EndTime | DateTime | The end time of the query | |
Filter | EventFilter | The filter of the query. Decides which fields are returned, and the condition for returning an event. | |
ReadValueIds | Array of HistoryReadValueId | The nodes to read events history for | |
Limit | Limit | Limit the number of events returned from the request | |
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
EventsResult | Array of HistoryEventExtendedResult | The result of the read operation | |
Members | Data type | Description | Default value |
EventFields | Array of Variant | The values of the event. The index of the collection corresponds to the index of the select clause in the query. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
UpdateEventDetails | Array of UpdateEventDetails | The events to write | |
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
HistoryUpdateResults | Array of HistoryUpdateResult | The results of the write operation. | |
Represents a predefined event field.
Members | Data type | Description | Default value |
Name | String | The name of the event field. | |
EventTypeId | NodeId | The node id of the event type this field belongs to. | |
BrowsePath | String | The browse path of the field. | |
AttributeId | UInt32 | The attribute id of the event field. | |
Used when getting event types.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
BaseEventType | NodeId | The event type to get the inherited event types from. | null means the BaseEventType (Node Id: 2041). |
Recursive | Boolean | Gets all inherited event types recursively. | True. |
IncludeBaseEventTypeInResponse | Boolean | Gets event type information of BaseEventType. | True. |
The response when getting event types.
Members | Data type | Description | Default value |
Success | Boolean | False if no values were read. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
EventTypes | Array of EventType | Contains the event types | |
Members | Data type | Description | Default value |
BrowseName | QualifiedName | The qualified name of the event type. | |
DisplayName | String | The display name of the event type. | |
NodeId | NodeId | The node id of the event type. | |
This is used when adding a comment to an event.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
ObjectId | NodeId | | null |
EventId | String | The id of the event. See EventMessage | null |
Message | LocalizedText | The comment | null |
The response when adding a comment.
Members | Data type | Description | Default value |
Success | Boolean | True if operation was successful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
StatusCode | StatusCode | Contains status code of the add comment operation. | |
This is used when confirming an event.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
ObjectId | NodeId | | null |
EventId | String | The id of the event. See EventMessage | null |
Message | LocalizedText | The comment | null |
The response when confirming an event.
Members | Data type | Description | Default value |
Success | Boolean | True if operation was successful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
StatusCode | StatusCode | Contains status code of the confirm operation. | |
This is used when acknowledging an event.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
ObjectId | NodeId | | null |
EventId | String | The id of the event. See EventMessage | null |
Message | LocalizedText | The comment | null |
The response when acknowledging an event.
Members | Data type | Description | Default value |
Success | Boolean | True if operation was successful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
StatusCode | StatusCode | Contains status code of the acknowledge operation. | |
This is used when creating a subscription for events.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
SourceNodeId | NodeId | The id of the node from where the events must occur. This includes nodes "below" this node in the hierarchy. | |
DisplayName | String | | null |
PublishingInterval | Int32 | This interval defines the cyclic rate that the Subscription is being requested to return Notifications to the Client. This interval is expressed in milliseconds. | 100 |
KeepAliveCount | UInt32 | Requested 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 |
LifetimeCount | UInt32 | Requested 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 |
MaxNotificationsPerPublish | UInt32 | The 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 |
Fields | Array of String | The fields to be returned when an event occurs | |
WhereClause | SimpleWhereClause | The condition that must be met for an event to be returned. | |
The response when creating an event.
Members | Data type | Description | Default value |
Success | Boolean | True if subscription was created. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
SubscriptionId | String | If success this string contains the subscription id. | |
The response when an event occurs.
Members | Data type | Description | Default value |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
SubscriptionId | String | The id of the subscription. | |
Events | Array of EventMessage | The events. | |
This is used when closing a subscription for events.
Members | Data type | Description | Default value |
Connection | Connection | The connection info. | |
SubscriptionId | String | The id of the subscription to close. | |
The response when closing an event subscription.
Members | Data type | Description | Default value |
Success | Boolean | True if subscription was closed successfully. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
SubscriptionId | String | The id of the subscription. | |
This is used when creating a data value subscription
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
DisplayName | String | | |
PublishingInterval | Int32 | This interval defines the cyclic rate that the Subscription is being requested to return Notifications to the Client. This interval is expressed in milliseconds. | |
KeepAliveCount | UInt32 | Requested 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. | |
LifetimeCount | UInt32 | Requested 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. | |
MaxNotificationsPerPublish | UInt32 | The 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. | |
Nodes | Array of DataValueMonitoredItem | The nodes to subscribe to | |
This data type contains information regarding subscription of an item.
The ClientHandle must set to a unique string for each node.
This filter decides when a data value is deemed to have changed.
Members | Data type | Description | Default value |
Trigger | Int32 | Decides when to trigger an data value changed event. See DataChangeTrigger | |
DeadbandType | UInt32 | Decides which kind of dead band check to use. See DeadbandType | |
DeadbandValue | Double | The dead band value. | |
The response when querying for namespaces.
Members | Data type | Description | Default value |
Success | Boolean | True if subscription was created successfully. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
SubscriptionId | String | If success: the subscription id. | |
When data values have changed this is sent to the subscriber.
Members | Data type | Description | Default value |
ServerNamespaces | Array of String | Contains the namespaces on the server. | |
SubscriptionId | String | The subscription id. | |
Values | Array of NodeIdDataValue | The subscribed values which have changed. | |
Represents a change value. The ClientHandle corresponds to the ClientHandle in DataValueMonitoredItem.
This is used when a data value subscription shall be closed.
Members | Data type | Description | Default value |
Connection | Connection | The connection info. | |
SubscriptionId | String | The subscription id. | |
Returend when data value subscription has been called.
Members | Data type | Description | Default value |
Success | Boolean | True if closed successfully. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | |
SubscriptionId | String | The subscription id. | |
Returned when data value subscription has been started.
Members | Data type | Description | Default value |
Success | Boolean | True if closed successfully. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
The response when querying for namespaces.
Members | Data type | Description | Default value |
Success | Boolean | True if namespaces were read successfully. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
Namespaces | Array of String | The namespaces in the OPC UA server. | |
This is used when browsing for nodes.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
View | ViewDescription | The view to browse. Is usually null. | null |
NodeToBrowse | NodeId | The id of the node to browse. | |
BrowseDirection | Int32 | The direction to browse. See BrowseDirection | |
ReferenceTypeId | NodeId | The reference types to follow. | |
IncludeSubtypes | Boolean | Include sub types of the specified ReferenceTypeId. | |
NodeClassMask | UInt32 | A mask indicating what kind of nodes to browse for. The node classes can be OR'ed' | |
This is used when browsing for nodes.
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
View | ViewDescription | The view to browse. Is usually null. | null |
Nodes | Array of BrowseNodes | The nodes to browse. | |
Members | Data type | Description | Default value |
NodeToBrowse | NodeId | The id of the node to browse. | |
BrowseDirection | Int32 | The direction to browse. See BrowseDirection | |
ReferenceTypeId | NodeId | The reference types to follow. | |
IncludeSubtypes | Boolean | Include sub types of the specified ReferenceTypeId. | |
NodeClassMask | UInt32 | A mask indicating what kind of nodes to browse for. The node classes can be OR'ed' | |
The response after a Browse, BrowseNext or GetChildren call.
Members | Data type | Description | Default value |
Success | Boolean | False if browse was unsuccesful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
BrowseResult | BrowseResult | The result of a browse call | |
Members | Data type | Description | Default value |
References | Array of ReferenceDescription | The references found. | |
StatusCode | StatusCode | The status code of the browse. | |
The response after a BrowseMulti, BrowsePropertiesMulti call.
Members | Data type | Description | Default value |
Success | Boolean | False if browse was unsuccesful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
BrowseResults | Array of BrowseResult | The result of a browse call | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
Parent | NodeId | The parent for which we want to browse for children. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
NodeId | NodeId | The node for which we want to browse for properties. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
NodeIds | Array of NodeId | The nodes for which we want to browse for properties. | |
Members | Data type | Description | Default value |
ClientNamespaces | Array of String | Contains the namespaces the client uses. | null |
Connection | Connection | The connection info. | |
BrowsePaths | Array of QualifiedNamePath | The browse paths to find node ids for. | |
Members | Data type | Description | Default value |
StartingNode | NodeId | The node id of the starting node of the relative path. | null |
RelativePath | Array of QualifiedName | The relative path described by browse names. | |
Members | Data type | Description | Default value |
Success | Boolean | False if browse was unsuccesful. | |
ErrorMessage | String | Only present if Success is false, and contains error message. | |
ErrorCode | Int32 | Only present if Success is false, and contains the error code. | |
ServerNamespaces | Array of String | Contains the namespaces on the server. | null if the corresponding request's' ClientNamespaces was null |
BrowsePathResults | Array of BrowsePathResult | Contains the node ids of the browse path request | |
Members | Data type | Description | Default value |
StatusCode | StatusCode | Indicating whether the request was successful | |
Targets | Array of BrowsePathTarget | The targets of the browse paths. | |
Members | Data type | Description | Default value |
TargetId | ExpandedNodeId | The node id of the target | |
RemainingPathIndex | UInt32 | The 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 . | |
Members | Data type | Description | Default value |
SelectClauses | Array of SimpleAttributeOperand | Fields to be selected | |
WhereClause | ContentFilter | The condition an event must meet to be returned in a query. | |
Members | Data type | Description | Default value |
TypeDefinitionId | NodeId | The event type id. | |
BrowsePath | Array of QualifiedName | The browsepath for the field. | |
AttributeId | UInt32 | The attribute id of value of the field. | |
IndexRange | string | The index range of the value. | null |
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.
Members | Data type | Description | Default value |
Elements | Array of ContentFilterElement | An array of content filter elements making up the where clause. | |
Members | Data type | Description | Default value |
FilterOperator | FilterOperator | The filter operator. | |
FilterOperands | Array of ExtensionObject | The operands in the filter expression. | |
ByteString is a sequence of bytes.
A ByteString is represented by a base64 encoded string in JavaScript.
Represents an XML element.
Not supported
The NodeId data type represents an OPC UA Node.
Members | Data type | Description | Default value |
Id | Numeric, String, Guid, Opaque | The id of the node | |
IdType | UInt16 | The id type of the node. Numeric = 0, String = 1, Guid = 2, Opaque = 3 | 0 |
Namespace | UInt16 | The namspace index of the namespace the node id belongs to | 0 |
Below are listed some JSON examples and the corresponding values.
IdType | Id | Namespace | Json |
0 | 45345 | 0 | {"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} |
A node id that stores the namespace URI instead of the namespace index.
TODO: Add
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.
Members | Data type | Description | Default value |
Code | UInt32 | The status code | |
Symbol | String | The textual representation | |
Code | Json |
0 | {} |
2147483648 | {"Code":2147483648,"Symbol":"Bad"} |
A string qualified with a namespace.
Members | Data type | Description | Default value |
Name | String | The text portion of the QualifiedName | |
Uri | UInt16 | Index that identifies the namespace that defines the name. | 0 |
Name | Uri | Json |
"Valve1" | 0 | {"Name":"Valve1"} |
"Valve2" | 4 | {"Name":"Valve2","Uri":4} |
A localized text string with a locale identifier
Members | Data type | Description | Default value |
Text | String | The text | |
Locale | String | The locale for the localized text. | "" |
Text | Locale | Json |
"mytext" | | {"Text":"mytext"} |
"Valve2" | "nb-NO" | {"Text":"mytext","Locale":"nb-NO"} |
An opaque object with a syntax that may be unknown to the receiver
Not supported
A diagnostic information associated with a result code
Members | Data type | Description | Default value |
SymbolicId | Int32 | The index of the symbolic id in the string table. | |
NamespaceUri | Int32 | The index of the namespace uri in the string table. | "" |
Locale | Int32 | The index of the locale associated with the localized text. | "" |
LocalizedText | Int32 | The index of the localized text in the string table. | "" |
AdditionalInfo | String | The additional debugging or trace information. | "" |
InnerStatusCode | StatusCode | The status code returned from an underlying system. | "" |
InnerDiagnosticInfo | DiagnosticInfo | The diagnostic info returned from a underlying system. | "" |
The Limit data type defines the structure to limit the request to a certain number of values.
Members | Data type | Description | Default value |
StartIndex | Int32 | The index from where to return elements | |
NumRecords | UInt16 | THe number of elements to return | |
The ReadValueId data type is used when reading attributes.
Members | Data type | Description | Default value |
NodeId | NodeId | The node id to read | |
AttributeId | UInt32 | The id of the attribute to read | |
IndexRange | String | | null |
{"NodeId":{"IdType":1,"Id":"idxyz","Namespace":3},"AttributeId":13}
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.
Id | Name | Description |
0 | Null | An invalid or unspecified value. |
1 | Boolean | A boolean logic value (true or false) |
2 | SByte | An 8 bit signed integer value. |
3 | Byte | An 8 bit unsigned integer value. |
4 | Int16 | A 16 bit signed integer value |
5 | UInt16 | A 16 bit unsigned integer value |
6 | Int32 | A 32 bit signed integer value |
7 | UInt32 | A 32 bit unsigned integer value |
8 | Int64 | A 64 bit signed integer value |
9 | UInt64 | A 64 bit unsigned integer value |
10 | Float | An IEEE single precision (32 bit) floating point value |
11 | Double | An IEEE double precision (64 bit) floating point value |
12 | String | A sequence of Unicode characters |
13 | DateTime | An instance in time |
14 | Guid | A 128-bit globally unique identifier |
15 | ByteString | A sequence of bytes |
16 | XmlElement | An XML element |
17 | NodeId | An identifier for a node in the address space of a UA server |
18 | ExpandedNodeId | A node id that stores the namespace URI instead of the namespace index |
19 | StatusCode | A structured result code |
20 | QualifiedName | A string qualified with a namespace |
21 | LocalizedText | A localized text string with an locale identifier |
22 | ExtensionObject | An opaque object with a syntax that may be unknown to the receiver |
23 | DataValue | A data value with an associated quality and timestamp |
24 | Variant | Any of the other built-in types |
25 | DiagnosticInfo | A diagnostic information associated with a result code |
The JavaScript data structure will look like this:
Members | Data type | Description | Default value |
Type | Byte | The Variant type (Id) | |
Body | Any | Depends on the Type | |
Type | Value | Json |
Float (10) | 87.34 | {"Type":10,"Body":87.34} |
Guid (14) | f114f6cf-31e0-43c8-9c22-399570312496 | {"Type":14,"Body":"f114f6cf-31e0-43c8-9c22-399570312496"} |
The data value is returned when reading an attribute.
Members | Data type | Description | Default value |
Value | Variant | The actual data value | |
StatusCode | StatusCode | The status code | |
SourceTimestamp | DateTime | | |
SourcePicoseconds | Numeric | | 0 |
ServerTimestamp | DateTime | | |
ServerPicoseconds | Numeric | | 0 |
The write value is used when writing an attribute.
Members | Data type | Description | Default value |
NodeId | NodeId | The node id | |
AttributeId | Int32 | The attribute id | |
Value | DataValue | The value to be written | |
{"NodeId":{"IdType":1,"Id":"V|Worker.Write","Namespace":2},"AttributeId":13,"Value":{"Value":{"Type":8,"Body":"637709221331900544"}}}
Members | Data type | Description | Default value |
NodeId | NodeId | The node id of the reference | |
IsForward | Boolean | True if forward reference | |
Value | DataValue | The value to be written | |
ReferenceTypeId | NodeId | The node id of the reference type | |
BrowseName | QualifiedName | The browse name of the referenced node | |
DisplayName | LocalizedText | The display name of the referenced node | |
NodeClass | NodeClass | The node class of the referenced node | |
TypeDefinition | NodeId | The node id of the type definition of the reference node | |
The list below contains all the available filter operators used in SimpleExpression.
Note that not all of the operators make sense in a SimpleExpression.
Description | Value |
Equals | 0 |
IsNull | 1 |
GreaterThan | 2 |
LessThan | 3 |
GreaterThanOrEqual | 4 |
LessThanOrEqual | 5 |
Like | 6 |
Not | 7 |
Between | 8 |
InList | 9 |
And | 10 |
Or | 11 |
Cast | 12 |
InView | 13 |
OfType | 14 |
RelatedTo | 15 |
BitwiseAnd | 16 |
BitwiseOr | 17 |
This int can be 4 values:
Description | Value |
Return the source timestamp | 0 |
Return the Server timestamp | 1 |
Return both the source and Server timestamps | 2 |
Return neither timestamp | 3 |
This int can be 3 values:
Description | Value |
Forward | 0 |
Inverse | 1 |
Both | 2 |
A node class is represented by an int:
Description | Value |
Object | 1 |
Variable | 2 |
Method | 4 |
ObjectType | 8 |
VariableType | 16 |
ReferenceType | 32 |
DataType | 64 |
View | 128 |
Description | Value |
Status | 0 |
StatusValue | 1 |
StatusValueTimestamp | 2 |
Description | Value |
None | 0 |
Absolute | 1 |
Percent | 2 |
Description | Value |
Insert | 1 |
Replace | 2 |
Update | 3 |
Remove | 4 |
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.
A string is a sequence of characters.
String is native to JavaScript.
A boolean logic value (true or false).
Boolean is native to JavaScript.
An 8 bit signed integer value.
SByte is represented as a Numeric in JavaScript.
An 8 bit unsigned integer value.
Byte is represented as a Numeric in JavaScript.
A 16 bit signed integer value.
Int16 is represented as a Numeric in JavaScript.
A 16 bit unsigned integer value.
UInt16 is represented as a Numeric in JavaScript.
A 32 bit signed integer value.
Int32 is represented as a Numeric in JavaScript.
A 32 bit unsigned integer value.
UInt32 is represented as a Numeric in JavaScript.
A 64 bit signed integer value.
Int64 is represented as a Numeric in JavaScript.
A 64 bit unsigned integer value.
UInt64 is represented as a Numeric in JavaScript.
An IEEE single precision (32 bit) floating point value.
Float is represented as a Numeric in JavaScript.
An IEEE double precision (64 bit) floating point value.
Double is represented as a Numeric in JavaScript.
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"
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