This module includes functions for signal jamming detection feature.
More...
This module includes functions for signal jamming detection feature.
The functions in this module are available when jam-detection feature (OPENTHREAD_ENABLE_JAM_DETECTION
) is enabled.
typedef void(* otJamDetectionCallback)(bool aJamState, void *aContext) |
This function pointer is called if signal jam detection is enabled and a jam is detected.
- Parameters
-
[in] | aJamState | Current jam state (true if jam is detected, false otherwise). |
[in] | aContext | A pointer to application-specific context. |
uint8_t otJamDetectionGetBusyPeriod |
( |
otInstance * |
aInstance | ) |
|
Get the Jam Detection Busy Period (in seconds)
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Jam Detection Busy Period.
uint64_t otJamDetectionGetHistoryBitmap |
( |
otInstance * |
aInstance | ) |
|
Get the current history bitmap.
This value provides information about current state of jamming detection module for monitoring/debugging purpose. It returns a 64-bit value where 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.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The current history bitmap.
int8_t otJamDetectionGetRssiThreshold |
( |
otInstance * |
aInstance | ) |
|
Get the Jam Detection RSSI Threshold (in dBm).
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Jam Detection RSSI Threshold.
bool otJamDetectionGetState |
( |
otInstance * |
aInstance | ) |
|
Get the Jam Detection State
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Jam Detection state (
true
jam is detected, `false' otherwise).
uint8_t otJamDetectionGetWindow |
( |
otInstance * |
aInstance | ) |
|
Get the Jam Detection Detection Window (in seconds).
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Jam Detection Window.
bool otJamDetectionIsEnabled |
( |
otInstance * |
aInstance | ) |
|
Get the Jam Detection Status (enabled/disabled)
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Returns
- The Jam Detection status (true if enabled, false otherwise).
Set the Jam Detection Busy Period (in seconds).
The number of aggregate seconds within the detection window where the RSSI must be above threshold to trigger detection.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aBusyPeriod | The Jam Detection busy period (should be non-zero and less than or equal to Jam Detection Window) |
- Return values
-
OT_ERROR_NONE | Successfully set the window. |
OT_ERROR_INVALID_ARGS | The given input is not within the valid range. |
otError otJamDetectionSetRssiThreshold |
( |
otInstance * |
aInstance, |
|
|
int8_t |
aRssiThreshold |
|
) |
| |
Set the Jam Detection RSSI Threshold (in dBm).
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRssiThreshold | The RSSI threshold. |
- Return values
-
OT_ERROR_NONE | Successfully set the threshold. |
Set the Jam Detection Detection Window (in seconds).
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aWindow | The Jam Detection window (valid range is 1 to 63) |
- Return values
-
OT_ERROR_NONE | Successfully set the window. |
OT_ERROR_INVALID_ARGS | The given input parameter not within valid range (1-63) |
Start the jamming detection.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aCallback | A pointer to a function called to notify of jamming state change. |
[in] | aContext | A pointer to application-specific context. |
- Return values
-
OT_ERROR_NONE | Successfully started the jamming detection. |
OT_ERROR_ALREADY | Jam detection has been started before. |
Stop the jamming detection.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
- Return values
-
OT_ERROR_NONE | Successfully stopped the jamming detection. |
OT_ERROR_ALREADY | Jam detection is already stopped. |