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#

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

Pointer is called if signal jam detection is enabled and a jam is detected.

Functions#

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).

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).

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)

otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext)

Start the jamming detection.

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.

Typedef Documentation#

otJamDetectionCallback#

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

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.


Definition at line 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).

Parameters
[in]aInstance

A pointer to an OpenThread instance.

[in]aRssiThreshold

The RSSI threshold.


Definition at line 75 of file include/openthread/jam_detection.h

otJamDetectionGetRssiThreshold#

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.


Definition at line 84 of file include/openthread/jam_detection.h

otJamDetectionSetWindow#

otError otJamDetectionSetWindow (otInstance * aInstance, uint8_t aWindow)

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)


Definition at line 96 of file include/openthread/jam_detection.h

otJamDetectionGetWindow#

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.


Definition at line 106 of file include/openthread/jam_detection.h

otJamDetectionSetBusyPeriod#

otError otJamDetectionSetBusyPeriod (otInstance * aInstance, uint8_t aBusyPeriod)

Set the Jam Detection Busy Period (in seconds).

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)

The number of aggregate seconds within the detection window where the RSSI must be above threshold to trigger detection.


Definition at line 122 of file include/openthread/jam_detection.h

otJamDetectionGetBusyPeriod#

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.


Definition at line 132 of file include/openthread/jam_detection.h

otJamDetectionStart#

otError otJamDetectionStart (otInstance * aInstance, otJamDetectionCallback aCallback, void * aContext)

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.


Definition at line 145 of file include/openthread/jam_detection.h

otJamDetectionStop#

otError otJamDetectionStop (otInstance * aInstance)

Stop the jamming detection.

Parameters
[in]aInstance

A pointer to an OpenThread instance.


Definition at line 156 of file include/openthread/jam_detection.h

otJamDetectionIsEnabled#

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).


Definition at line 166 of file include/openthread/jam_detection.h

otJamDetectionGetState#

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).


Definition at line 176 of file include/openthread/jam_detection.h

otJamDetectionGetHistoryBitmap#

uint64_t otJamDetectionGetHistoryBitmap (otInstance * aInstance)

Get the current history bitmap.

Parameters
[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.


Definition at line 193 of file include/openthread/jam_detection.h