1. 28 Aug, 2023 1 commit
  2. 15 Jun, 2023 5 commits
  3. 05 May, 2023 2 commits
  4. 04 May, 2023 2 commits
    • Pau Espin Pedrol's avatar
    • tangzhikun's avatar
      fix issue #126: decoding extensible CHOICE error · fc23d52b
      tangzhikun authored
          The constraints ct was not effective for extensible CHOICE, so if ct && ct->flags & APC_EXTENSIBLE was true,
          ct was set to 0. Using normal CHOICE constraint in decoding extensible CHOICE was weird.
          We should change the normal CHOICE constraint to extensible CHOICE constraint when decoding extensible CHOICE,
          the extensible CHOICE constraint was lb=0,ub=specs->tag2el_count-specs->ext_start-1. So the conditional structure
          should be if specs && specs->tag2el_count > specs->ext_start, then decoding the CHOICE which range
          was specs->tag2el_count - specs->ext_start, and add specs->ext_start to value in the last.
      fc23d52b
  5. 18 Nov, 2022 1 commit
  6. 04 Nov, 2022 1 commit
    • Mark's avatar
      rename ATS_BASIC_JER to ATS_JER · 0b34c0f7
      Mark authored
      When JER was added it was based on XER, which has BASIC-XER and
      CANONICAL-XER.
      So originally we had BASIC-JER, which isn't a real thing.
      
      This renames ATS_BASIC_JER to ATS_JER and adds JER in the list of
      encodings in the readme.
      0b34c0f7
  7. 01 Nov, 2022 9 commits
    • Bi-Ruei, Chiu's avatar
      Fix incorrect UPER encoding for empty extensible SEQUENCE in 38.331 · f3a9ca5b
      Bi-Ruei, Chiu authored
      For empty extensible SEQUENCE type, e.g.
      
        searchSpaceType              CHOICE {
          common                       SEQUENCE {
            dci-Format0-0-AndFormat1-0     SEQUENCE {
              ...
            }                                                           OPTIONAL,   -- Need R
            dci-Format2-0                SEQUENCE {
              nrofCandidates-SFI           SEQUENCE {
                aggregationLevel1            ENUMERATED {n1, n2}        OPTIONAL,   -- Need R
                aggregationLevel2            ENUMERATED {n1, n2}        OPTIONAL,   -- Need R
                aggregationLevel4            ENUMERATED {n1, n2}        OPTIONAL,   -- Need R
                aggregationLevel8            ENUMERATED {n1, n2}        OPTIONAL,   -- Need R
                aggregationLevel16           ENUMERATED {n1, n2}        OPTIONAL    -- Need R
              },
              ...
            }                                                         OPTIONAL,   -- Need R
            dci-Format2-1                SEQUENCE {
              ...
            }                                                         OPTIONAL,   -- Need R
            dci-Format2-2                SEQUENCE {
              ...
            }                                                         OPTIONAL,   -- Need R
            dci-Format2-3                SEQUENCE {
              dummy1                       ENUMERATED {sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20}    OPTIONAL,   -- Cond Setup
              dummy2                       ENUMERATED {n1, n2},
              ...
            }                                                         OPTIONAL    -- Need R
          },
          ue-Specific                    SEQUENCE {
            dci-Formats                    ENUMERATED {formats0-0-And-1-0, formats0-1-And-1-1},
            ...
          }
        }
      
      According to X.691 :
      
        If the sequence type has an extension marker in the "ComponentTypeLists"
        or in the "SequenceType" productions, then a single bit shall first be added to
        the field-list in a bit-field of length one.
      
      So for dci-Format0-0-AndFormat1-0, dci-Format2-1 and dci-Format2-2,
      even they are empty without other fields, there shall be still one extension bit
      to be added.
      
      Use compute_extensions_start() to determine position of extension in
      asn1c_lang_C_type_SEQUENCE_def() to fix this problem.
      f3a9ca5b
    • Bi-Ruei, Chiu's avatar
      Fix code generated from ASN.1 of F1AP v15.4.0 failed to be compiled · 6af78bbd
      Bi-Ruei, Chiu authored
      ProtocolExtensionField.c generated from the following excerpt from ASN.1 of F1AP v15.4.0 :
      
      RRC-Version ::= SEQUENCE {
          latest-RRC-Version BIT STRING (SIZE(3)),
          iE-Extensions      ProtocolExtensionContainer { { RRC-Version-ExtIEs } } OPTIONAL}
      
      RRC-Version-ExtIEs F1AP-PROTOCOL-EXTENSION ::= {
          {ID id-latest-RRC-Version-Enhanced CRITICALITY ignore EXTENSION OCTET STRING (SIZE(3)) PRESENCE optional },
          ...
      }
      
      failed to be compiled because asn_PER_memb_OCTET_STRING_SIZE_3__constr_31 is not generated.
      
      The reason is constraints of types used in information object sets are not processed in asn1fix() stage
      so it's constraint, i.e. (SIZE(3)) in this case, is not generated.
      
      With this fix, OCTET STRING (SIZE(3)) used in ASN.1 of F1AP v15.4.0 can be correctly processed
      and generated code can be compiled.
      
      However, this fix does not work for all sorts of types.
      
      For example, if information object refer to a type like this : SEQUENCE (SIZE(3)) OF INTEGER
      it will be failed to compiled because asn_IOS_RRC_Version_ExtIEs_1_rows[] refers to non-existing
      asn_DEF_SEQUENCE_OF.
      6af78bbd
    • Bi-Ruei, Chiu's avatar
      Fix the problem of compiling NR_RangeToBestCell.c of NR-RRC 15.3.0 · 1b8943a2
      Bi-Ruei, Chiu authored
      This issue only occurred when ASN1C_PREFIX applies.
      1b8943a2
    • Bi-Ruei, Chiu's avatar
      Fix issue 293 by handling default value with type ATV_BITVECTOR · b0c2608d
      Bi-Ruei, Chiu authored
      1. Modify asn1p_y.c and asn1p_y.y to fix an error that
         function _convert_bitstring2binary() always return NULL.
      
      2. Add handling for default value with type ATV_BITVECTOR in
         function try_inline_default().
      b0c2608d
    • Bi-Ruei, Chiu's avatar
      Add support of extension group inside CHOICE type · 530a7996
      Bi-Ruei, Chiu authored
      In LTE-RRC 36.331 15.3.0, there is :
      
          RLC-Config-NB-r13 ::= CHOICE {
              am    SEQUENCE {
                  ul-AM-RLC-r13                UL-AM-RLC-NB-r13,
                  dl-AM-RLC-r13                DL-AM-RLC-NB-r13
              },
              ...,
              [[  um-Bi-Directional-r15        NULL,
                  um-Uni-Directional-UL-r15    NULL,
                  um-Uni-Directional-DL-r15    NULL
              ]]
          }
      
      that asn1c can not handle `[[` ... `]]` inside CHOICE type.
      
      1. Modify asn1p_y.y and asn1p_y.c to mimic the approach for handling extension
         group inside SEQUENCE type.
      
      2. Modify asn1c_C.c to use 'ext1', 'ext2' ... as extension groups names.
      530a7996
    • Bi-Ruei, Chiu's avatar
      Fix the problem that NGAP ASN.1 can not generate C files · e1801353
      Bi-Ruei, Chiu authored
      Because TAIItem and TAIList exist in NAGP-IEs module and NGAP-PDU
      module, so name conflict condition occurs.
      
      Previous returned value from asn1p_oid_compare() in asn1f_check_duplicate()
      is incorrectly checked. Fix it by adding additional ASN1FIX flag
      A1F_COMPOUND_NAMES which is set in asn1c.c.
      e1801353
    • Bi-Ruei, Chiu's avatar
      Fix reference comes from another module · 0fe0ef12
      Bi-Ruei, Chiu authored
      In ASN.1 of 38.331 rev 15.2.1, module NR-InterNodeDefinitions
      imports GapConfig from NR-RRC-Definition module. It should treat
      
        SetupRelease { GapConfig }
      
      in module NR-InterNodeDefinitions the same as the one in
      module NR-RRC-Definition.
      0fe0ef12
    • Bi-Ruei, Chiu's avatar
      Add min and max value of INTEGER(min..max) to asn_constant.h · 755cadaa
      Bi-Ruei, Chiu authored
      For the following ASN.1 excerpt, the value of these Types will
      be checked against its valid range in their corresponding
      constraint functions.
      
      DRB-Identity ::= INTEGER(1..32)
      RSRP-Range   ::= INTEGER(0..97)
      RSRQ-Range   ::= INTEGER(0..34)
      
      Sometime it is convenient for application being aware of these
      min and max values.
      
      This commit generate the following macro defintions in
      asn_constant.h :
      
      \#define min_val_DRB_Identity (1)
      \#define max_val_DRB_Identity (32)
      \#define min_val_RSRP_Range (0)
      \#define max_val_RSRP_Range (97)
      \#define min_val_RSRQ_Range (0)
      \#define max_val_RSRQ_Range (34)
      755cadaa
    • Mark's avatar
      converter-example output JER to console · 140cdbec
      Mark authored
      The list of formats that are text output is a hardcoded list that didn't
      include JER
      140cdbec
  8. 24 Oct, 2022 1 commit
  9. 19 Jul, 2022 4 commits
    • Bi-Ruei, Chiu's avatar
      Fix the problem when ActualParameter to parameterized type is a Type · cecb8d1b
      Bi-Ruei, Chiu authored
      When ActualParameter to a parameterized type is a Type, commit
      59b9e705 will produce C struct types using ActualParameter,
      which are conflict with the C struct types for these Types themselves.
      
      For example, the following typedef has duplicate definition of
      UCI_OnPUSCH_t :
      
      typedef struct UCI_OnPUSCH {
      	UCI_OnPUSCH_PR present;
      	union UCI_OnPUSCH_u {
      		NULL_t	 release;
      		UCI_OnPUSCH_t	 setup;
      	} choice;
      
      	/* Context for parsing across buffer boundaries */
      	asn_struct_ctx_t _asn_ctx;
      } UCI_OnPUSCH_t;
      
      With this commit, if ActualParameter is a Type, then prefix it
      with Parameterized Type name.
      
      typedef struct SetupRelease_UCI_OnPUSCH {
      	SetupRelease_UCI_OnPUSCH_PR present;
      	union SetupRelease_UCI_OnPUSCH_u {
      		NULL_t	 release;
      		UCI_OnPUSCH_t	 setup;
      	} choice;
      
      	/* Context for parsing across buffer boundaries */
      	asn_struct_ctx_t _asn_ctx;
      } SetupRelease_UCI_OnPUSCH_t;
      
      As for ActualParameter is ObjectSet, used in S1AP ... etc, it doesn't
      prefix generated typedefs for keeping names shorter.
      
      This commit can replace item 3 of
      
      https://github.com/vlm/asn1c/issues/282#issuecomment-390838895
      
      which solve part of #282.
      cecb8d1b
    • Bi-Ruei, Chiu's avatar
      Fix item 2 of issue 254 · a09e7553
      Bi-Ruei, Chiu authored
      1. Record the de-referenced expression to newly added field ref_expr
         of strcut asn1p_ref_t.
      2. In function asn1c_make_identifier(), not only check whehter there
         is name clash occurred for this asn1p_expr_t but also the referenced
         expression to determine whether an additional module name to be added.
      3. Change signature of some functions and variables to eliminate warning
         messages when const type pointer, i.e. const asn1p_ref_t *, variables
         versus, non-const * type pointer, i.e. asn1p_ref_t *, varibles are
         used. E.g.:
         warning: assignment discards ‘const’ qualifier from pointer target type
      a09e7553
    • Pau Espin Pedrol's avatar
      aper: Fix regression reusing allocated sptr decoding CHOICE · eb4cd0c2
      Pau Espin Pedrol authored
      Recent commit abd1faa6 broke passing
      already existing output decoded structre as sptr. As a result, a new
      sptr was always allocated, and the old one leaked.
      
      Fixes: abd1faa6
      eb4cd0c2
    • Pau Espin Pedrol's avatar
      23751fcd
  10. 18 Jul, 2022 1 commit
  11. 15 Jul, 2022 8 commits
  12. 12 Jul, 2022 4 commits
  13. 11 Jul, 2022 1 commit