zaher saryedden wrote:
Hello there
sorry if this another post of the same question.
I have an assignment to produce an asn.1 file that will contain one header, 0 or
many details and 1 footer records.
All what I have is a table that specifies the tag name (like TE.T8 or
TE0.TA3.TA2.T9F24 ), field name ( a descriptive name of the field), and the
format (B,B2,B1..3 and other formats). I have no problem with the formats
defined and I know the header fields and the details fields (repetitive) and
the footer fields. I also know how to get the value of each field required.
I also have a sample binary file and a sample gdr file which shows the tags and
the hexadecimal values as asccii values and a tool to convert these files from
binary to gdr or from gdr to binary.
My problem is that I still donâ–“t know how to start this task. It is difficult to
get more information about this task as it is an external interface with no
enough support from the other party.
My current understanding is that I should use the table to write a formal asn.1
specification and then use a compiler to produce an encoder then use it to write
the file. Is this correct and is this the only possible approach.
Yes, this is a valid approach, but not the only possible one.
Alternatively, you could just get the table with tag/field/format and
create the encoder/decoder by hand, yourself. This would be
significantly slower and more error-prone. Moreover, you will not gain
some advantages provided by the asn.1 compiler automatically. For
example, you would not be able to obtain the XER (XML) encoding from the
binary data as a simple by-product of compiling the ASN.1 specification.
If you could show a part of that table I could give you some tips about
converting that table back into ASN.1 specification.
Although this will only be possible if the format you are trying to
convert back into ASN.1 domain was initially an ASN.1 one. If not,
it might not be possible to convert an arbitrary protocol into ASN.1
while maintaining complete binary compatibility. Without using ECN,
that is.
--
Lev Walkin
[EMAIL PROTECTED]
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1