Link

This module includes functions that control link-layer configuration.

Summary

Enumerations

otMacFilterAddressMode{
  OT_MAC_FILTER_ADDRESS_MODE_DISABLED,
  OT_MAC_FILTER_ADDRESS_MODE_ALLOWLIST,
  OT_MAC_FILTER_ADDRESS_MODE_DENYLIST
}
enum
Defines address mode of the mac filter.

Typedefs

otActiveScanResult typedef
Represents a received IEEE 802.15.4 Beacon.
otEnergyScanResult typedef
Represents an energy scan result.
otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext) typedef
void(*
Pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or the scan completes.
otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext) typedef
void(*
Pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the scan completes.
otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext) typedef
void(*
Pointer is called when an IEEE 802.15.4 frame is received.
otMacCounters typedef
struct otMacCounters
Represents the MAC layer counters.
otMacFilterAddressMode typedef
Defines address mode of the mac filter.
otMacFilterEntry typedef
Represents a Mac Filter entry.
otMacFilterIterator typedef
uint8_t
Used to iterate through mac filter entries.

Functions

otLinkActiveScan(otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleActiveScanResult aCallback, void *aCallbackContext)
Starts an IEEE 802.15.4 Active Scan.
otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality)
int8_t
Converts link quality to typical received signal strength.
otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss)
uint8_t
Converts received signal strength to link quality.
otLinkEnergyScan(otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleEnergyScanResult aCallback, void *aCallbackContext)
Starts an IEEE 802.15.4 Energy Scan.
otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
Adds an Extended Address to MAC filter.
otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss)
Adds the specified Extended Address to the RssIn list (or modifies an existing address in the RssIn list) and sets the received signal strength (in dBm) entry for messages from that address.
otLinkFilterClearAddresses(otInstance *aInstance)
void
Clears all the Extended Addresses from MAC filter.
otLinkFilterClearAllRssIn(otInstance *aInstance)
void
Clears all the received signal strength (rss) and link quality indicator (lqi) entries (including defaults) from the RssIn list.
otLinkFilterClearDefaultRssIn(otInstance *aInstance)
void
Clears any previously set default received signal strength (in dBm) on MAC Filter.
otLinkFilterGetAddressMode(otInstance *aInstance)
Gets the address mode of MAC filter.
otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
Gets an in-use address filter entry.
otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
Gets an in-use RssIn filter entry.
otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
void
Removes an Extended Address from MAC filter.
otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddress)
void
Removes the specified Extended Address from the RssIn list.
otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aMode)
void
Sets the address mode of MAC filter.
otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss)
void
Sets the default received signal strength (in dBm) on MAC Filter.
otLinkGetAlternateShortAddress(otInstance *aInstance)
Get the IEEE 802.15.4 alternate short address.
otLinkGetCcaFailureRate(otInstance *aInstance)
uint16_t
Returns the current CCA (Clear Channel Assessment) failure rate.
otLinkGetChannel(otInstance *aInstance)
uint8_t
Get the IEEE 802.15.4 channel.
otLinkGetCounters(otInstance *aInstance)
const otMacCounters *
Get the MAC layer counters.
otLinkGetCslChannel(otInstance *aInstance)
uint8_t
Gets the CSL channel.
otLinkGetCslPeriod(otInstance *aInstance)
uint32_t
Gets the CSL period in microseconds.
otLinkGetCslTimeout(otInstance *aInstance)
uint32_t
Gets the CSL timeout.
otLinkGetExtendedAddress(otInstance *aInstance)
const otExtAddress *
Gets the IEEE 802.15.4 Extended Address.
otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64)
void
Get the factory-assigned IEEE EUI-64.
otLinkGetFrameCounter(otInstance *aInstance)
uint32_t
Gets the current MAC frame counter value.
otLinkGetMaxFrameRetriesDirect(otInstance *aInstance)
uint8_t
Returns the maximum number of frame retries during direct transmission.
otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance)
uint8_t
Returns the maximum number of frame retries during indirect transmission.
otLinkGetPanId(otInstance *aInstance)
Get the IEEE 802.15.4 PAN ID.
otLinkGetPollPeriod(otInstance *aInstance)
uint32_t
Get the data poll period of sleepy end device.
otLinkGetRegion(otInstance *aInstance, uint16_t *aRegionCode)
Get the region code.
otLinkGetShortAddress(otInstance *aInstance)
Get the IEEE 802.15.4 Short Address.
otLinkGetSupportedChannelMask(otInstance *aInstance)
uint32_t
Get the supported channel mask of MAC layer.
otLinkGetTxDirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries)
const uint32_t *
Gets histogram of retries for a single direct packet until success.
otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries)
const uint32_t *
Gets histogram of retries for a single indirect packet until success.
otLinkGetWakeupChannel(otInstance *aInstance)
uint8_t
Gets the Wake-up channel.
otLinkGetWakeupListenParameters(otInstance *aInstance, uint32_t *aInterval, uint32_t *aDuration)
void
Get the wake-up listen parameters.
otLinkIsActiveScanInProgress(otInstance *aInstance)
bool
Indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
otLinkIsCslEnabled(otInstance *aInstance)
bool
Indicates whether or not CSL is enabled.
otLinkIsCslSupported(otInstance *aInstance)
bool
Indicates whether the device is connected to a parent which supports CSL.
otLinkIsEnabled(otInstance *aInstance)
bool
Indicates whether or not the link layer is enabled.
otLinkIsEnergyScanInProgress(otInstance *aInstance)
bool
Indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
otLinkIsInTransmitState(otInstance *aInstance)
bool
Indicates whether or not an IEEE 802.15.4 MAC is in the transmit state.
otLinkIsPromiscuous(otInstance *aInstance)
bool
Indicates whether or not promiscuous mode is enabled at the link layer.
otLinkIsRadioFilterEnabled(otInstance *aInstance)
bool
Indicates whether the IEEE 802.15.4 radio filter is enabled or not.
otLinkIsWakeupListenEnabled(otInstance *aInstance)
bool
Returns whether listening for wake-up frames is enabled.
otLinkResetCounters(otInstance *aInstance)
void
Resets the MAC layer counters.
otLinkResetTxRetrySuccessHistogram(otInstance *aInstance)
void
Clears histogram statistics for direct and indirect transmissions.
otLinkSendDataRequest(otInstance *aInstance)
Enqueues an IEEE 802.15.4 Data Request message for transmission.
otLinkSendEmptyData(otInstance *aInstance)
Instructs the device to send an empty IEEE 802.15.4 data frame.
otLinkSetChannel(otInstance *aInstance, uint8_t aChannel)
Set the IEEE 802.15.4 channel.
otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel)
Sets the CSL channel.
otLinkSetCslPeriod(otInstance *aInstance, uint32_t aPeriod)
Sets the CSL period in microseconds.
otLinkSetCslTimeout(otInstance *aInstance, uint32_t aTimeout)
Sets the CSL timeout in seconds.
otLinkSetEnabled(otInstance *aInstance, bool aEnable)
Enables or disables the link layer.
otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
Sets the IEEE 802.15.4 Extended Address.
otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect)
void
Sets the maximum number of frame retries during direct transmission.
otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect)
void
Sets the maximum number of frame retries during indirect transmission.
otLinkSetPanId(otInstance *aInstance, otPanId aPanId)
Set the IEEE 802.15.4 PAN ID.
otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext)
void
Registers a callback to provide received raw IEEE 802.15.4 frames.
otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod)
Set/clear user-specified/external data poll period for sleepy end device.
otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous)
Enables or disables the link layer promiscuous mode.
otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled)
void
Enables/disables IEEE 802.15.4 radio filter mode.
otLinkSetRegion(otInstance *aInstance, uint16_t aRegionCode)
Sets the region code.
otLinkSetRxOnWhenIdle(otInstance *aInstance, bool aRxOnWhenIdle)
Sets the rx-on-when-idle state.
otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMask)
Set the supported channel mask of MAC layer.
otLinkSetWakeUpListenEnabled(otInstance *aInstance, bool aEnable)
Enables or disables listening for wake-up frames.
otLinkSetWakeupChannel(otInstance *aInstance, uint8_t aChannel)
Sets the Wake-up channel.
otLinkSetWakeupListenParameters(otInstance *aInstance, uint32_t aInterval, uint32_t aDuration)
Set the wake-up listen parameters.

Macros

OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC (160)
Represents CSL period ten symbols unit in microseconds.
OT_MAC_FILTER_FIXED_RSS_DISABLED 127
Used to indicate no fixed received signal strength was set.
OT_MAC_FILTER_ITERATOR_INIT 0
Initializer for otMacFilterIterator.
OT_US_PER_TEN_SYMBOLS OT_RADIO_TEN_SYMBOLS_TIME
Time for 10 symbols in units of microseconds.

Structs

otActiveScanResult

Represents a received IEEE 802.15.4 Beacon.

otEnergyScanResult

Represents an energy scan result.

otMacCounters

Represents the MAC layer counters.

otMacFilterEntry

Represents a Mac Filter entry.

Enumerations

Typedefs

Functions

Macros

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.