![]() |
0.01.00
|
This module includes functions that control the raw link-layer configuration. More...
Typedefs | |
typedef void(OTCALL * | otLinkRawReceiveDone) (otInstance *aInstance, otRadioFrame *aFrame, otError aError) |
This function pointer on receipt of a IEEE 802.15.4 frame. More... | |
typedef void(* | otLinkRawTransmitDone) (otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError) |
This function pointer on receipt of a IEEE 802.15.4 frame. More... | |
typedef void(* | otLinkRawEnergyScanDone) (otInstance *aInstance, int8_t aEnergyScanMaxRssi) |
This function pointer on receipt of a IEEE 802.15.4 frame. More... | |
Functions | |
otError | otLinkRawSetEnable (otInstance *aInstance, bool aEnabled) |
This function enables/disables the raw link-layer. More... | |
bool | otLinkRawIsEnabled (otInstance *aInstance) |
This function indicates whether or not the raw link-layer is enabled. More... | |
otError | otLinkRawSetPanId (otInstance *aInstance, uint16_t aPanId) |
This function set the IEEE 802.15.4 PAN ID. More... | |
otError | otLinkRawSetExtendedAddress (otInstance *aInstance, const otExtAddress *aExtAddress) |
This function sets the IEEE 802.15.4 Extended Address. More... | |
otError | otLinkRawSetShortAddress (otInstance *aInstance, uint16_t aShortAddress) |
Set the Short Address for address filtering. More... | |
bool | otLinkRawGetPromiscuous (otInstance *aInstance) |
This function gets the status of promiscuous mode. More... | |
otError | otLinkRawSetPromiscuous (otInstance *aInstance, bool aEnable) |
This function enables or disables promiscuous mode. More... | |
otError | otLinkRawSleep (otInstance *aInstance) |
Transition the radio from Receive to Sleep. More... | |
otError | otLinkRawReceive (otInstance *aInstance, uint8_t aChannel, otLinkRawReceiveDone aCallback) |
Transitioning the radio from Sleep to Receive. More... | |
otRadioFrame * | otLinkRawGetTransmitBuffer (otInstance *aInstance) |
The radio transitions from Transmit to Receive. More... | |
otError | otLinkRawTransmit (otInstance *aInstance, otRadioFrame *aFrame, otLinkRawTransmitDone aCallback) |
This method begins the transmit sequence on the radio. More... | |
int8_t | otLinkRawGetRssi (otInstance *aInstance) |
Get the most recent RSSI measurement. More... | |
otRadioCaps | otLinkRawGetCaps (otInstance *aInstance) |
Get the radio capabilities. More... | |
otError | otLinkRawEnergyScan (otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback) |
This method begins the energy scan sequence on the radio. More... | |
otError | otLinkRawSrcMatchEnable (otInstance *aInstance, bool aEnable) |
Enable/Disable source match for AutoPend. More... | |
otError | otLinkRawSrcMatchAddShortEntry (otInstance *aInstance, const uint16_t aShortAddress) |
Adding short address to the source match table. More... | |
otError | otLinkRawSrcMatchAddExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress) |
Adding extended address to the source match table. More... | |
otError | otLinkRawSrcMatchClearShortEntry (otInstance *aInstance, const uint16_t aShortAddress) |
Removing short address to the source match table. More... | |
otError | otLinkRawSrcMatchClearExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress) |
Removing extended address to the source match table of the radio. More... | |
otError | otLinkRawSrcMatchClearShortEntries (otInstance *aInstance) |
Removing all the short addresses from the source match table. More... | |
otError | otLinkRawSrcMatchClearExtEntries (otInstance *aInstance) |
Removing all the extended addresses from the source match table. More... | |
This module includes functions that control the raw link-layer configuration.
typedef void(* otLinkRawEnergyScanDone) (otInstance *aInstance, int8_t aEnergyScanMaxRssi) |
This function pointer on receipt of a IEEE 802.15.4 frame.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnergyScanMaxRssi | The maximum RSSI encountered on the scanned channel. |
typedef void(OTCALL * otLinkRawReceiveDone) (otInstance *aInstance, otRadioFrame *aFrame, otError aError) |
This function pointer on receipt of a IEEE 802.15.4 frame.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aFrame | A pointer to the received frame or NULL if the receive operation was aborted. |
[in] | aError | OT_ERROR_NONE when successfully received a frame. OT_ERROR_ABORT when reception was aborted and a frame was not received. |
typedef void(* otLinkRawTransmitDone) (otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError) |
This function pointer on receipt of a IEEE 802.15.4 frame.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aFrame | A pointer to the frame that was transmitted. |
[in] | aAckFrame | A pointer to the ACK frame. |
[in] | aError | OT_ERROR_NONE when the frame was transmitted. OT_ERROR_NO_ACK when the frame was transmitted but no ACK was received OT_ERROR_CHANNEL_ACCESS_FAILURE when the transmission could not take place due to activity on the channel. OT_ERROR_ABORT when transmission was aborted for other reasons. |
otError otLinkRawEnergyScan | ( | otInstance * | aInstance, |
uint8_t | aScanChannel, | ||
uint16_t | aScanDuration, | ||
otLinkRawEnergyScanDone | aCallback | ||
) |
This method begins the energy scan sequence on the radio.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aScanChannel | The channel to perform the energy scan on. |
[in] | aScanDuration | The duration, in milliseconds, for the channel to be scanned. |
[in] | aCallback | A pointer to a function called on completion of a scanned channel. |
OT_ERROR_NONE | Successfully started scanning the channel. |
OT_ERROR_NOT_IMPLEMENTED | The radio doesn't support energy scanning. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otRadioCaps otLinkRawGetCaps | ( | otInstance * | aInstance | ) |
Get the radio capabilities.
[in] | aInstance | A pointer to an OpenThread instance. |
bool otLinkRawGetPromiscuous | ( | otInstance * | aInstance | ) |
This function gets the status of promiscuous mode.
[in] | aInstance | A pointer to an OpenThread instance. |
true | Promiscuous mode is enabled. |
false | Promiscuous mode is disabled. |
int8_t otLinkRawGetRssi | ( | otInstance * | aInstance | ) |
Get the most recent RSSI measurement.
[in] | aInstance | A pointer to an OpenThread instance. |
otRadioFrame* otLinkRawGetTransmitBuffer | ( | otInstance * | aInstance | ) |
The radio transitions from Transmit to Receive.
This method returns a pointer to the transmit buffer.
The caller forms the IEEE 802.15.4 frame in this buffer then calls otLinkRawTransmit() to request transmission.
[in] | aInstance | A pointer to an OpenThread instance. |
bool otLinkRawIsEnabled | ( | otInstance * | aInstance | ) |
This function indicates whether or not the raw link-layer is enabled.
[in] | aInstance | A pointer to an OpenThread instance. |
true | The raw link-layer is enabled. |
false | The raw link-layer is disabled. |
otError otLinkRawReceive | ( | otInstance * | aInstance, |
uint8_t | aChannel, | ||
otLinkRawReceiveDone | aCallback | ||
) |
Transitioning the radio from Sleep to Receive.
Turn on the radio.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChannel | The channel to use for receiving. |
[in] | aCallback | A pointer to a function called on receipt of a IEEE 802.15.4 frame. |
OT_ERROR_NONE | Successfully transitioned to Receive. |
OT_ERROR_INVALID_STATE | The radio was disabled or transmitting. |
otError otLinkRawSetEnable | ( | otInstance * | aInstance, |
bool | aEnabled | ||
) |
This function enables/disables the raw link-layer.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnabled | TRUE to enable raw link-layer, FALSE otherwise. |
OT_ERROR_NONE | If the enable state was successfully set. |
OT_ERROR_INVALID_STATE | If the OpenThread Ip6 interface is already enabled. |
otError otLinkRawSetExtendedAddress | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress | ||
) |
This function 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. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSetPanId | ( | otInstance * | aInstance, |
uint16_t | aPanId | ||
) |
This function 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. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSetPromiscuous | ( | otInstance * | aInstance, |
bool | aEnable | ||
) |
This function enables or disables promiscuous mode.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | A value to enable or disable promiscuous mode. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSetShortAddress | ( | otInstance * | aInstance, |
uint16_t | aShortAddress | ||
) |
Set the Short Address for address filtering.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aShortAddress | The IEEE 802.15.4 Short Address. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSleep | ( | otInstance * | aInstance | ) |
Transition the radio from Receive to Sleep.
Turn off the radio.
[in] | aInstance | A pointer to an OpenThread instance. |
OT_ERROR_NONE | Successfully transitioned to Sleep. |
OT_ERROR_BUSY | The radio was transmitting |
OT_ERROR_INVALID_STATE | The radio was disabled |
otError otLinkRawSrcMatchAddExtEntry | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress | ||
) |
Adding extended address to the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | The extended address to be added. |
OT_ERROR_NONE | Successfully added extended address to the source match table. |
OT_ERROR_NO_BUFS | No available entry in the source match table. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchAddShortEntry | ( | otInstance * | aInstance, |
const uint16_t | aShortAddress | ||
) |
Adding short address to the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aShortAddress | The short address to be added. |
OT_ERROR_NONE | Successfully added short address to the source match table. |
OT_ERROR_NO_BUFS | No available entry in the source match table. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchClearExtEntries | ( | otInstance * | aInstance | ) |
Removing all the extended addresses from the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchClearExtEntry | ( | otInstance * | aInstance, |
const otExtAddress * | aExtAddress | ||
) |
Removing extended address to the source match table of the radio.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | The extended address to be removed. |
OT_ERROR_NONE | Successfully removed the extended address from the source match table. |
OT_ERROR_NO_ADDRESS | The extended address is not in source match table. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchClearShortEntries | ( | otInstance * | aInstance | ) |
Removing all the short addresses from the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchClearShortEntry | ( | otInstance * | aInstance, |
const uint16_t | aShortAddress | ||
) |
Removing short address to the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aShortAddress | The short address to be removed. |
OT_ERROR_NONE | Successfully removed short address from the source match table. |
OT_ERROR_NO_ADDRESS | The short address is not in source match table. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawSrcMatchEnable | ( | otInstance * | aInstance, |
bool | aEnable | ||
) |
Enable/Disable source match for AutoPend.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | Enable/disable source match for automatical pending. |
OT_ERROR_NONE | If successful. |
OT_ERROR_INVALID_STATE | If the raw link-layer isn't enabled. |
otError otLinkRawTransmit | ( | otInstance * | aInstance, |
otRadioFrame * | aFrame, | ||
otLinkRawTransmitDone | aCallback | ||
) |
This method begins the transmit sequence on the radio.
The caller must form the IEEE 802.15.4 frame in the buffer provided by otLinkRawGetTransmitBuffer() before requesting transmission. The channel and transmit power are also included in the otRadioFrame structure.
The transmit sequence consists of:
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aFrame | A pointer to the frame that was transmitted. |
[in] | aCallback | A pointer to a function called on completion of the transmission. |
OT_ERROR_NONE | Successfully transitioned to Transmit. |
OT_ERROR_INVALID_STATE | The radio was not in the Receive state. |