e2ap: add RIC indication SN

master
Piotr Gawlowicz 2 years ago committed by Justin Tallon
parent 2047c1b62c
commit 0c7d499250

@ -39,6 +39,8 @@ typedef struct {
uint32_t ric_instance_id; uint32_t ric_instance_id;
uint32_t ra_nfunction_id; uint32_t ra_nfunction_id;
uint32_t ri_caction_id; uint32_t ri_caction_id;
bool ri_indication_sn_present;
uint32_t ri_indication_sn;
ri_cind_type_e indication_type; ri_cind_type_e indication_type;
srsran::unique_byte_buffer_t ri_cind_hdr; srsran::unique_byte_buffer_t ri_cind_hdr;
srsran::unique_byte_buffer_t ri_cind_msg; srsran::unique_byte_buffer_t ri_cind_msg;

@ -38,6 +38,7 @@ public:
private: private:
void send_ric_indication(); void send_ric_indication();
uint32_t _generate_ric_indication_sn();
ric_client* parent = nullptr; ric_client* parent = nullptr;
bool initialized = false; bool initialized = false;
@ -52,6 +53,8 @@ private:
std::vector<E2AP_RIC_action_t> admitted_actions; std::vector<E2AP_RIC_action_t> admitted_actions;
std::vector<uint32_t> not_admitted_actions; std::vector<uint32_t> not_admitted_actions;
uint32_t _ric_indication_sn_gen = 0;
}; };
} // namespace srsenb } // namespace srsenb

@ -207,6 +207,12 @@ e2_ap_pdu_c e2ap::generate_indication(ric_indication_t& ric_indication)
indication->ri_caction_id.crit = asn1::crit_opts::reject; indication->ri_caction_id.crit = asn1::crit_opts::reject;
indication->ri_caction_id.value = ric_indication.ri_caction_id; indication->ri_caction_id.value = ric_indication.ri_caction_id;
if (ric_indication.ri_indication_sn_present) {
indication->ri_cind_sn_present = true;
indication->ri_cind_sn.crit = asn1::crit_opts::reject;
indication->ri_cind_sn->value = ric_indication.ri_indication_sn;
}
indication->ri_cind_type.crit = asn1::crit_opts::reject; indication->ri_cind_type.crit = asn1::crit_opts::reject;
indication->ri_cind_type.value = ric_indication.indication_type; indication->ri_cind_type.value = ric_indication.indication_type;

@ -140,6 +140,16 @@ void ric_client::ric_subscription::delete_subscription()
parent->queue_send_e2ap_pdu(send_pdu); parent->queue_send_e2ap_pdu(send_pdu);
} }
uint32_t ric_client::ric_subscription::_generate_ric_indication_sn()
{
uint32_t sn = _ric_indication_sn_gen;
_ric_indication_sn_gen++;
if (_ric_indication_sn_gen > 65535) {
_ric_indication_sn_gen = 0;
}
return sn;
};
void ric_client::ric_subscription::send_ric_indication() void ric_client::ric_subscription::send_ric_indication()
{ {
if (sm_ptr == nullptr) { if (sm_ptr == nullptr) {
@ -154,6 +164,8 @@ void ric_client::ric_subscription::send_ric_indication()
ric_indication.ric_instance_id = ric_instance_id; ric_indication.ric_instance_id = ric_instance_id;
ric_indication.ra_nfunction_id = ra_nfunction_id; ric_indication.ra_nfunction_id = ra_nfunction_id;
ric_indication.ri_caction_id = action.ric_action_id; ric_indication.ri_caction_id = action.ric_action_id;
ric_indication.ri_indication_sn_present = true;
ric_indication.ri_indication_sn = _generate_ric_indication_sn();
sm_ptr->execute_action_fill_ric_indication(action, ric_indication); sm_ptr->execute_action_fill_ric_indication(action, ric_indication);
e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication); e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication);

Loading…
Cancel
Save