-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 }, ... } ```
- Loading branch information
Showing
8 changed files
with
178 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.