libplctag.DataTypes.IPlcMapper< T > Interface Template Reference
Inheritance diagram for libplctag.DataTypes.IPlcMapper< T >:

Public Member Functions | |
int? | GetElementCount () |
This is used to convert the number of array elements into the raw element count, which is used by the library. More... | |
T | Decode (Tag tag) |
This is the method that reads/unpacks the underlying value of the tag and returns it as a C# type More... | |
void | Encode (Tag tag, T value) |
This is the method that transforms the C# type into the underlying value of the tag More... | |
Properties | |
PlcType | PlcType [get, set] |
You can define different marshalling behaviour for different types The PlcType is injected during PlcMapper instantiation, and will be available to you in your marshalling logic More... | |
int? | ElementSize [get] |
Provide an integer value for ElementSize if you want to pass this into the tag constructor More... | |
int [] | ArrayDimensions [get, set] |
The dimensions of the array. More... | |
Member Function Documentation
◆ Decode()
T libplctag.DataTypes.IPlcMapper< T >.Decode | ( | Tag | tag | ) |
- Parameters
-
tag Tag to be Decoded
- Returns
- C# value of tag
Implemented in libplctag.DataTypes.PlcMapperBase< T >.
◆ Encode()
void libplctag.DataTypes.IPlcMapper< T >.Encode | ( | Tag | tag, |
T | value | ||
) |
- Parameters
-
tag Tag to be encoded to value C# value to be transformed
Implemented in libplctag.DataTypes.PlcMapperBase< T >.
◆ GetElementCount()
int? libplctag.DataTypes.IPlcMapper< T >.GetElementCount | ( | ) |
Most of the time, this will be the dimensions multiplied, but occasionally it is not (e.g. BOOL arrays).
Implemented in libplctag.DataTypes.PlcMapperBase< T >.
Property Documentation
◆ ArrayDimensions
|
getset |
Null if not an array.
◆ ElementSize
|
get |
◆ PlcType
|
getset |