NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to make a type cast in TestStand?

I've got the following problem.
I use a receive function which waits for an undefined package. (struct package).
The problem is i can't specify the module with the exaxt package.
Generally in C i define a Pointer and create enough buffer for it. Is it the same in TestStand?
Is it possible to make a type cast?
 
for example:
i've got these packages
struct packet;
struct  data;
 
the function does not know which structure to receive.
 
err = receive(buffer,maxlen);
how do i specify the buffer variable?
 
can i create a type "void" with a String to have enough buffer.
and then to make a type cast, for example "Locals.dataobject = ((data)Locals.buffer)"
 
any ideas?
thx for help
 
0 Kudos
Message 1 of 2
(3,779 Views)
Unfortunately there is no way to do type-casts in TestStand. What you could do is write a wrapper-dll in C, that has for example two parameters for both possible structs. The dll then takes one of the parameters, does the typecast and passes it on to your original dll.
From TestStand you can pass the struct(or better container in the "TestStand language") you want to use to the accoridng parameter of the wrapper-dll, leaving the other parameter empty or with some default-value.

Hope this helps!

André
Message 2 of 2
(3,768 Views)