libplctag.DataTypes.IPlcMapper< T > Interface Template Reference
Inheritance diagram for libplctag.DataTypes.IPlcMapper< T >:
libplctag.DataTypes.PlcMapperBase< 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...
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...


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)
tagTag to be Decoded
C# value of tag

Implemented in libplctag.DataTypes.PlcMapperBase< T >.

◆ Encode()

void libplctag.DataTypes.IPlcMapper< T >.Encode ( Tag  tag,
tagTag to be encoded to
valueC# 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

int [] libplctag.DataTypes.IPlcMapper< T >.ArrayDimensions

Null if not an array.

◆ ElementSize

int? libplctag.DataTypes.IPlcMapper< T >.ElementSize

◆ PlcType