Reference
OpcEncoding Members
Identifies how data is encoded on the wire and therefore describes in which way information is serialized or deserialized.
Reference
OpcEncoding Members
- Type
- OpcEncoding
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Properties
DefaultBinary
Gets the foundation defined encoding used by default to encode information using the binary representation (known as 'OPC UA Binary') of the information to serialize or deserialize.
public static OpcEncoding DefaultBinary { get; }Public Shared ReadOnly Property DefaultBinary As OpcEncodingProperty value
An instance of the OpcEncoding class used to define the OPC UA Binary encoding. The OpcEncoding instance provided identifies a data independent encoding and does therefore not refer to a specific node which refers to the OpcEncodingType used by the instance (Id is equals Null).
DefaultXml
Gets the foundation defined encoding used by default to encode information using a XML-based serialization format (known as 'OPC UA XML') to serialize or deserialize information.
public static OpcEncoding DefaultXml { get; }Public Shared ReadOnly Property DefaultXml As OpcEncodingProperty value
An instance of the OpcEncoding class used to define the OPC UA XML encoding. The OpcEncoding instance provided identifies a data independent encoding and does therefore not refer to a specific node which refers to the OpcEncodingType used by the instance (Id is equals Null).
Id
Gets the identifier of the node which refers to a specific OpcEncodingType (defined by Type) used to encode information.
public OpcNodeId Id { get; }Public ReadOnly Property Id As OpcNodeIdProperty value
An instance of the OpcNodeId class which either identifies a data type specific encoding or Null in case there this OpcEncoding represents one of the default encodings defined by the foundation.
Namespace
Gets the namespace within the encoding has been defined. This can be the same namespace as referenced by data type dictioanries using their NamespaceUri property.
public OpcNamespace Namespace { get; }Public ReadOnly Property [Namespace] As OpcNamespaceProperty value
An instance of the OpcNamespace class which refers to the namespace within the encoding has been defined. These instance may be the same OpcNamespace as used by the Id (see Namespace) or a custom namespace which in case of data type encodings have to be the same namespace as referenced by data type dictionaries using their NamespaceUri property.
Type
Gets a value which identifies the underlying logic used to encode information.
public OpcEncodingType Type { get; }Public ReadOnly Property Type As OpcEncodingTypeProperty value
One of the members defined by the OpcEncodingType enumeration.
Methods
All
| Overload | Description |
|---|---|
| All( | Retrieves for each supported OpcEncodingType a new OpcEncoding while each uses the id specified. |
| All( | Retrieves for each supported OpcEncodingType a new OpcEncoding while each uses the id and encoding specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The id is a null reference ( |
All(OpcNodeId)
Retrieves for each supported OpcEncodingType a new OpcEncoding while each uses the id specified.
public static OpcEncoding[] All(OpcNodeId id)Public Shared Function All(id As OpcNodeId) As OpcEncoding()Parameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encodings offered. |
Returns
An array of OpcEncoding instances representing all OpcEncodingTypes supported while referencing to the encoding node specified by id.
All(OpcNodeId, OpcNamespace)
Retrieves for each supported OpcEncodingType a new OpcEncoding while each uses the id and encodingNamespace specified.
public static OpcEncoding[] All(OpcNodeId id, OpcNamespace encodingNamespace)Public Shared Function All(
id As OpcNodeId,
encodingNamespace As OpcNamespace) As OpcEncoding()Parameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encodings offered. |
encoding | OpcNamespace | The OpcNamespace which refers to the namespace within the encodings has been defined. In case of data type encodings this OpcNamespace instance have to be the same namespace as referenced by data type dictionaries using their NamespaceUri property. This parameter can be a null reference (id specified is used instead. |
Returns
An array of OpcEncoding instances representing all OpcEncodingTypes supported while referencing to the encoding node specified by id.
Binary
| Overload | Description |
|---|---|
| Binary( | Retrieves a new OpcEncoding which uses the id specified to define an encoding which uses the logic used for binary data encoding. |
| Binary( | Retrieves a new OpcEncoding which uses the id and encoding specified to define an encoding which uses the logic used for binary data encoding. |
| Binary( | Selects the first OpcEncoding in encodings which defines an encoding which uses the Binary encoding type as the logic used to encode data. |
Binary(OpcNodeId)
Retrieves a new OpcEncoding which uses the id specified to define an encoding which uses the logic used for binary data encoding.
public static OpcEncoding Binary(OpcNodeId id)Public Shared Function Binary(id As OpcNodeId) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encoding offered. |
Returns
A new instance of the OpcEncoding class representing the encoding node specified by the id while using the Binary encoding type as the Type of encoding.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The id is a null reference ( |
Binary(OpcNodeId, OpcNamespace)
Retrieves a new OpcEncoding which uses the id and encodingNamespace specified to define an encoding which uses the logic used for binary data encoding.
public static OpcEncoding Binary(OpcNodeId id, OpcNamespace encodingNamespace)Public Shared Function Binary(
id As OpcNodeId,
encodingNamespace As OpcNamespace) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encoding offered. |
encoding | OpcNamespace | The OpcNamespace which refers to the namespace within the encoding has been defined. In case of data type encodings this OpcNamespace instance have to be the same namespace as referenced by data type dictionaries using their NamespaceUri property. This parameter can be a null reference (id specified is used instead. |
Returns
A new instance of the OpcEncoding class representing the encoding node specified by the id within the further defined encodingNamespace while using the Binary encoding type as the Type of encoding.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The id is a null reference ( |
Binary(params OpcEncoding[])
Selects the first OpcEncoding in encodings which defines an encoding which uses the Binary encoding type as the logic used to encode data.
public static OpcEncoding Binary(params OpcEncoding[] encodings)Public Shared Function Binary(
ParamArray encodings As OpcEncoding()) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
encodings | params OpcEncoding[] | An array of OpcEncoding instances from which the first binary encoding is to be selected. |
Returns
The first binary OpcEncoding in encodings or a null reference (Nothing in Visual Basic)
Default
Retrieves the according default OpcEncoding which is used for the encodingType specified.
public static OpcEncoding Default(OpcEncodingType encodingType)Public Shared Function [Default](encodingType As OpcEncodingType) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
encodingType | OpcEncodingType | The OpcEncodingType for that the according default OpcEncoding is to be determined. |
Returns
The default OpcEncoding used for the encodingType specified.
Empty
Returns an empty array of the type OpcEncoding.
public static OpcEncoding[] Empty()Public Shared Function Empty() As OpcEncoding()Returns
Returns an empty OpcEncoding array.
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcEncoding. |
| Equals( | Determines whether the specified other is equal to this OpcEncoding. |
Equals(object)
Determines whether the specified other is equal to this OpcEncoding.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcEncoding to compare to the current OpcEncoding. |
Returns
The value true if the specified OpcEncoding is equal to the current OpcEncoding; otherwise the value false.
Overrides
Equals(OpcEncoding)
Determines whether the specified other is equal to this OpcEncoding.
public bool Equals(OpcEncoding other)Public Function Equals(other As OpcEncoding) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcEncoding | The OpcEncoding to compare to the current OpcEncoding. |
Returns
The value true if the specified OpcEncoding is equal to the current OpcEncoding; otherwise the value false.
Implements
GetHashCode
Retrieves a hash code for this OpcEncoding.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcEncoding.
Overrides
GetType
Determines the expressed type of encoding using the information encoded in the encodingName specified.
public static OpcEncodingType? GetType(string encodingName)Public Shared Function [GetType](encodingName As String) As OpcEncodingType?Parameters
| Name | Type | Description |
|---|---|---|
encodingName | String | A string expressing the name of a specific encoding from which the according OpcEncodingType is to be determined. |
Returns
One of the members defined by the OpcEncodingType enumeration or a null reference (Nothing in Visual Basic) in case there no encoding type related information could be determined in the encodingName.
Of
Selects the first OpcEncoding in encodings which defines an encoding which uses the encodingType specified as the logic used to encode data.
public static OpcEncoding[] Of(
OpcEncodingType encodingType,
params OpcEncoding[] encodings)Public Shared Function [Of](
encodingType As OpcEncodingType,
ParamArray encodings As OpcEncoding()) As OpcEncoding()Parameters
| Name | Type | Description |
|---|---|---|
encodingType | OpcEncodingType | The type of encoding the OpcEncoding instance is to be selected from the encodings specified. |
encodings | params OpcEncoding[] | An array of OpcEncoding instances from which the first encoding with of the encodingType specified is to be selected. |
Returns
The first OpcEncoding in encodings of the encodingType specified or a null reference (Nothing in Visual Basic).
ToString
Returns a string representing the encoding described.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string represening the information used by this OpcEncoding instance.
Overrides
Xml
| Overload | Description |
|---|---|
| Xml( | Retrieves a new OpcEncoding which uses the id specified to define an encoding which uses the logic used for XML data encoding. |
| Xml( | Retrieves a new OpcEncoding which uses the id and encoding specified to define an encoding which uses the logic used for XML data encoding. |
| Xml( | Selects the first OpcEncoding in encodings which defines an encoding which uses the Xml encoding type as the logic used to encode data. |
Xml(OpcNodeId)
Retrieves a new OpcEncoding which uses the id specified to define an encoding which uses the logic used for XML data encoding.
public static OpcEncoding Xml(OpcNodeId id)Public Shared Function Xml(id As OpcNodeId) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encoding offered. |
Returns
A new instance of the OpcEncoding class representing the encoding node specified by the id while using the Xml encoding type as the Type of encoding.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The id is a null reference ( |
Xml(OpcNodeId, OpcNamespace)
Retrieves a new OpcEncoding which uses the id and encodingNamespace specified to define an encoding which uses the logic used for XML data encoding.
public static OpcEncoding Xml(OpcNodeId id, OpcNamespace encodingNamespace)Public Shared Function Xml(
id As OpcNodeId,
encodingNamespace As OpcNamespace) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
id | OpcNodeId | The identifier of the node which relates to the encoding offered. |
encoding | OpcNamespace | The OpcNamespace which referes to the namespace within the encoding has been defined. In case of data type encodings this OpcNamespace instance have to be the same namespace as referenced by data type dictionaries using their NamespaceUri property. This parameter can be a null reference (id specified is used instead. |
Returns
A new instance of the OpcEncoding class representing the encoding node specified by the id within the further defined encodingNamespace while using the Xml encoding type as the Type of encoding.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The id is a null reference ( |
Xml(params OpcEncoding[])
Selects the first OpcEncoding in encodings which defines an encoding which uses the Xml encoding type as the logic used to encode data.
public static OpcEncoding Xml(params OpcEncoding[] encodings)Public Shared Function Xml(ParamArray encodings As OpcEncoding()) As OpcEncodingParameters
| Name | Type | Description |
|---|---|---|
encodings | params OpcEncoding[] | An array of OpcEncoding instances from which the first XML encoding is to be selected. |
Returns
The first XML OpcEncoding in encodings or a null reference (Nothing in Visual Basic)
Operators
Equality
Returns a value indicating whether two instance of OpcEncoding are equal.
public static bool operator ==(OpcEncoding left, OpcEncoding right)Public Shared Operator =(left As OpcEncoding, right As OpcEncoding) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcEncoding | The first OpcEncoding to compare. |
right | OpcEncoding | The second OpcEncoding to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
Inequality
Returns a value indicating whether two instances of OpcEncoding are not equal.
public static bool operator !=(OpcEncoding left, OpcEncoding right)Public Shared Operator <>(left As OpcEncoding, right As OpcEncoding) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcEncoding | The first OpcEncoding to compare. |
right | OpcEncoding | The second OpcEncoding to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.

