#define HARQ_FAIL 1
#define HARQ_NOT_PRESENT 3
-/* events */
-#define EVENT_RACH_IND_TO_MAC 0
-#define EVENT_CRC_IND_TO_MAC 1
-#define EVENT_RX_DATA_IND_TO_MAC 2
-#define EVENT_STOP_IND_TO_MAC 3
-#define EVENT_SLOT_IND_TO_MAC 4
-#define EVENT_UCI_IND_TO_MAC 5
+/* Events */
+#define EVENT_RACH_IND_TO_MAC 1
+#define EVENT_CRC_IND_TO_MAC 2
+#define EVENT_RX_DATA_IND_TO_MAC 3
+#define EVENT_STOP_IND_TO_MAC 4
+#define EVENT_SLOT_IND_TO_MAC 5
+#define EVENT_UCI_IND_TO_MAC 6
typedef struct rachPreamInfo
{
typedef struct rachInd
{
uint16_t cellId;
- SlotIndInfo timingInfo;
+ SlotTimingInfo timingInfo;
uint8_t numPdu;
RachPduInfo rachPdu[MAX_RACH_PDU_PER_SLOT];
}RachInd;
typedef struct crcInd
{
uint16_t cellId;
- SlotIndInfo timingInfo;
+ SlotTimingInfo timingInfo;
uint16_t numCrc;
CrcInfo crcInfo[MAX_CRCS_PER_SLOT];
}CrcInd;
typedef struct
{
uint16_t cellId;
- SlotIndInfo timingInfo;
+ SlotTimingInfo timingInfo;
uint16_t numPdus;
RxDataIndPdu pdus[MAX_ULSCH_PDUS_PER_TTI];
}RxDataInd;
uint16_t crnti;
uint16_t timingAdvance;
uint16_t rssi;
- uint8_t uciBits[MAX_UCI_BIT_PER_TTI_IN_BYTES];
SrInfoF0F1 srInfo;
HarqInfoF0F1 harqInfo;
}UciPucchF0F1;
typedef struct
{
uint16_t cellId;
- SlotIndInfo slotInd;
+ SlotTimingInfo slotInd;
uint16_t numUcis;
UciIndPduInfo pdus[MAX_UCI_PDUS_PER_TTI];
}UciInd;
-typedef uint8_t (*packSlotIndMsg)(Pst *pst, SlotIndInfo *slotInd);
-typedef uint8_t (*packRachIndMsg)(Pst *pst, RachInd *rachInd);
-typedef uint8_t (*packCrcIndMsg)(Pst *pst, CrcInd *crcInd);
-typedef uint8_t (*packRxDataIndMsg)(Pst *pst, RxDataInd *rxDataInd);
-typedef uint8_t (*packStopIndMsg)(Pst *pst, uint16_t cellId);
-typedef uint8_t (*packMacUciIndMsg)(Pst *pst, UciInd *uciInd);
+typedef uint8_t (*SlotIndFunc)(Pst *pst, SlotTimingInfo *slotInd);
+typedef uint8_t (*RachIndFunc)(Pst *pst, RachInd *rachInd);
+typedef uint8_t (*CrcIndFunc)(Pst *pst, CrcInd *crcInd);
+typedef uint8_t (*RxDataIndFunc)(Pst *pst, RxDataInd *rxDataInd);
+typedef uint8_t (*StopIndFunc)(Pst *pst, uint16_t *cellId);
+typedef uint8_t (*UciIndFunc)(Pst *pst, UciInd *uciInd);
-uint8_t packLcSlotInd (Pst *pst, SlotIndInfo *slotInd);
-uint8_t packLwlcSlotInd (Pst *pst, SlotIndInfo *slotInd);
-uint8_t fapiMacSlotInd(Pst *pst, SlotIndInfo *slotInd);
+uint8_t packSlotInd (Pst *pst, SlotTimingInfo *slotInd);
+uint8_t unpackSlotInd(SlotIndFunc func, Pst *pst, Buffer *mBuf);
+uint8_t fapiMacSlotInd(Pst *pst, SlotTimingInfo *slotInd);
uint8_t packRachInd(Pst *pst, RachInd *rachInd);
+uint8_t unpackRachInd(RachIndFunc func, Pst *pst, Buffer *mBuf);
uint8_t fapiMacRachInd(Pst *pst, RachInd *rachInd);
uint8_t packCrcInd(Pst *pst, CrcInd *crcInd);
+uint8_t unpackCrcInd(CrcIndFunc func, Pst *pst, Buffer *mBuf);
uint8_t fapiMacCrcInd(Pst *pst, CrcInd *crcInd);
uint8_t packRxDataInd(Pst *pst, RxDataInd *rxDataInd);
+uint8_t unpackRxDataInd(RxDataIndFunc func, Pst *pst, Buffer *mBuf);
uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd);
-uint8_t packStopInd(Pst *pst, uint16_t cellId);
-uint8_t fapiMacStopInd(Pst *pst, uint16_t cellId);
-uint8_t packMacUciInd(Pst *pst, UciInd *uciInd);
+uint8_t packStopInd(Pst *pst, uint16_t *cellId);
+uint8_t unpackStopInd(StopIndFunc func, Pst *pst, Buffer *mBuf);
+uint8_t fapiMacStopInd(Pst *pst, uint16_t *cellId);
+uint8_t packUciInd(Pst *pst, UciInd *uciInd);
+uint8_t unpackUciInd(UciIndFunc func, Pst *pst, Buffer *mBuf);
uint8_t FapiMacUciInd(Pst *pst, UciInd *uciInd);
#endif