[ncp] update JAM_DETECT_HISTORY_BITMAP to spinel uint64_t (#2404)

This commit changes the `JAM_DETECT_HISTORY_BITMAP` format to use
spinel primitive type of `uint64_t` instead of two `uint32_t`.
This commit is contained in:
Abtin Keshavarzian
2017-12-07 18:22:24 +00:00
committed by Jonathan Hui
parent a667c59af0
commit 07f4ae1ff3
3 changed files with 3 additions and 19 deletions
@@ -85,7 +85,7 @@ is larger than `PROP_JAM_DETECT_WINDOW` is undefined.
### PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP
* Type: Read-Only
* Packed-Encoding: `LL`
* Packed-Encoding: `X`
* Default Value: Implementation-specific
* RECOMMENDED for `CAP_JAM_DETECT`
@@ -95,6 +95,3 @@ each bit corresponds to one second interval starting with bit 0 for the
most recent interval and bit 63 for the oldest intervals (63 sec earlier).
The bit is set to 1 if the jamming detection module observed/detected
high signal level during the corresponding one second interval.
The value is read-only and is encoded as two `L` (uint32) values in
little-endian format (first `L` (uint32) value gives the lower bits
corresponding to more recent history).
+1 -11
View File
@@ -1396,17 +1396,7 @@ otError NcpBase::GetPropertyHandler_JAM_DETECT_BUSY(void)
otError NcpBase::GetPropertyHandler_JAM_DETECT_HISTORY_BITMAP(void)
{
otError error = OT_ERROR_NONE;
uint64_t historyBitmap = otJamDetectionGetHistoryBitmap(mInstance);
// History bitmap - bits 0-31
SuccessOrExit(error = mEncoder.WriteUint32(static_cast<uint32_t>(historyBitmap & 0xffffffff)));
// // History bitmap - bits 32-63
SuccessOrExit(error = mEncoder.WriteUint32(static_cast<uint32_t>(historyBitmap >> 32)));
exit:
return error;
return mEncoder.WriteUint64(otJamDetectionGetHistoryBitmap(mInstance));
}
otError NcpBase::SetPropertyHandler_JAM_DETECT_ENABLE(void)
+1 -4
View File
@@ -654,7 +654,7 @@ typedef enum
SPINEL_PROP_JAM_DETECT_BUSY = SPINEL_PROP_PHY_EXT__BEGIN + 4,
/// Jamming detection history bitmap (for debugging)
/** Format: `LL` (read-only)
/** Format: `X` (read-only)
*
* This value provides information about current state of jamming detection
* module for monitoring/debugging purpose. It returns a 64-bit value where
@@ -663,9 +663,6 @@ typedef enum
* The bit is set to 1 if the jamming detection module observed/detected
* high signal level during the corresponding one second interval.
*
* The value is read-only and is encoded as two uint32 values in
* little-endian format (first uint32 gives the lower bits corresponding to
* more recent history).
*/
SPINEL_PROP_JAM_DETECT_HISTORY_BITMAP
= SPINEL_PROP_PHY_EXT__BEGIN + 5,