Link

This module includes functions that control link-layer configuration.

Summary

Typedefs

otActiveScanResult typedef
This structure represents a received IEEE 802.15.4 Beacon.
otEnergyScanResult typedef
This structure represents an energy scan result.
otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext) typedef
void(*
This function 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(*
This function 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(*
This function pointer is called when an IEEE 802.15.4 frame is received.
otMacCounters typedef
struct otMacCounters
This structure represents the MAC layer counters.
otMacFilterAddressMode typedef
Defines address mode of the mac filter.
otMacFilterEntry typedef
This structure represents a Mac Filter entry.
otMacFilterIterator typedef
uint8_t
Used to iterate through mac filter entries.
otThreadLinkInfo typedef
This structure represents link-specific information for messages received from the Thread radio.

Functions

otLinkActiveScan(otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleActiveScanResult aCallback, void *aCallbackContext)
This function starts an IEEE 802.15.4 Active Scan.
otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality)
int8_t
This method converts link quality to typical received signal strength.
otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss)
uint8_t
This method converts received signal strength to link quality.
otLinkCslGetChannel(otInstance *aInstance)
uint8_t
This function gets the CSL channel.
otLinkCslGetPeriod(otInstance *aInstance)
uint16_t
This function gets the CSL period.
otLinkCslGetTimeout(otInstance *aInstance)
uint32_t
This function gets the CSL timeout.
otLinkCslSetChannel(otInstance *aInstance, uint8_t aChannel)
This function sets the CSL channel.
otLinkCslSetPeriod(otInstance *aInstance, uint16_t aPeriod)
This function sets the CSL period.
otLinkCslSetTimeout(otInstance *aInstance, uint32_t aTimeout)
This function sets the CSL timeout.
otLinkEnergyScan(otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleEnergyScanResult aCallback, void *aCallbackContext)
This function starts an IEEE 802.15.4 Energy Scan.
otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
This method adds an Extended Address to MAC filter.
otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss)
This method adds a fixed received signal strength (in dBm) entry for the messages from a given Extended Address in MAC Filter.
otLinkFilterClearAddresses(otInstance *aInstance)
void
This method clears all the Extended Addresses from MAC filter.
otLinkFilterClearAllRssIn(otInstance *aInstance)
void
This method clears all the received signal strength entries (including default RSS-in) on MAC Filter.
otLinkFilterClearDefaultRssIn(otInstance *aInstance)
void
This method clears any previously set default received signal strength (in dBm) on MAC Filter.
otLinkFilterGetAddressMode(otInstance *aInstance)
This function gets the address mode of MAC filter.
otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
This method gets an in-use address filter entry.
otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
This method gets an in-use RssIn filter entry.
otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
void
This method removes an Extended Address from MAC filter.
otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddress)
void
This method removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address.
otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aMode)
void
This function sets the address mode of MAC filter.
otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss)
void
This method sets the default received signal strength (in dBm) on MAC Filter.
otLinkGetCcaFailureRate(otInstance *aInstance)
uint16_t
This function 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.
otLinkGetExtendedAddress(otInstance *aInstance)
const otExtAddress *
Get the IEEE 802.15.4 Extended Address.
otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64)
void
Get the factory-assigned IEEE EUI-64.
otLinkGetMaxFrameRetriesDirect(otInstance *aInstance)
uint8_t
This method returns the maximum number of frame retries during direct transmission.
otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance)
uint8_t
This method 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.
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 *
This method gets histogram of retries for a single direct packet until success.
otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries)
const uint32_t *
This method gets histogram of retries for a single indirect packet until success.
otLinkIsActiveScanInProgress(otInstance *aInstance)
bool
This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
otLinkIsEnabled(otInstance *aInstance)
bool
This function indicates whether or not the link layer is enabled.
otLinkIsEnergyScanInProgress(otInstance *aInstance)
bool
This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
otLinkIsInTransmitState(otInstance *aInstance)
bool
This function indicates whether or not an IEEE 802.15.4 MAC is in the transmit state.
otLinkIsPromiscuous(otInstance *aInstance)
bool
This function indicates whether or not promiscuous mode is enabled at the link layer.
otLinkIsRadioFilterEnabled(otInstance *aInstance)
bool
This function indicates whether the IEEE 802.15.4 radio filter is enabled or not.
otLinkResetCounters(otInstance *aInstance)
void
Reset the MAC layer counters.
otLinkResetTxRetrySuccessHistogram(otInstance *aInstance)
void
This method clears histogram statistics for direct and indirect transmissions.
otLinkSendDataRequest(otInstance *aInstance)
This function enqueues an IEEE 802.15.4 Data Request message for transmission.
otLinkSendEmptyData(otInstance *aInstance)
This function 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.
otLinkSetEnabled(otInstance *aInstance, bool aEnable)
This function enables or disables the link layer.
otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
This function sets the IEEE 802.15.4 Extended Address.
otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect)
void
This method sets the maximum number of frame retries during direct transmission.
otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect)
void
This method 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
This function 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)
This function enables or disables the link layer promiscuous mode.
otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled)
void
This function enables/disables IEEE 802.15.4 radio filter mode.
otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMask)
Set the supported channel mask of MAC layer.

Macros

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 160
The microseconds per 10 symbols.

Structs

otActiveScanResult

This structure represents a received IEEE 802.15.4 Beacon.

otEnergyScanResult

This structure represents an energy scan result.

otMacCounters

This structure represents the MAC layer counters.

otMacFilterEntry

This structure represents a Mac Filter entry.

otThreadLinkInfo

This structure represents link-specific information for messages received from the Thread radio.

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.