Commit 70ec9483 authored by gauthier's avatar gauthier

Changed macro macro_enb to CGI cell id.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7677 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent d5bd3f47
Branches unavailable
2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 2017.w34 2017.w30 2017.w25 2017.w24 2017.w22 2017.w20 2017.w19 2017.w15 2017.w14 2017.w13 2017.w12 2017.w11 2017.w10 2017.w09 2017.w08 2017.w07 2017.w06 2017.w05 2017.w04 2017.w03 2017.w02 2017.w01 2016.w50 2016.w49 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 v1B0.8 v1B0.7 v1B0.6 v1B0.5 v1B0.4 v1B0.3 v1B0.2 v1B0.1 v0.6.1 v0.6.1_tdd v0.6 v0.5.2 v0.5.1_tdd v0.5 v0.4 v0.3 v0.2 v0.1 testing-cmw500 setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0
No related merge requests found
......@@ -67,6 +67,11 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p);
static
int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
uint32_t stream,
......@@ -94,7 +99,7 @@ s1ap_message_decoded_callback messages_callback[][3] = {
{ 0, 0, 0 }, /* initialUEMessage */
{ 0, 0, 0 }, /* uplinkNASTransport */
{ 0, 0, 0 }, /* Reset */
{ 0, 0, 0 }, /* ErrorIndication */
{ s1ap_eNB_handle_error_indication, 0, 0 }, /* ErrorIndication */
{ 0, 0, 0 }, /* NASNonDeliveryIndication */
{ 0, s1ap_eNB_handle_s1_setup_response, s1ap_eNB_handle_s1_setup_failure }, /* S1Setup */
{ 0, 0, 0 }, /* UEContextReleaseRequest */
......@@ -418,6 +423,264 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
return 0;
}
static
int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
uint32_t stream,
struct s1ap_message_s *message_p)
{
S1ap_ErrorIndicationIEs_t *s1_error_indication_p;
s1ap_eNB_mme_data_t *mme_desc_p;
DevAssert(message_p != NULL);
s1_error_indication_p = &message_p->msg.s1ap_ErrorIndicationIEs;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) {
S1AP_WARN("[SCTP %d] Received s1 Error indication on stream != 0 (%d)\n",
assoc_id, stream);
}
if ((mme_desc_p = s1ap_eNB_get_MME(NULL, assoc_id, 0)) == NULL) {
S1AP_ERROR("[SCTP %d] Received S1 Error indication for non existing "
"MME context\n", assoc_id);
return -1;
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_MME_UE_S1AP_ID_PRESENT) {
S1AP_WARN("Received S1 Error indication MME UE S1AP ID 0x%x\n", s1_error_indication_p->mme_ue_s1ap_id);
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_ENB_UE_S1AP_ID_PRESENT) {
S1AP_WARN("Received S1 Error indication eNB UE S1AP ID 0x%x\n", s1_error_indication_p->eNB_UE_S1AP_ID);
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_CAUSE_PRESENT) {
switch(s1_error_indication_p->cause.present) {
case S1ap_Cause_PR_NOTHING:
S1AP_WARN("Received S1 Error indication cause NOTHING\n");
break;
case S1ap_Cause_PR_radioNetwork:
switch (s1_error_indication_p->cause.choice.radioNetwork) {
case S1ap_CauseRadioNetwork_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unspecified\n");
break;
case S1ap_CauseRadioNetwork_tx2relocoverall_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tx2relocoverall_expiry\n");
break;
case S1ap_CauseRadioNetwork_successful_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_successful_handover\n");
break;
case S1ap_CauseRadioNetwork_release_due_to_eutran_generated_reason:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_release_due_to_eutran_generated_reason\n");
break;
case S1ap_CauseRadioNetwork_handover_cancelled:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_handover_cancelled\n");
break;
case S1ap_CauseRadioNetwork_partial_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_partial_handover\n");
break;
case S1ap_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system\n");
break;
case S1ap_CauseRadioNetwork_ho_target_not_allowed:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ho_target_not_allowed\n");
break;
case S1ap_CauseRadioNetwork_tS1relocoverall_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tS1relocoverall_expiry\n");
break;
case S1ap_CauseRadioNetwork_tS1relocprep_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_tS1relocprep_expiry\n");
break;
case S1ap_CauseRadioNetwork_cell_not_available:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_cell_not_available\n");
break;
case S1ap_CauseRadioNetwork_unknown_targetID:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_targetID\n");
break;
case S1ap_CauseRadioNetwork_no_radio_resources_available_in_target_cell:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_no_radio_resources_available_in_target_cell\n");
break;
case S1ap_CauseRadioNetwork_unknown_mme_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_mme_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_unknown_enb_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_enb_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_unknown_pair_ue_s1ap_id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_pair_ue_s1ap_id\n");
break;
case S1ap_CauseRadioNetwork_handover_desirable_for_radio_reason:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_handover_desirable_for_radio_reason\n");
break;
case S1ap_CauseRadioNetwork_time_critical_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_time_critical_handover\n");
break;
case S1ap_CauseRadioNetwork_resource_optimisation_handover:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_resource_optimisation_handover\n");
break;
case S1ap_CauseRadioNetwork_reduce_load_in_serving_cell:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_reduce_load_in_serving_cell\n");
break;
case S1ap_CauseRadioNetwork_user_inactivity:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_user_inactivity\n");
break;
case S1ap_CauseRadioNetwork_radio_connection_with_ue_lost:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_radio_connection_with_ue_lost\n");
break;
case S1ap_CauseRadioNetwork_load_balancing_tau_required:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_load_balancing_tau_required\n");
break;
case S1ap_CauseRadioNetwork_cs_fallback_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_cs_fallback_triggered\n");
break;
case S1ap_CauseRadioNetwork_ue_not_available_for_ps_service:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_ue_not_available_for_ps_service\n");
break;
case S1ap_CauseRadioNetwork_radio_resources_not_available:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_radio_resources_not_available\n");
break;
case S1ap_CauseRadioNetwork_failure_in_radio_interface_procedure:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_failure_in_radio_interface_procedure\n");
break;
case S1ap_CauseRadioNetwork_invals1ap_id_qos_combination:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_invals1ap_id_qos_combination\n");
break;
case S1ap_CauseRadioNetwork_interrat_redirection:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_interrat_redirection\n");
break;
case S1ap_CauseRadioNetwork_interaction_with_other_procedure:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_interaction_with_other_procedure\n");
break;
case S1ap_CauseRadioNetwork_unknown_E_RAB_ID:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_unknown_E_RAB_ID\n");
break;
case S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances\n");
break;
case S1ap_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported\n");
break;
case S1ap_CauseRadioNetwork_s1_intra_system_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_s1_intra_system_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_s1_inter_system_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_s1_inter_system_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_x2_handover_triggered:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_x2_handover_triggered\n");
break;
case S1ap_CauseRadioNetwork_redirection_towards_1xRTT:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_redirection_towards_1xRTT\n");
break;
case S1ap_CauseRadioNetwork_not_supported_QCI_value:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_not_supported_QCI_value\n");
break;
case S1ap_CauseRadioNetwork_invals1ap_id_CSG_Id:
S1AP_WARN("Received S1 Error indication S1ap_CauseRadioNetwork_invals1ap_id_CSG_Id\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause radio network case not handled\n");
}
break;
case S1ap_Cause_PR_transport:
switch (s1_error_indication_p->cause.choice.transport) {
case S1ap_CauseTransport_transport_resource_unavailable:
S1AP_WARN("Received S1 Error indication S1ap_CauseTransport_transport_resource_unavailable\n");
break;
case S1ap_CauseTransport_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseTransport_unspecified\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause transport case not handled\n");
}
break;
case S1ap_Cause_PR_nas:
switch (s1_error_indication_p->cause.choice.nas) {
case S1ap_CauseNas_normal_release:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_normal_release\n");
break;
case S1ap_CauseNas_authentication_failure:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_authentication_failure\n");
break;
case S1ap_CauseNas_detach:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_detach\n");
break;
case S1ap_CauseNas_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_unspecified\n");
break;
case S1ap_CauseNas_csg_subscription_expiry:
S1AP_WARN("Received S1 Error indication S1ap_CauseNas_csg_subscription_expiry\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause nas case not handled\n");
}
break;
case S1ap_Cause_PR_protocol:
switch (s1_error_indication_p->cause.choice.protocol) {
case S1ap_CauseProtocol_transfer_syntax_error:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_transfer_syntax_error\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_reject:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_reject\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_ignore_and_notify:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_ignore_and_notify\n");
break;
case S1ap_CauseProtocol_message_not_compatible_with_receiver_state:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_message_not_compatible_with_receiver_state\n");
break;
case S1ap_CauseProtocol_semantic_error:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_semantic_error\n");
break;
case S1ap_CauseProtocol_abstract_syntax_error_falsely_constructed_message:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_abstract_syntax_error_falsely_constructed_message\n");
break;
case S1ap_CauseProtocol_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseProtocol_unspecified\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause protocol case not handled\n");
}
break;
case S1ap_Cause_PR_misc:
switch (s1_error_indication_p->cause.choice.protocol) {
case S1ap_CauseMisc_control_processing_overload:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_control_processing_overload\n");
break;
case S1ap_CauseMisc_not_enough_user_plane_processing_resources:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_not_enough_user_plane_processing_resources\n");
break;
case S1ap_CauseMisc_hardware_failure:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_hardware_failure\n");
break;
case S1ap_CauseMisc_om_intervention:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_om_intervention\n");
break;
case S1ap_CauseMisc_unspecified:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_unspecified\n");
break;
case S1ap_CauseMisc_unknown_PLMN:
S1AP_WARN("Received S1 Error indication S1ap_CauseMisc_unknown_PLMN\n");
break;
default:
S1AP_WARN("Received S1 Error indication cause misc case not handled\n");
}
break;
}
}
if ( s1_error_indication_p->presenceMask & S1AP_ERRORINDICATIONIES_CRITICALITYDIAGNOSTICS_PRESENT) {
// TODO continue
}
// TODO continue
return 0;
}
static
int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
uint32_t stream,
......
......@@ -155,7 +155,7 @@ int s1ap_eNB_handle_nas_first_req(
initial_ue_message_p->rrC_Establishment_Cause = s1ap_nas_first_req_p->establishment_cause;
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_s_tmsi) {
S1AP_DEBUG("S_TMSI_PRESENT");
S1AP_DEBUG("S_TMSI_PRESENT\n");
initial_ue_message_p->presenceMask |= S1AP_INITIALUEMESSAGEIES_S_TMSI_PRESENT;
MME_CODE_TO_OCTET_STRING(s1ap_nas_first_req_p->ue_identity.s_tmsi.mme_code,
......@@ -165,7 +165,7 @@ int s1ap_eNB_handle_nas_first_req(
}
if (s1ap_nas_first_req_p->ue_identity.presenceMask & UE_IDENTITIES_gummei) {
S1AP_DEBUG("GUMMEI_ID_PRESENT");
S1AP_DEBUG("GUMMEI_ID_PRESENT\n");
initial_ue_message_p->presenceMask |= S1AP_INITIALUEMESSAGEIES_GUMMEI_ID_PRESENT;
MCC_MNC_TO_PLMNID(
......@@ -191,8 +191,10 @@ int s1ap_eNB_handle_nas_first_req(
* The cell identity is defined on 28 bits but as we use macro enb id,
* we have to pad.
*/
#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(instance_p->eNB_id,
&initial_ue_message_p->eutran_cgi.cell_ID);
0, // Cell ID
&initial_ue_message_p->eutran_cgi.cell_ID);
MCC_MNC_TO_TBCD(instance_p->mcc,
instance_p->mnc,
instance_p->mnc_digit_length,
......@@ -389,8 +391,10 @@ int s1ap_eNB_nas_uplink(instance_t instance, s1ap_uplink_nas_t *s1ap_uplink_nas_
s1ap_eNB_instance_p->mnc_digit_length,
&uplink_NAS_transport_p->eutran_cgi.pLMNidentity);
#warning "TODO get cell id from RRC"
MACRO_ENB_ID_TO_CELL_IDENTITY(s1ap_eNB_instance_p->eNB_id,
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
0,
&uplink_NAS_transport_p->eutran_cgi.cell_ID);
/* MCC/MNC should be repeated in TAI and EUTRAN CGI */
MCC_MNC_TO_PLMNID(
......
......@@ -259,6 +259,13 @@ do { \
+ pLMN.MNCdigit2 * 10 + pLMN.MNCdigit1; \
} while(0)
/* TS 36.413 v10.9.0 section 9.2.1.37:
* Macro eNB ID:
* Equal to the 20 leftmost bits of the Cell
* Identity IE contained in the E-UTRAN CGI
* IE (see subclause 9.2.1.38) of each cell
* served by the eNB.
*/
#define MACRO_ENB_ID_TO_BIT_STRING(mACRO, bITsTRING) \
do { \
(bITsTRING)->buf = calloc(3, sizeof(uint8_t)); \
......@@ -268,14 +275,20 @@ do { \
(bITsTRING)->size = 3; \
(bITsTRING)->bits_unused = 4; \
} while(0)
#define MACRO_ENB_ID_TO_CELL_IDENTITY(mACRO, bITsTRING) \
/*
/* TS 36.413 v10.9.0 section 9.2.1.38:
* E-UTRAN CGI/Cell Identity
* The leftmost bits of the Cell
* Identity correspond to the eNB
* ID (defined in subclause 9.2.1.37).
*/
#define MACRO_ENB_ID_TO_CELL_IDENTITY(mACRO, cELL_iD, bITsTRING) \
do { \
(bITsTRING)->buf = calloc(4, sizeof(uint8_t)); \
(bITsTRING)->buf[0] = 0; \
(bITsTRING)->buf[1] = ((mACRO) >> 12); \
(bITsTRING)->buf[2] = (mACRO) >> 4; \
(bITsTRING)->buf[3] = ((mACRO) & 0x0f) << 4; \
(bITsTRING)->buf[0] = ((mACRO) >> 12); \
(bITsTRING)->buf[1] = (mACRO) >> 4; \
(bITsTRING)->buf[2] = (((mACRO) & 0x0f) << 4) | ((cELL_iD) >> 4); \
(bITsTRING)->buf[3] = ((cELL_iD) & 0x0f) << 4; \
(bITsTRING)->size = 4; \
(bITsTRING)->bits_unused = 4; \
} while(0)
......
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