Commit 206f8ae1 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/bugfix-fix-context' into integration_2023_w03

parents 60bf3a98 3674a6f0
...@@ -234,16 +234,14 @@ typedef struct protocol_ctxt_s { ...@@ -234,16 +234,14 @@ typedef struct protocol_ctxt_s {
#define GNB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE #define GNB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE
#define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \ #define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \
if(eNB_fLAG == ENB_FLAG_YES) \ do { \
iNSTANCE = ENB_MODULE_ID_TO_INSTANCE(mODULE_iD); \ iNSTANCE = eNB_fLAG == ENB_FLAG_YES ? ENB_MODULE_ID_TO_INSTANCE(mODULE_iD) : UE_MODULE_ID_TO_INSTANCE(mODULE_iD); \
else \ } while (0)
iNSTANCE = UE_MODULE_ID_TO_INSTANCE(mODULE_iD)
#define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \ #define INSTANCE_TO_MODULE_ID(iNSTANCE, mODULE_iD, eNB_fLAG) \
if(eNB_fLAG == ENB_FLAG_YES) \ do { \
mODULE_iD = ENB_INSTANCE_TO_MODULE_ID(iNSTANCE); \ mODULE_iD = eNB_fLAG == ENB_FLAG_YES ? ENB_INSTANCE_TO_MODULE_ID(iNSTANCE) : UE_INSTANCE_TO_MODULE_ID(iNSTANCE); \
else \ } while (0)
mODULE_iD = UE_INSTANCE_TO_MODULE_ID(iNSTANCE)
#define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \ #define PROTOCOL_CTXT_COMPUTE_MODULE_ID(CtXt_h) \
INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag ) INSTANCE_TO_MODULE_ID( (CtXt_h)->instance , (CtXt_h)->module_id , (CtXt_h)->enb_flag )
...@@ -253,21 +251,28 @@ typedef struct protocol_ctxt_s { ...@@ -253,21 +251,28 @@ typedef struct protocol_ctxt_s {
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag ) MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \ #define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
(Ctxt_Pp)->module_id = mODULE_iD; \ do { \
(Ctxt_Pp)->enb_flag = eNB_fLAG; \ (Ctxt_Pp)->module_id = mODULE_iD; \
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \ (Ctxt_Pp)->enb_flag = eNB_fLAG; \
(Ctxt_Pp)->frame = fRAME; \ (Ctxt_Pp)->rntiMaybeUEid = rNTI; \
(Ctxt_Pp)->subframe = sUBfRAME; \ (Ctxt_Pp)->frame = fRAME; \
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \ (Ctxt_Pp)->subframe = sUBfRAME; \
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp) (Ctxt_Pp)->eNB_index = eNB_iNDEX; \
(Ctxt_Pp)->brOption = false; /* set a default value */ \
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp); \
} while (0)
#define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \ #define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \
(Ctxt_Pp)->instance = iNSTANCE; \ do { \
(Ctxt_Pp)->enb_flag = eNB_fLAG; \ (Ctxt_Pp)->instance = iNSTANCE; \
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \ (Ctxt_Pp)->enb_flag = eNB_fLAG; \
(Ctxt_Pp)->frame = fRAME; \ (Ctxt_Pp)->rntiMaybeUEid = rNTI; \
(Ctxt_Pp)->subframe = sUBfRAME; \ (Ctxt_Pp)->frame = fRAME; \
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp) (Ctxt_Pp)->subframe = sUBfRAME; \
(Ctxt_Pp)->eNB_index = 0; /* set a default value */ \
(Ctxt_Pp)->brOption = false; /* set a default value */ \
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp); \
} while (0)
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx64 "]" #define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx64 "]"
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid #define PROTOCOL_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
......
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