LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

tcpip interprocess communication decoupling

I am developing a LabWindows/CVI User Interface, which can "launch" and control (Start, pause, continue etc.) any chosen test program.  The test program will be a seperate .exe.  The UI will also receive and display test results from the test program.   I am using TCP/IP for comminications between the server (UI) and the client (test program).  Both the client and server are on the same machine.  I am using the LabWindows/CVI TCP functions to do the work.
 
The problem with this setup is that the both the UI and any developers test program will require embedding the TCP code into each.  Ideally I would like to decouple the TCP functionallity from the client and server.  Well at least the client.  In other words I would like to encapsulate all the TCP code in a seperate dll and use simple calls to the encapsulated functions to get and send the data.  The problem I am having is if I do that how do I get the UI or the client to know about the TCPIP callback event when the dll will be receiving the event?  Is there a way to retrigger the event so the UI and the client will know data is available?
 
JJT
0 Kudos
Message 1 of 2
(3,008 Views)
You can pass a function pointer from your EXE (UI, etc) to your TCP DLL when initially calling the TCP DLL. Then your TCP DLL can call this function (which is actually in your EXE) when the DLL gets a TCP event in its callback.
0 Kudos
Message 2 of 2
(2,989 Views)