print enhance: check start time at the beginning of linklayer proc, avoiding wired print message.
This commit is contained in:
@@ -1128,15 +1128,6 @@ static int32_t Linklayer_Routine(L2_INST *instPtr)
|
|||||||
ASSERT(instPtr != NULL);
|
ASSERT(instPtr != NULL);
|
||||||
int32_t Status;
|
int32_t Status;
|
||||||
uint32_t tableIndx, entryIndx;
|
uint32_t tableIndx, entryIndx;
|
||||||
|
|
||||||
// FIXME: Consider time wrapping.
|
|
||||||
uint32_t nextTimeUnit = (TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1) / L2_SLOTS_PER_FRAME;
|
|
||||||
if (nextTimeUnit < instPtr->netStartTime)
|
|
||||||
{
|
|
||||||
DBG_WARNING("Linklayer not start yet, next time unit: %u, start time unit: %u.\n",
|
|
||||||
nextTimeUnit, instPtr->netStartTime);
|
|
||||||
return EIGNORE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine which routine entry is going to be performed.
|
// Determine which routine entry is going to be performed.
|
||||||
tableIndx = L2_GetNextFrameNum(instPtr) % instPtr->rtneConfig.rtnePrd;
|
tableIndx = L2_GetNextFrameNum(instPtr) % instPtr->rtneConfig.rtnePrd;
|
||||||
@@ -1217,6 +1208,15 @@ int32_t Linklayer_Proc(L2_INST *instPtr)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Consider time wrapping.
|
||||||
|
uint32_t nextTimeUnit = (TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1) / L2_SLOTS_PER_FRAME;
|
||||||
|
if (nextTimeUnit < instPtr->netStartTime)
|
||||||
|
{
|
||||||
|
DBG_WARNING("Linklayer not start yet, next time unit: %u, start time unit: %u.\n",
|
||||||
|
nextTimeUnit, instPtr->netStartTime);
|
||||||
|
return EIGNORE;
|
||||||
|
}
|
||||||
|
|
||||||
// Update slot number.
|
// Update slot number.
|
||||||
L2_UpdateSlotNum(instPtr);
|
L2_UpdateSlotNum(instPtr);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user