Jam Detection#
This module includes functions for signal jamming detection feature.
The functions in this module are available when jam-detection feature (OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE
) is enabled.
Typedefs#
This function pointer is called if signal jam detection is enabled and a jam is detected.
Functions#
Set the Jam Detection RSSI Threshold (in dBm).
Get the Jam Detection RSSI Threshold (in dBm).
Set the Jam Detection Detection Window (in seconds).
Get the Jam Detection Detection Window (in seconds).
Set the Jam Detection Busy Period (in seconds).
Get the Jam Detection Busy Period (in seconds)
Start the jamming detection.
Stop the jamming detection.
Get the Jam Detection Status (enabled/disabled)
Get the Jam Detection State.
Get the current history bitmap.
Typedef Documentation#
otJamDetectionCallback#
typedef void(* otJamDetectionCallback) (bool aJamState, void *aContext) )(bool aJamState, void *aContext)
This function pointer is called if signal jam detection is enabled and a jam is detected.
[in] | aJamState | Current jam state ( |
[in] | aContext | A pointer to application-specific context. |
64
of file include/openthread/jam_detection.h
Function Documentation#
otJamDetectionSetRssiThreshold#
otError otJamDetectionSetRssiThreshold (otInstance * aInstance, int8_t aRssiThreshold)
Set the Jam Detection RSSI Threshold (in dBm).
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRssiThreshold | The RSSI threshold. |
75
of file include/openthread/jam_detection.h
otJamDetectionGetRssiThreshold#
int8_t otJamDetectionGetRssiThreshold (otInstance * aInstance)
Get the Jam Detection RSSI Threshold (in dBm).
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Jam Detection RSSI Threshold.
84
of file include/openthread/jam_detection.h
otJamDetectionSetWindow#
otError otJamDetectionSetWindow (otInstance * aInstance, uint8_t aWindow)
Set the Jam Detection Detection Window (in seconds).
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aWindow | The Jam Detection window (valid range is 1 to 63) |
96
of file include/openthread/jam_detection.h
otJamDetectionGetWindow#
uint8_t otJamDetectionGetWindow (otInstance * aInstance)
Get the Jam Detection Detection Window (in seconds).
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Jam Detection Window.
106
of file include/openthread/jam_detection.h
otJamDetectionSetBusyPeriod#
otError otJamDetectionSetBusyPeriod (otInstance * aInstance, uint8_t aBusyPeriod)
Set the Jam Detection Busy Period (in seconds).
[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) |
The number of aggregate seconds within the detection window where the RSSI must be above threshold to trigger detection.
122
of file include/openthread/jam_detection.h
otJamDetectionGetBusyPeriod#
uint8_t otJamDetectionGetBusyPeriod (otInstance * aInstance)
Get the Jam Detection Busy Period (in seconds)
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Jam Detection Busy Period.
132
of file include/openthread/jam_detection.h
otJamDetectionStart#
otError otJamDetectionStart (otInstance * aInstance, otJamDetectionCallback aCallback, void * aContext)
Start the jamming detection.
[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. |
145
of file include/openthread/jam_detection.h
otJamDetectionStop#
otError otJamDetectionStop (otInstance * aInstance)
Stop the jamming detection.
[in] | aInstance | A pointer to an OpenThread instance. |
156
of file include/openthread/jam_detection.h
otJamDetectionIsEnabled#
bool otJamDetectionIsEnabled (otInstance * aInstance)
Get the Jam Detection Status (enabled/disabled)
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Jam Detection status (true if enabled, false otherwise).
166
of file include/openthread/jam_detection.h
otJamDetectionGetState#
bool otJamDetectionGetState (otInstance * aInstance)
Get the Jam Detection State.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Jam Detection state (
true
jam is detected, ‘false’ otherwise).
176
of file include/openthread/jam_detection.h
otJamDetectionGetHistoryBitmap#
uint64_t otJamDetectionGetHistoryBitmap (otInstance * aInstance)
Get the current history bitmap.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
Returns
The current history bitmap.
193
of file include/openthread/jam_detection.h