Class SumReader
- Namespace
- TwinSharp
- Assembly
- TwinSharp.dll
Using the ADS Sum Command it is possible to read or write several variables in one command.
public class SumReader
- Inheritance
-
SumReader
- Inherited Members
Constructors
SumReader(AdsClient)
Creates a new sum reader. Used for reading multiple variables in one ADS command.
public SumReader(AdsClient client)
Parameters
client
AdsClient
Properties
AdsErrorCodes
The ADS return codes for the variables that were read.
public AdsErrorCode[] AdsErrorCodes { get; }
Property Value
- AdsErrorCode[]
Methods
AddVariable(string, Type)
Add a variable based on symbol name to this sum reader.
public void AddVariable(string symbolName, Type type)
Parameters
Exceptions
AddVariable(uint, uint, Type)
Add a variable based on index group and index offset to this sum reader.
public void AddVariable(uint indexGroup, uint indexOffset, Type type)
Parameters
ReadVariables(out byte[])
Reads the added variables. The values are stored in the readValues array in the order they were added. If the operation is not succesful, false is returned and the field "AdsErrorCodes" will contain the error codes for the respective variable.
public bool ReadVariables(out byte[] returnedValues)
Parameters
returnedValues
byte[]
Returns
- bool
If the operation was succesful without ADS errors. If not succesful, user should examine the AdsErrorCodes