LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to deprecate instrument driver functions?

In the most expedient way possible, I need to create a driver that supercedes two others.  So as to not give too much away, let's pretend I have two drivers:
 
XY110X, which supports multiple instruments, say 1101, 1102, 1103, etc.
XY111X, which supports related multiple instruments, say 1111, 1112
 
A poor decision to not move to a more generic XY11XX driver was made.  The functions supported by the instruments are essentially the same.
 
With new line of XY112X related instruments coming out, it seems like a good time to make amends and create a XY11XX driver.  However, in the interest of supporting existing users of XY110X and XY111X, I'd like to have deprecated functions, so that when their existing application tries to access XY110X_init(), the call is actually made to XY11XX_init().  It would be swell to have a warning (not an error) about deprecation show up.  Though I know how to accomplish this easily if it were a Visual C++ DLL, I'm out of my fishpond with CVI.  I can do it the not-so-efficient way:
 
ViStatus _VI_FUNC XY110X_init((ViRsrc resourceName, ViBoolean IDQuery,
                                 ViBoolean resetDevice, ViSession *newVi)
{  
 return XY11XX_init (resourceName, IDQuery, resetDevice, newVi);
}
 
But it seems like there should be a better way.  Surely I can't be the only one to run up against such an issue? 
 
 
 
Certified LabVIEW Developer
NI-VLM Administrator
0 Kudos
Message 1 of 3
(3,216 Views)
Hi JulieC!

I have been looking into this for a little while now, and it appears that what you have proposed is the best way to accomplish what you are after in CVI.  I have been unable to find another way to accomplish this. 

NickB
0 Kudos
Message 2 of 3
(3,162 Views)
Thanks for looking into this Nick, I was hoping for a better way, but oh well.  It didn't take as long as I expected.
Certified LabVIEW Developer
NI-VLM Administrator
0 Kudos
Message 3 of 3
(3,157 Views)