Use an un-official community collaboration version of asn1c
1. It's no need to modify LTE-RRC's ASN.1 file for enabling option group feature in generate_asn1. 2. It's no need to patch the C header files generated from LTE-RRC/S1AP/X2AP's ASN.1 in fix_asn1. 3. It's no need to pre-process S1AP/X2AP's ASN.1 for enabling information object class feature by asn1tostruct.py. This commit requires an un-official version of asn1c which are collaboration of asn1c community members and `build_helper` is modified in this commit accordingly : https://github.com/brchiu/asn1c/tree/velichkov_s1ap_plus_option_group This asn1c can also convert ASN.1 of 5G NR RRC (38.331, v15.1.0) and generate C files with -findirect-choice command line option without tweaking ASN.1 file. Examples for how to use this asn1c for S1AP are in S1AP files, e.g. s1ap_eNB_nas_procedures.c and s1ap_eNB_handler.c. There is an modified openair-cn (based on tag 0.5.0) with this new asn1c at : https://github.com/brchiu/openair-cn/tree/new-asn1c Basic S1AP interaction and data transfer operation between OAI eNB and this modified openair-cn has been tested. Note: Community version of asn1c is keeping evolved to provide better usage.
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "s1ap_common.h"
|
||||
#include "s1ap_ies_defs.h"
|
||||
#include "s1ap_eNB_defs.h"
|
||||
|
||||
#include "s1ap_eNB.h"
|
||||
@@ -44,20 +43,24 @@
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
struct s1ap_message_s *message_p)
|
||||
int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
S1AP_S1AP_PDU_t *pdu)
|
||||
{
|
||||
S1ap_OverloadStartIEs_t *overload_start_p;
|
||||
s1ap_eNB_mme_data_t *mme_desc_p;
|
||||
S1AP_OverloadStart_t *container;
|
||||
S1AP_OverloadStartIEs_t *ie;
|
||||
|
||||
DevAssert(message_p != NULL);
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
overload_start_p = &message_p->msg.s1ap_OverloadStartIEs;
|
||||
container = &pdu->choice.initiatingMessage.value.choice.OverloadStart;
|
||||
|
||||
DevCheck(overload_start_p->overloadResponse.present ==
|
||||
S1ap_OverloadResponse_PR_overloadAction,
|
||||
S1ap_OverloadResponse_PR_overloadAction, 0, 0);
|
||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_OverloadStartIEs_t, ie, container,
|
||||
S1AP_ProtocolIE_ID_id_OverloadResponse, true);
|
||||
|
||||
DevCheck(ie->value.choice.OverloadResponse.present ==
|
||||
S1AP_OverloadResponse_PR_overloadAction,
|
||||
S1AP_OverloadResponse_PR_overloadAction, 0, 0);
|
||||
|
||||
/* Non UE-associated signalling -> stream 0 */
|
||||
DevCheck(stream == 0, stream, 0, 0);
|
||||
@@ -72,21 +75,20 @@ int s1ap_eNB_handle_overload_start(uint32_t assoc_id,
|
||||
*/
|
||||
mme_desc_p->state = S1AP_ENB_OVERLOAD;
|
||||
mme_desc_p->overload_state =
|
||||
overload_start_p->overloadResponse.choice.overloadAction;
|
||||
ie->value.choice.OverloadResponse.choice.overloadAction;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int s1ap_eNB_handle_overload_stop(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
struct s1ap_message_s *message_p)
|
||||
int s1ap_eNB_handle_overload_stop(uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
S1AP_S1AP_PDU_t *pdu)
|
||||
{
|
||||
/* We received Overload stop message, meaning that the MME is no more
|
||||
* overloaded. This is an empty message, with only message header and no
|
||||
* Information Element.
|
||||
*/
|
||||
|
||||
DevAssert(message_p != NULL);
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
s1ap_eNB_mme_data_t *mme_desc_p;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user