You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use comprehensible names for instances of parameterized types
With previous commit, the following data types are generated in ProtocolIE-Field.h
for S1AP's ASN.1 :
```
typedef enum ProtocolIE_Field_6564P0__value_PR {
ProtocolIE_Field_6564P0__value_PR_NOTHING, /* No components present */
ProtocolIE_Field_6564P0__value_PR_E_RABToBeSetupItemBearerSUReq
} ProtocolIE_Field_6564P0__value_PR;
typedef struct ProtocolIE_Field_6564P0 {
ProtocolIE_ID_t id;
Criticality_t criticality;
struct ProtocolIE_Field_6564P0__value {
ProtocolIE_Field_6564P0__value_PR present;
union ProtocolIE_Field_6564P0__value_u {
E_RABToBeSetupItemBearerSUReq_t E_RABToBeSetupItemBearerSUReq;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} value;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Field_6564P0_t;
```
It's difficult for developer to recognize to which ASN.1 type they are linked.
They all start with 'ProtocolIE_Field_'. It will be error-prone.
With this commit, more human comprehensible data types are generated :
```
typedef enum E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_PR {
E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_PR_NOTHING, /* No components present */
E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_PR_E_RABToBeSetupItemBearerSUReq
} E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_PR;
typedef struct E_RABToBeSetupItemBearerSUReqIEs_6564P0 {
ProtocolIE_ID_t id;
Criticality_t criticality;
struct E_RABToBeSetupItemBearerSUReqIEs_6564P0__value {
E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_PR present;
union E_RABToBeSetupItemBearerSUReqIEs_6564P0__value_u {
E_RABToBeSetupItemBearerSUReq_t E_RABToBeSetupItemBearerSUReq;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} value;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} E_RABToBeSetupItemBearerSUReqIEs_6564P0_t;
```
Developers can understand they are generated from :
```
E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= {
{ ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory },
...
}
```
0 commit comments