07-08-2009 10:05 AM
I would like to know how to handle ASN.1 encoding/decoding in LabView? |
Solved! Go to Solution.
07-08-2009 10:25 AM
Hi J,
from the example given here it looks like a simple bytestream format...
You have to read the byte stream, get the first and second byte to decode the datatype and length and then read&typecast the according number of bytes. Then again reading 2 bytes and so on...
Encoding will work the same but in reverse order
11-07-2013 02:09 AM
Hi all,
I want to read TLV (ASN.1) format files with Labview and extarct the data from it.
Please help me if anyone knows any information about this.
Thanks & Regards,
Guru
11-07-2013 02:53 AM
11-07-2013 02:57 AM
It seems like a homework, huh
11-07-2013 03:01 AM
Hello GerdW,
Thank you so much for your reply.
I read that article (i.e. ASN.1 Str) but I don't know how to read my file for decoding.
I don't know the code table present in my file.
Please provide me sample VI.
Thanks & Regards,
Guru
11-07-2013 03:17 AM
Hi Guru,
- use ReadBinaryFile to read the ASN file as a bytestream.
- Try to find more documentation about ASN specification. I don't use such files nor do I have any intention to do your work (and so I don't have any VIs). You will need such a document to fully understand the file format...
It's your task, so do your work. It's a perfect example to learn to use file read functions and type conversions...
11-07-2013 05:23 AM
Dear GerdW,
Thank you so much for your support and advice 🙂
I don't have any document for this file format.
Just I know that its TLV (ASN.1 with PER/BER str inside)format .
I guess ASN.1 standard format. I don't know how can I get the TLV (Tag length value) for every signal present in that file.
BR,
Guru
11-07-2013 05:36 AM - edited 11-07-2013 05:40 AM
Hi guru,
as said before:
- Use FileRead function to read the tag (byte) and the length (byte).
- Then read the value bytes (given by length) and parse it (information given by tag).
- Then continue with reading next tag and length...
Simplified example:
11-07-2013
07:27 AM
- last edited on
11-14-2013
12:14 PM
by
Hassan_Atassi
Dear GerdW,
Thank you so much for sharing sample VI.
I checked your VI with my sample file But, I'm not getting proper data.
I want to read CAN Frame (i.e. Timestamp ID and Payload) data from this file.
Thanks & Regards,
Guru