Refactor NR_UE_L2_STATE_t enum definition using X-Macro
- this change simplifies the enum definition and makes it easier to add, remove, or modify states in the future - the states are now defined in the NR_UE_L2_STATES macro, and the enum members are generated automatically from this macro
This commit is contained in:
@@ -163,12 +163,18 @@
|
||||
#define PRACH_MASK_INDEX 54
|
||||
#define RESERVED_NR_DCI 55
|
||||
|
||||
// Define the UE L2 states with X-Macro
|
||||
#define NR_UE_L2_STATES \
|
||||
UE_STATE(UE_NOT_SYNC) \
|
||||
UE_STATE(UE_SYNC) \
|
||||
UE_STATE(UE_PERFORMING_RA) \
|
||||
UE_STATE(UE_CONNECTED)
|
||||
|
||||
/*!\brief UE layer 2 status */
|
||||
typedef enum {
|
||||
UE_NOT_SYNC = 0,
|
||||
UE_SYNC,
|
||||
UE_PERFORMING_RA,
|
||||
UE_CONNECTED
|
||||
#define UE_STATE(state) state,
|
||||
NR_UE_L2_STATES
|
||||
#undef UE_STATE
|
||||
} NR_UE_L2_STATE_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user