11-30-2018 03:48 AM
I have dll written in c++. One of the functions that i want to call take input parameter, that is defined as:
struct myStruct
{
uint32_t par1;
uint32_t par2;
}
It is important that function gets par1 at the first and then it gets par2
My question is:
Since cluster does not have indexes of elements, is it better to pass input to call library node of this parameter "myStruct" as array with tho uint32 elements? Is it wrong to pass it Cluster with two uint32 elements?
12-01-2018 10:53 AM
It depends on the function. I assume your function looks something like:
int32 myFunc(..., myStruct *param, ...);
Please note the asterix for the param. In that case it is terms of memory allocations equivalent to create a cluster in LabVIEW (with the tab order in the cluster set to the order you want) and configuring the Call Library Node Parameter to Adapt to Type (rest of the configuration has no influence for clusters) or create an array of two elements and configure the parameter to Array of 32 bit integers, Passed as Pointer to Array. The first is however more logical as Clusters are the LabVIEW equivalent of structs.