libplctag.DataTypes.PlcMapperBase< T > Class Template Referenceabstract
Inheritance diagram for libplctag.DataTypes.PlcMapperBase< T >:
libplctag.DataTypes.IPlcMapper< T > libplctag.DataTypes.IPlcMapper< T[]> libplctag.DataTypes.IPlcMapper< T[,]> libplctag.DataTypes.IPlcMapper< T[,,]>

Public Member Functions

virtual ? int GetElementCount ()
 This is used to convert the number of array elements into the raw element count, which is used by the library. More...
 
virtual 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...
 
abstract T Decode (Tag tag, int offset)
 
virtual void Encode (Tag tag, T value)
 This is the method that transforms the C# type into the underlying value of the tag More...
 
abstract void Encode (Tag tag, int offset, T value)
 
virtual void Encode (Tag tag, T[] value)
 
- Public Member Functions inherited from libplctag.DataTypes.IPlcMapper< T[]>
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...
 
- Public Member Functions inherited from libplctag.DataTypes.IPlcMapper< T[,]>
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...
 
- Public Member Functions inherited from libplctag.DataTypes.IPlcMapper< T[,,]>
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...
 

Protected Member Functions

virtual T [] DecodeArray (Tag tag)
 
virtual void EncodeArray (Tag tag, T[] values)
 

Properties

PlcType PlcType [get, set]
 
abstract ? int ElementSize [get]
 
int [] ArrayDimensions [get, set]
 
- Properties inherited from libplctag.DataTypes.IPlcMapper< T >
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...
 
- Properties inherited from libplctag.DataTypes.IPlcMapper< T[]>
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...
 
- Properties inherited from libplctag.DataTypes.IPlcMapper< T[,]>
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...
 
- Properties inherited from libplctag.DataTypes.IPlcMapper< T[,,]>
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()

virtual T libplctag.DataTypes.PlcMapperBase< T >.Decode ( Tag  tag)
virtual
Parameters
tagTag to be Decoded
Returns
C# value of tag

Implements libplctag.DataTypes.IPlcMapper< T >.

◆ Encode()

virtual void libplctag.DataTypes.PlcMapperBase< T >.Encode ( Tag  tag,
value 
)
virtual
Parameters
tagTag to be encoded to
valueC# value to be transformed

Implements libplctag.DataTypes.IPlcMapper< T >.

◆ GetElementCount()

virtual ? int libplctag.DataTypes.PlcMapperBase< T >.GetElementCount ( )
virtual

Most of the time, this will be the dimensions multiplied, but occasionally it is not (e.g. BOOL arrays).

Implements libplctag.DataTypes.IPlcMapper< T >.