forked from gatsby/df_datalink
feat: 调整节点ttl逻辑, 启用自动重入网; 根据物理层修改时间调整值
This commit is contained in:
@@ -1053,12 +1053,12 @@ static int32_t Linklayer_Routine(L2_INST *instPtr)
|
||||
if (L2_GetMainState(instPtr) != L2_INIT_STATE)
|
||||
{
|
||||
L2_IterDeleteNode(instPtr->nodeList, IsNodeConnected);
|
||||
if (L2_GetNodeListLen(instPtr->nodeList) < instPtr->config.netScale - 1)
|
||||
if (L2_GetNodeType(instPtr) == L2_NODE_MEMBER && (L2_GetNodeById(instPtr->nodeList, instPtr->myInfo.headId) == NULL))
|
||||
{
|
||||
// reset scan process
|
||||
L2_EVENT l2Event;
|
||||
// Assert Net-Setup Done.
|
||||
l2Event.event = (L2_GetNodeType(instPtr) == L2_NODE_HEAD) ? L2_EV_LOST_NODE : L2_EV_LOST_CXN;
|
||||
l2Event.event = L2_EV_LOST_CXN;
|
||||
l2Event.msg = NULL;
|
||||
AssertL2Event(instPtr, &l2Event);
|
||||
}
|
||||
@@ -1323,15 +1323,13 @@ int32_t L2_SetupNextSlot(L2_INST *instPtr, L2_TOR_TYPE txrxMode, L2_FRAME_TYPE f
|
||||
DBG_ERROR("Physical set listening timeout failed, with error code: %" PRId32 "\n", Status);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
TIME_WORD pollTime = {0, 0};
|
||||
pollTime.int_part = TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1;
|
||||
Status = Phy_SetTimeWord(phyRef, &pollTime, PHY_TIME_WORD_POLL);
|
||||
if (Status != SUCCESS)
|
||||
{
|
||||
TIME_WORD pollTime = {0, 0};
|
||||
pollTime.int_part = TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1;
|
||||
Status = Phy_SetTimeWord(phyRef, &pollTime, PHY_TIME_WORD_POLL);
|
||||
if (Status != SUCCESS)
|
||||
{
|
||||
DBG_ERROR("Physical set poll time failed, with error code: %" PRId32 "\n", Status);
|
||||
}
|
||||
DBG_ERROR("Physical set poll time failed, with error code: %" PRId32 "\n", Status);
|
||||
}
|
||||
|
||||
PHY_TOR_TYPE tor;
|
||||
|
||||
Reference in New Issue
Block a user