Menu

human readable TBCD STRING in XER

Help
2012-11-16
2013-03-19
  • leniviytorrent

    leniviytorrent - 2012-11-16

    Suppose, I have the file gsn3_4.asn1 :

    SGSNPDPRecord ::= SET
    {
        recordType          [0] CallEventRecordType,
        servedIMSI          [3] OCTET STRING (SIZE (3..8)),
        servedIMEI          [4] OCTET STRING (SIZE (8)) OPTIONAL,
    --  servedIMEI          [4] TBCD STRING (SIZE (8)) OPTIONAL,
    

    It was adapted for asn1c, because TBCD STRING gives:

    ASN.1 grammar parse error near line 113 (token "STRING"): syntax error, unexpected TOK_STRING, expecting '}'
    Cannot parse "gsn3_4.asn1"
    

    A CDR file converted to xml, has TBCD strings in the form:

            <servedIMSI>22 08 41 11 85 08 38 F0</servedIMSI>
    

    I want to create an new syntax, which will be alternate for reading and default for writing. Something like this:

            <servedIMSI>'228014115880830'</servedIMSI>
    
     
  • Lev Walkin

    Lev Walkin - 2012-11-16

    You can do that by modifying the source code for OCTET STRING or IA5String.

     

Log in to post a comment.