Hi Anthony,

I shortly analysed your data and here are some conclusions

Theirs
------
66 82 02 49 7F 81 6A

01100110    TAG - Application - Constructed - 6
10000010    LONG DEFINITE LENGTH - 2 next octets encode length
            00000010 01001001 = 101001001001 = 585 octets

            01111111 TAG - Application - Constructed - 234
            (1)0000001 + (0)1101010 = 11101010 = 234 (D)

Yours
-----
66 85 20 7F 81 6A

01100110    TAG - Application - Constructed - 6
10000101    LONG DEFINITE LENGTH - 5 next octets encode length
            00100000 01111111 10000001 01101010 next_bin_no = some_decimal_number_expressing_length_in_octets

As whether or not something can come in between Length and Value I would answer yes: another TLV.

If the answers I provide seem to obvious, do pardon me as I am just beginning to understand BER encoding/decoding.

Sergio da Silva

DUBUISSON Olivier wrote:

I hope that someone on this list can find time to answer to Anthony.
I am preparing the ASN.1 meeting of next week and won't find time to
handle such
requests before 2 weeks, I'm afraid.

-------- Original Message --------
Subject: [ASN.1] Hex level encoding problem
   Date: Wed, 9 Jan 2002 15:23:35 +0200
   From: Anthony Mamacos <[EMAIL PROTECTED]>
     To: "DUBUISSON Olivier FTRD/DTL"
         <[EMAIL PROTECTED]>

Hi Oliver,
I saw that you answer quiet a lot of questions on the message
boards and I had a question I need urgently answered , so I hope
you don't mind the direct email , if you do please ignore it and
I won't bother you again.

I'm a developer working on implementing a ASN1 Tap3
encoder for the company I'm currently working for and
unfortunately they don't want to purchase a ready
made encoder. I was wondering if you could help me
out , I'll give a brief explanation of what I've done so far.

I've developed a dynamic doubly linked list which holds
all the composite and primitive tags , I do one run once
I am finished encoding to set up all the lengths of the tag
so my code ends up looking like

// Create Transfer Batch
     A->set_Node(TRANSFERBATCH,APPLICATION);
// End Transfer Batch

//Create BatchControlInfo
     A->find_LastTag(TRANSFERBATCH);
     A->find_freeSpace();
     A->set_Node(BATCHCONTROLINFO,APPLICATION);

     //Set Recieving PLMN
     A->find_LastTag(BATCHCONTROLINFO);
     A->find_freeSpace();
     strcpy(T , "AUSOP");
     A->set_Node(RECIPIENT,APPLICATION,*T);
//Then a final
A->set_Lengths();

the set_Node procedure has a few overloaded types to say whether is
composite or primitive
BCD , Binary or String (IA5) and then I have a final A->write_file()
procedure to output for
distribution.

My problem is that I am building a file according to another file I have
which was
encoded perfectly by another system and I want the files to match 100%
by the
time I'm done. This is thier encoded tag in hex

Theirs
--------------------------------
66 82 02 49 7F 81 6A

Mine
---------------------------------
66 85 20 7F 81 6A

Both   - 66 Is the TAG , being a COMPOSITE APPLICATION TAG 6
Theirs - 82 02 49 - 82 02 should be the LENGTH portion but it's not big
enough and 49
            is nothing at all
Mine   - 85 20 is the LENGTH
Both   - 7F 81 6A is a composite tag inside the current TAG (ie Data
Portion)

NOTE - The Lengths portions might not match up 100% even when correct at
the moment

What I'd like to know is if there is any other way to encode ASN.1 TAP3
than the straight forward TLV ?
or if anything can come between L & V ?

Many Thanks,
Anthony Mamacos
Software Developer

SOFTWARE FUTURES
the business advantage

Proud member of MGX

www.softwarefutures.com

E-Mail : mailto:[EMAIL PROTECTED]
Mobile : +27-82-955-4425
Tel      : +27-21-700-5000 Ext. 333

     This e-mail and attachments relating thereto, is intended for the
     above mentioned recipient.  If you have received this e-mail in
     error, kindly notify the sender and delete it immediately as it
     contains information relating to the official business of Software
     Futures, which is confidential, legally privileged and proprietary
     to Software Futures. Software Futures does not own and endorse any
     other content.  The views and opinions expressed in this e-mail are
     those of the sender unless clearly stated as being those of
     Software Futures.

Reply via email to