• Bi-Ruei, Chiu's avatar
    Generate constant variables reference to user defined types · 8d0f6857
    Bi-Ruei, Chiu authored
    Currently, there is no code generated for following ASN.1 excerpt.
    Thus application is not aware of these values.
    
        ProtocolIE-ID ::= INTEGER (0..65535)
    
        id-MME-UE-S1AP-ID  ProtocolIE-ID ::= 0
        id-HandoverType    ProtocolIE-ID ::= 1
        id-Cause           ProtocolIE-ID ::= 2
        id-SourceID        ProtocolIE-ID ::= 3
          ...
    
        ProcedureCode ::= INTEGER (0..255)
    
        id-HandoverPreparation         ProcedureCode ::= 0
        id-HandoverResourceAllocation  ProcedureCode ::= 1
        id-HandoverNotification        ProcedureCode ::= 2
        id-PathSwitchRequest           ProcedureCode ::= 3
        ...
    
    This commit adds corresponding macro definitions in
    ProtocolIE-ID.h and ProcedureCode.h respectively.
    
        #define ProtocolIE_ID_id_MME_UE_S1AP_ID       ((ProtocolIE_ID_t)0)
        #define ProtocolIE_ID_id_HandoverType ((ProtocolIE_ID_t)1)
        #define ProtocolIE_ID_id_Cause        ((ProtocolIE_ID_t)2)
        #define ProtocolIE_ID_id_SourceID     ((ProtocolIE_ID_t)3)
        ...
    
        #define ProcedureCode_id_HandoverPreparation ((ProcedureCode_t)0)
        #define ProcedureCode_id_HandoverResourceAllocation    ((ProcedureCode_t)1)
        #define ProcedureCode_id_HandoverNotification ((ProcedureCode_t)2)
        #define ProcedureCode_id_PathSwitchRequest    ((ProcedureCode_t)3)
        ...
    
    Only types of ASN_BASIC_INTEGER and ASN_BASIC_ENUMERATED referenced
    by these constant variables are handled.
    
    Other built-in types shall be added in the future.
    8d0f6857
asn1c_C.c 94.7 KB