Expose LQI from radio up through Thread stack. (#70)

* Add an LQI field to the radio packet structure.
* Add an LQI field to the ThreadMessageInfo.
* Add an LQI field to the scan result.
* Print LQI value in CLI scan result.
This commit is contained in:
Jonathan Hui
2016-05-26 15:08:11 -07:00
parent e3f0e69ea6
commit 25f1fe5a21
9 changed files with 30 additions and 5 deletions
+1
View File
@@ -116,6 +116,7 @@ typedef struct otActiveScanResult
uint16_t mPanId; ///< IEEE 802.15.4 PAN ID
uint8_t mChannel; ///< IEEE 802.15.4 Channel
int8_t mRssi; ///< RSSI (dBm)
uint8_t mLqi; ///< LQI
uint8_t mVersion : 4; ///< Version
bool mIsNative : 1; ///< Native Commissioner flag
bool mIsJoinable : 1; ///< Joining Permitted flag
+3
View File
@@ -75,6 +75,8 @@ enum
kPhyBitsPerOctet = 8,
kPhyUsPerSymbol = ((kPhyBitsPerOctet / kPhySymbolsPerOctet) * 1000000) / kPhyBitRate,
kPhyNoLqi = 0, ///< LQI measurement not supported
};
/**
@@ -97,6 +99,7 @@ typedef struct RadioPacket
uint8_t mPsdu[kMaxPHYPacketSize]; ///< The PSDU.
uint8_t mChannel; ///< Channel used to transmit/receive the frame.
int8_t mPower; ///< Transmit/receive power in dBm.
uint8_t mLqi; ///< Link Quality Indicator for received frames.
bool mSecurityValid; ///< Security Enabled flag is set and frame passes security checks.
} RadioPacket;