Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b99d0bfca0 | ||
|
|
3dedebbe79 |
@@ -130,6 +130,10 @@ void L2_NodeList_Destroy(NODE_LIST *list)
|
||||
NODE_ENTRY *L2_GetNodeById(NODE_LIST *list, uint8_t nodeId)
|
||||
{
|
||||
ASSERT(list != NULL);
|
||||
if (nodeId == L2_BROADCAST_ID || nodeId == L2_NONE_ID)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
util_entry.nodeInfo.nodeId = nodeId;
|
||||
clist_node_t *node = clist_find(list, &util_entry);
|
||||
if (node == NULL)
|
||||
|
||||
@@ -608,18 +608,19 @@ int32_t L2_Scan_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
if (rtneEntry->dst == L2_GetNodeId(instPtr) || rtneEntry->dst == L2_BROADCAST_ID)
|
||||
{
|
||||
torState = L2_TOR_RX;
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->dst);
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||
}
|
||||
else if (rtneEntry->src == L2_GetNodeId(instPtr) || rtneEntry->src == L2_BROADCAST_ID)
|
||||
{
|
||||
torState = L2_TOR_TX;
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->dst);
|
||||
}
|
||||
else
|
||||
{
|
||||
torState = L2_TOR_SUSPEND;
|
||||
}
|
||||
|
||||
// Setup antenna beam
|
||||
Phy_SetBeamWidth(instPtr->config.phyInstPtr, PHY_ANT_BEAM_25);
|
||||
instPtr->log.lastBeamWidth = PHY_ANT_BEAM_25;
|
||||
if (commNode != NULL)
|
||||
@@ -641,6 +642,7 @@ int32_t L2_Scan_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntry)
|
||||
{
|
||||
torState = L2_TOR_SUSPEND;
|
||||
}
|
||||
// Setup antenna beam
|
||||
Phy_SetBeamWidth(instPtr->config.phyInstPtr, PHY_ANT_BEAM_120);
|
||||
instPtr->log.lastBeamWidth = PHY_ANT_BEAM_120;
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ int32_t L2_Service_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntr
|
||||
if (rtneEntry->src == L2_GetNodeId(instPtr))
|
||||
{
|
||||
torState = L2_TOR_TX;
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->src);
|
||||
commNode = L2_GetNodeById(instPtr->nodeList, rtneEntry->dst);
|
||||
}
|
||||
else if (rtneEntry->dst == L2_GetNodeId(instPtr))
|
||||
{
|
||||
@@ -385,6 +385,7 @@ int32_t L2_Service_Routine(L2_INST *instPtr, const L2_RTNE_TABLE_ENTRY *rtneEntr
|
||||
torState = L2_TOR_SUSPEND;
|
||||
}
|
||||
|
||||
// Setup antenna beam
|
||||
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD && commNode != NULL)
|
||||
{
|
||||
Phy_SetBeamWidth(phyRef, PHY_ANT_BEAM_25);
|
||||
|
||||
@@ -308,6 +308,8 @@ void Phy_UpdateState(PHY_INST *instPtr)
|
||||
{
|
||||
instPtr->isValid = false;
|
||||
}
|
||||
|
||||
// Logging
|
||||
instPtr->recvSlotTime.int_part = PhyRead(instPtr, TM_TARGET_H);
|
||||
instPtr->recvSlotTime.frac_part = PhyRead(instPtr, TM_TARGET_L);
|
||||
instPtr->recvFsTime.int_part = PhyRead(instPtr, FSTIME_H);
|
||||
@@ -334,7 +336,7 @@ void Phy_UpdateState(PHY_INST *instPtr)
|
||||
instPtr->phyLog.fsyncFreqCh = (PhyRead(instPtr, PHY_FRAME_SYNC_FREQEST) & PHY_FRAME_SYNC_FREQEST_CHANNEL_MASK) >> PHY_FRAME_SYNC_FREQEST_CHANNEL_SHIFT;
|
||||
instPtr->phyLog.deintlvAmpEst = PhyRead(instPtr, PHY_DEINTLV_AMPEST) & PHY_DEINTLV_AMPEST_MASK;
|
||||
memset(instPtr->phyLog.reserve, 0x00, sizeof(instPtr->phyLog.reserve));
|
||||
|
||||
// Sync logs to system monitor
|
||||
SysMonitor_UpdatePhysicalLayerLog(&(instPtr->phyLog));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#ifndef EMULATION
|
||||
#include "xbram.h"
|
||||
#include "xadcps.h"
|
||||
#include "../config/app_config.h"
|
||||
#endif
|
||||
#include "../../system_monitor.h"
|
||||
#include "../../time_ctrl/time_ctrl.h"
|
||||
|
||||
Reference in New Issue
Block a user