There will be two selector functions generated for the following ASN.1 excerpt.
InitiatingMessage ::= SEQUENCE {
procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode ({S1AP-ELEMENTARY-PROCEDURES}),
criticality S1AP-ELEMENTARY-PROCEDURE.&criticality ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
This pull request enables different function names by adding field name after type name.
For example, there are many 'enum value_PR' and 'struct value' generated if
a class is instantiated as many instances.
typedef enum value_PR {
value_PR_NOTHING, /* No components present */
.....
} value_PR;
typedef struct ProtocolIE_Field_6563P5 {
....
struct value {
value_PR present;
union value_u {
} 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_6563P5_t;
E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= {
{ ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory },
...
}
result in 'FATAL: Information Object Set E-RABToBeSetupItemBearerSUReqIEs contains no objects at line xxxx'
If it contains more than one entry then there is no problem.
E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= {
{ ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }|
{ ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }|
{ ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }|
{ ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory },
...
}
In Module_1,
Criticality ::= ENUMERATED { reject, ignore, notify }
In Module_2,
IMPORTS
Criticality
FROM Module_1
someMessage SOME-CLASS ::= {
CRITICALITY ignore
}
This pull request add the capability to resolve 'reject', 'ignore' and 'notify'
in Module_2.
The aforementioned error message displayed during processing the following ASN.1 excerpt.
S1AP-ELEMENTARY-PROCEDURES S1AP-ELEMENTARY-PROCEDURE ::= {
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 |
S1AP-ELEMENTARY-PROCEDURES-CLASS-2,
...
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-1 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverPreparation |
...
writeReplaceWarning,
...,
uERadioCapabilityMatch |
....
uEContextResume
}
S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= {
handoverNotification |
...
privateMessage,
...,
downlinkUEAssociatedLPPaTransport |
...
mMECPRelocationIndication
}
Because S1AP-ELEMENTARY-PROCEDURES-CLASS-1 and S1AP-ELEMENTARY-PROCEDURES-CLASS-2
are resolved 'after' S1AP-ELEMENTARY-PROCEDURES, so the ioc tables of them are not
available during resolving S1AP-ELEMENTARY-PROCEDURES. So we can not drop the
latter's containedSubtype field at first pass of asn1f_resolve_constraints of fix
process.
We also add second pass of asn1f_resolve_constraints to have a chance to combine
ioc tables of S1AP-ELEMENTARY-PROCEDURES-CLASS-1 and
S1AP-ELEMENTARY-PROCEDURES-CLASS-2.