رابط أساسي
تشمل هذه الوحدة وظائف تتحكم في ضبط طبقة الرابط الأولية.
الملخّص
مواقد الخط |
|
---|---|
otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi)
|
مَعلمة typetypevoid(*
مؤشر الدالة هذا عند استلام إطار IEEE 802.15.4. |
otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
|
مَعلمة typetypevoid(*
مؤشر الدالة هذا عند استلام إطار IEEE 802.15.4. |
otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError)
|
مَعلمة typetypevoid(*
مؤشر الدالة هذا عند استلام إطار 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)
|
انتقالات الراديو من خدمة Transmit toReceive (نقل المحتوى إلى الاستلام)
|
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.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
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 )
تحصل هذه الدالة على حالة الوضع المتنوّع.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
otLinkRawGetRadioTime
uint64_t otLinkRawGetRadioTime( otInstance *aInstance )
احصل على وقت النظام الأساسي الحالي (عرض 64 بت) لرقاقة الراديو.
التفاصيل | |||
---|---|---|---|
المعلَمات |
|
||
طلبات الإرجاع |
وقت الراديو الحالي بالميكروثانية.
|
otLinkRawGetRssi
int8_t otLinkRawGetRssi( otInstance *aInstance )
يمكنك الاطّلاع على أحدث قياس RSSI.
التفاصيل | |||
---|---|---|---|
المعلَمات |
|
||
طلبات الإرجاع |
تنسيق RSSI بالديسيبل ميلي واط عندما يكون صالحًا. 127 عندما يكون RSSI غير صالح.
|
otLinkRawGetTransmitBuffer
otRadioFrame * otLinkRawGetTransmitBuffer( otInstance *aInstance )
انتقالات الراديو من خدمة Transmit toReceive (نقل المحتوى إلى الاستلام)
تعرض هذه الطريقة مؤشرًا إلى المخزن المؤقت للإرسال.
ويطلب المتصل إطار IEEE 802.15.4 في هذا المخزن المؤقت، ثم يستدعي otLinkRawTransmit() لطلب النقل.
التفاصيل | |||
---|---|---|---|
المعلَمات |
|
||
طلبات الإرجاع |
مؤشر إلى المخزن المؤقت للنقل أو فارغ إذا لم يتم تفعيل طبقة الرابط الأولية.
|
otLinkRawIsEnabled
bool otLinkRawIsEnabled( otInstance *aInstance )
وتوضّح هذه الدالة ما إذا كانت طبقة الروابط الأولية مفعّلة أم لا.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
otLinkRawReceive
otError otLinkRawReceive( otInstance *aInstance )
جارٍ نقل الراديو من وضع السكون إلى الاستلام.
شغِّل الراديو.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
otLinkRawSetMacFrameCounter
otError otLinkRawSetMacFrameCounter( 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 )
تعمل هذه الوظيفة على تفعيل وضع المشاعر أو إيقافه.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
otLinkRawSetReceiveDone
otError otLinkRawSetReceiveDone( otInstance *aInstance, otLinkRawReceiveDone aCallback )
تعمل هذه الدالة على تفعيل/إيقاف طبقة الروابط الأولية.
التفاصيل | |||||||
---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||
قيم الإرجاع |
|
otLinkRawSetShortAddress
otError otLinkRawSetShortAddress( otInstance *aInstance, uint16_t aShortAddress )
إعداد العنوان القصير لفلترة العناوين.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
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 على القناة المحددة وبقوة إرسال معيّنة.
التفاصيل | |||||
---|---|---|---|---|---|
المعلَمات |
|
||||
قيم الإرجاع |
|
المراجع
تنشأ مواضيع واجهة برمجة التطبيقات المرجعية لـ OpenThread من رمز المصدر، المتوفر على GitHub. للاطّلاع على مزيد من المعلومات أو للمساهمة في مستنداتنا، يُرجى الرجوع إلى المراجع.