nRF5 SDK for Thread and Zigbee v1.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Jam Detection

This module includes functions for signal jamming detection feature. More...

Typedefs

typedef void(* otJamDetectionCallback )(bool aJamState, void *aContext)
 

Functions

otError otJamDetectionSetRssiThreshold (otInstance *aInstance, int8_t aRssiThreshold)
 
int8_t otJamDetectionGetRssiThreshold (otInstance *aInstance)
 
otError otJamDetectionSetWindow (otInstance *aInstance, uint8_t aWindow)
 
uint8_t otJamDetectionGetWindow (otInstance *aInstance)
 
otError otJamDetectionSetBusyPeriod (otInstance *aInstance, uint8_t aBusyPeriod)
 
uint8_t otJamDetectionGetBusyPeriod (otInstance *aInstance)
 
otError otJamDetectionStart (otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext)
 
otError otJamDetectionStop (otInstance *aInstance)
 
bool otJamDetectionIsEnabled (otInstance *aInstance)
 
bool otJamDetectionGetState (otInstance *aInstance)
 
uint64_t otJamDetectionGetHistoryBitmap (otInstance *aInstance)
 

Detailed Description

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 Documentation

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 (true if jam is detected, false otherwise).
[in]aContextA pointer to application-specific context.

Function Documentation

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
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.
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.
bool otJamDetectionGetState ( otInstance aInstance)

Get the Jam Detection State

Parameters
[in]aInstanceA 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]aInstanceA pointer to an OpenThread instance.
Returns
The Jam Detection Window.
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).
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.
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.
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)
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.
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.