ลิงก์ข้อมูลดิบ
โมดูลนี้มีฟังก์ชันที่ควบคุมการกำหนดค่าเลเยอร์ลิงก์ดิบ
สรุป
Typedef |
|
|---|---|
otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
|
typedefvoid(*
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4 |
otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
|
typedefvoid(*
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4 |
otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
|
typedefvoid(*
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4 |
ฟังก์ชัน |
|
|---|---|
otLinkRawEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback)
|
เริ่มลำดับการสแกนพลังงานทางวิทยุ
|
otLinkRawGetCaps(otInstance *aInstance)
|
ใช้ความสามารถของวิทยุ
|
otLinkRawGetPromiscuous(otInstance *aInstance)
|
bool
รับสถานะของโหมด Promiscuous
|
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 ในปัจจุบัน
|
otLinkRawSetMacFrameCounterIfLarger(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)
|
เปิดหรือปิดโหมด Promiscuous
|
otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCallback)
|
เปิด/ปิดใช้เลเยอร์ลิงก์แบบข้อมูลดิบ
|
otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress)
|
ตั้งค่า Short Address สำหรับการกรองที่อยู่
|
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)
|
เริ่มลำดับการส่งทางวิทยุ
|
Typedef
otLinkRawEnergyScanDone
void(* otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
otLinkRawReceiveDone
void(* otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
otLinkRawTransmitDone
void(* otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
ตัวชี้บนใบเสร็จเฟรม IEEE 802.15.4
| รายละเอียด | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||||
ฟังก์ชัน
otLinkRawEnergyScan
otError otLinkRawEnergyScan( otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback )
เริ่มลำดับการสแกนพลังงานทางวิทยุ
| รายละเอียด | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||||
| แสดงผลค่า |
|
||||||||
otLinkRawGetCaps
otRadioCaps otLinkRawGetCaps( otInstance *aInstance )
ใช้ความสามารถของวิทยุ
| รายละเอียด | |||
|---|---|---|---|
| พารามิเตอร์ |
|
||
| การส่งคืน |
เวกเตอร์ของความสามารถในการใช้งานวิทยุ สแต็กจะเปิดใช้หรือปิดใช้ฟังก์ชันบางรายการตามค่านี้
|
||
otLinkRawGetPromiscuous
bool otLinkRawGetPromiscuous( otInstance *aInstance )
รับสถานะของโหมด Promiscuous
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawGetRadioTime
uint64_t otLinkRawGetRadioTime( otInstance *aInstance )
ดูเวลาแพลตฟอร์มปัจจุบัน (ความกว้าง 64 บิต) ของชิปตัวเลือก
| รายละเอียด | |||
|---|---|---|---|
| พารามิเตอร์ |
|
||
| การส่งคืน |
เวลาวิทยุปัจจุบันในหน่วยไมโครวินาที
|
||
otLinkRawGetRssi
int8_t otLinkRawGetRssi( otInstance *aInstance )
ดูการวัด RSSI ล่าสุด
| รายละเอียด | |||
|---|---|---|---|
| พารามิเตอร์ |
|
||
| การส่งคืน |
RSSI ใน dBm เมื่อถูกต้อง 127 เมื่อ RSSI ไม่ถูกต้อง
|
||
otLinkRawGetTransmitBuffer
otRadioFrame * otLinkRawGetTransmitBuffer( otInstance *aInstance )
วิทยุจะเปลี่ยนจาก "ส่ง" เป็น "รับ"
แสดงตัวชี้ไปยังบัฟเฟอร์การส่ง
ผู้เรียกใช้สร้างเฟรม IEEE 802.15.4 ในบัฟเฟอร์นี้ จากนั้นจะเรียก otLinkRawTransmit() เพื่อขอให้ส่งข้อมูล
| รายละเอียด | |||
|---|---|---|---|
| พารามิเตอร์ |
|
||
| การส่งคืน |
ตัวชี้ไปยังบัฟเฟอร์การส่งหรือ NULL หากไม่ได้เปิดใช้งานเลเยอร์ลิงก์ข้อมูล RAW
|
||
otLinkRawIsEnabled
bool otLinkRawIsEnabled( otInstance *aInstance )
ระบุว่ามีการเปิดใช้เลเยอร์ลิงก์แบบข้อมูลดิบหรือไม่
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawReceive
otError otLinkRawReceive( otInstance *aInstance )
กําลังเปลี่ยนวิทยุจาก "นอนหลับ" เป็น "รับ"
เปิดวิทยุ
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSetMacFrameCounter
otError otLinkRawSetMacFrameCounter( otInstance *aInstance, uint32_t aMacFrameCounter )
ตั้งค่าตัวนับเฟรมของ MAC ในปัจจุบัน
ตั้งค่าตัวนับ MAC เป็นค่าใหม่ที่ระบุ aMacFrameCounter โดยไม่ขึ้นอยู่กับค่าปัจจุบันเสมอ
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSetMacFrameCounterIfLarger
otError otLinkRawSetMacFrameCounterIfLarger( otInstance *aInstance, uint32_t aMacFrameCounter )
ตั้งค่าตัวนับเฟรม MAC ปัจจุบันเฉพาะในกรณีที่ค่าใหม่มากกว่าค่าปัจจุบัน
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSetMacKey
otError otLinkRawSetMacKey( otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKey *aPrevKey, const otMacKey *aCurrKey, const otMacKey *aNextKey )
อัปเดตคีย์ MAC และดัชนีคีย์
| รายละเอียด | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||||||||
| แสดงผลค่า |
|
||||||||||||
otLinkRawSetPromiscuous
otError otLinkRawSetPromiscuous( otInstance *aInstance, bool aEnable )
เปิดหรือปิดโหมด Promiscuous
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSetReceiveDone
otError otLinkRawSetReceiveDone( otInstance *aInstance, otLinkRawReceiveDone aCallback )
เปิด/ปิดใช้เลเยอร์ลิงก์แบบข้อมูลดิบ
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSetShortAddress
otError otLinkRawSetShortAddress( otInstance *aInstance, uint16_t aShortAddress )
ตั้งค่า Short Address สำหรับการกรองที่อยู่
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSleep
otError otLinkRawSleep( otInstance *aInstance )
เปลี่ยนวิทยุจากการรับเป็นโหมดสลีป
ปิดวิทยุ
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSrcMatchAddExtEntry
otError otLinkRawSrcMatchAddExtEntry( otInstance *aInstance, const otExtAddress *aExtAddress )
กำลังเพิ่มที่อยู่ที่ขยายลงในตารางการจับคู่ต้นทาง
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSrcMatchAddShortEntry
otError otLinkRawSrcMatchAddShortEntry( otInstance *aInstance, uint16_t aShortAddress )
กำลังเพิ่มที่อยู่แบบสั้นลงในตารางการจับคู่ต้นทาง
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSrcMatchClearExtEntries
otError otLinkRawSrcMatchClearExtEntries( otInstance *aInstance )
นําที่อยู่แบบขยายทั้งหมดออกจากตารางการจับคู่ต้นทาง
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSrcMatchClearExtEntry
otError otLinkRawSrcMatchClearExtEntry( otInstance *aInstance, const otExtAddress *aExtAddress )
กำลังนำที่อยู่แบบขยายออกจากตารางการจับคู่ต้นทางของวิทยุ
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSrcMatchClearShortEntries
otError otLinkRawSrcMatchClearShortEntries( otInstance *aInstance )
นําที่อยู่แบบสั้นทั้งหมดออกจากตารางการจับคู่ต้นทาง
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawSrcMatchClearShortEntry
otError otLinkRawSrcMatchClearShortEntry( otInstance *aInstance, uint16_t aShortAddress )
กำลังนำที่อยู่แบบสั้นออกจากตารางการจับคู่ต้นทาง
| รายละเอียด | |||||||
|---|---|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||||
| แสดงผลค่า |
|
||||||
otLinkRawSrcMatchEnable
otError otLinkRawSrcMatchEnable( otInstance *aInstance, bool aEnable )
เปิด/ปิดใช้การจับคู่แหล่งที่มาสำหรับเฟรมที่รอดำเนินการ
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
otLinkRawTransmit
otError otLinkRawTransmit( otInstance *aInstance, otLinkRawTransmitDone aCallback )
เริ่มลำดับการส่งทางวิทยุ
ผู้เรียกใช้ต้องมีเฟรม IEEE 802.15.4 ในบัฟเฟอร์ที่ otLinkRawGetTransmitBuffer() ระบุไว้ก่อนขอการส่งข้อมูล ช่องสัญญาณและกำลังส่งจะรวมอยู่ในโครงสร้าง otRadioFrame ด้วย
ลำดับการส่งประกอบด้วยข้อมูลต่อไปนี้
- กำลังเปลี่ยนสัญญาณวิทยุเป็น "ส่งจากการรับ"
- ส่ง PSDU ในช่องและตามกำลังส่งที่ระบุ
| รายละเอียด | |||||
|---|---|---|---|---|---|
| พารามิเตอร์ |
|
||||
| แสดงผลค่า |
|
||||
แหล่งข้อมูล
หัวข้ออ้างอิง API ของ OpenThread จะมาจากซอร์สโค้ดซึ่งพร้อมใช้งานใน GitHub ดูข้อมูลเพิ่มเติมหรือมีส่วนร่วมในเอกสารประกอบของเราได้ที่แหล่งข้อมูล