主要内容

このページの翻訳は最新ではありません。ここをクリックして,英語の最新版を参照してください。

内部IEEE 802.15.4——提供服务非同期CSMA MAC

この例では、通信工具箱™的图书馆无线个域网®协议を使用して,IEEE内部®802.15.4™提供服务非同期CSMA MAC (1.]をシミュレーションする方法を説明します。

背景

IEEE 802.15.4規格は、低速無線パーソナル エリア ネットワーク (LR-WPAN) [1.]のMAC層と体育層を規定します。内部IEEE 802.15.4の提供服务MAC層とPHY層は,无线个域网, WirelessHart®、6 lowpan MiWiなどの他の上位層の規格のベースを提供します。このような規格は,ホームオートメーションやセンサーネットワーキングに使用例があり,モノのインターネット(物联网)の流行にも密接に関連しています。

Ieee 802.15.4 MAC [1.2)はつの基本的なMACモード,(我)ビーコン非対応 雨衣と(2)ビーコン対応 雨衣を規定します。ビーコン非対応 雨衣は非同期 CSMA(载波侦听多址)MACであり、IEEE 802.11 MACにとてもよく似ています。ビーコン対応 雨衣では、2.つの異なる 雨衣周期(我)同期型の CSMA MAC周期と(2)タイムスロット型の競合のないMAC周期が許可されます。この例では、ビーコン非対応の非同期 CSMA ベースの IEEE 802.15.4 MAC について幅広いシミュレーションを提供します。

ネットワーク設定

内部IEEE 802.15.4锅提供服务(パーソナルエリアネットワーク)は,エンドデバイスと锅コーディネーターの間の標準的な処理によって設定されます。はじめに,ネットワークに参加しようとしているデバイスが,アクティブまたはパッシブのスキャンを実行します。アクティブ スキャンとは、デバイスがはじめにビーコン要求を送信し,その後でパッシブスキャンを実行することです。パッシブスキャンとは,デバイスが锅コーディネーターからのビーコン フレームを収集するために監視を行うことです。アクティブスキャンの場合,潘コーディネーターはビーコン要求を受信済みであることがあります。パッシブスキャン中にビーコンを収集しているときに,エンドデバイスが関連付けをする锅を選択します。その後,アソシエーション要求をこの锅のコーディネーターに送信し,コーディネーターがその要求に肯定応答します。

IEEE 802.11とは対照的に、コーディネーターはアソシエーション応答をすぐに送信することでアソシエーション要求の肯定応答をフォローしません。代わりに、IEEE 802.15.4コーディネーターは初めにアソシエーション応答をローカルに保存し、エンド デバイスがデータ要求を送信しコーディネーターがそれに肯定応答するときにのみ,アソシエーション応答を送信します。内部IEEE 802.15.4規提供服务格では,このフレーム送信メカニズムを指して間接伝送という用語を使用します。一般に、このメカニズムはトラフィックが少ないネットワーク (センサー ネットワークなど) のバッテリーにより電力を供給されるデバイスにとって非常に有用です。このようなデバイスは、フレームを即座に受信できるように絶え間なく無線を使用する代わりに、定期的に無線をアクティブにして自分宛てのフレームが保留されているかどうかをチェックします。

アソシエーション応答が受信され肯定応答されると,エンドデバイスが锅に関連付けされます。そうすると,コーディネーターとエンドデバイスの間で双方向にデータフレームをやり取りできるようになります。データフレームは、'肯定応答要求' の指示に応じて、肯定応答されます。

非同期メディアアクセス制御(MAC)

内部非同期CSMA IEEE 802.15.4 MACは提供服务,一般的なCSMAの処理とIEEE 802.11 MACによく似ています。このMACスキームでは,CSMAの手法を用いず,肯定応答フレームは即座に送信されます。他のすべてのフレームはCSMAを使用して送信されます。

具体的には,デバイスは,送信すべきフレームを持つと,[0 2 ^ 1]の範囲からランダムにバックオフ遅延(バックオフ周期の数)を選択します。ここで是はバックオフ指数です。各バックオフ周期の期間は20シンボルです.2.4 GHzのOQPSK PHYでは,この期間は128チップと0.32毫秒に相当します。デバイスは,選択したバックオフ周期の数だけ待機すると,搬送波感知を実行します。メディアがアイドルである場合は,デバイスはそのフレームの送信を開始し,すべて送信するまで継続します。

搬送波感知中メディアがビジーであった場合は,バックオフ指数が1増やされ,新しい範囲[0 2 ^ 1]から新しいバックオフ周期数が選択されます。再度バックオフカウンターがいっぱいになったら,搬送波検出が実行されます。すべての搬送波検出インスタンスの間、メディアがアイドルにならずに、バックオフ カウントダウンの最大数に達した場合は、デバイスはフレーム送信試行を終了します。

ネットワークシミュレーション機能

この例では、lrwpan。MACFullFunctionDeviceおよびlrwpan。MACReducedFunctionDeviceクラスを介して、説明したネットワーク設定処理と CSMA手法を実装します。具体的には、以下の機能が有効にされます。

  • アクティブおよびパッシブスキャン

  • アソシエーション要求とアソシエーション応答の交換

  • データ要求を使用した間接伝送

  • 肯定応答がタイムリーに受信されない場合のフレーム肯定応答とフレームの再送信

  • 短いフレーム間隔および長いフレーム間隔(sifおよび生活)

  • バイナリ指数バックオフ

  • 搬送波検出

ネットワークシミュレーション

この節では3ノード(1つの锅コーディネーターと2つのエンドデバイス)で構成される内部IEEE 802.15.4ネ提供服务ットワークを作成します。ネットワークシミュレーターは,単一のバックオフ持続時間(20シンボル,0.32 ms)を1つずつ増やしてすべてのデバイスを処理するように構成します。

はじめに,次のコードで,最初のデバイスとネットワークの関連付けを示します。

symbolsPerStep = 20;chipsPerSymbol = 32;samplesPerChip = 4;symbolRate = 65.5 e3;%符号/秒时间=0;停止时间=5;%交会创建PAN CoordinatorpanCoordinator = lrwpan。MACFullFunctionDevice (“泛协调人”,真的,“SamplesPerChip”4....“PANIdentifier”,“7777”,“扩展地址”[repmat ('0', 1, 8)“7”1 8)),...“ShortAddress”,“1234”);%创建第一个终端设备:endDevice1 = lrwpan。MACReducedFunctionDevice(“SamplesPerChip”4...“ShortAddress”,“0001”,“扩展地址”[repmat ('0', 1, 8)“3”, 1, 8)]);初始化设备输入received1=零(采样概率*芯片符号*符号步骤/2,1);received2=零(采样概率*芯片符号*符号步骤/2,1);时间<停止时间将接收到的信号传递给节点进行处理。另外,获取什么%他们必须传播:transmitted1 = panCoordinator (received1);transmitted2 = endDevice1 (received2);%理想的无线信道,其中两个节点都在范围内:received1 = transmitted2;%半双工无线电,发送时不接收received2 = transmitted1;time = time + symbolsPerStep/symbolRate;%更新时钟结束
0001:*******将信标请求帧添加到队列0001:1584的被动扫描步骤0001:处理队列0001中的下一帧:初始化传输;退避延迟=1步骤0001:退避延迟=1步骤->0步骤0001:载波感应:介质空闲。0001:清除发送0001:发送信标请求0001:IFS偏移=0样本0001:发送2050年的1-1280发现OQPSK PHY的前导码。找到OQPSK PHY的帧分隔符(SFD)的开始。0001:IFS偏移=0样本0001:传输1281-2050个,共2050个0001:完成传输0001:需要等待SIFS(12)符号。偏移量=12,下一个IFS=4 0001:进入被动扫描1234:PHY解码IEEE 802.15.4帧MAC帧的CRC检查通过。1234:*********接收帧类型=MAC命令1234:*********接收MAC命令类型=信标请求1234:需要等待SIFS(12)符号。Offset=12,next IFS=4 1234:*******向队列1234添加信标帧:next IFS=4 1234:处理队列1234中的下一帧:初始化传输;退避延迟=7步1234:退避延迟=7步->6步1234:退避延迟=6步->5步1234:退避延迟=5步->4步1234:退避延迟=4步->3步1234:退避延迟=3步->2步1234:退避延迟=2步->1步1234:退避延迟=1步->0步1234:载波感应:介质为闲置的1234:清除以发送1234:IFS偏移=256个样本1234:发送2562中的1-1024个1234:IFS偏移=0个样本1234:发送OQPSK PHY中找到的2562前导码中的1025-2304个。找到OQPSK PHY的帧分隔符(SFD)的开始。1234:IFS offset=0样本1234:2562中的2305-2562发送1234:Finished transmission 1234:需要等待LIFS(40)符号。偏移量=4,下一个IFS=24 1234:将等待时间减少20个符号至4 0001:MAC帧的PHY解码IEEE 802.15.4帧CRC检查通过。0001:*********接收到的帧类型=信标0001:需要等待SIFS(12)符号。偏移量=4,下一个IFS=-4 0001:下一个IFS=0 0001:扫描完成0001:*******将关联请求帧添加到队列0001:处理队列0001中的下一帧:初始化传输;退避延迟=0步骤0001:载波感应:介质空闲。0001:清除以传输0001:IFS偏移=0样本0001:传输3458中的1-1280找到OQPSK PHY的前导码。找到OQPSK PHY的帧分隔符(SFD)的开始。0001:IFS偏移=0个样本0001:传输3458中的1281-2560个样本0001:IFS偏移=0个样本0001:传输3458中的2561-3458个样本0001:完成传输0001:将等待确认54个符号,以附加到IFS=0 1234:物理层解码的IEEE 802.15.4帧,MAC帧的CRC检查通过。1234:*********接收到的帧类型=MAC命令1234:*********接收到的MAC命令类型=关联请求1234:需要等待LIFS(40)符号。偏移量=14,下一个IFS=34 1234:**********直接发送确认帧(无CSMA/CA)1234:*******将数据响应帧添加到挂起队列1234:下一个IFS=34 0001:将ack等待持续时间减少20个符号至34 1234:IFS offset=896个样本1234:传输1410 0001中的1-384个:将ack等待持续时间减少20个符号至14 1234:IFS offset=0个样本1234:传输1410 1234中的385-1410个:完成传输1234:需要等待SIFS(12)符号。偏移量=16,下一个IFS=8 0001:将ack等待持续时间减少20个符号,以-6找到OQPSK PHY的前导码。找到OQPSK PHY的帧分隔符(SFD)的开始。0001:MAC帧的物理层解码IEEE 802.15.4帧CRC检查通过。0001:*********接收到的帧类型=确认0001:需要等待SIFS(12)符号。偏移量=16,next IFS=8 0001:**********将数据请求帧添加到队列0001:next IFS=1920 0001:将等待时间减少20个符号到1900 0001:将等待时间减少20个符号到1880 0001:将等待时间减少20个符号到1860 0001:将等待时间减少20个符号到1840 0001:将等待时间减少20个符号到1820 0001:减少等待时间减少20个符号至1800 0001:等待时间减少20个符号至1780 0001:等待时间减少20个符号至1760 0001:等待时间减少20个符号至1740 0001:等待时间减少20个符号至1720 0001:等待时间减少20个符号至1700 0001:等待时间减少20个符号至1680 0001:等待时间减少20个符号到1660 0001:将等待时间减少20个符号到1640 0001:将等待时间减少20个符号到1620 0001:将等待时间减少20个符号到1600 0001:将等待时间减少20个符号到1580 0001:将等待时间减少20个符号到1560 0001:将等待时间减少20个符号到1540 0001:将等待时间减少20个符号到1540 0001:将等待时间减少20个符号到1540 00011520 0001:将等待时间减少20个符号至1500 0001:将等待时间减少20个符号至1480 0001:将等待时间减少20个符号至1460 0001:将等待时间减少20个符号至1440 0001: Decreased wait time by 20 symbols to 1420 0001: Decreased wait time by 20 symbols to 1400 0001: Decreased wait time by 20 symbols to 1380 0001: Decreased wait time by 20 symbols to 1360 0001: Decreased wait time by 20 symbols to 1340 0001: Decreased wait time by 20 symbols to 1320 0001: Decreased wait time by 20 symbols to 1300 0001: Decreased wait time by 20 symbols to 1280 0001: Decreased wait time by 20 symbols to 1260 0001: Decreased wait time by 20 symbols to 1240 0001: Decreased wait time by 20 symbols to 1220 0001: Decreased wait time by 20 symbols to 1200 0001: Decreased wait time by 20 symbols to 1180 0001: Decreased wait time by 20 symbols to 1160 0001: Decreased wait time by 20 symbols to 1140 0001: Decreased wait time by 20 symbols to 1120 0001: Decreased wait time by 20 symbols to 1100 0001: Decreased wait time by 20 symbols to 1080 0001: Decreased wait time by 20 symbols to 1060 0001: Decreased wait time by 20 symbols to 1040 0001: Decreased wait time by 20 symbols to 1020 0001: Decreased wait time by 20 symbols to 1000 0001: Decreased wait time by 20 symbols to 980 0001: Decreased wait time by 20 symbols to 960 0001: Decreased wait time by 20 symbols to 940 0001: Decreased wait time by 20 symbols to 920 0001: Decreased wait time by 20 symbols to 900 0001: Decreased wait time by 20 symbols to 880 0001: Decreased wait time by 20 symbols to 860 0001: Decreased wait time by 20 symbols to 840 0001: Decreased wait time by 20 symbols to 820 0001: Decreased wait time by 20 symbols to 800 0001: Decreased wait time by 20 symbols to 780 0001: Decreased wait time by 20 symbols to 760 0001: Decreased wait time by 20 symbols to 740 0001: Decreased wait time by 20 symbols to 720 0001: Decreased wait time by 20 symbols to 700 0001: Decreased wait time by 20 symbols to 680 0001: Decreased wait time by 20 symbols to 660 0001: Decreased wait time by 20 symbols to 640 0001: Decreased wait time by 20 symbols to 620 0001: Decreased wait time by 20 symbols to 600 0001: Decreased wait time by 20 symbols to 580 0001: Decreased wait time by 20 symbols to 560 0001: Decreased wait time by 20 symbols to 540 0001: Decreased wait time by 20 symbols to 520 0001: Decreased wait time by 20 symbols to 500 0001: Decreased wait time by 20 symbols to 480 0001: Decreased wait time by 20 symbols to 460 0001: Decreased wait time by 20 symbols to 440 0001: Decreased wait time by 20 symbols to 420 0001: Decreased wait time by 20 symbols to 400 0001: Decreased wait time by 20 symbols to 380 0001: Decreased wait time by 20 symbols to 360 0001: Decreased wait time by 20 symbols to 340 0001: Decreased wait time by 20 symbols to 320 0001: Decreased wait time by 20 symbols to 300 0001: Decreased wait time by 20 symbols to 280 0001: Decreased wait time by 20 symbols to 260 0001: Decreased wait time by 20 symbols to 240 0001: Decreased wait time by 20 symbols to 220 0001: Decreased wait time by 20 symbols to 200 0001: Decreased wait time by 20 symbols to 180 0001: Decreased wait time by 20 symbols to 160 0001: Decreased wait time by 20 symbols to 140 0001: Decreased wait time by 20 symbols to 120 0001: Decreased wait time by 20 symbols to 100 0001: Decreased wait time by 20 symbols to 80 0001: Decreased wait time by 20 symbols to 60 0001: Decreased wait time by 20 symbols to 40 0001: Decreased wait time by 20 symbols to 20 0001: Decreased wait time by 20 symbols to 0 0001: Processing next frame from the queue 0001: Initializing transmission; backoff delay = 2 steps 0001: Backoff delay = 2 steps -> 1 steps 0001: Backoff delay = 1 steps -> 0 steps 0001: Carrier sensing: Medium is idle. 0001: Clear to transmit 0001: IFS offset = 0 samples 0001: Transmitting 1-1280 of 3074 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 0001: IFS offset = 0 samples 0001: Transmitting 1281-2560 of 3074 0001: IFS offset = 0 samples 0001: Transmitting 2561-3074 of 3074 0001: Finished transmission 0001: will wait for ack for 54 symbols additional to IFS = 0 1234: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 1234: *********** Received frame type = MAC command 1234: *********** Received MAC Command type = Data request 1234: Need to wait for SIFS (12) symbols. Offset = 8, next IFS = 0 1234: ********** Directly transmitting acknowledgement frame (no CSMA/CA) 1234: Moving frame for 0000000033333333 from pending queue to the transmission queue 1234: next IFS = 0 1234: IFS offset = 0 samples 1234: Transmitting 1-1280 of 1410 0001: Decreasing ack wait durations by 20 symbols to 34 1234: IFS offset = 0 samples 1234: Transmitting 1281-1410 of 1410 1234: Finished transmission 1234: Need to wait for SIFS (12) symbols. Offset = 2, next IFS = -6 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 0001: Decreasing ack wait durations by 20 symbols to 14 1234: Processing next frame from the queue 1234: Initializing transmission; backoff delay = 5 steps 1234: Backoff delay = 5 steps -> 4 steps 0001: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 0001: *********** Received frame type = Acknowledgment 0001: Need to wait for SIFS (12) symbols. Offset = 2, next IFS = -6 0001: next IFS = 0 1234: Backoff delay = 4 steps -> 3 steps 1234: Backoff delay = 3 steps -> 2 steps 1234: Backoff delay = 2 steps -> 1 steps 1234: Backoff delay = 1 steps -> 0 steps 1234: Carrier sensing: Medium is idle. 1234: Clear to transmit 1234: IFS offset = 0 samples 1234: Transmitting 1-1280 of 4226 1234: IFS offset = 0 samples 1234: Transmitting 1281-2560 of 4226 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 1234: IFS offset = 0 samples 1234: Transmitting 2561-3840 of 4226 1234: IFS offset = 0 samples 1234: Transmitting 3841-4226 of 4226 1234: Finished transmission 1234: will wait for ack for 54 symbols additional to IFS = 0 1234: Decreasing ack wait durations by 20 symbols to 34 0001: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 0001: *********** Received frame type = MAC command 0001: *********** Received MAC Command type = Association response 0001: Need to wait for LIFS (40) symbols. Offset = 6, next IFS = 26 0001: *********** Association successful, changing short address to = 8CEC 8CEC: *********** Association successful, associated to PAN = 7777 8CEC: ********** Directly transmitting acknowledgement frame (no CSMA/CA) 8CEC: next IFS = 26 1234: Decreasing ack wait durations by 20 symbols to 14 8CEC: IFS offset = 384 samples 8CEC: Transmitting 1-896 of 1410 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 1234: Decreasing ack wait durations by 20 symbols to -6 8CEC: IFS offset = 0 samples 8CEC: Transmitting 897-1410 of 1410 8CEC: Finished transmission 8CEC: Need to wait for SIFS (12) symbols. Offset = 8, next IFS = 0 1234: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 1234: *********** Received frame type = Acknowledgment 1234: Need to wait for SIFS (12) symbols. Offset = 8, next IFS = 0 1234: next IFS = 0 8CEC: ********* (t=4.079360) Injecting data frame to the queue. From: 8CEC -> To: 1234 8CEC: Processing next frame from the queue 8CEC: Initializing transmission; backoff delay = 6 steps 8CEC: Backoff delay = 6 steps -> 5 steps 8CEC: Backoff delay = 5 steps -> 4 steps 8CEC: Backoff delay = 4 steps -> 3 steps 8CEC: Backoff delay = 3 steps -> 2 steps 8CEC: Backoff delay = 2 steps -> 1 steps 8CEC: Backoff delay = 1 steps -> 0 steps 8CEC: Carrier sensing: Medium is idle. 8CEC: Clear to transmit 8CEC: IFS offset = 0 samples 8CEC: Transmitting 1-1280 of 8578 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 8CEC: IFS offset = 0 samples 8CEC: Transmitting 1281-2560 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 2561-3840 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 3841-5120 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 5121-6400 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 6401-7680 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 7681-8578 of 8578 8CEC: Finished transmission 8CEC: will wait for ack for 54 symbols additional to IFS = 0 1234: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 1234: *********** Received frame type = Data 1234: Need to wait for SIFS (12) symbols. Offset = 14, next IFS = 6 1234: ********** Directly transmitting acknowledgement frame (no CSMA/CA) 1234: next IFS = 6 1234: IFS offset = 384 samples 1234: Transmitting 1-896 of 1410 8CEC: Decreasing ack wait durations by 20 symbols to 34 1234: IFS offset = 0 samples 1234: Transmitting 897-1410 of 1410 1234: Finished transmission 1234: Need to wait for SIFS (12) symbols. Offset = 8, next IFS = 0 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 8CEC: Decreasing ack wait durations by 20 symbols to 14 8CEC: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 8CEC: *********** Received frame type = Acknowledgment 8CEC: Need to wait for LIFS (40) symbols. Offset = 8, next IFS = 28 8CEC: next IFS = 28 8CEC: Decreased wait time by 20 symbols to 8 8CEC: ********* (t=4.795200) Injecting data frame to the queue. From: 8CEC -> To: 1234 8CEC: Processing next frame from the queue 8CEC: Initializing transmission; backoff delay = 6 steps 8CEC: Backoff delay = 6 steps -> 5 steps 8CEC: Backoff delay = 5 steps -> 4 steps 8CEC: Backoff delay = 4 steps -> 3 steps 8CEC: Backoff delay = 3 steps -> 2 steps 8CEC: Backoff delay = 2 steps -> 1 steps 8CEC: Backoff delay = 1 steps -> 0 steps 8CEC: Carrier sensing: Medium is idle. 8CEC: Clear to transmit 8CEC: IFS offset = 512 samples 8CEC: Transmitting 1-768 of 8578 Found preamble of OQPSK PHY. 8CEC: IFS offset = 0 samples 8CEC: Transmitting 769-2048 of 8578 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 8CEC: IFS offset = 0 samples 8CEC: Transmitting 2049-3328 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 3329-4608 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 4609-5888 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 5889-7168 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 7169-8448 of 8578 8CEC: IFS offset = 0 samples 8CEC: Transmitting 8449-8578 of 8578 8CEC: Finished transmission 8CEC: will wait for ack for 54 symbols additional to IFS = 0 1234: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 1234: *********** Received frame type = Data 1234: Need to wait for SIFS (12) symbols. Offset = 2, next IFS = -6 1234: ********** Directly transmitting acknowledgement frame (no CSMA/CA) 1234: next IFS = 0 1234: IFS offset = 0 samples 1234: Transmitting 1-1280 of 1410 8CEC: Decreasing ack wait durations by 20 symbols to 34 1234: IFS offset = 0 samples 1234: Transmitting 1281-1410 of 1410 1234: Finished transmission 1234: Need to wait for SIFS (12) symbols. Offset = 2, next IFS = -6 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 8CEC: Decreasing ack wait durations by 20 symbols to 14 8CEC: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 8CEC: *********** Received frame type = Acknowledgment 8CEC: Need to wait for LIFS (40) symbols. Offset = 2, next IFS = 22 8CEC: next IFS = 22 8CEC: Decreased wait time by 20 symbols to 2 1234: ********* (t=5.001280) Injecting data frame to the queue. From: 1234 -> To: 8CEC 1234: Processing next frame from the queue 1234: Initializing transmission; backoff delay = 1 steps 1234: Backoff delay = 1 steps -> 0 steps 1234: Carrier sensing: Medium is idle. 1234: Clear to transmit 1234: IFS offset = 0 samples 1234: Transmitting 1-1280 of 8578 1234: IFS offset = 0 samples 1234: Transmitting 1281-2560 of 8578 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 1234: IFS offset = 0 samples 1234: Transmitting 2561-3840 of 8578 1234: IFS offset = 0 samples 1234: Transmitting 3841-5120 of 8578 1234: IFS offset = 0 samples 1234: Transmitting 5121-6400 of 8578 1234: IFS offset = 0 samples 1234: Transmitting 6401-7680 of 8578 1234: IFS offset = 0 samples 1234: Transmitting 7681-8578 of 8578 1234: Finished transmission 1234: will wait for ack for 54 symbols additional to IFS = 0 1234: Decreasing ack wait durations by 20 symbols to 34 8CEC: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 8CEC: *********** Received frame type = Data 8CEC: Need to wait for SIFS (12) symbols. Offset = 14, next IFS = 6 8CEC: ********** Directly transmitting acknowledgement frame (no CSMA/CA) 8CEC: next IFS = 6 8CEC: IFS offset = 384 samples 8CEC: Transmitting 1-896 of 1410 Found preamble of OQPSK PHY. Found start-of-frame delimiter (SFD) of OQPSK PHY. 1234: Decreasing ack wait durations by 20 symbols to 14 8CEC: IFS offset = 0 samples 8CEC: Transmitting 897-1410 of 1410 8CEC: Finished transmission 8CEC: Need to wait for SIFS (12) symbols. Offset = 8, next IFS = 0 1234: PHY decoded IEEE 802.15.4 frame CRC check passed for the MAC frame. 1234: *********** Received frame type = Acknowledgment 1234: Need to wait for LIFS (40) symbols. Offset = 8, next IFS = 28 1234: next IFS = 28 1234: Decreased wait time by 20 symbols to 8

1つ目のエンドデバイスが関連付けられると,エンドデバイスと锅コーディネーターの間のリンクにデータフレームがランダムに投入されます。

次に3つ目のデバイスが锅に参加すると,スタートポロジの形で,コーディネーターと両方のエンドデバイス間でデータフレームが交換されます(エンドデバイスはコーディネーターへのフレーム送信のみを行う必要があります)。この場合出力は表示されません。

%创建第二个终端设备:endDevice2 = lrwpan。MACReducedFunctionDevice(“SamplesPerChip”4...“ShortAddress”,“0002”,“扩展地址”[repmat ('0', 1, 8)“4”1 8)),“冗长”、假);%抑制详细输出:endDevice1。冗长= false;panCoordinator。冗长= false;%初始化输入received3 = 0 (samplesPerChip * chipsPerSymbol * symbolsPerStep/ 2,1); / /接收到的数据stopTime = 10;%交会时间<停止时间将接收到的信号传递给节点进行处理。另外,获取什么%他们必须传播:transmitted1 = panCoordinator (received1);transmitted2 = endDevice1 (received2);transmitted3 = endDevice2 (received3);%理想的无线信道,其中所有节点都在范围内:received1=被传人d2+被传人d3;%半双工无线电,发送时不接收received2=被传人d1+被传人d3;received3=被传人1+被传人2;时间=时间+symbolsPerStep/symbolRate;%更新时钟结束

チャネルの関係が適切に確立している(送信された信号に応じて信号が受信される)限り,ネットワークにはもっとノードを追加できます。

その他の調査

ジェネレーター関数と復号化関数,および構成オブジェクトの詳細については,次の情報を参照してください。

参考文献

  1. IEEE 802.15.4-2011 IEEE局域网和城域网标准第15.4部分:低速率无线个人区域网(rr - wpan)