tags:

views:

60

answers:

2

Long story, long:
I am adding a web interface (ASPX.NET: VB) to a data acquisition system developed with LabVIEW which outputs raw data files. These raw data files are the binary representation of a LabVIEW cluster (essentially a structure). LabVIEW provides functions to instantiate a class or structure or call a method defined in a .NET DLL file.

I plan to create a DLL file containing a structure definition and a class with methods to transfer the structure. When the webpage requests data, it would call a LabVIEW executable with a filename parameter. The LabVIEW code would instantiate the structure, populate the structure from the data file, then call the method to transfer the data back to the website.

Long story, short: How do you recommend I transfer (copy) an instance of a structure from one .NET program to the VB.NET program that executed it?

Ideas considered: sockets, temp file, xml file, console output, config file, web services, CSV, some type of serialization, shared memory

+2  A: 

Serialized XML would be my first initial stab at it. (System.Xml.Serialization namespace).

It's Microsoft-specific but it's standard "enough" that you could probably get another program w/ another technology to read it with minimal finagling, compared to previous MS object serialization technologies I've heard horror stories about.

Broam
What mechanism would actually transfer the serialized XML data between programs?
Steven
Broam
SerializedXML should be a perfect carrier for the data. I plan to transfer the data by having the web server call the client program using Process.Start() and outputting the serialized XML via the console which the webserver would read, deserialize, then handle. http://stackoverflow.com/questions/2638686/send-a-string-from-child-application-to-parent
Steven
A: 

I would build the LabVIEW code (file->(XML)-string) into a DLL which you can call directly and would return the serialized string.

Or you could read the datafile 'as-is', the LabVIEW structs aren't that hard. and they are pretty good documented:

Ton