NR RRC - Created function to check if DRB is active for a UE

parent 0fd71f09
...@@ -113,4 +113,10 @@ uint8_t next_available_drb(gNB_RRC_UE_t *ue, uint8_t pdusession_id) { ...@@ -113,4 +113,10 @@ uint8_t next_available_drb(gNB_RRC_UE_t *ue, uint8_t pdusession_id) {
/* From this point, we handle the case that all DRBs are already used by the UE. */ /* From this point, we handle the case that all DRBs are already used by the UE. */
LOG_E(RRC, "Error - All the DRBs are used - Handle this\n"); LOG_E(RRC, "Error - All the DRBs are used - Handle this\n");
return DRB_INACTIVE; return DRB_INACTIVE;
}
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id) {
if(ue->DRB_active[drb_id-1] == DRB_ACTIVE)
return true;
return false;
} }
\ No newline at end of file
...@@ -39,5 +39,6 @@ NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *rrc_ue, ...@@ -39,5 +39,6 @@ NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *rrc_ue,
int do_drb_ciphering); int do_drb_ciphering);
uint8_t next_available_drb(gNB_RRC_UE_t *ue, uint8_t pdusession_id); uint8_t next_available_drb(gNB_RRC_UE_t *ue, uint8_t pdusession_id);
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id);
#endif #endif
\ No newline at end of file
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