Hi,
Is it possible to be provided with a use case for below method?
public static object[] GetColumns(this SLProtocol protocol, int tablePid, IEnumerable<uint> columnsIdx)
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Utils.Protocol.Extension.ProtocolExtension.GetColumns.html?q=getcolumns
Recently I was advised to use more of GetColumns and SetColumns calls to avoid using row gets/sets as apparently they help with the connector performance.
However, the documentation from the above link does not seem to have any examples which makes me a bit hard to understand the method.
if I had List<QActionTableRows> and went through each item by using a foreach loop to save each item to another class e.g. Class A, and add it to a List<Class A>, how can I convert it to use the GetColumns method? It's the return type structure that I'm not quite sure about.
E.g. if I have following code,
List<uint> columns = new List<uint>()
{0,1.2.3.4.5.6.7};
var getColumns = protocol.GetColumns(testQActionTable.TableId, columns);
Is it possible to loop through each 'row' and adds its property to the 'Class A'?
Hi Paul,
The return type is of type object[] where each item in the array is again of type object[] which holds the values of one of the retrieved columns. This method basically executes the following notify call NT_GET_TABLE_COLUMNS which provides an example of what is returned. To loop through the rows, you'll have to create a loop that iterates over e.g. the number of items in the first column and then in every iteration take the corresponding item from the other column objects.