IDataTypeMarshalerUnmarshal Method
Unmarshals the specified source memory to a (primitive) data type value.
Namespace: TwinCAT.TypeSystem
Assembly: TwinCAT.Ads.Abstractions (in
TwinCAT.Ads.Abstractions.dll) Version:
7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470
Syntax
C#
int Unmarshal(
IDataType type,
Encoding encoding,
ReadOnlySpan<byte> source,
Type valueType,
out Object value
)Parameters
|
type IDataType |
The ADS type. |
|
encoding Encoding |
Forced encoding for strings or NULL (Default). |
|
source ReadOnlySpanByte |
The data. |
|
valueType Type |
Managed value Type (optional, can be null for primitives, strings or arrays of primitives). |
|
value Object |
The created value object. |
Return Value
Int32
The number of unmarshalled bytes.
Exceptions
|
Exception |
Condition |
|---|---|
|
type or data | |
Remarks
if the value type is not given, this method can only unmarshal values from primitives, strings or array of primitives.
Reference
IDataTypeMarshaler Interface TwinCAT.TypeSystem Namespace
Beckhoff Automation GmbH & Co. KG 2001-2026