print enhance: check start time at the beginning of linklayer proc, avoiding wired print message.
This commit is contained in:
@@ -1129,15 +1129,6 @@ static int32_t Linklayer_Routine(L2_INST *instPtr)
|
||||
int32_t Status;
|
||||
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.
|
||||
tableIndx = L2_GetNextFrameNum(instPtr) % instPtr->rtneConfig.rtnePrd;
|
||||
entryIndx = L2_GetNextSlotNum(instPtr);
|
||||
@@ -1217,6 +1208,15 @@ int32_t Linklayer_Proc(L2_INST *instPtr)
|
||||
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.
|
||||
L2_UpdateSlotNum(instPtr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user