Reference
OpcTypeEncodingFailedEventArgs Members
Provides the event data for events of the delegate type OpcTypeEncodingFailedEventHandler.
Reference
OpcTypeEncodingFailedEventArgs Members
- Type
- OpcTypeEncodingFailedEventArgs
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from EventArgs.
Properties
Data
Gets the data which is tried to encode.
public object Data { get; }Public ReadOnly Property Data As ObjectProperty value
An object instance which depends on the encoder used.
Encoding
Gets the type of encoding supported by the encoder used.
public OpcEncodingType Encoding { get; }Public ReadOnly Property Encoding As OpcEncodingTypeProperty value
One of the members defined by the OpcEncodingType enumeration.
Exception
Gets the Exception created or caught during the encoding process.
public Exception Exception { get; }Public ReadOnly Property Exception As ExceptionProperty value
An instance of the Exception class or a null reference (Nothing in Visual Basic) in case there the conditions under which the encoding failed are in advance determined and reported.
FieldName
Gets the name of the field of an Instance which is about to get encoded.
public string FieldName { get; }Public ReadOnly Property FieldName As StringProperty value
The name of the field to encode or a null reference (Nothing in Visual Basic) if there is no field name known by the encoder for the current encode failure.
FieldType
Gets the type of the field being encoded.
public Type FieldType { get; }Public ReadOnly Property FieldType As TypeProperty value
The Type of the field to encode or a null reference (Nothing in Visual Basic) if there is no Type known by the encoder for the current encode failure.
Instance
Gets the object instance its data is being encoded.
public object Instance { get; }Public ReadOnly Property Instance As ObjectProperty value
An object instance or a null reference (Nothing in Visual Basic) in case there the encoder is not about to encode an instance.
Message
Gets the description of the encoding failure.
public string Message { get; }Public ReadOnly Property Message As StringProperty value
The description of the encoding failure or a null reference (Nothing in Visual Basic) in the case there the encoding failure indicates an exception which was handled using a generic exception handler.
Type
Gets the type information used to encode the data of the Instance.
public Type Type { get; }Public ReadOnly Property Type As TypeProperty value
The Type of the Instance being encoded or a null reference (Nothing in Visual Basic) if the encoding failure occured in a context where an instance type is either not used or unknown.
TypeId
Gets the identifier of the type being encoded.
public OpcNodeId TypeId { get; }Public ReadOnly Property TypeId As OpcNodeIdProperty value
An instance of the OpcNodeId class which identifies the type being encoded or a null reference (Nothing in Visual Basic) if the encoding failed in a context there a type identifier does not apply to the encoding operation performed.
TypeIdAbsolute
Gets the absolute TypeId (if available).
public OpcNodeId TypeIdAbsolute { get; }Public ReadOnly Property TypeIdAbsolute As OpcNodeIdProperty value
The absolute TypeId in case there the TypeId has been resolved or a null reference (Nothing in Visual Basic) if the TypeId hasn't been resolved.
Methods
Dispose
| Overload | Description |
|---|---|
| Dispose() | Releases all resources used by the Opc |
| Dispose( | Releases the unmanaged resources used by the Opc |
Dispose()
Releases all resources used by the OpcTypeEncodingFailedEventArgs.
public void Dispose()Public Sub Dispose()Implements
Dispose(bool)
Releases the unmanaged resources used by the OpcTypeEncodingFailedEventArgs and optionally releases the managed resources.
protected virtual void Dispose(bool disposing)Protected Overridable Sub Dispose(disposing As Boolean)Parameters
| Name | Type | Description |
|---|---|---|
disposing | Boolean | The value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources. |
GetData
Retrieves a copy of the binary data in the Stream used by the encoder to encode the data.
public byte[] GetData()Public Function GetData() As Byte()Returns
Byte[]
An array of byte values with the data the encoder uses for encoding.
Remarks
In case there GetStream is used as well and the Stream instance is modified, the array offered by GetData is modified as well.
GetStackTrace
Retrieves an instance which summarizes the stack within the encoder until the failure has been produced. The OpcEncodingStackTrace returned contains OpcEncodingStackFrame entries only in case there IsEnabled is equals true (this influences the overall performance while encoding / decoding).
public OpcEncodingStackTrace GetStackTrace()Public Function GetStackTrace() As OpcEncodingStackTraceReturns
An instance of the OpcEncodingStackTrace class which summarizes the stack within the encode until the failure has been produced. The instance returned provides an empty stack trace if IsEnabled is equals false (the default value).
GetStream
Retrieves a copy of the Stream used by the encoder to encode the data.
public Stream GetStream()Public Function GetStream() As StreamReturns
An instance of the Stream which represents a copy of the Stream used by the encoder to encode the data.
Remarks
The Stream provided allows reading, writing and seeking; but modifying or disposing the instance will influcence the instance provided by subsequent calls to GetStream of the current OpcTypeEncodingFailedEventArgs.
ToString
Returns a string representing the Message or the Message of the Exception of the current OpcTypeEncodingFailedEventArgs.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string representing the Message or the Message of the Exception of the current OpcTypeEncodingFailedEventArgs.
Overrides

