Raw Link#
This module includes functions that control the raw link-layer configuration.
Typedefs#
Pointer on receipt of a IEEE 802.15.4 frame.
Pointer on receipt of a IEEE 802.15.4 frame.
Pointer on receipt of a IEEE 802.15.4 frame.
Functions#
Enables/disables the raw link-layer.
Indicates whether or not the raw link-layer is enabled.
Gets the status of promiscuous mode.
Enables or disables promiscuous mode.
Set the Short Address for address filtering.
Transition the radio from Receive to Sleep.
Transitioning the radio from Sleep to Receive.
This function indicates whether or not the raw link-layer is busy transmitting or scanning.
The radio transitions from Transmit to Receive.
Begins the transmit sequence on the radio.
Get the most recent RSSI measurement.
Get the radio capabilities.
Begins the energy scan sequence on the radio.
Enable/Disable source match for frame pending.
Adding short address to the source match table.
Adding extended address to the source match table.
Removing short address to the source match table.
Removing extended address to the source match table of the radio.
Removing all the short addresses from the source match table.
Removing all the extended addresses from the source match table.
Update MAC keys and key index.
Sets the current MAC frame counter value.
Sets the current MAC frame counter value only if the new value is larger than the current one.
Get current platform time (64bits width) of the radio chip.
Typedef Documentation#
otLinkRawReceiveDone#
typedef void(* otLinkRawReceiveDone) (otInstance *aInstance, otRadioFrame *aFrame, otError aError) )(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
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. |
63
of file include/openthread/link_raw.h
otLinkRawTransmitDone#
typedef void(* otLinkRawTransmitDone) (otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError) )(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
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. |
188
of file include/openthread/link_raw.h
otLinkRawEnergyScanDone#
typedef void(* otLinkRawEnergyScanDone) (otInstance *aInstance, int8_t aEnergyScanMaxRssi) )(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
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. |
239
of file include/openthread/link_raw.h
Function Documentation#
otLinkRawSetReceiveDone#
otError otLinkRawSetReceiveDone (otInstance * aInstance, otLinkRawReceiveDone aCallback)
Enables/disables the raw link-layer.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aCallback | A pointer to a function called on receipt of a IEEE 802.15.4 frame. NULL to disable the raw-link layer. |
77
of file include/openthread/link_raw.h
otLinkRawIsEnabled#
bool otLinkRawIsEnabled (otInstance * aInstance)
Indicates whether or not the raw link-layer is enabled.
[in] | aInstance | A pointer to an OpenThread instance. |
88
of file include/openthread/link_raw.h
otLinkRawGetPromiscuous#
bool otLinkRawGetPromiscuous (otInstance * aInstance)
Gets the status of promiscuous mode.
[in] | aInstance | A pointer to an OpenThread instance. |
99
of file include/openthread/link_raw.h
otLinkRawSetPromiscuous#
otError otLinkRawSetPromiscuous (otInstance * aInstance, bool aEnable)
Enables or disables promiscuous mode.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | A value to enable or disable promiscuous mode. |
111
of file include/openthread/link_raw.h
otLinkRawSetShortAddress#
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. |
123
of file include/openthread/link_raw.h
otLinkRawSleep#
otError otLinkRawSleep (otInstance * aInstance)
Transition the radio from Receive to Sleep.
[in] | aInstance | A pointer to an OpenThread instance. |
Turn off the radio.
136
of file include/openthread/link_raw.h
otLinkRawReceive#
otError otLinkRawReceive (otInstance * aInstance)
Transitioning the radio from Sleep to Receive.
[in] | aInstance | A pointer to an OpenThread instance. |
Turn on the radio.
148
of file include/openthread/link_raw.h
otLinkRawIsTransmittingOrScanning#
bool otLinkRawIsTransmittingOrScanning (otInstance * aInstance)
This function indicates whether or not the raw link-layer is busy transmitting or scanning.
[in] | aInstance | A pointer to an OpenThread instance. |
159
of file include/openthread/link_raw.h
otLinkRawGetTransmitBuffer#
otRadioFrame * otLinkRawGetTransmitBuffer (otInstance * aInstance)
The radio transitions from Transmit to Receive.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
Returns
A pointer to the transmit buffer or NULL if the raw link-layer isn't enabled.
173
of file include/openthread/link_raw.h
otLinkRawTransmit#
otError otLinkRawTransmit (otInstance * aInstance, otLinkRawTransmitDone aCallback)
Begins the transmit sequence on the radio.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aCallback | A pointer to a function called on completion of the transmission. |
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:
Transitioning the radio to Transmit from Receive.
Transmits the PSDU on the given channel and at the given transmit power.
210
of file include/openthread/link_raw.h
otLinkRawGetRssi#
int8_t otLinkRawGetRssi (otInstance * aInstance)
Get the most recent RSSI measurement.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The RSSI in dBm when it is valid. 127 when RSSI is invalid.
220
of file include/openthread/link_raw.h
otLinkRawGetCaps#
otRadioCaps otLinkRawGetCaps (otInstance * aInstance)
Get the radio capabilities.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The radio capability bit vector. The stack enables or disables some functions based on this value.
230
of file include/openthread/link_raw.h
otLinkRawEnergyScan#
otError otLinkRawEnergyScan (otInstance * aInstance, uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback)
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. |
255
of file include/openthread/link_raw.h
otLinkRawSrcMatchEnable#
otError otLinkRawSrcMatchEnable (otInstance * aInstance, bool aEnable)
Enable/Disable source match for frame pending.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnable | Enable/disable source match for frame pending. |
270
of file include/openthread/link_raw.h
otLinkRawSrcMatchAddShortEntry#
otError otLinkRawSrcMatchAddShortEntry (otInstance * aInstance, 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. |
283
of file include/openthread/link_raw.h
otLinkRawSrcMatchAddExtEntry#
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. |
296
of file include/openthread/link_raw.h
otLinkRawSrcMatchClearShortEntry#
otError otLinkRawSrcMatchClearShortEntry (otInstance * aInstance, 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. |
309
of file include/openthread/link_raw.h
otLinkRawSrcMatchClearExtEntry#
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. |
322
of file include/openthread/link_raw.h
otLinkRawSrcMatchClearShortEntries#
otError otLinkRawSrcMatchClearShortEntries (otInstance * aInstance)
Removing all the short addresses from the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
333
of file include/openthread/link_raw.h
otLinkRawSrcMatchClearExtEntries#
otError otLinkRawSrcMatchClearExtEntries (otInstance * aInstance)
Removing all the extended addresses from the source match table.
[in] | aInstance | A pointer to an OpenThread instance. |
344
of file include/openthread/link_raw.h
otLinkRawSetMacKey#
otError otLinkRawSetMacKey (otInstance * aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKey * aPrevKey, const otMacKey * aCurrKey, const otMacKey * aNextKey)
Update MAC keys and key index.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aKeyIdMode | The key ID mode. |
[in] | aKeyId | The key index. |
[in] | aPrevKey | The previous MAC key. |
[in] | aCurrKey | The current MAC key. |
[in] | aNextKey | The next MAC key. |
360
of file include/openthread/link_raw.h
otLinkRawSetMacFrameCounter#
otError otLinkRawSetMacFrameCounter (otInstance * aInstance, uint32_t aMacFrameCounter)
Sets the current MAC frame counter value.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMacFrameCounter | The MAC frame counter value. |
Always sets the MAC counter to the new given value aMacFrameCounter
independent of the current value.
380
of file include/openthread/link_raw.h
otLinkRawSetMacFrameCounterIfLarger#
otError otLinkRawSetMacFrameCounterIfLarger (otInstance * aInstance, uint32_t aMacFrameCounter)
Sets the current MAC frame counter value only if the new value is larger than the current one.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMacFrameCounter | The MAC frame counter value. |
392
of file include/openthread/link_raw.h
otLinkRawGetRadioTime#
uint64_t otLinkRawGetRadioTime (otInstance * aInstance)
Get current platform time (64bits width) of the radio chip.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The current radio time in microseconds.
402
of file include/openthread/link_raw.h