Link#
This module includes functions that control link-layer configuration.
Modules#
Enumerations#
Defines address mode of the mac filter.
Typedefs#
Represents link-specific information for messages received from the Thread radio.
Used to iterate through mac filter entries.
Defines address mode of the mac filter.
Represents a Mac Filter entry.
Represents the MAC layer counters.
Represents a received IEEE 802.15.4 Beacon.
Represents an energy scan result.
Pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or the scan completes.
Pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the scan completes.
Pointer is called when an IEEE 802.15.4 frame is received.
Functions#
Starts an IEEE 802.15.4 Active Scan.
Indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
Starts an IEEE 802.15.4 Energy Scan.
Indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
Enqueues an IEEE 802.15.4 Data Request message for transmission.
Indicates whether or not an IEEE 802.15.4 MAC is in the transmit state.
Get the IEEE 802.15.4 channel.
Set the IEEE 802.15.4 channel.
Get the supported channel mask of MAC layer.
Set the supported channel mask of MAC layer.
Gets the IEEE 802.15.4 Extended Address.
Sets the IEEE 802.15.4 Extended Address.
Get the factory-assigned IEEE EUI-64.
Get the IEEE 802.15.4 PAN ID.
Set the IEEE 802.15.4 PAN ID.
Get the data poll period of sleepy end device.
Set/clear user-specified/external data poll period for sleepy end device.
Get the IEEE 802.15.4 Short Address.
Returns the maximum number of frame retries during direct transmission.
Sets the maximum number of frame retries during direct transmission.
Returns the maximum number of frame retries during indirect transmission.
Sets the maximum number of frame retries during indirect transmission.
Gets the address mode of MAC filter.
Sets the address mode of MAC filter.
Adds an Extended Address to MAC filter.
Removes an Extended Address from MAC filter.
Clears all the Extended Addresses from MAC filter.
Gets an in-use address filter entry.
Adds a fixed received signal strength (in dBm) entry for the messages from a given Extended Address in MAC Filter.
Removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address.
Sets the default received signal strength (in dBm) on MAC Filter.
Clears any previously set default received signal strength (in dBm) on MAC Filter.
Clears all the received signal strength entries (including default RSS-in) on MAC Filter.
Gets an in-use RssIn filter entry.
Enables/disables IEEE 802.15.4 radio filter mode.
Indicates whether the IEEE 802.15.4 radio filter is enabled or not.
Converts received signal strength to link quality.
Converts link quality to typical received signal strength.
Gets histogram of retries for a single direct packet until success.
Gets histogram of retries for a single indirect packet until success.
Clears histogram statistics for direct and indirect transmissions.
Get the MAC layer counters.
Resets the MAC layer counters.
Registers a callback to provide received raw IEEE 802.15.4 frames.
Indicates whether or not promiscuous mode is enabled at the link layer.
Enables or disables the link layer promiscuous mode.
Gets the CSL channel.
Sets the CSL channel.
Gets the CSL period.
Sets the CSL period in units of 10 symbols.
Gets the CSL timeout.
Sets the CSL timeout in seconds.
Returns the current CCA (Clear Channel Assessment) failure rate.
Enables or disables the link layer.
Indicates whether or not the link layer is enabled.
Indicates whether or not CSL is enabled.
Indicates whether the device is connected to a parent which supports CSL.
Instructs the device to send an empty IEEE 802.15.4 data frame.
Macros#
Time for 10 symbols in units of microseconds.
Used to indicate no fixed received signal strength was set.
Initializer for otMacFilterIterator.
Enumeration Documentation#
otMacFilterAddressMode#
otMacFilterAddressMode
Defines address mode of the mac filter.
Enumerator | |
---|---|
OT_MAC_FILTER_ADDRESS_MODE_DISABLED | Address filter is disabled. |
OT_MAC_FILTER_ADDRESS_MODE_ALLOWLIST | Allowlist address filter mode is enabled. |
OT_MAC_FILTER_ADDRESS_MODE_DENYLIST | Denylist address filter mode is enabled. |
92
of file include/openthread/link.h
Typedef Documentation#
otThreadLinkInfo#
typedef struct otThreadLinkInfo otThreadLinkInfo
Represents link-specific information for messages received from the Thread radio.
76
of file include/openthread/link.h
otMacFilterIterator#
typedef uint8_t otMacFilterIterator
Used to iterate through mac filter entries.
86
of file include/openthread/link.h
otMacFilterAddressMode#
typedef enum otMacFilterAddressMode otMacFilterAddressMode
Defines address mode of the mac filter.
97
of file include/openthread/link.h
otMacFilterEntry#
typedef struct otMacFilterEntry otMacFilterEntry
Represents a Mac Filter entry.
107
of file include/openthread/link.h
otMacCounters#
typedef struct otMacCounters otMacCounters
Represents the MAC layer counters.
374
of file include/openthread/link.h
otActiveScanResult#
typedef struct otActiveScanResult otActiveScanResult
Represents a received IEEE 802.15.4 Beacon.
398
of file include/openthread/link.h
otEnergyScanResult#
typedef struct otEnergyScanResult otEnergyScanResult
Represents an energy scan result.
408
of file include/openthread/link.h
otHandleActiveScanResult#
typedef void(* otHandleActiveScanResult) (otActiveScanResult *aResult, void *aContext) )(otActiveScanResult *aResult, void *aContext)
Pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or the scan completes.
[in] | aResult | A valid pointer to the beacon information or NULL when the active scan completes. |
[in] | aContext | A pointer to application-specific context. |
418
of file include/openthread/link.h
otHandleEnergyScanResult#
typedef void(* otHandleEnergyScanResult) (otEnergyScanResult *aResult, void *aContext) )(otEnergyScanResult *aResult, void *aContext)
Pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the scan completes.
[in] | aResult | A valid pointer to the energy scan result information or NULL when the energy scan completes. |
[in] | aContext | A pointer to application-specific context. |
456
of file include/openthread/link.h
otLinkPcapCallback#
typedef void(* otLinkPcapCallback) (const otRadioFrame *aFrame, bool aIsTx, void *aContext) )(const otRadioFrame *aFrame, bool aIsTx, void *aContext)
Pointer is called when an IEEE 802.15.4 frame is received.
[in] | aFrame | A pointer to the received IEEE 802.15.4 frame. |
[in] | aIsTx | Whether this frame is transmitted, not received. |
[in] | aContext | A pointer to application-specific context. |
Note
This callback is called after FCS processing and
aFrame
may not contain the actual FCS that was received.This callback is called before IEEE 802.15.4 security processing.
987
of file include/openthread/link.h
Function Documentation#
otLinkActiveScan#
otError otLinkActiveScan (otInstance * aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleActiveScanResult aCallback, void * aCallbackContext)
Starts an IEEE 802.15.4 Active Scan.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aScanChannels | A bit vector indicating which channels to scan (e.g. OT_CHANNEL_11_MASK). |
[in] | aScanDuration | The time in milliseconds to spend scanning each channel. |
[in] | aCallback | A pointer to a function called on receiving a beacon or scan completes. |
[in] | aCallbackContext | A pointer to application-specific context. |
433
of file include/openthread/link.h
otLinkIsActiveScanInProgress#
bool otLinkIsActiveScanInProgress (otInstance * aInstance)
Indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
true if an IEEE 802.15.4 Active Scan is in progress, false otherwise.
446
of file include/openthread/link.h
otLinkEnergyScan#
otError otLinkEnergyScan (otInstance * aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleEnergyScanResult aCallback, void * aCallbackContext)
Starts an IEEE 802.15.4 Energy Scan.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aScanChannels | A bit vector indicating on which channels to perform energy scan. |
[in] | aScanDuration | The time in milliseconds to spend scanning each channel. |
[in] | aCallback | A pointer to a function called to pass on scan result on indicate scan completion. |
[in] | aCallbackContext | A pointer to application-specific context. |
471
of file include/openthread/link.h
otLinkIsEnergyScanInProgress#
bool otLinkIsEnergyScanInProgress (otInstance * aInstance)
Indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
true if an IEEE 802.15.4 Energy Scan is in progress, false otherwise.
485
of file include/openthread/link.h
otLinkSendDataRequest#
otError otLinkSendDataRequest (otInstance * aInstance)
Enqueues an IEEE 802.15.4 Data Request message for transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
497
of file include/openthread/link.h
otLinkIsInTransmitState#
bool otLinkIsInTransmitState (otInstance * aInstance)
Indicates whether or not an IEEE 802.15.4 MAC is in the transmit state.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
Returns
true if an IEEE 802.15.4 MAC is in the transmit state, false otherwise.
511
of file include/openthread/link.h
otLinkGetChannel#
uint8_t otLinkGetChannel (otInstance * aInstance)
Get the IEEE 802.15.4 channel.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The IEEE 802.15.4 channel.
See Also
523
of file include/openthread/link.h
otLinkSetChannel#
otError otLinkSetChannel (otInstance * aInstance, uint8_t aChannel)
Set the IEEE 802.15.4 channel.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannel | The IEEE 802.15.4 channel. |
Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
See Also
541
of file include/openthread/link.h
otLinkGetSupportedChannelMask#
uint32_t otLinkGetSupportedChannelMask (otInstance * aInstance)
Get the supported channel mask of MAC layer.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The supported channel mask as
uint32_t
with bit 0 (lsb) mapping to channel 0, bit 1 to channel 1, so on.
551
of file include/openthread/link.h
otLinkSetSupportedChannelMask#
otError otLinkSetSupportedChannelMask (otInstance * aInstance, uint32_t aChannelMask)
Set the supported channel mask of MAC layer.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannelMask | The supported channel mask (bit 0 or lsb mapping to channel 0, and so on). |
Succeeds only when Thread protocols are disabled.
565
of file include/openthread/link.h
otLinkGetExtendedAddress#
const otExtAddress * otLinkGetExtendedAddress (otInstance * aInstance)
Gets the IEEE 802.15.4 Extended Address.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
A pointer to the IEEE 802.15.4 Extended Address.
575
of file include/openthread/link.h
otLinkSetExtendedAddress#
otError otLinkSetExtendedAddress (otInstance * aInstance, const otExtAddress * aExtAddress)
Sets the IEEE 802.15.4 Extended Address.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the IEEE 802.15.4 Extended Address. |
Note
Only succeeds when Thread protocols are disabled.
590
of file include/openthread/link.h
otLinkGetFactoryAssignedIeeeEui64#
void otLinkGetFactoryAssignedIeeeEui64 (otInstance * aInstance, otExtAddress * aEui64)
Get the factory-assigned IEEE EUI-64.
[in] | aInstance | A pointer to the OpenThread instance. |
[out] | aEui64 | A pointer to where the factory-assigned IEEE EUI-64 is placed. |
599
of file include/openthread/link.h
otLinkGetPanId#
otPanId otLinkGetPanId (otInstance * aInstance)
Get the IEEE 802.15.4 PAN ID.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The IEEE 802.15.4 PAN ID.
See Also
611
of file include/openthread/link.h
otLinkSetPanId#
otError otLinkSetPanId (otInstance * aInstance, otPanId aPanId)
Set the IEEE 802.15.4 PAN ID.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPanId | The IEEE 802.15.4 PAN ID. |
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.
See Also
629
of file include/openthread/link.h
otLinkGetPollPeriod#
uint32_t otLinkGetPollPeriod (otInstance * aInstance)
Get the data poll period of sleepy end device.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The data poll period of sleepy end device in milliseconds.
See Also
641
of file include/openthread/link.h
otLinkSetPollPeriod#
otError otLinkSetPollPeriod (otInstance * aInstance, uint32_t aPollPeriod)
Set/clear user-specified/external data poll period for sleepy end device.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPollPeriod | data poll period in milliseconds. |
Note
This function updates only poll period of sleepy end device. To update child timeout the function
otThreadSetChildTimeout()
shall be called.Minimal non-zero value should be
OPENTHREAD_CONFIG_MAC_MINIMUM_POLL_PERIOD
(10ms). Or zero to clear user-specified poll period.User-specified value should be no more than the maximal value 0x3FFFFFF ((1 << 26) - 1) allowed, otherwise it would be clipped by the maximal value.
See Also
664
of file include/openthread/link.h
otLinkGetShortAddress#
otShortAddress otLinkGetShortAddress (otInstance * aInstance)
Get the IEEE 802.15.4 Short Address.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
A pointer to the IEEE 802.15.4 Short Address.
674
of file include/openthread/link.h
otLinkGetMaxFrameRetriesDirect#
uint8_t otLinkGetMaxFrameRetriesDirect (otInstance * aInstance)
Returns the maximum number of frame retries during direct transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The maximum number of retries during direct transmission.
684
of file include/openthread/link.h
otLinkSetMaxFrameRetriesDirect#
void otLinkSetMaxFrameRetriesDirect (otInstance * aInstance, uint8_t aMaxFrameRetriesDirect)
Sets the maximum number of frame retries during direct transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMaxFrameRetriesDirect | The maximum number of retries during direct transmission. |
693
of file include/openthread/link.h
otLinkGetMaxFrameRetriesIndirect#
uint8_t otLinkGetMaxFrameRetriesIndirect (otInstance * aInstance)
Returns the maximum number of frame retries during indirect transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The maximum number of retries during indirect transmission.
703
of file include/openthread/link.h
otLinkSetMaxFrameRetriesIndirect#
void otLinkSetMaxFrameRetriesIndirect (otInstance * aInstance, uint8_t aMaxFrameRetriesIndirect)
Sets the maximum number of frame retries during indirect transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMaxFrameRetriesIndirect | The maximum number of retries during indirect transmission. |
712
of file include/openthread/link.h
otLinkFilterGetAddressMode#
otMacFilterAddressMode otLinkFilterGetAddressMode (otInstance * aInstance)
Gets the address mode of MAC filter.
[in] | aInstance | A pointer to an OpenThread instance. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
Returns
the address mode.
724
of file include/openthread/link.h
otLinkFilterSetAddressMode#
void otLinkFilterSetAddressMode (otInstance * aInstance, otMacFilterAddressMode aMode)
Sets the address mode of MAC filter.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMode | The address mode to set. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
735
of file include/openthread/link.h
otLinkFilterAddAddress#
otError otLinkFilterAddAddress (otInstance * aInstance, const otExtAddress * aExtAddress)
Adds an Extended Address to MAC filter.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the Extended Address (MUST NOT be NULL). |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
749
of file include/openthread/link.h
otLinkFilterRemoveAddress#
void otLinkFilterRemoveAddress (otInstance * aInstance, const otExtAddress * aExtAddress)
Removes an Extended Address from MAC filter.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the Extended Address (MUST NOT be NULL). |
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.
762
of file include/openthread/link.h
otLinkFilterClearAddresses#
void otLinkFilterClearAddresses (otInstance * aInstance)
Clears all the Extended Addresses from MAC filter.
[in] | aInstance | A pointer to an OpenThread instance. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
772
of file include/openthread/link.h
otLinkFilterGetNextAddress#
otError otLinkFilterGetNextAddress (otInstance * aInstance, otMacFilterIterator * aIterator, otMacFilterEntry * aEntry)
Gets an in-use address filter entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[inout] | aIterator | A pointer to the MAC filter iterator context. To get the first in-use address filter entry, it should be set to OT_MAC_FILTER_ITERATOR_INIT. MUST NOT be NULL. |
[out] | aEntry | A pointer to where the information is placed. MUST NOT be NULL. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
788
of file include/openthread/link.h
otLinkFilterAddRssIn#
otError otLinkFilterAddRssIn (otInstance * aInstance, const otExtAddress * aExtAddress, int8_t aRss)
Adds a fixed received signal strength (in dBm) entry for the messages from a given Extended Address in MAC Filter.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the IEEE 802.15.4 Extended Address. MUST NOT be NULL. |
[in] | aRss | A received signal strength (in dBm). |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
804
of file include/openthread/link.h
otLinkFilterRemoveRssIn#
void otLinkFilterRemoveRssIn (otInstance * aInstance, const otExtAddress * aExtAddress)
Removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | A pointer to the IEEE 802.15.4 Extended Address. MUST NOT be NULL. |
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.
817
of file include/openthread/link.h
otLinkFilterSetDefaultRssIn#
void otLinkFilterSetDefaultRssIn (otInstance * aInstance, int8_t aRss)
Sets the default received signal strength (in dBm) on MAC Filter.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRss | The default received signal strength (in dBm) to set. |
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()
).
831
of file include/openthread/link.h
otLinkFilterClearDefaultRssIn#
void otLinkFilterClearDefaultRssIn (otInstance * aInstance)
Clears any previously set default received signal strength (in dBm) on MAC Filter.
[in] | aInstance | A pointer to an OpenThread instance. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
841
of file include/openthread/link.h
otLinkFilterClearAllRssIn#
void otLinkFilterClearAllRssIn (otInstance * aInstance)
Clears all the received signal strength entries (including default RSS-in) on MAC Filter.
[in] | aInstance | A pointer to an OpenThread instance. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
851
of file include/openthread/link.h
otLinkFilterGetNextRssIn#
otError otLinkFilterGetNextRssIn (otInstance * aInstance, otMacFilterIterator * aIterator, otMacFilterEntry * aEntry)
Gets an in-use RssIn filter entry.
[in] | aInstance | A pointer to an OpenThread instance. |
[inout] | aIterator | A pointer to the MAC filter iterator context. MUST NOT be NULL. To get the first entry, it should be set to OT_MAC_FILTER_ITERATOR_INIT. |
[out] | aEntry | A pointer to where the information is placed. The last entry would have the extended address as all 0xff to indicate the default received signal strength if it was set. |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
869
of file include/openthread/link.h
otLinkSetRadioFilterEnabled#
void otLinkSetRadioFilterEnabled (otInstance * aInstance, bool aFilterEnabled)
Enables/disables IEEE 802.15.4 radio filter mode.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aFilterEnabled | TRUE to enable radio filter, FALSE to disable |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the 802.15.4 radio. When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the frame over the air (return "no ack" error if ack is requested, otherwise return success).
885
of file include/openthread/link.h
otLinkIsRadioFilterEnabled#
bool otLinkIsRadioFilterEnabled (otInstance * aInstance)
Indicates whether the IEEE 802.15.4 radio filter is enabled or not.
N/A | aInstance |
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled.
896
of file include/openthread/link.h
otLinkConvertRssToLinkQuality#
uint8_t otLinkConvertRssToLinkQuality (otInstance * aInstance, int8_t aRss)
Converts received signal strength to link quality.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRss | The received signal strength value to be converted. |
Returns
Link quality value mapping to
aRss
.
907
of file include/openthread/link.h
otLinkConvertLinkQualityToRss#
int8_t otLinkConvertLinkQualityToRss (otInstance * aInstance, uint8_t aLinkQuality)
Converts link quality to typical received signal strength.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aLinkQuality | LinkQuality value, should be in range [0,3]. |
Returns
Typical platform received signal strength mapping to
aLinkQuality
.
918
of file include/openthread/link.h
otLinkGetTxDirectRetrySuccessHistogram#
const uint32_t * otLinkGetTxDirectRetrySuccessHistogram (otInstance * aInstance, uint8_t * aNumberOfEntries)
Gets histogram of retries for a single direct packet until success.
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aNumberOfEntries | A pointer to where the size of returned histogram array is placed. |
Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
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.
931
of file include/openthread/link.h
otLinkGetTxIndirectRetrySuccessHistogram#
const uint32_t * otLinkGetTxIndirectRetrySuccessHistogram (otInstance * aInstance, uint8_t * aNumberOfEntries)
Gets histogram of retries for a single indirect packet until success.
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aNumberOfEntries | A pointer to where the size of returned histogram array is placed. |
Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
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.
945
of file include/openthread/link.h
otLinkResetTxRetrySuccessHistogram#
void otLinkResetTxRetrySuccessHistogram (otInstance * aInstance)
Clears histogram statistics for direct and indirect transmissions.
[in] | aInstance | A pointer to an OpenThread instance. |
Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
955
of file include/openthread/link.h
otLinkGetCounters#
const otMacCounters * otLinkGetCounters (otInstance * aInstance)
Get the MAC layer counters.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
A pointer to the MAC layer counters.
965
of file include/openthread/link.h
otLinkResetCounters#
void otLinkResetCounters (otInstance * aInstance)
Resets the MAC layer counters.
[in] | aInstance | A pointer to an OpenThread instance. |
973
of file include/openthread/link.h
otLinkSetPcapCallback#
void otLinkSetPcapCallback (otInstance * aInstance, otLinkPcapCallback aPcapCallback, void * aCallbackContext)
Registers a callback to provide received raw IEEE 802.15.4 frames.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPcapCallback | A pointer to a function that is called when receiving an IEEE 802.15.4 link frame or NULL to disable the callback. |
[in] | aCallbackContext | A pointer to application-specific context. |
998
of file include/openthread/link.h
otLinkIsPromiscuous#
bool otLinkIsPromiscuous (otInstance * aInstance)
Indicates whether or not promiscuous mode is enabled at the link layer.
[in] | aInstance | A pointer to an OpenThread instance. |
1009
of file include/openthread/link.h
otLinkSetPromiscuous#
otError otLinkSetPromiscuous (otInstance * aInstance, bool aPromiscuous)
Enables or disables the link layer promiscuous mode.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPromiscuous | true to enable promiscuous mode, or false otherwise. |
Note
Promiscuous mode may only be enabled when the Thread interface is disabled.
1024
of file include/openthread/link.h
otLinkCslGetChannel#
uint8_t otLinkCslGetChannel (otInstance * aInstance)
Gets the CSL channel.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The CSL channel.
1034
of file include/openthread/link.h
otLinkCslSetChannel#
otError otLinkCslSetChannel (otInstance * aInstance, uint8_t aChannel)
Sets the CSL channel.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannel | The CSL sample channel. Channel value should be |
1047
of file include/openthread/link.h
otLinkCslGetPeriod#
uint16_t otLinkCslGetPeriod (otInstance * aInstance)
Gets the CSL period.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The CSL period in units of 10 symbols.
1057
of file include/openthread/link.h
otLinkCslSetPeriod#
otError otLinkCslSetPeriod (otInstance * aInstance, uint16_t aPeriod)
Sets the CSL period in units of 10 symbols.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPeriod | The CSL period in units of 10 symbols. |
Disable CSL by setting this parameter to 0
.
1069
of file include/openthread/link.h
otLinkCslGetTimeout#
uint32_t otLinkCslGetTimeout (otInstance * aInstance)
Gets the CSL timeout.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The CSL timeout in seconds.
1079
of file include/openthread/link.h
otLinkCslSetTimeout#
otError otLinkCslSetTimeout (otInstance * aInstance, uint32_t aTimeout)
Sets the CSL timeout in seconds.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aTimeout | The CSL timeout in seconds. |
1091
of file include/openthread/link.h
otLinkGetCcaFailureRate#
uint16_t otLinkGetCcaFailureRate (otInstance * aInstance)
Returns the current CCA (Clear Channel Assessment) failure rate.
N/A | aInstance |
The rate is maintained over a window of (roughly) last OPENTHREAD_CONFIG_CCA_FAILURE_RATE_AVERAGING_WINDOW
frame transmissions.
Returns
The CCA failure rate with maximum value
0xffff
corresponding to 100% failure rate.
1102
of file include/openthread/link.h
otLinkSetEnabled#
otError otLinkSetEnabled (otInstance * aInstance, bool aEnable)
Enables or disables the link layer.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | true to enable the link layer, or false otherwise. |
Note
The link layer may only be enabled / disabled when the Thread Interface is disabled.
1117
of file include/openthread/link.h
otLinkIsEnabled#
bool otLinkIsEnabled (otInstance * aInstance)
Indicates whether or not the link layer is enabled.
[in] | aInstance | A pointer to an OpenThread instance. |
1128
of file include/openthread/link.h
otLinkIsCslEnabled#
bool otLinkIsCslEnabled (otInstance * aInstance)
Indicates whether or not CSL is enabled.
[in] | aInstance | A pointer to an OpenThread instance. |
1139
of file include/openthread/link.h
otLinkIsCslSupported#
bool otLinkIsCslSupported (otInstance * aInstance)
Indicates whether the device is connected to a parent which supports CSL.
N/A | aInstance |
1148
of file include/openthread/link.h
otLinkSendEmptyData#
otError otLinkSendEmptyData (otInstance * aInstance)
Instructs the device to send an empty IEEE 802.15.4 data frame.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
1163
of file include/openthread/link.h
Macro Definition Documentation#
OT_US_PER_TEN_SYMBOLS#
#define OT_US_PER_TEN_SYMBOLSValue:
OT_RADIO_TEN_SYMBOLS_TIME
Time for 10 symbols in units of microseconds.
55
of file include/openthread/link.h
OT_MAC_FILTER_FIXED_RSS_DISABLED#
#define OT_MAC_FILTER_FIXED_RSS_DISABLEDValue:
127
Used to indicate no fixed received signal strength was set.
82
of file include/openthread/link.h
OT_MAC_FILTER_ITERATOR_INIT#
#define OT_MAC_FILTER_ITERATOR_INITValue:
0
Initializer for otMacFilterIterator.
84
of file include/openthread/link.h