NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Defining typedefs

Hi all,
 
This is probably a very basic question, but I haven't been able to find an answer in my searches.
 
I'm designing a statemachine in Teststand, and wish to define a typedef for my main state variable. I would normally do this as a "typedef" in Labview, or an "enumerated type" in pascal.
 
Does Teststand have some way of creating enumerated types?
0 Kudos
Message 1 of 5
(3,086 Views)
TestStand does not have a way to define Enumerated Types.  However, you can always use integers and enumerate them yourself.  This is what is done in TestStand Step Types.  This would be a nice addition to TestStand and I will add it to a list of customer suggestions.

Allen P.
NI
0 Kudos
Message 2 of 5
(3,079 Views)

Hi Allen,

Thanks for the reply. I did intend to enumerate an integer using constant definitions, as you suggest. However its not very robust programming practice, but will have to suffice for now.

Regards Tom

0 Kudos
Message 3 of 5
(3,065 Views)
Hello there,

Does anyone have an example of dealing with a fairly basic Windows typedef enum? For example,

typedef enum _DRIVER_TYPE_ENUM
{
    DRIVER_TYPE_A,
    DRIVER_TYPE_B,
    DRIVER_TYPE_C,
    DRIVER_TYPE_D,
} DRIVER_TYPE_ENUM;


What I'd like to set from TestStand:
DRIVER_TYPE_ENUM driverType = DRIVER_TYPE_C;

I'm trying to call a Windows DLL (MSVC 8.0) from TS3.5.

Any thoughts would be greatly appreciated.

-Chroma
0 Kudos
Message 4 of 5
(2,978 Views)
Chroma,

As Allen discussed, you would need to use an integer for this, since you can not create your own typedef directly. So store this as an integer and use it as if it were just an integer. This means you can not set it equal to your definitions but instead use numerics.

Message Edited by Brandon V on 05-10-2007 10:53 AM


Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 5 of 5
(2,956 Views)