This module includes functions for signal jamming detection feature.
Typedefs |
|
| typedef void(* | otJamDetectionCallback ) (bool aJamState, void *aContext) |
|
This function pointer is called if signal jam detection is enabled and a jam is detected.
|
|
Functions |
|
| otError | otJamDetectionSetRssiThreshold ( otInstance *aInstance, int8_t aRssiThreshold) |
|
Set the Jam Detection RSSI Threshold (in dBm).
|
|
| int8_t | otJamDetectionGetRssiThreshold ( otInstance *aInstance) |
|
Get the Jam Detection RSSI Threshold (in dBm).
|
|
| otError | otJamDetectionSetWindow ( otInstance *aInstance, uint8_t aWindow) |
|
Set the Jam Detection Detection Window (in seconds).
|
|
| uint8_t | otJamDetectionGetWindow ( otInstance *aInstance) |
|
Get the Jam Detection Detection Window (in seconds).
|
|
| otError | otJamDetectionSetBusyPeriod ( otInstance *aInstance, uint8_t aBusyPeriod) |
|
Set the Jam Detection Busy Period (in seconds).
|
|
| uint8_t | otJamDetectionGetBusyPeriod ( otInstance *aInstance) |
|
Get the Jam Detection Busy Period (in seconds)
|
|
| otError | otJamDetectionStart ( otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext) |
|
Start the jamming detection.
|
|
| otError | otJamDetectionStop ( otInstance *aInstance) |
|
Stop the jamming detection.
|
|
| bool | otJamDetectionIsEnabled ( otInstance *aInstance) |
|
Get the Jam Detection Status (enabled/disabled)
|
|
| bool | otJamDetectionGetState ( otInstance *aInstance) |
|
Get the Jam Detection State.
|
|
| uint64_t | otJamDetectionGetHistoryBitmap ( otInstance *aInstance) |
|
Get the current history bitmap.
|
|
Detailed Description
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.
Typedef Documentation
◆ otJamDetectionCallback
| 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] aJamStateCurrent jam state ( trueif jam is detected,falseotherwise).[in] aContextA pointer to application-specific context.
Function Documentation
◆ otJamDetectionGetBusyPeriod()
| uint8_t otJamDetectionGetBusyPeriod | ( | otInstance * |
aInstance
|
) |
Get the Jam Detection Busy Period (in seconds)
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Jam Detection Busy Period.
◆ otJamDetectionGetHistoryBitmap()
| 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] aInstanceA pointer to an OpenThread instance.
- Returns
- The current history bitmap.
◆ otJamDetectionGetRssiThreshold()
| int8_t otJamDetectionGetRssiThreshold | ( | otInstance * |
aInstance
|
) |
Get the Jam Detection RSSI Threshold (in dBm).
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Jam Detection RSSI Threshold.
◆ otJamDetectionGetState()
| bool otJamDetectionGetState | ( | otInstance * |
aInstance
|
) |
Get the Jam Detection State.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
-
The Jam Detection state (
truejam is detected, `false' otherwise).
◆ otJamDetectionGetWindow()
| uint8_t otJamDetectionGetWindow | ( | otInstance * |
aInstance
|
) |
Get the Jam Detection Detection Window (in seconds).
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Jam Detection Window.
◆ otJamDetectionIsEnabled()
| bool otJamDetectionIsEnabled | ( | otInstance * |
aInstance
|
) |
Get the Jam Detection Status (enabled/disabled)
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The Jam Detection status (true if enabled, false otherwise).
◆ otJamDetectionSetBusyPeriod()
| otError otJamDetectionSetBusyPeriod | ( | otInstance * |
aInstance,
|
| uint8_t |
aBusyPeriod
|
||
| ) |
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] aInstanceA pointer to an OpenThread instance. [in] aBusyPeriodThe Jam Detection busy period (should be non-zero and less than or equal to Jam Detection Window)
- Return values
-
OT_ERROR_NONESuccessfully set the window. OT_ERROR_INVALID_ARGSThe given input is not within the valid range.
◆ otJamDetectionSetRssiThreshold()
| otError otJamDetectionSetRssiThreshold | ( | otInstance * |
aInstance,
|
| int8_t |
aRssiThreshold
|
||
| ) |
Set the Jam Detection RSSI Threshold (in dBm).
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aRssiThresholdThe RSSI threshold.
- Return values
-
OT_ERROR_NONESuccessfully set the threshold.
◆ otJamDetectionSetWindow()
| otError otJamDetectionSetWindow | ( | otInstance * |
aInstance,
|
| uint8_t |
aWindow
|
||
| ) |
Set the Jam Detection Detection Window (in seconds).
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aWindowThe Jam Detection window (valid range is 1 to 63)
- Return values
-
OT_ERROR_NONESuccessfully set the window. OT_ERROR_INVALID_ARGSThe given input parameter not within valid range (1-63)
◆ otJamDetectionStart()
| otError otJamDetectionStart | ( | otInstance * |
aInstance,
|
| otJamDetectionCallback |
aCallback,
|
||
| void * |
aContext
|
||
| ) |
Start the jamming detection.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aCallbackA pointer to a function called to notify of jamming state change. [in] aContextA pointer to application-specific context.
- Return values
-
OT_ERROR_NONESuccessfully started the jamming detection. OT_ERROR_ALREADYJam detection has been started before.
◆ otJamDetectionStop()
| otError otJamDetectionStop | ( | otInstance * |
aInstance
|
) |
Stop the jamming detection.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Return values
-
OT_ERROR_NONESuccessfully stopped the jamming detection. OT_ERROR_ALREADYJam detection is already stopped.