原始鏈接
該模塊包括控制原始鏈路層配置的功能。
概要
類型定義 |
---|
otLinkRawEnergyScanDone )(otInstance *aInstance, int8_t aEnergyScanMaxRssi) | 類型定義 void(*
收到IEEE 802.15.4幀時此函數指針。 |
otLinkRawReceiveDone )(otInstance *aInstance, otRadioFrame *aFrame, otError aError) | 類型定義 void(*
收到IEEE 802.15.4幀時此函數指針。 |
otLinkRawTransmitDone )(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError) | 類型定義 void(*
收到IEEE 802.15.4幀時此函數指針。 |
職能 |
---|
otLinkRawEnergyScan ( otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback) | 該方法開始於無線電能量掃描序列。 |
otLinkRawGetCaps ( otInstance *aInstance) | 獲取廣播功能。 |
otLinkRawGetPromiscuous ( otInstance *aInstance) | bool 此功能獲取混雜模式的狀態。 |
otLinkRawGetRadioTime ( otInstance *aInstance) | uint64_t 獲取無線電芯片的當前平台時間(64位寬度)。 |
otLinkRawGetRssi ( otInstance *aInstance) | int8_t 獲取最新的RSSI測量值。 |
otLinkRawGetTransmitBuffer ( otInstance *aInstance) | 無線電從發送轉換為接收。 |
otLinkRawIsEnabled ( otInstance *aInstance) | bool 該功能指示是否啟用了原始鏈路層。 |
otLinkRawReceive ( otInstance *aInstance) | 將無線電從睡眠模式轉換為接收模式。 |
otLinkRawSetMacFrameCounter ( otInstance *aInstance, uint32_t aMacFrameCounter) | 設置當前的MAC幀計數器值。 |
otLinkRawSetMacKey ( otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKey *aPrevKey, const otMacKey *aCurrKey, const otMacKey *aNextKey) | 更新MAC密鑰和密鑰索引。 |
otLinkRawSetPromiscuous ( otInstance *aInstance, bool aEnable) | 此功能啟用或禁用混雜模式。 |
otLinkRawSetReceiveDone ( otInstance *aInstance, otLinkRawReceiveDone aCallback) | 此功能啟用/禁用原始鏈路層。 |
otLinkRawSetShortAddress ( otInstance *aInstance, uint16_t aShortAddress) | 設置短地址以進行地址過濾。 |
otLinkRawSleep ( otInstance *aInstance) | 將無線電從“接收”轉換為“睡眠”。 |
otLinkRawSrcMatchAddExtEntry ( otInstance *aInstance, const otExtAddress *aExtAddress) | 將擴展地址添加到源匹配表。 |
otLinkRawSrcMatchAddShortEntry ( otInstance *aInstance, uint16_t aShortAddress) | 將短地址添加到源匹配表。 |
otLinkRawSrcMatchClearExtEntries ( otInstance *aInstance) | 從源匹配表中刪除所有擴展地址。 |
otLinkRawSrcMatchClearExtEntry ( otInstance *aInstance, const otExtAddress *aExtAddress) | 刪除擴展地址到無線電的源匹配表。 |
otLinkRawSrcMatchClearShortEntries ( otInstance *aInstance) | 從源匹配表中刪除所有短地址。 |
otLinkRawSrcMatchClearShortEntry ( otInstance *aInstance, uint16_t aShortAddress) | 刪除源匹配表的短地址。 |
otLinkRawSrcMatchEnable ( otInstance *aInstance, bool aEnable) | 啟用/禁用未決源匹配幀。 |
otLinkRawTransmit ( otInstance *aInstance, otLinkRawTransmitDone aCallback) | 該方法開始於無線電發射序列。 |
類型定義
otLinkRawEnergyScanDone
void(* otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
收到IEEE 802.15.4幀時此函數指針。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aEnergyScanMaxRssi | 掃描通道上遇到的最大RSSI。 |
|
otLinkRawReceiveDone
void(* otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
收到IEEE 802.15.4幀時此函數指針。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aFrame | 指向接收到的幀的指針;如果接收操作被中止,則為NULL。 | [in] aError | OT_ERROR_NONE成功接收幀時。接收中止且未接收到幀時的OT_ERROR_ABORT。 |
|
otLinkRawTransmitDone
void(* otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
收到IEEE 802.15.4幀時此函數指針。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aFrame | 指向已發送幀的指針。 | [in] aAckFrame | 指向ACK幀的指針。 | [in] aError | 傳輸幀時的OT_ERROR_NONE。傳輸幀時收到OT_ERROR_NO_ACK,但未收到ACK時OT_ERROR_CHANNEL_ACCESS_FAILURE當由於通道上的活動而無法進行傳輸時。傳輸因其他原因中止時的OT_ERROR_ABORT。 |
|
職能
otLinkRawEnergyScan
otError otLinkRawEnergyScan(
otInstance *aInstance,
uint8_t aScanChannel,
uint16_t aScanDuration,
otLinkRawEnergyScanDone aCallback
)
此方法開始無線電上的能量掃描序列。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aScanChannel | 執行能量掃描的通道。 | [in] aScanDuration | 掃描通道的持續時間(以毫秒為單位)。 | [in] aCallback | 指向完成掃描通道時調用的函數的指針。 |
|
返回值 | OT_ERROR_NONE | 成功開始掃描頻道。 | OT_ERROR_NOT_IMPLEMENTED | 收音機不支持能量掃描。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawGetCaps
otRadioCaps otLinkRawGetCaps(
otInstance *aInstance
)
獲取廣播功能。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
退貨 | 無線電能力位向量。堆棧基於此值啟用或禁用某些功能。 |
otLinkRawGetPromiscuous
bool otLinkRawGetPromiscuous(
otInstance *aInstance
)
此功能獲取混雜模式的狀態。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | true | 混雜模式已啟用。 | false | 混雜模式被禁用。 |
|
otLinkRawGetRadioTime
uint64_t otLinkRawGetRadioTime(
otInstance *aInstance
)
獲取無線電芯片的當前平台時間(64位寬度)。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
退貨 | 當前的無線電時間,以微秒為單位。 |
int8_t otLinkRawGetRssi(
otInstance *aInstance
)
獲取最新的RSSI測量值。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
退貨 | 有效時的RSSI(以dBm為單位)。 RSSI無效時為127。 |
otLinkRawGetTransmitBuffer
otRadioFrame * otLinkRawGetTransmitBuffer(
otInstance *aInstance
)
無線電從發送轉換為接收。
該方法返回一個指向發送緩衝區的指針。
調用方在此緩衝區中形成IEEE 802.15.4幀,然後調用otLinkRawTransmit()以請求傳輸。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
退貨 | 指向傳輸緩衝區的指針;如果未啟用原始鏈路層,則為NULL。 |
otLinkRawIsEnabled
bool otLinkRawIsEnabled(
otInstance *aInstance
)
該功能指示是否啟用了原始鏈路層。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | true | 原始鏈路層已啟用。 | false | 原始鏈路層已禁用。 |
|
otLinkRawReceive
otError otLinkRawReceive(
otInstance *aInstance
)
將無線電從睡眠模式轉換為接收模式。
打開收音機。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | OT_ERROR_NONE | 成功過渡到接收。 | OT_ERROR_INVALID_STATE | 收音機已禁用或正在傳輸。 |
|
otLinkRawSetMacFrameCounter
otError otLinkRawSetMacFrameCounter(
otInstance *aInstance,
uint32_t aMacFrameCounter
)
設置當前的MAC幀計數器值。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aMacFrameCounter | MAC幀計數器值。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSetMacKey
otError otLinkRawSetMacKey(
otInstance *aInstance,
uint8_t aKeyIdMode,
uint8_t aKeyId,
const otMacKey *aPrevKey,
const otMacKey *aCurrKey,
const otMacKey *aNextKey
)
更新MAC密鑰和密鑰索引。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aKeyIdMode | 密鑰ID模式。 | [in] aKeyId | 關鍵索引。 | [in] aPrevKey | 上一個MAC密鑰。 | [in] aCurrKey | 當前的MAC密鑰。 | [in] aNextKey | 下一個MAC密鑰。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSetPromiscuous
otError otLinkRawSetPromiscuous(
otInstance *aInstance,
bool aEnable
)
此功能啟用或禁用混雜模式。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aEnable | 用於啟用或禁用混雜模式的值。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSetReceiveDone
otError otLinkRawSetReceiveDone(
otInstance *aInstance,
otLinkRawReceiveDone aCallback
)
此功能啟用/禁用原始鏈路層。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aCallback | 指向在收到IEEE 802.15.4幀時調用的函數的指針。 NULL禁用原始鏈路層。 |
|
返回值 | OT_ERROR_FAILED | 無法啟用/禁用無線電。 | OT_ERROR_INVALID_STATE | 如果已啟用OpenThread Ip6接口。 | OT_ERROR_NONE | 成功設置啟用狀態。 |
|
otLinkRawSetShortAddress
otError otLinkRawSetShortAddress(
otInstance *aInstance,
uint16_t aShortAddress
)
設置短地址以進行地址過濾。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aShortAddress | IEEE 802.15.4短地址。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSleep
otError otLinkRawSleep(
otInstance *aInstance
)
將無線電從“接收”轉換為“睡眠”。
關閉收音機。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | OT_ERROR_NONE | 成功過渡到睡眠。 | OT_ERROR_BUSY | 收音機正在傳送 | OT_ERROR_INVALID_STATE | 收音機被禁用 |
|
otLinkRawSrcMatchAddExtEntry
otError otLinkRawSrcMatchAddExtEntry(
otInstance *aInstance,
const otExtAddress *aExtAddress
)
將擴展地址添加到源匹配表。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aExtAddress | 要添加的擴展地址。 |
|
返回值 | OT_ERROR_NONE | 已成功將擴展地址添加到源匹配表。 | OT_ERROR_NO_BUFS | 源匹配表中沒有可用的條目。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSrcMatchAddShortEntry
otError otLinkRawSrcMatchAddShortEntry(
otInstance *aInstance,
uint16_t aShortAddress
)
將短地址添加到源匹配表。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aShortAddress | 要添加的短地址。 |
|
返回值 | OT_ERROR_NONE | 已將簡短地址成功添加到源匹配表。 | OT_ERROR_NO_BUFS | 源匹配表中沒有可用的條目。 | OT_ERROR_INVALID_STATE | 如果未啟用原鏈路層。 |
|
otLinkRawSrcMatchClearExtEntries
otError otLinkRawSrcMatchClearExtEntries(
otInstance *aInstance
)
從源匹配表中刪除所有擴展地址。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原鏈路層。 |
|
otLinkRawSrcMatchClearExtEntry
otError otLinkRawSrcMatchClearExtEntry(
otInstance *aInstance,
const otExtAddress *aExtAddress
)
刪除擴展地址到無線電的源匹配表。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aExtAddress | 要刪除的擴展地址。 |
|
返回值 | OT_ERROR_NONE | 從源匹配表中成功刪除擴展地址。 | OT_ERROR_NO_ADDRESS | 擴展地址不在源匹配表中。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSrcMatchClearShortEntries
otError otLinkRawSrcMatchClearShortEntries(
otInstance *aInstance
)
從源匹配表中刪除所有短地址。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSrcMatchClearShortEntry
otError otLinkRawSrcMatchClearShortEntry(
otInstance *aInstance,
uint16_t aShortAddress
)
刪除源匹配表的短地址。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aShortAddress | 要刪除的短地址。 |
|
返回值 | OT_ERROR_NONE | 從源匹配表中成功刪除了短地址。 | OT_ERROR_NO_ADDRESS | 短地址不在源匹配表中。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|
otLinkRawSrcMatchEnable
第0394章
啟用/禁用幀掛起的源匹配。
細節 | 參量 | [in] aInstance | 指向OpenThread實例的指針。 | [in] aEnable | 啟用/禁用幀匹配的源匹配。 |
|
返回值 | OT_ERROR_NONE | 如果成功。 | OT_ERROR_INVALID_STATE | 如果未啟用原始鏈路層。 |
|