Commit e0c66b8a authored by aligungr's avatar aligungr

RRC developments

parent 563012bc
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
#include <asn/rrc/ASN_RRC_SIB1.h> #include <asn/rrc/ASN_RRC_SIB1.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSet.h> #include <asn/rrc/ASN_RRC_UAC-BarringInfoSet.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSetIndex.h> #include <asn/rrc/ASN_RRC_UAC-BarringInfoSetIndex.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSetList.h> #include <asn/rrc/ASN_RRC_UAC-BarringPerCat.h>
#include <asn/rrc/ASN_RRC_UAC-BarringPerCatList.h>
namespace nr::gnb namespace nr::gnb
{ {
...@@ -46,7 +47,8 @@ static ASN_RRC_BCCH_BCH_Message *ConstructMibMessage(bool barred, bool intraFreq ...@@ -46,7 +47,8 @@ static ASN_RRC_BCCH_BCH_Message *ConstructMibMessage(bool barred, bool intraFreq
return pdu; return pdu;
} }
static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int tac, int64_t nci, const Plmn &plmn) static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int tac, int64_t nci, const Plmn &plmn,
const UacAiBarringSet &aiBarringSet)
{ {
auto *pdu = asn::New<ASN_RRC_BCCH_DL_SCH_Message>(); auto *pdu = asn::New<ASN_RRC_BCCH_DL_SCH_Message>();
pdu->message.present = ASN_RRC_BCCH_DL_SCH_MessageType_PR_c1; pdu->message.present = ASN_RRC_BCCH_DL_SCH_MessageType_PR_c1;
...@@ -74,6 +76,30 @@ static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int ...@@ -74,6 +76,30 @@ static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int
asn::SequenceAdd(plmnInfo->plmn_IdentityList, asn::rrc::NewPlmnId(plmn)); asn::SequenceAdd(plmnInfo->plmn_IdentityList, asn::rrc::NewPlmnId(plmn));
asn::SequenceAdd(sib1.cellAccessRelatedInfo.plmn_IdentityList, plmnInfo); asn::SequenceAdd(sib1.cellAccessRelatedInfo.plmn_IdentityList, plmnInfo);
asn::MakeNew(sib1.uac_BarringInfo);
auto *info = asn::New<ASN_RRC_UAC_BarringInfoSet>();
info->uac_BarringFactor = ASN_RRC_UAC_BarringInfoSet__uac_BarringFactor_p50;
info->uac_BarringTime = ASN_RRC_UAC_BarringInfoSet__uac_BarringTime_s4;
asn::SetBitStringInt<7>(bits::Consequential8(false, aiBarringSet.ai1, aiBarringSet.ai2, aiBarringSet.ai11,
aiBarringSet.ai12, aiBarringSet.ai13, aiBarringSet.ai14,
aiBarringSet.ai15),
info->uac_BarringForAccessIdentity);
asn::SequenceAdd(sib1.uac_BarringInfo->uac_BarringInfoSetList, info);
asn::MakeNew(sib1.uac_BarringInfo->uac_BarringForCommon);
for (size_t i = 0; i < 63; i++)
{
auto *item = asn::New<ASN_RRC_UAC_BarringPerCat>();
item->accessCategory = static_cast<long>(i + 1);
item->uac_barringInfoSetIndex = 1;
asn::SequenceAdd(*sib1.uac_BarringInfo->uac_BarringForCommon, item);
}
return pdu; return pdu;
} }
...@@ -85,7 +111,7 @@ void GnbRrcTask::onBroadcastTimerExpired() ...@@ -85,7 +111,7 @@ void GnbRrcTask::onBroadcastTimerExpired()
void GnbRrcTask::triggerSysInfoBroadcast() void GnbRrcTask::triggerSysInfoBroadcast()
{ {
auto *mib = ConstructMibMessage(m_isBarred, m_intraFreqReselectAllowed); auto *mib = ConstructMibMessage(m_isBarred, m_intraFreqReselectAllowed);
auto *sib1 = ConstructSib1Message(m_cellReserved, m_config->tac, m_config->nci, m_config->plmn); auto *sib1 = ConstructSib1Message(m_cellReserved, m_config->tac, m_config->nci, m_config->plmn, m_aiBarringSet);
sendRrcMessage(mib); sendRrcMessage(mib);
sendRrcMessage(sib1); sendRrcMessage(sib1);
......
...@@ -51,6 +51,7 @@ class GnbRrcTask : public NtsTask ...@@ -51,6 +51,7 @@ class GnbRrcTask : public NtsTask
bool m_isBarred = true; bool m_isBarred = true;
bool m_intraFreqReselectAllowed = true; bool m_intraFreqReselectAllowed = true;
bool m_cellReserved = false; bool m_cellReserved = false;
UacAiBarringSet m_aiBarringSet = {};
friend class GnbCmdHandler; friend class GnbCmdHandler;
......
...@@ -43,6 +43,12 @@ inline T *NewFor(T *p) ...@@ -43,6 +43,12 @@ inline T *NewFor(T *p)
return New<typename std::remove_pointer<T>::type>(); return New<typename std::remove_pointer<T>::type>();
} }
template <typename T>
inline void MakeNew(T *&p)
{
p = NewFor(p);
}
template <typename T> template <typename T>
inline void Free(asn_TYPE_descriptor_t &desc, T *ptr) inline void Free(asn_TYPE_descriptor_t &desc, T *ptr)
{ {
......
...@@ -154,21 +154,21 @@ enum class ECellCategory ...@@ -154,21 +154,21 @@ enum class ECellCategory
struct UeCellMeasurement struct UeCellMeasurement
{ {
uint64_t sti{}; uint64_t sti{};
GlobalNci cellId{}; GlobalNci cellId;
int tac{}; int tac{};
int dbm{}; int dbm{};
std::string gnbName{}; std::string gnbName;
std::string linkIp{}; std::string linkIp;
}; };
struct UeCellInfo struct UeCellInfo
{ {
uint64_t sti{}; uint64_t sti{};
GlobalNci cellId{}; GlobalNci cellId;
int tac{}; int tac{};
ECellCategory cellCategory{}; ECellCategory cellCategory{};
std::string gnbName{}; std::string gnbName;
std::string linkIp{}; std::string linkIp;
}; };
struct Vector3 struct Vector3
...@@ -184,6 +184,17 @@ struct Vector3 ...@@ -184,6 +184,17 @@ struct Vector3
} }
}; };
struct UacAiBarringSet
{
bool ai1 = false;
bool ai2 = false;
bool ai11 = false;
bool ai12 = false;
bool ai13 = false;
bool ai14 = false;
bool ai15 = false;
};
bool operator==(const SingleSlice &lhs, const SingleSlice &rhs); bool operator==(const SingleSlice &lhs, const SingleSlice &rhs);
bool operator==(const Plmn &lhs, const Plmn &rhs); bool operator==(const Plmn &lhs, const Plmn &rhs);
bool operator==(const GlobalNci &lhs, const GlobalNci &rhs); bool operator==(const GlobalNci &lhs, const GlobalNci &rhs);
......
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