Commit 45a678cb authored by Robert Schmidt's avatar Robert Schmidt

Harmonize call to F1AP_get_next_transaction_identifier()

We ever only have one instance, so hard code that.
parent 96e300da
......@@ -35,7 +35,9 @@
static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_gNB_MAX]= {0};
static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_gNB_MAX]= {0};
uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP) {
uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP)
{
DevAssert(mod_idP == 0 && cu_mod_idP == 0);
static uint8_t transaction_identifier[NUMBER_OF_gNB_MAX] = {0};
transaction_identifier[mod_idP+cu_mod_idP] =
(transaction_identifier[mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER;
......
......@@ -263,13 +263,8 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
return 0;
}
int CU_send_F1_SETUP_RESPONSE(instance_t instance,
f1ap_setup_resp_t *f1ap_setup_resp) {
instance_t enb_mod_idP;
instance_t cu_mod_idP;
// This should be fixed
enb_mod_idP = (instance_t)0;
cu_mod_idP = (instance_t)0;
int CU_send_F1_SETUP_RESPONSE(instance_t instance, f1ap_setup_resp_t *f1ap_setup_resp)
{
F1AP_F1AP_PDU_t pdu= {0};
uint8_t *buffer=NULL;
uint32_t len=0;
......@@ -287,7 +282,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_F1SetupResponseIEs__value_PR_TransactionID;
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
/* optional */
/* c2. GNB_CU_Name */
......@@ -372,9 +367,6 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
int CU_send_F1_SETUP_FAILURE(instance_t instance) {
LOG_D(F1AP, "CU_send_F1_SETUP_FAILURE\n");
instance_t enb_mod_idP=0;
instance_t cu_mod_idP=0;
// This should be fixed
F1AP_F1AP_PDU_t pdu= {0};
uint8_t *buffer=NULL;
uint32_t len=0;
......@@ -392,7 +384,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_F1SetupFailureIEs__value_PR_TransactionID;
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, cu_mod_idP);
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
/* mandatory */
/* c2. Cause */
asn1cSequenceAdd(out->protocolIEs.list, F1AP_F1SetupFailureIEs_t, ie2);
......@@ -484,7 +476,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
ieC1->id = F1AP_ProtocolIE_ID_id_TransactionID;
ieC1->criticality = F1AP_Criticality_reject;
ieC1->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_TransactionID;
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, 0);
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
// mandatory
// c2. Cells_to_be_Activated_List
......
......@@ -93,9 +93,8 @@ int DU_handle_ERROR_INDICATION(instance_t instance,
*/
// SETUP REQUEST
int DU_send_F1_SETUP_REQUEST(instance_t instance) {
instance_t nb_mod_idP=0;
instance_t du_mod_idP=0;
int DU_send_F1_SETUP_REQUEST(instance_t instance)
{
F1AP_F1AP_PDU_t pdu= {0};
uint8_t *buffer;
uint32_t len;
......@@ -113,7 +112,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
ieC1->id = F1AP_ProtocolIE_ID_id_TransactionID;
ieC1->criticality = F1AP_Criticality_reject;
ieC1->value.present = F1AP_F1SetupRequestIEs__value_PR_TransactionID;
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(nb_mod_idP, du_mod_idP);
ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
/* mandatory */
/* c2. GNB_DU_ID (integer value) */
asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC2);
......@@ -569,7 +568,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
ie1->id = F1AP_ProtocolIE_ID_id_TransactionID;
ie1->criticality = F1AP_Criticality_reject;
ie1->value.present = F1AP_GNBDUConfigurationUpdateIEs__value_PR_TransactionID;
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(instance, du_mod_idP);
ie1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(0, 0);
/* mandatory */
/* c2. Served_Cells_To_Add */
asn1cSequenceAdd(out, F1AP_GNBDUConfigurationUpdateIEs_t, ie2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment