mirror of
https://github.com/espressif/openthread.git
synced 2026-09-10 19:20:06 +00:00
Feature/ot plat rssi (#411)
* rename otPlatRadioGetNoiseFloor to otPlatRadioGetRssi * update cli README with singleton command
This commit is contained in:
committed by
Jonathan Hui
parent
aabca8b299
commit
a0c6f50051
@@ -300,7 +300,7 @@ RadioPacket *otPlatRadioGetTransmitBuffer(void)
|
||||
return &sTransmitFrame;
|
||||
}
|
||||
|
||||
int8_t otPlatRadioGetNoiseFloor(void)
|
||||
int8_t otPlatRadioGetRssi(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ RadioPacket *otPlatRadioGetTransmitBuffer(void)
|
||||
return &sTransmitFrame;
|
||||
}
|
||||
|
||||
int8_t otPlatRadioGetNoiseFloor(void)
|
||||
int8_t otPlatRadioGetRssi(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -272,9 +272,9 @@ extern void otPlatRadioTransmitDone(bool aFramePending, ThreadError aError);
|
||||
/**
|
||||
* Get the most recent RSSI measurement.
|
||||
*
|
||||
* @returns The noise floor value in dBm when the noise floor value is valid. 127 when noise floor value is invalid.
|
||||
* @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid.
|
||||
*/
|
||||
int8_t otPlatRadioGetNoiseFloor(void);
|
||||
int8_t otPlatRadioGetRssi(void);
|
||||
|
||||
/**
|
||||
* Get the radio capabilities.
|
||||
|
||||
@@ -40,6 +40,7 @@ OpenThread test scripts use the CLI to execute test cases.
|
||||
* [router](#router)
|
||||
* [routerupgradethreshold](#routerupgradethreshold)
|
||||
* [scan](#scan)
|
||||
* [singleton](#singleton)
|
||||
* [state](#state)
|
||||
* [thread](#thread)
|
||||
* [version](#version)
|
||||
@@ -734,6 +735,15 @@ Perform an IEEE 802.15.4 Active Scan.
|
||||
Done
|
||||
```
|
||||
|
||||
### singleton
|
||||
Return true when there are no other nodes in the network, otherwise return false.
|
||||
|
||||
```bash
|
||||
> singleton
|
||||
true or false
|
||||
Done
|
||||
```
|
||||
|
||||
### thread start
|
||||
|
||||
Enable Thread protocol operation and attach to a Thread network.
|
||||
|
||||
@@ -1264,7 +1264,7 @@ ThreadError NcpBase::GetPropertyHandler_PHY_RSSI(uint8_t header, spinel_prop_key
|
||||
SPINEL_CMD_PROP_VALUE_IS,
|
||||
key,
|
||||
SPINEL_DATATYPE_INT8_S,
|
||||
otPlatRadioGetNoiseFloor()
|
||||
otPlatRadioGetRssi()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user