Commit 6793cb30 authored by Guido Casati's avatar Guido Casati

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
parent 4062d3dc
...@@ -163,12 +163,18 @@ ...@@ -163,12 +163,18 @@
#define PRACH_MASK_INDEX 54 #define PRACH_MASK_INDEX 54
#define RESERVED_NR_DCI 55 #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 */ /*!\brief UE layer 2 status */
typedef enum { typedef enum {
UE_NOT_SYNC = 0, #define UE_STATE(state) state,
UE_SYNC, NR_UE_L2_STATES
UE_PERFORMING_RA, #undef UE_STATE
UE_CONNECTED
} NR_UE_L2_STATE_t; } NR_UE_L2_STATE_t;
typedef enum { typedef enum {
......
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