0.01.00
link.h File Reference

This file defines the OpenThread IEEE 802.15.4 Link Layer API. More...

Go to the source code of this file.

Typedefs

typedef void(OTCALLotHandleActiveScanResult) (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. More...
 
typedef void(OTCALLotHandleEnergyScanResult) (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. More...
 
typedef void(* otLinkPcapCallback) (const otRadioFrame *aFrame, void *aContext)
 This function pointer is called when an IEEE 802.15.4 frame is received. More...
 

Functions

OTAPI otError OTCALL otLinkActiveScan (otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleActiveScanResult aCallback, void *aCallbackContext)
 This function starts an IEEE 802.15.4 Active Scan. More...
 
OTAPI bool OTCALL otLinkIsActiveScanInProgress (otInstance *aInstance)
 This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress. More...
 
OTAPI otError OTCALL otLinkEnergyScan (otInstance *aInstance, uint32_t aScanChannels, uint16_t aScanDuration, otHandleEnergyScanResult aCallback, void *aCallbackContext)
 This function starts an IEEE 802.15.4 Energy Scan. More...
 
OTAPI bool OTCALL otLinkIsEnergyScanInProgress (otInstance *aInstance)
 This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress. More...
 
OTAPI otError OTCALL otLinkSendDataRequest (otInstance *aInstance)
 This function enqueues an IEEE 802.15.4 Data Request message for transmission. More...
 
OTAPI bool OTCALL otLinkIsInTransmitState (otInstance *aInstance)
 This function indicates whether or not an IEEE 802.15.4 MAC is in the transmit state. More...
 
OTAPI uint8_t OTCALL otLinkGetChannel (otInstance *aInstance)
 Get the IEEE 802.15.4 channel. More...
 
OTAPI otError OTCALL otLinkSetChannel (otInstance *aInstance, uint8_t aChannel)
 Set the IEEE 802.15.4 channel. More...
 
OTAPI const otExtAddress *OTCALL otLinkGetExtendedAddress (otInstance *aInstance)
 Get the IEEE 802.15.4 Extended Address. More...
 
OTAPI otError OTCALL otLinkSetExtendedAddress (otInstance *aInstance, const otExtAddress *aExtAddress)
 This function sets the IEEE 802.15.4 Extended Address. More...
 
OTAPI void OTCALL otLinkGetFactoryAssignedIeeeEui64 (otInstance *aInstance, otExtAddress *aEui64)
 Get the factory-assigned IEEE EUI-64. More...
 
OTAPI int8_t OTCALL otLinkGetMaxTransmitPower (otInstance *aInstance)
 This function returns the maximum transmit power setting in dBm. More...
 
OTAPI void OTCALL otLinkSetMaxTransmitPower (otInstance *aInstance, int8_t aPower)
 This function sets the maximum transmit power in dBm. More...
 
OTAPI otPanId OTCALL otLinkGetPanId (otInstance *aInstance)
 Get the IEEE 802.15.4 PAN ID. More...
 
OTAPI otError OTCALL otLinkSetPanId (otInstance *aInstance, otPanId aPanId)
 Set the IEEE 802.15.4 PAN ID. More...
 
OTAPI uint32_t OTCALL otLinkGetPollPeriod (otInstance *aInstance)
 Get the data poll period of sleepy end device. More...
 
OTAPI void OTCALL otLinkSetPollPeriod (otInstance *aInstance, uint32_t aPollPeriod)
 Set the data poll period for sleepy end device. More...
 
OTAPI otShortAddress OTCALL otLinkGetShortAddress (otInstance *aInstance)
 Get the IEEE 802.15.4 Short Address. More...
 
OTAPI otMacFilterAddressMode OTCALL otLinkFilterGetAddressMode (otInstance *aInstance)
 This function gets the address mode of MAC filter. More...
 
OTAPI otError OTCALL otLinkFilterSetAddressMode (otInstance *aInstance, otMacFilterAddressMode aMode)
 This function sets the address mode of MAC filter. More...
 
OTAPI otError OTCALL otLinkFilterAddAddress (otInstance *aInstance, const otExtAddress *aExtAddress)
 This method adds an Extended Address to MAC filter. More...
 
OTAPI otError OTCALL otLinkFilterRemoveAddress (otInstance *aInstance, const otExtAddress *aExtAddress)
 This method removes an Extended Address from MAC filter. More...
 
OTAPI void OTCALL otLinkFilterClearAddresses (otInstance *aInstance)
 This method clears all the Extended Addresses from MAC filter. More...
 
OTAPI otError OTCALL otLinkFilterGetNextAddress (otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
 This method gets an in-use address filter entry. More...
 
OTAPI otError OTCALL otLinkFilterAddRssIn (otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss)
 This method sets the received signal strength (in dBm) for the messages from the Extended Address. More...
 
OTAPI otError OTCALL otLinkFilterRemoveRssIn (otInstance *aInstance, const otExtAddress *aExtAddress)
 This method removes the received signal strength setting for the received messages from the Extended Address or removes the default received signal strength setting if no Extended Address is specified. More...
 
OTAPI void OTCALL otLinkFilterClearRssIn (otInstance *aInstance)
 This method clears all the received signal strength settings. More...
 
OTAPI otError OTCALL otLinkFilterGetNextRssIn (otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry)
 This method gets an in-use RssIn filter entry. More...
 
uint8_t otLinkConvertRssToLinkQuality (otInstance *aInstance, int8_t aRss)
 This method converts received signal strength to link quality. More...
 
int8_t otLinkConvertLinkQualityToRss (otInstance *aInstance, uint8_t aLinkQuality)
 This method converts link quality to typical received signal strength. More...
 
OTAPI const otMacCounters *OTCALL otLinkGetCounters (otInstance *aInstance)
 Get the MAC layer counters. More...
 
void otLinkSetPcapCallback (otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext)
 This function registers a callback to provide received raw IEEE 802.15.4 frames. More...
 
bool otLinkIsPromiscuous (otInstance *aInstance)
 This function indicates whether or not promiscuous mode is enabled at the link layer. More...
 
otError otLinkSetPromiscuous (otInstance *aInstance, bool aPromiscuous)
 This function enables or disables the link layer promiscuous mode. More...
 

Detailed Description

This file defines the OpenThread IEEE 802.15.4 Link Layer API.