رابط Raw
تتضمن هذه الوحدة وظائف تتحكم في ضبط طبقة الرابط الأولية.
ملخّص
أنواع المحددات |
|
---|---|
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
الحصول على حالة الوضع غير الموحّد.
|
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)
|
تفعيل وضع الرسائل غير المرغوب فيها أو إيقافه.
|
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)
|
لبدء تسلسل الإرسال على الراديو.
|
أنواع المحددات
otLinkRawEnergyScanتم
void(* otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
مؤشر عند استلام إطار IEEE 802.15.4
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
otLinkRaw الاستلامتم
void(* otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
مؤشر عند استلام إطار IEEE 802.15.4
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
otLinkRawTransmitتمّ
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 )
الحصول على حالة الوضع غير الموحّد.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
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() لطلب نقل البيانات.
التفاصيل | |||
---|---|---|---|
المَعلمات |
|
||
المرتجعات |
مؤشر إلى المخزن المؤقت للنقل أو القيمة الفارغة إذا لم يتم تفعيل طبقة الرابط الأولية.
|
otLinkRawIsEnabled
bool otLinkRawIsEnabled( otInstance *aInstance )
يشير إلى ما إذا كان قد تم تفعيل طبقة الروابط الأولية.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
otLinkRawReceived
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 )
تفعيل وضع الرسائل غير المرغوب فيها أو إيقافه.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
otLinkRawSetReceivedتمّ
otError otLinkRawSetReceiveDone( otInstance *aInstance, otLinkRawReceiveDone aCallback )
لتفعيل/إيقاف طبقة الرابط الأولية.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
||||||
قيم الإرجاع |
|
otLinkRawSetShortAddress
otError otLinkRawSetShortAddress( otInstance *aInstance, uint16_t aShortAddress )
حدِّد العنوان القصير لفلترة العناوين.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
otLinkRawSleep
otError otLinkRawSleep( otInstance *aInstance )
يمكنك نقل الراديو من وضع "الاستلام" إلى وضع "النوم".
أوقِف الراديو.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
||||||
قيم الإرجاع |
|
إدخال otLinkRawSrcmatchAddExt
otError otLinkRawSrcMatchAddExtEntry( otInstance *aInstance, const otExtAddress *aExtAddress )
إضافة عنوان موسع إلى جدول مطابقة المصدر
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
||||||
قيم الإرجاع |
|
إدخال otLinkRawSrcmatchAddShort
otError otLinkRawSrcMatchAddShortEntry( otInstance *aInstance, uint16_t aShortAddress )
إضافة عنوان قصير إلى جدول مطابقة المصدر.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
||||||
قيم الإرجاع |
|
otLinkRawSrcmatchClearExtEntries
otError otLinkRawSrcMatchClearExtEntries( otInstance *aInstance )
جارٍ إزالة جميع العناوين الموسَّعة من جدول مطابقة المصدر.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
إدخال otLinkRawSrcmatchClearExt
otError otLinkRawSrcMatchClearExtEntry( otInstance *aInstance, const otExtAddress *aExtAddress )
جارٍ إزالة العنوان الموسّع إلى جدول مطابقة المصدر للراديو.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المَعلمات |
|
||||||
قيم الإرجاع |
|
otLinkRawSrcmatchClearShortEntries
otError otLinkRawSrcMatchClearShortEntries( otInstance *aInstance )
جارٍ إزالة جميع العناوين القصيرة من جدول مطابقة المصدر.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
إدخال otLinkRawSrcmatchClearShort
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 على القناة المحددة وقوة النقل المحددة.
التفاصيل | |||||
---|---|---|---|---|---|
المَعلمات |
|
||||
قيم الإرجاع |
|
الموارد
تبدأ مواضيع مراجع واجهة برمجة تطبيقات OpenThread من رمز المصدر، وهو متاح على GitHub. للحصول على مزيد من المعلومات أو للمساهمة في المستندات، يمكنك الاطّلاع على المراجع.