示例#1
0
        private void ReceiveBeaconRequest(
            Header hdr,
            ref Frame frame,
            Byte linkQuality)
        {
            // see 7.3.7
            bool ok = true;

            ok &= (hdr.fcs.Version == Microsoft.SPOT.Wireless.IEEE_802_15_4.Mac.Frames.Version.IEEE2003);
            ok &= (hdr.fcs.DstAddrMode == AddressingMode.Short);
            ok &= (hdr.fcs.SrcAddrMode == AddressingMode.None);
            ok &= (hdr.dstPanId == State.cBroadcastPanId);
            ok &= (hdr.dstAddrShort == State.cBroadcastShortAddr);

            Command.BeaconRequest msg = new Command.BeaconRequest();
            if (ok && msg.ReadFromFrame(ref frame))
            {
                TaskBeaconRequest task = new TaskBeaconRequest();
                _taskQueue.Add(task);
            }
        }
示例#2
0
        private void ReceiveBeaconRequest(
            Header hdr,
            ref Frame frame,
            Byte linkQuality)
        {
            // see 7.3.7
            bool ok = true;
            ok &= (hdr.fcs.Version == Microsoft.SPOT.Wireless.IEEE_802_15_4.Mac.Frames.Version.IEEE2003);
            ok &= (hdr.fcs.DstAddrMode == AddressingMode.Short);
            ok &= (hdr.fcs.SrcAddrMode == AddressingMode.None);
            ok &= (hdr.dstPanId == State.cBroadcastPanId);
            ok &= (hdr.dstAddrShort == State.cBroadcastShortAddr);

            Command.BeaconRequest msg = new Command.BeaconRequest();
            if (ok && msg.ReadFromFrame(ref frame))
            {
                TaskBeaconRequest task = new TaskBeaconRequest();
                _taskQueue.Add(task);
            }
        }