LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve cluster structure from its flattened data string

Hello,

I need to decode data sent via TCP-IP protocol from an external LabVIEW-based application. I don't have the source code of the external application.

The application sent a string which I'm pretty sure it's a the binary representation of a cluster, obtained with the "Flatten to String" function.

My problem is that I don't know the cluster structure and I cannot decode it.

Is there any way to build the cluster structure starting from its binary data string?

 

Thanks

 

0 Kudos
Message 1 of 4
(224 Views)

Without some knowledge about what the structure contains in terms of data types and actual values, you’re facing a problem similar to trying to decipher encrypted messages without knowing the encryption key. Not entirely impossible but fairly close.

A flattened data stream simply contains all the binary data neatly serialized in memory, without any padding and other formatting hints.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(210 Views)

You don't really need the source code, just the documentation. Do you know who wrote it?

 

How long are these strings? Since you probably know what kind of data it contains (scalars, integers, arrays, etc.) you might be able to reverse engineer with some trial and error. Can you collect a series of raw strings based on known data? For example if only one element changes, you can pinpoint its offset location.

0 Kudos
Message 3 of 4
(146 Views)

@altenbach wrote:

You don't really need the source code, just the documentation. Do you know who wrote it?


If it's a typical LabVIEW application, chances that you can somewhere somehow get at the source code are definitely higher than that someone cared to document such "arcane" details. 😁

I didn't say the chances are high, but in my not quite uninformed opinion, it's factors higher than to find the byte stream protocol documented.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(111 Views)