NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Hash Table implementation

Hi,

 

Is there a way to implement CVI "HashTableType" equivalent data type in TestStand?

 

Regards,

Ramjee V

0 Kudos
Message 1 of 8
(4,733 Views)

Hi,

 

What do you like to perform with the hashtable inside TestStand ?

Just give us more input ?

There is a way to use array of containers like a mappingtable or dictionary

in Teststand

 

Regards

 

Juergen 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 8
(4,657 Views)

Hi,

 

I have a structure in CVI that uses the hashtable type to read the data from a configuration file to search for a key. The same structure i need to get reflected in TestStand to use these strucutre values for the rest of my sequence.

 

So, Please suggest me a best solution to do this kind of implementation.

 

Regards,

Ramjee V

0 Kudos
Message 3 of 8
(4,641 Views)

Hi Ramjee,

 

Yes you can you approxiamte with a custom data type your CVI structure.

Note: for each Property in our data type you have be defined the the 'C' datatype.

         and dont forget the alignment.

There is also good example \Examples\StructPassing\C\Struct Passing to C DLL.seq that comes with TS

 

 

Regards

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 8
(4,626 Views)

Instead of duplicating data, you could export the functions you need to access your data structures from your CVI DLL and call those from TestStand.

0 Kudos
Message 5 of 8
(4,619 Views)

HI James,

 

I am interrested in your recommondation. 

Where would you prefer to store data TS or DLL ?

(I know that will be depends on the app, but what are in pro and con in your point of view?)

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 8
(4,616 Views)

If your data structure is complex enough to require accessor functions and it is already implemented in CVI, it would be simpler and faster to access the data via CVI functions. If your data is not global, you'll need to pass a pointer to it back to TestStand for TestStand to hand back to your accessor functions.

 

If you need to be able to inspect and access the internals of your data structure in the TestStand variables view or in expressions (unlikely if you have good accessor functions), or if your data structure is a structure you want TestStand to convert to the languages of other modules such as LabVIEW or .net, then you might want to put it in TestStand.

 

An analogy would be an instrument driver. Instrument drivers have all sorts of internal data structures, but you typically only deal with their exported functions (and the instrument handle), whether calling them from TestStand or CVI.

Message 7 of 8
(4,609 Views)

Hi James,

 

Thanks for answering, your statements will cover with my one's.

 

Regards

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 8
(4,598 Views)