LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FLIR SDK 6 .NET Controller System_Collections_Generics

I am working with a FLIR T530 Camera with USB.  From LabWindows/CVI, I created a .NET Controller to the FLIR ATLAS SDK 6 libraries.  Everything appears working except when calling the function that will discover the USB devices associated with the system.  The Flir_Atlas_Live_Discovery_Discovery_Start_2(handle, time, list, error) has 4 arguments, in which "list" is of type System_Collections_Generic_List_T1.  The "list" returns an address, but there is none of the expected data at that address associated with the USB data structure for each item of the C# List<T>.  So the question is, how is the System_Collections_Generic type handle within the LabWindows?  It is unclear how the allocation of memory is done for generic list type in the LabWindows.  

 

Here is a simple example of the code.   

 

From the FLIR.h:

typedef struct __System_Collections_Generic_List_T1 * System_Collections_Generic_List_T1;

 

From the FLIR.c

System_Collections_Generic_List_T1 list = NULL;
CDotNetHandle hError = NULL; 
Flir_Atlas_Live_Discovery_Discovery InstanceHandle;
Initialize_Flir_Atlas_Live();
Flir_Atlas_Live_Discovery_Discovery__Create(&InstanceHandle, &hError);
Flir_Atlas_Live_Discovery_Discovery_Start_2(InstanceHandle, 10, &list, &hError);
return (0);
 

0 Kudos
Message 1 of 3
(4,021 Views)

Hello Dan,

 

I found another forum post that might be helpful in this scenario; try the instructions there:

 

Solved: Re: use generic list in .net library
https://forums.ni.com/t5/LabWindows-CVI/use-generic-list-in-net-library/m-p/2947574#M67925

Message 2 of 3
(3,995 Views)

Thank you for the response.  This definitely pointed me in the right direction of trying to figure out what was going on.  These problems are not very straight forward.  Best. Dan

0 Kudos
Message 3 of 3
(3,961 Views)