Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrapper class for my Wrapper class.

Hey guys.

I know you are busy but this seems like a good question. Basically I'm tired of writing the following each time I want to update a voltage on a DAC channel:

m_analog.SingleWrite(CNiVariant(voltage), CNiVariant(true));

I'd like to put this in a function and just pass it a voltage with something like:

WriteDAC(voltage);

I do this with all my C-based instrument drivers and it works great. I can create some instrument object like comm and just do calls like:

voltage = comm.dmm.Read();
comm.relay.Close(1);

I know that you have already done a great deal to make these Visual Basic tools like CWAOPoint available to us Visual C++ programmers. However, if there is a slick way to use IntelliSense to help clar
ify the function calls of my CWAOPoint objects I would appreciate it. Right now when I create an object like CCWAOPoint m_analog and I type m_analog. IntelliSense gives me 100 different options when all I want is SetChannelString() and SingleWrite(). I'd like to be able to have a setup that allows people other then myself to understand the interface so I'd love to hide the CNiVariant stuff from everyone. I love the way you use accessor functions to allow specific menus in your functions. Is there a way to put all those into another level so I see something like:

________
comm. | analog | ?
| digital |
-------------


Anyway, if you have some times and some ideas on how to clean up my code I'd really appreciate it. Thanks for all your help already.

Grant
Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 1 of 2
(3,015 Views)
Hi Grant,

Obviously, we haven't created a native C++ API for DAQ yet. We are currently working on it though. A lot of the types of things you are suggesting will be coming in the C++ API for DAQ. We value all the feedback you have about the usability of a new API, so continue to let us know what you would value in a native C++ API for DAQ. You could create a simple object that only exposes a little of the DAQ functionality and wraps the CWDAQ controls if you want a short term solution.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 2
(3,015 Views)