Link
This module includes functions that control link-layer configuration.
Summary
Enumerations |
|
---|---|
otMacFilterAddressMode{
|
enum Defines address mode of the mac filter. |
Typedefs |
|
---|---|
otActiveScanResult
|
typedefstruct otActiveScanResult
This structure represents a received IEEE 802.15.4 Beacon. |
otEnergyScanResult
|
typedefstruct otEnergyScanResult
This structure represents an energy scan result. |
otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext)
|
typedefvoid(*
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)
|
typedefvoid(*
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)
|
typedefvoid(*
This function pointer is called when an IEEE 802.15.4 frame is received. |
otMacCounters
|
typedefstruct otMacCounters
This structure represents the MAC layer counters. |
otMacFilterAddressMode
|
typedef Defines address mode of the mac filter. |
otMacFilterEntry
|
typedefstruct otMacFilterEntry
This structure represents a Mac Filter entry. |
otMacFilterIterator
|
typedefuint8_t
Used to iterate through mac filter entries. |
otThreadLinkInfo
|
typedefstruct otThreadLinkInfo
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.
|
otLinkOutOfBandTransmitRequest(otInstance *aInstance, otRadioFrame *aOobFrame)
|
This function enqueues an IEEE 802.15.4 out of band Frame for transmission.
|
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.
|
otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMask)
|
Set the supported channel mask of MAC layer.
|
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
otMacFilterAddressMode
otMacFilterAddressMode
Typedefs
otActiveScanResult
struct otActiveScanResult otActiveScanResult
This structure represents a received IEEE 802.15.4 Beacon.
otEnergyScanResult
struct otEnergyScanResult otEnergyScanResult
This structure represents an energy scan result.
otHandleActiveScanResult
void(* otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext)
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otHandleEnergyScanResult
void(* otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext)
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkPcapCallback
void(* otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext)
This function pointer is called when an IEEE 802.15.4 frame is received.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otMacFilterAddressMode
enum otMacFilterAddressMode otMacFilterAddressMode
Defines address mode of the mac filter.
otMacFilterEntry
struct otMacFilterEntry otMacFilterEntry
This structure represents a Mac Filter entry.
otMacFilterIterator
uint8_t otMacFilterIterator
Used to iterate through mac filter entries.
otThreadLinkInfo
struct otThreadLinkInfo otThreadLinkInfo
This structure represents link-specific information for messages received from the Thread radio.
Functions
otLinkActiveScan
otError otLinkActiveScan( otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleActiveScanResult aCallback, void *aCallbackContext )
This function starts an IEEE 802.15.4 Active Scan.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otLinkConvertLinkQualityToRss
int8_t otLinkConvertLinkQualityToRss( otInstance *aInstance, uint8_t aLinkQuality )
This method converts link quality to typical received signal strength.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Typical platform received signal strength mapping to
aLinkQuality . |
otLinkConvertRssToLinkQuality
uint8_t otLinkConvertRssToLinkQuality( otInstance *aInstance, int8_t aRss )
This method converts received signal strength to link quality.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
Link quality value mapping to
aRss . |
otLinkCslGetChannel
uint8_t otLinkCslGetChannel( otInstance *aInstance )
This function gets the CSL channel.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The CSL channel.
|
otLinkCslGetPeriod
uint16_t otLinkCslGetPeriod( otInstance *aInstance )
This function gets the CSL period.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The CSL period in units of 10 symbols.
|
otLinkCslGetTimeout
uint32_t otLinkCslGetTimeout( otInstance *aInstance )
This function gets the CSL timeout.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The CSL timeout in seconds.
|
otLinkCslSetChannel
otError otLinkCslSetChannel( otInstance *aInstance, uint8_t aChannel )
This function sets the CSL channel.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkCslSetPeriod
otError otLinkCslSetPeriod( otInstance *aInstance, uint16_t aPeriod )
This function sets the CSL period.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkCslSetTimeout
otError otLinkCslSetTimeout( otInstance *aInstance, uint32_t aTimeout )
This function sets the CSL timeout.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkEnergyScan
otError otLinkEnergyScan( otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleEnergyScanResult aCallback, void *aCallbackContext )
This function starts an IEEE 802.15.4 Energy Scan.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otLinkFilterAddAddress
otError otLinkFilterAddAddress( otInstance *aInstance, const otExtAddress *aExtAddress )
This method adds an Extended Address to MAC filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkFilterAddRssIn
otError 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.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkFilterClearAddresses
void otLinkFilterClearAddresses( otInstance *aInstance )
This method clears all the Extended Addresses from MAC filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||
---|---|---|---|
Parameters |
|
otLinkFilterClearAllRssIn
void otLinkFilterClearAllRssIn( otInstance *aInstance )
This method clears all the received signal strength entries (including default RSS-in) on MAC Filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||
---|---|---|---|
Parameters |
|
otLinkFilterClearDefaultRssIn
void otLinkFilterClearDefaultRssIn( otInstance *aInstance )
This method clears any previously set default received signal strength (in dBm) on MAC Filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||
---|---|---|---|
Parameters |
|
otLinkFilterGetAddressMode
otMacFilterAddressMode otLinkFilterGetAddressMode( otInstance *aInstance )
This function gets the address mode of MAC filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
the address mode.
|
otLinkFilterGetNextAddress
otError otLinkFilterGetNextAddress( otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry )
This method gets an in-use address filter entry.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkFilterGetNextRssIn
otError otLinkFilterGetNextRssIn( otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry )
This method gets an in-use RssIn filter entry.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkFilterRemoveAddress
void otLinkFilterRemoveAddress( otInstance *aInstance, const otExtAddress *aExtAddress )
This method removes an Extended Address from MAC filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
No action is performed if there is no existing entry in Filter matching the given Extended Address.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkFilterRemoveRssIn
void otLinkFilterRemoveRssIn( otInstance *aInstance, const otExtAddress *aExtAddress )
This method removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
No action is performed if there is no existing entry in Filter matching the given Extended Address.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkFilterSetAddressMode
void otLinkFilterSetAddressMode( otInstance *aInstance, otMacFilterAddressMode aMode )
This function sets the address mode of MAC filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkFilterSetDefaultRssIn
void otLinkFilterSetDefaultRssIn( otInstance *aInstance, int8_t aRss )
This method sets the default received signal strength (in dBm) on MAC Filter.
This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
The default RSS value is used for all received frames from addresses for which there is no explicit RSS-IN entry in the Filter list (added using otLinkFilterAddRssIn()
).
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkGetCcaFailureRate
uint16_t otLinkGetCcaFailureRate( otInstance *aInstance )
This function returns the current CCA (Clear Channel Assessment) failure rate.
The rate is maintained over a window of (roughly) last OPENTHREAD_CONFIG_CCA_FAILURE_RATE_AVERAGING_WINDOW
frame transmissions.
Details | |
---|---|
Returns |
The CCA failure rate with maximum value
0xffff corresponding to 100% failure rate. |
otLinkGetChannel
uint8_t otLinkGetChannel( otInstance *aInstance )
Get the IEEE 802.15.4 channel.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The IEEE 802.15.4 channel.
|
otLinkSetChannel
otLinkGetCounters
const otMacCounters * otLinkGetCounters( otInstance *aInstance )
Get the MAC layer counters.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the MAC layer counters.
|
otLinkGetExtendedAddress
const otExtAddress * otLinkGetExtendedAddress( otInstance *aInstance )
Get the IEEE 802.15.4 Extended Address.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the IEEE 802.15.4 Extended Address.
|
otLinkGetFactoryAssignedIeeeEui64
void otLinkGetFactoryAssignedIeeeEui64( otInstance *aInstance, otExtAddress *aEui64 )
Get the factory-assigned IEEE EUI-64.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkGetMaxFrameRetriesDirect
uint8_t otLinkGetMaxFrameRetriesDirect( otInstance *aInstance )
This method returns the maximum number of frame retries during direct transmission.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The maximum number of retries during direct transmission.
|
otLinkGetMaxFrameRetriesIndirect
uint8_t otLinkGetMaxFrameRetriesIndirect( otInstance *aInstance )
This method returns the maximum number of frame retries during indirect transmission.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The maximum number of retries during indirect transmission.
|
otLinkGetPanId
otPanId otLinkGetPanId( otInstance *aInstance )
Get the IEEE 802.15.4 PAN ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The IEEE 802.15.4 PAN ID.
|
otLinkSetPanId
otLinkGetPollPeriod
uint32_t otLinkGetPollPeriod( otInstance *aInstance )
Get the data poll period of sleepy end device.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The data poll period of sleepy end device in milliseconds.
|
otLinkSetPollPeriod
otLinkGetShortAddress
otShortAddress otLinkGetShortAddress( otInstance *aInstance )
Get the IEEE 802.15.4 Short Address.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the IEEE 802.15.4 Short Address.
|
otLinkGetSupportedChannelMask
uint32_t otLinkGetSupportedChannelMask( otInstance *aInstance )
Get the supported channel mask of MAC layer.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The supported channel mask as
uint32_t with bit 0 (lsb) mapping to channel 0, bit 1 to channel 1, so on. |
otLinkGetTxDirectRetrySuccessHistogram
const uint32_t * otLinkGetTxDirectRetrySuccessHistogram( otInstance *aInstance, uint8_t *aNumberOfEntries )
This method gets histogram of retries for a single direct packet until success.
This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
A pointer to the histogram of retries (in a form of an array). The n-th element indicates that the packet has been sent with n-th retry.
|
otLinkGetTxIndirectRetrySuccessHistogram
const uint32_t * otLinkGetTxIndirectRetrySuccessHistogram( otInstance *aInstance, uint8_t *aNumberOfEntries )
This method gets histogram of retries for a single indirect packet until success.
This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
A pointer to the histogram of retries (in a form of an array). The n-th element indicates that the packet has been sent with n-th retry.
|
otLinkIsActiveScanInProgress
bool otLinkIsActiveScanInProgress( otInstance *aInstance )
This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if an IEEE 802.15.4 Active Scan is in progress, false otherwise.
|
otLinkIsEnabled
bool otLinkIsEnabled( otInstance *aInstance )
This function indicates whether or not the link layer is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkIsEnergyScanInProgress
bool otLinkIsEnergyScanInProgress( otInstance *aInstance )
This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if an IEEE 802.15.4 Energy Scan is in progress, false otherwise.
|
otLinkIsInTransmitState
bool otLinkIsInTransmitState( otInstance *aInstance )
This function indicates whether or not an IEEE 802.15.4 MAC is in the transmit state.
MAC module is in the transmit state during CSMA/CA procedure, CCA, Data, Beacon or Data Request frame transmission and receiving an ACK of a transmitted frame. MAC module is not in the transmit state during transmission of an ACK frame or a Beacon Request frame.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if an IEEE 802.15.4 MAC is in the transmit state, false otherwise.
|
otLinkIsPromiscuous
bool otLinkIsPromiscuous( otInstance *aInstance )
This function indicates whether or not promiscuous mode is enabled at the link layer.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkOutOfBandTransmitRequest
otError otLinkOutOfBandTransmitRequest( otInstance *aInstance, otRadioFrame *aOobFrame )
This function enqueues an IEEE 802.15.4 out of band Frame for transmission.
An Out of Band frame is one that was generated outside of OpenThread.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otLinkResetCounters
void otLinkResetCounters( otInstance *aInstance )
Reset the MAC layer counters.
Details | |||
---|---|---|---|
Parameters |
|
otLinkResetTxRetrySuccessHistogram
void otLinkResetTxRetrySuccessHistogram( otInstance *aInstance )
This method clears histogram statistics for direct and indirect transmissions.
This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Details | |||
---|---|---|---|
Parameters |
|
otLinkSendDataRequest
otError otLinkSendDataRequest( otInstance *aInstance )
This function enqueues an IEEE 802.15.4 Data Request message for transmission.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otLinkSendEmptyData
otError otLinkSendEmptyData( otInstance *aInstance )
This function instructs the device to send an empty IEEE 802.15.4 data frame.
This function is only supported on an Rx-Off-When-Idle device to send an empty data frame to its parent. Note: available only when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkSetChannel
otError otLinkSetChannel( otInstance *aInstance, uint8_t aChannel )
Set the IEEE 802.15.4 channel.
This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkGetChannel
otLinkSetEnabled
otError otLinkSetEnabled( otInstance *aInstance, bool aEnable )
This function enables or disables the link layer.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkSetExtendedAddress
otError otLinkSetExtendedAddress( otInstance *aInstance, const otExtAddress *aExtAddress )
This function sets the IEEE 802.15.4 Extended Address.
This function succeeds only when Thread protocols are disabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkSetMaxFrameRetriesDirect
void otLinkSetMaxFrameRetriesDirect( otInstance *aInstance, uint8_t aMaxFrameRetriesDirect )
This method sets the maximum number of frame retries during direct transmission.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkSetMaxFrameRetriesIndirect
void otLinkSetMaxFrameRetriesIndirect( otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect )
This method sets the maximum number of frame retries during indirect transmission.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otLinkSetPanId
otError otLinkSetPanId( otInstance *aInstance, otPanId aPanId )
Set the IEEE 802.15.4 PAN ID.
This function succeeds only when Thread protocols are disabled. A successful call to this function also invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otLinkGetPanId
otLinkSetPcapCallback
void otLinkSetPcapCallback( otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext )
This function registers a callback to provide received raw IEEE 802.15.4 frames.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otLinkSetPollPeriod
otError otLinkSetPollPeriod( otInstance *aInstance, uint32_t aPollPeriod )
Set/clear user-specified/external data poll period for sleepy end device.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkGetPollPeriod
otLinkSetPromiscuous
otError otLinkSetPromiscuous( otInstance *aInstance, bool aPromiscuous )
This function enables or disables the link layer promiscuous mode.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otLinkSetSupportedChannelMask
otError otLinkSetSupportedChannelMask( otInstance *aInstance, uint32_t aChannelMask )
Set the supported channel mask of MAC layer.
This function succeeds only when Thread protocols are disabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Macros
OT_MAC_FILTER_FIXED_RSS_DISABLED
OT_MAC_FILTER_FIXED_RSS_DISABLED 127
Used to indicate no fixed received signal strength was set.
OT_MAC_FILTER_ITERATOR_INIT
OT_MAC_FILTER_ITERATOR_INIT 0
Initializer for otMacFilterIterator.
OT_US_PER_TEN_SYMBOLS
OT_US_PER_TEN_SYMBOLS 160
The microseconds per 10 symbols.