otRadioAvailability

#include <openthread/platform/radio.h>

Represents the radio availability schedule.

Summary

The radio availability schedule is a periodic map of mNumSlots slots, each lasting mSlotDuration. The schedule starts at mStartTime and repeats every mNumSlots slots. The schedule duration (mNumSlots multiplied by mSlotDuration) MUST NOT be longer than OT_RADIO_AVAILABILITY_MAX_DURATION_US.

The bitmaps are MSB-first: slot i corresponds to bit 7 - (i % 8) of byte i / 8, i.e., (bitmap[i / 8] >> (7 - (i % 8))) & 1. Only the first mNumSlots bits of each bitmap are used. The remaining bits SHOULD be set to 0 and are ignored by OpenThread.

In mAvailableSlots, a bit value of 1 indicates that the slot is available for Thread, and 0 indicates that it is unavailable (e.g., occupied by BT or 2.4GHz WiFi).

In mPreferredSlots, a bit value of 1 indicates that the slot is preferred for Thread, and 0 indicates that it is not preferred. The preferred slots MUST be a subset of the available slots, i.e., a bit MUST be 0 in mPreferredSlots if the corresponding bit is 0 in mAvailableSlots. OpenThread treats a slot as preferred only if it is set in both bitmaps. If there is no preference among the available slots, mPreferredSlots MUST be set to the same value as mAvailableSlots.

Public attributes

mAvailableSlots[OT_RADIO_AVAILABILITY_MAX_BITMAP_SIZE]
uint8_t
The available radio slots bitmap.
mNumSlots
uint8_t
The number of slots. Value 0 indicates always available.
mPreferredSlots[OT_RADIO_AVAILABILITY_MAX_BITMAP_SIZE]
uint8_t
The preferred radio slots bitmap.
mSlotDuration
The duration of each slot.
mStartTime
Local radio clock time in microseconds when the schedule starts.

Public attributes

mAvailableSlots

uint8_t otRadioAvailability::mAvailableSlots[OT_RADIO_AVAILABILITY_MAX_BITMAP_SIZE]

The available radio slots bitmap.

mNumSlots

uint8_t otRadioAvailability::mNumSlots

The number of slots. Value 0 indicates always available.

mPreferredSlots

uint8_t otRadioAvailability::mPreferredSlots[OT_RADIO_AVAILABILITY_MAX_BITMAP_SIZE]

The preferred radio slots bitmap.

mSlotDuration

otRadioAvailabilitySlotDuration otRadioAvailability::mSlotDuration

The duration of each slot.

mStartTime

otRadioTime64 otRadioAvailability::mStartTime

Local radio clock time in microseconds when the schedule starts.

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.