OPC UA PubSub JSON mapping component: Difference between revisions
From OPC Labs Knowledge Base
No edit summary |
|||
Line 5: | Line 5: | ||
= Configuration = | = Configuration = | ||
The configuration of the OPC UA PubSub JSON mapping package consists of three parts that correspond to the three areas of functionality that the package provides: | |||
; Send message mapping: The full name of the corresponding configuration part type is '''{{Style=Identifier|OpcLabs.UAPubSubJson.JsonSendMessageMapping}}'''. | |||
; Receive message mapping: The full name of the corresponding configuration part type is '''{{Style=Identifier|OpcLabs.UAPubSubJson.JsonReceiveMessageMapping}}'''. | |||
; Envelope mapping: The full name of the corresponding configuration part type is '''{{Style=Identifier|OpcLabs.UAPubSubJson.JsonEnvelopeMapping}}'''. | |||
In order to configure properties of the OPC UA PubSub JSON mapping package, you need to set one or more custom properties on a PubSub connection as follows: | In order to configure properties of the OPC UA PubSub JSON mapping package, you need to set one or more custom properties on a PubSub connection as follows: | ||
* '''Property namespace''': http://opclabs.com/OpcUA/PubSub | * '''Property namespace''': http://opclabs.com/OpcUA/PubSub | ||
* '''Property name''': Full name of the | * '''Property name''': Full name of the configuration part type (see above), followed by "." and the property name from the documentation below. For example, the PubSub connection custom property name for the MessageFormattingParameters.PrettificationLevel property of the send message mapping will be "OpcLabs.UAPubSubJson.JsonSendMessageMapping.MessageFormattingParameters.PrettificationLevel". | ||
* '''Property datatype''': ''As given by the documentation below.'' | * '''Property datatype''': ''As given by the documentation below.'' | ||
* '''Property value''': ''The desired value.'' | * '''Property value''': ''The desired value.'' |
Revision as of 12:56, 30 January 2020
(tbd!!!)
Installation
Configuration
The configuration of the OPC UA PubSub JSON mapping package consists of three parts that correspond to the three areas of functionality that the package provides:
- Send message mapping
- The full name of the corresponding configuration part type is OpcLabs.UAPubSubJson.JsonSendMessageMapping.
- Receive message mapping
- The full name of the corresponding configuration part type is OpcLabs.UAPubSubJson.JsonReceiveMessageMapping.
- Envelope mapping
- The full name of the corresponding configuration part type is OpcLabs.UAPubSubJson.JsonEnvelopeMapping.
In order to configure properties of the OPC UA PubSub JSON mapping package, you need to set one or more custom properties on a PubSub connection as follows:
- Property namespace: http://opclabs.com/OpcUA/PubSub
- Property name: Full name of the configuration part type (see above), followed by "." and the property name from the documentation below. For example, the PubSub connection custom property name for the MessageFormattingParameters.PrettificationLevel property of the send message mapping will be "OpcLabs.UAPubSubJson.JsonSendMessageMapping.MessageFormattingParameters.PrettificationLevel".
- Property datatype: As given by the documentation below.
- Property value: The desired value.
How this is done depends on the concrete software you are using.
EasyUASubscriber object
OpcCmd tool
UADemoPublisher tool
Parameters
Send message mapping
The table below lists the available properties, their types, and descriptions.
Property | Type | Default | Description |
---|---|---|---|
MessageFormattingParameters | OpcLabs.UAPubSubJson.Sdk.PubSub.JsonMessageFormattingParameters | ||
MessageFormattingParameters.IndentChars | System.String | " " (two spaces) | The character string to use when indenting. |
MessageFormattingParameters.PrettificationLevel | OpcLabs.UAPubSubJson.Sdk.PubSub.JsonMessagePrettificationLevel | JsonMessagePrettificationLevel.DataSetMessageData | A value indicating how to prettify the output. |
The JsonMessagePrettificationLevel enumeration is defined in the following table:
Name | Value | Description |
---|---|---|
None | 0 | The JSON message is not prettified. |
NetworkMessage | 1 | The message is prettified to the network message level. |
NetworkMessageData | 2 | The message is prettified to the network message data level. |
DataSetMessage | 3 | The message is prettified to the dataset message level. |
DataSetMessageData | 4 | The message is prettified to the dataset message data level. |
Receive message mapping
The table below lists the available properties, their types, and descriptions.
Property | Type | Default | Description |
---|---|---|---|
MessageParsingParameters | OpcLabs.UAPubSubJson.Sdk.PubSub.JsonMessageParsingParameters | ||
MessageParsingParameters.AutoRecognizeMessageFormat | System.Boolean | True | Determines whether the message format will be automatically recognized when possible. |
MessageParsingParameters.RecognizedNonReversibleBuiltInTypesMask | System.Int32 | NodeId, ExpandedNodeId, StatusCode, QualifiedName, DataValue, DiagnosticInfo |
The built-in types that be recognized when parsing the non-reversible JSON encoding. |
MessageParsingParameters.RequireDataSetMetadata | System.Boolean | False | Determines whether data set metadata will always be required for parsing. |
Envelope mapping
There are no parameters that can be set for the envelope mapping.