無線電設定
這個模組包含無線電設定的平台抽象層。
摘要
Functions |
|
---|---|
otPlatRadioGetBusSpeed(otInstance *aInstance)
|
uint32_t
取得主機和無線電晶片之間的公車速度 (以位元/秒為單位)。
|
otPlatRadioGetCaps(otInstance *aInstance)
|
取得電台功能。
|
otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold)
|
根為 IEEE 802.15.4 - 2015 第 10.1.4 部分在天後連接器上執行為 Radio 的 CCA ED 閾值,以 dBm 為單位。
|
otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain)
|
取得外部 FEM 的 Rx LNA 增益 (dBm)。
|
otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
|
void
取得此介面的工廠指派的 IEEE EUI-64。
|
otPlatRadioGetNow(otInstance *aInstance)
|
uint64_t
取得無線電晶片目前的預估時間 (以微秒為單位)。
|
otPlatRadioGetPromiscuous(otInstance *aInstance)
|
bool
取得鄰近模式的狀態。
|
otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
|
int8_t
取得無線電接收靈敏度值。
|
otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
|
取得收音機的傳輸功率 (dBm)。
|
otPlatRadioGetVersionString(otInstance *aInstance)
|
const char *
取得無線電版本字串。
|
otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold)
|
根為 IEEE 802.15.4 - 2015 第 10.1.4 部分在天後連接器上測量的 dBm 為.
|
otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
|
void
設定地址位址擴展地址。
|
otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain)
|
設定外部 FEM 的 Rx LNA 增益 (dBm)。
|
otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter)
|
void
此方法會設定目前的 MAC 影格計數器值。
|
otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter)
|
void
只有在新的指定值大於目前的值時,此方法才會設定目前的 MAC 影格計數器值。
|
otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey, const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType)
|
void
更新 MAC 金鑰和金鑰索引。
|
otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId)
|
void
設定用於篩選地址的 PAN ID。
|
otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable)
|
void
啟用或停用鄰近模式。
|
otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress)
|
void
設定短位址篩選位址。
|
otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
|
設定無線電的傳輸功率 (dBm)。
|
Functions
otPlatRadioGetBusSpeed
uint32_t otPlatRadioGetBusSpeed( otInstance *aInstance )
取得主機和無線電晶片之間的公車速度 (以位元/秒為單位)。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
主機與無線電晶片之間的匯流速度 (單位為秒/秒)。如果 MAC 位址以上圖層和無線電圖層位在同一個晶片上,則傳回 0。
|
otPlatRadioGetCaps
otRadioCaps otPlatRadioGetCaps( otInstance *aInstance )
取得電台功能。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
無線電功能位元向量 (請參閱
OT_RADIO_CAP_* 定義)。 |
otPlatRadioGetCcaEnergyDetectThreshold
otError otPlatRadioGetCcaEnergyDetectThreshold( otInstance *aInstance, int8_t *aThreshold )
根為 IEEE 802.15.4 - 2015 第 10.1.4 部分在天後連接器上執行為 Radio 的 CCA ED 閾值,以 dBm 為單位。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otPlatRadioGetFemLna 取得
otError otPlatRadioGetFemLnaGain( otInstance *aInstance, int8_t *aGain )
取得外部 FEM 的 Rx LNA 增益 (dBm)。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otPlatRadioGetIeeeEui64
void otPlatRadioGetIeeeEui64( otInstance *aInstance, uint8_t *aIeeeEui64 )
取得此介面的工廠指派的 IEEE EUI-64。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioGetNow
uint64_t otPlatRadioGetNow( otInstance *aInstance )
取得無線電晶片目前的預估時間 (以微秒為單位)。
這個微秒計時器必須是計時性計時器。即使無線電處於休眠狀態,計時器也必須以微秒的精確度持續推進。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
目前時間,單位為毫秒。UINT64_MAX,但這個平台不支援或尚未準備好電台時間。
|
otPlatRadioGetPromiscuous
bool otPlatRadioGetPromiscuous( otInstance *aInstance )
取得鄰近模式的狀態。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otPlatRadioGetReceiveSensitivity
int8_t otPlatRadioGetReceiveSensitivity( otInstance *aInstance )
取得無線電接收靈敏度值。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
收音機接收到的靈敏度值,以 dBm 為單位。
|
otPlatRadioGetTransmitPower
otError otPlatRadioGetTransmitPower( otInstance *aInstance, int8_t *aPower )
取得收音機的傳輸功率 (dBm)。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otPlatRadioGetVersionString
const char * otPlatRadioGetVersionString( otInstance *aInstance )
取得無線電版本字串。
這是選用的無線電驅動程式平台功能。如果沒有提供平台無線電驅動程式,OpenThread 則會改用 OpenThread 版本 (
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
指向 OpenThread 無線電版本的指標。
|
otGetVersionString())。
otPlatRadioSetCcaEnergyDetectThreshold
otError otPlatRadioSetCcaEnergyDetectThreshold( otInstance *aInstance, int8_t aThreshold )
根為 IEEE 802.15.4 - 2015 第 10.1.4 部分在天後連接器上測量的 dBm 為.
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otPlatRadioSetExtendedAddress
void otPlatRadioSetExtendedAddress( otInstance *aInstance, const otExtAddress *aExtAddress )
設定地址位址擴展地址。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetFemLna 取得
otError otPlatRadioSetFemLnaGain( otInstance *aInstance, int8_t aGain )
設定外部 FEM 的 Rx LNA 增益 (dBm)。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otPlatRadioSetMacFrameCounter
void otPlatRadioSetMacFrameCounter( otInstance *aInstance, uint32_t aMacFrameCounter )
此方法會設定目前的 MAC 影格計數器值。
當無線電提供 OT_RADIO_CAPS_TRANSMIT_SEC
功能時,系統就會使用這個函式。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetMacFrameCounterIfLarger
void otPlatRadioSetMacFrameCounterIfLarger( otInstance *aInstance, uint32_t aMacFrameCounter )
只有在新的指定值大於目前的值時,此方法才會設定目前的 MAC 影格計數器值。
當無線電提供 OT_RADIO_CAPS_TRANSMIT_SEC
功能時,系統就會使用這個函式。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetMacKey
void otPlatRadioSetMacKey( otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey, const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType )
更新 MAC 金鑰和金鑰索引。
無線電提供 OT_RADIO_CAPS_TRANSMIT_SEC 功能時會使用此功能。
詳細資料 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
otPlatRadioSetPanId
void otPlatRadioSetPanId( otInstance *aInstance, otPanId aPanId )
設定用於篩選地址的 PAN ID。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetPromiscuous
void otPlatRadioSetPromiscuous( otInstance *aInstance, bool aEnable )
啟用或停用鄰近模式。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetShortAddress
void otPlatRadioSetShortAddress( otInstance *aInstance, otShortAddress aShortAddress )
設定短位址篩選位址。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otPlatRadioSetTransmitPower
otError otPlatRadioSetTransmitPower( otInstance *aInstance, int8_t aPower )
設定無線電的傳輸功率 (dBm)。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
資源
OpenThread API 參考資料主題來自原始碼,可在 GitHub 取得。如需詳細資訊或為說明文件貢獻一己之力,請參閱資源。