Copy Structure To Another Program
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 s开发者_运维知识库tructure, 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
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.
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:
- How LabVIEW stores data in memory
- Flattened data
精彩评论