]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
renaming directories to lower cases
authorjanhauer <janhauer>
Mon, 21 Jul 2008 14:42:51 +0000 (14:42 +0000)
committerjanhauer <janhauer>
Mon, 21 Jul 2008 14:42:51 +0000 (14:42 +0000)
36 files changed:
apps/tests/tkn154/TestASSOCIATE/README.txt [deleted file]
apps/tests/tkn154/TestASSOCIATE/app_profile.h [deleted file]
apps/tests/tkn154/TestASSOCIATE/coordinator/Makefile [deleted file]
apps/tests/tkn154/TestASSOCIATE/coordinator/TestAssociateAppC.nc [deleted file]
apps/tests/tkn154/TestASSOCIATE/coordinator/TestCoordC.nc [deleted file]
apps/tests/tkn154/TestASSOCIATE/device/Makefile [deleted file]
apps/tests/tkn154/TestASSOCIATE/device/TestAssociateAppC.nc [deleted file]
apps/tests/tkn154/TestASSOCIATE/device/TestDeviceC.nc [deleted file]
apps/tests/tkn154/TestDATA/README.txt [deleted file]
apps/tests/tkn154/TestDATA/app_profile.h [deleted file]
apps/tests/tkn154/TestDATA/coordinator/Makefile [deleted file]
apps/tests/tkn154/TestDATA/coordinator/TestCoordReceiverC.nc [deleted file]
apps/tests/tkn154/TestDATA/coordinator/TestDataAppC.nc [deleted file]
apps/tests/tkn154/TestDATA/device/Makefile [deleted file]
apps/tests/tkn154/TestDATA/device/TestDataAppC.nc [deleted file]
apps/tests/tkn154/TestDATA/device/TestDeviceSenderC.nc [deleted file]
apps/tests/tkn154/TestINDIRECT/README.txt [deleted file]
apps/tests/tkn154/TestINDIRECT/app_profile.h [deleted file]
apps/tests/tkn154/TestINDIRECT/coordinator/Makefile [deleted file]
apps/tests/tkn154/TestINDIRECT/coordinator/TestCoordSenderC.nc [deleted file]
apps/tests/tkn154/TestINDIRECT/coordinator/TestIndirectAppC.nc [deleted file]
apps/tests/tkn154/TestINDIRECT/device/Makefile [deleted file]
apps/tests/tkn154/TestINDIRECT/device/TestDeviceReceiverC.nc [deleted file]
apps/tests/tkn154/TestINDIRECT/device/TestIndirectAppC.nc [deleted file]
apps/tests/tkn154/TestPROMISCUOUS/Makefile [deleted file]
apps/tests/tkn154/TestPROMISCUOUS/README.txt [deleted file]
apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousAppC.nc [deleted file]
apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousC.nc [deleted file]
apps/tests/tkn154/TestSTARTSYNC/README.txt [deleted file]
apps/tests/tkn154/TestSTARTSYNC/app_profile.h [deleted file]
apps/tests/tkn154/TestSTARTSYNC/coordinator/Makefile [deleted file]
apps/tests/tkn154/TestSTARTSYNC/coordinator/TestCoordC.nc [deleted file]
apps/tests/tkn154/TestSTARTSYNC/coordinator/TestStartSyncAppC.nc [deleted file]
apps/tests/tkn154/TestSTARTSYNC/device/Makefile [deleted file]
apps/tests/tkn154/TestSTARTSYNC/device/TestDeviceC.nc [deleted file]
apps/tests/tkn154/TestSTARTSYNC/device/TestStartSyncAppC.nc [deleted file]

diff --git a/apps/tests/tkn154/TestASSOCIATE/README.txt b/apps/tests/tkn154/TestASSOCIATE/README.txt
deleted file mode 100644 (file)
index ccc25d8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-README for TestASSOCIATE
-Author/Contact: tinyos-help@millennium.berkeley.edu
-
-Description:
-
-In this application one node takes the role of a PAN coordinator in a
-beacon-enabled 802.15.4 PAN; it transmits periodic beacons and waits for
-devices to request association to its PAN. Whenever a device tries to
-associate, the PAN coordinator allows association and assigns to the device a
-unique short address (starting from zero, incremented for every device
-requesting association). 
-
-A second node acts as a device; it first scans the pre-defined channel for
-beacons from the coordinator and once it finds a beacon it tries to associate
-to the PAN and synchronize to and track all future beacons. A short time after
-association the device then disassociates from the PAN. 
-
-The third LED (Telos: blue) is toggled whenever the coordinator has transmitted
-a beacon or whenever a device has received a beacon. On the coordinator the
-second LED (Telos: green) is switched on whenever an association request was
-successful and it is switched off, whenever a disassociation request was
-received. On a device the second LED is switched on while the device is
-associated to the PAN, i.e. it is switched off after disassociation. The first
-LED (Telos: red) is used for debugging, it denotes an error in the protocol
-stack and should never be on.
-
-Tools: NONE
-
-Usage: 
-
-1. Install the coordinator:
-
-    $ cd coordinator; make telosb install
-
-2. Install one (or more) devices:
-
-    $ cd device; make telosb install
-
-You can change some of the configuration parameters in app_profile.h
-
-Known bugs/limitations:
-
-- Currently this application only works on TelosB nodes
-- The MAC timing is not standard compliant, because TelosB lacks a
-  clock with sufficient precision/accuracy
-
-$Id$o
-
diff --git a/apps/tests/tkn154/TestASSOCIATE/app_profile.h b/apps/tests/tkn154/TestASSOCIATE/app_profile.h
deleted file mode 100644 (file)
index 21641f6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#ifndef __APP_PROFILE_H
-#define __APP_PROFILE_H
-
-enum {
-  RADIO_CHANNEL = 26,
-  PAN_ID = 0x1238,
-  COORDINATOR_ADDRESS = 0x9182,
-  BEACON_ORDER = 6,
-  SUPERFRAME_ORDER = 6,
-};
-
-#endif
diff --git a/apps/tests/tkn154/TestASSOCIATE/coordinator/Makefile b/apps/tests/tkn154/TestASSOCIATE/coordinator/Makefile
deleted file mode 100644 (file)
index 7fe7134..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-COMPONENT=TestAssociateAppC
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestASSOCIATE/coordinator/TestAssociateAppC.nc b/apps/tests/tkn154/TestASSOCIATE/coordinator/TestAssociateAppC.nc
deleted file mode 100644 (file)
index 5945ddf..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestAssociateAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC as Ieee802154MacC;
-  components TestCoordC as App;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-
-  App.MLME_START -> Ieee802154MacC;
-  App.MLME_ASSOCIATE -> Ieee802154MacC;
-  App.MLME_DISASSOCIATE -> Ieee802154MacC;
-  App.MLME_COMM_STATUS -> Ieee802154MacC;
-  App.Frame -> Ieee802154MacC;
-  App.IEEE154TxBeaconPayload -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestASSOCIATE/coordinator/TestCoordC.nc b/apps/tests/tkn154/TestASSOCIATE/coordinator/TestCoordC.nc
deleted file mode 100644 (file)
index ceb793c..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright 
- *   notice, this list of conditions and the following disclaimer in the 
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names 
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestCoordC
-{
-  uses {
-    interface Boot;
-    interface MLME_RESET;
-    interface MLME_START;
-    interface MLME_ASSOCIATE;
-    interface MLME_DISASSOCIATE;
-    interface MLME_COMM_STATUS;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface IEEE154Frame as Frame;
-    interface IEEE154TxBeaconPayload;
-    interface Leds;
-  }
-} implementation {
-
-  ieee154_address_t m_lastDevice;
-  uint16_t m_shortAddress;
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status != IEEE154_SUCCESS)
-      return;
-    call MLME_SET.macShortAddress(COORDINATOR_ADDRESS);
-    call MLME_SET.macAssociationPermit(TRUE);
-    call MLME_START.request(
-                          PAN_ID,           // PANId
-                          RADIO_CHANNEL,    // LogicalChannel
-                          0,                // ChannelPage,
-                          0,                // StartTime,
-                          BEACON_ORDER,     // BeaconOrder
-                          SUPERFRAME_ORDER, // SuperframeOrder
-                          TRUE,             // PANCoordinator
-                          FALSE,            // BatteryLifeExtension
-                          FALSE,            // CoordRealignment
-                          0,                // no realignment security
-                          0                 // no beacon security
-                        );
-  }
-
-  event void MLME_START.confirm(ieee154_status_t status) { }
-
-  event void MLME_ASSOCIATE.indication (
-                          uint64_t DeviceAddress,
-                          ieee154_CapabilityInformation_t CapabilityInformation,
-                          ieee154_security_t *security
-                        )
-  {
-    call MLME_ASSOCIATE.response(DeviceAddress, m_shortAddress++, IEEE154_ASSOCIATION_SUCCESSFUL, 0);
-  }
-
-  event void MLME_DISASSOCIATE.indication (
-                          uint64_t DeviceAddress,
-                          ieee154_disassociation_reason_t DisassociateReason,
-                          ieee154_security_t *security
-                        )
-  {
-    call Leds.led1Off();
-  }
-
-
-  event void MLME_COMM_STATUS.indication (
-                          uint16_t PANId,
-                          uint8_t SrcAddrMode,
-                          ieee154_address_t SrcAddr,
-                          uint8_t DstAddrMode,
-                          ieee154_address_t DstAddr,
-                          ieee154_status_t status,
-                          ieee154_security_t *security
-                        )
-  {
-    if (status == IEEE154_SUCCESS){
-      // association was successful
-      call Leds.led1On();
-      m_lastDevice.extendedAddress = DstAddr.extendedAddress;
-    } else {
-      call Leds.led1Off();
-    }
-  }
-
-  event void MLME_DISASSOCIATE.confirm    (
-                          ieee154_status_t status,
-                          uint8_t DeviceAddrMode,
-                          uint16_t DevicePANID,
-                          ieee154_address_t DeviceAddress
-                        ){}
-
-  event void MLME_ASSOCIATE.confirm    (
-                          uint16_t AssocShortAddress,
-                          uint8_t status,
-                          ieee154_security_t *security
-                        ){}
-
-  event void IEEE154TxBeaconPayload.aboutToTransmit() { }
-
-  event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length) { }
-
-  event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength) { }
-
-  event void IEEE154TxBeaconPayload.beaconTransmitted() 
-  {
-    ieee154_macBSN_t beaconSequenceNumber = call MLME_GET.macBSN();
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();
-  }  
-}
diff --git a/apps/tests/tkn154/TestASSOCIATE/device/Makefile b/apps/tests/tkn154/TestASSOCIATE/device/Makefile
deleted file mode 100644 (file)
index 7fe7134..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-COMPONENT=TestAssociateAppC
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestASSOCIATE/device/TestAssociateAppC.nc b/apps/tests/tkn154/TestASSOCIATE/device/TestAssociateAppC.nc
deleted file mode 100644 (file)
index c99e233..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestAssociateAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC as Ieee802154MacC,
-             new Timer62500C() as Timer;
-  components TestDeviceC as App;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-  App.DisassociateTimer -> Timer;  
-  App.MLME_SCAN -> Ieee802154MacC;
-  App.MLME_SYNC -> Ieee802154MacC;
-  App.MLME_BEACON_NOTIFY -> Ieee802154MacC;
-  App.MLME_SYNC_LOSS -> Ieee802154MacC;
-  App.MLME_ASSOCIATE -> Ieee802154MacC;
-  App.MLME_DISASSOCIATE -> Ieee802154MacC;
-  App.MLME_COMM_STATUS -> Ieee802154MacC;
-  App.BeaconFrame -> Ieee802154MacC;
-
-}
diff --git a/apps/tests/tkn154/TestASSOCIATE/device/TestDeviceC.nc b/apps/tests/tkn154/TestASSOCIATE/device/TestDeviceC.nc
deleted file mode 100644 (file)
index 1c22739..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-#include "TKN154.h"
-#include "app_profile.h"
-module TestDeviceC
-{
-  uses {
-    interface Boot;
-    interface MLME_RESET;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface MLME_SCAN;
-    interface MLME_SYNC;
-    interface MLME_ASSOCIATE;
-    interface MLME_DISASSOCIATE;
-    interface MLME_COMM_STATUS;
-    interface MLME_BEACON_NOTIFY;
-    interface MLME_SYNC_LOSS;
-    interface Leds;
-    interface IEEE154BeaconFrame as BeaconFrame;
-    interface Timer<T62500hz> as DisassociateTimer;
-  }
-} implementation {
-
-  ieee154_CapabilityInformation_t m_capabilityInformation;
-  ieee154_PANDescriptor_t m_PANDescriptor;
-  bool m_isPANDescriptorValid;
-  void startApp();
-
-  event void Boot.booted() {
-    m_capabilityInformation.AlternatePANCoordinator = 0;
-    m_capabilityInformation.DeviceType = 0;
-    m_capabilityInformation.PowerSource = 0;
-    m_capabilityInformation.ReceiverOnWhenIdle = 0;
-    m_capabilityInformation.Reserved = 0;
-    m_capabilityInformation.SecurityCapability = 0;
-    m_capabilityInformation.AllocateAddress = 1;    
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS)
-      startApp();
-  }
-
-  void startApp()
-  {
-    ieee154_phyChannelsSupported_t channel;
-    uint8_t scanDuration = BEACON_ORDER; 
-
-    m_isPANDescriptorValid = FALSE;
-
-    // scan only one channel
-    channel = ((uint32_t) 1) << RADIO_CHANNEL;
-
-    // we want all received beacons to be signalled 
-    // through the MLME_BEACON_NOTIFY interface, i.e.
-    // we set the macAutoRequest attribute to FALSE
-    call MLME_SET.macAutoRequest(FALSE);
-    m_isPANDescriptorValid = FALSE;
-    call MLME_SCAN.request  (
-                           PASSIVE_SCAN,           // ScanType
-                           channel,                // ScanChannels
-                           scanDuration,           // ScanDuration
-                           0x00,                   // ChannelPage
-                           0,                      // EnergyDetectListNumEntries
-                           NULL,                   // EnergyDetectList
-                           0,                      // PANDescriptorListNumEntries
-                           NULL,                   // PANDescriptorList
-                           NULL                    // security
-                        );
-  }
-
-  event message_t* MLME_BEACON_NOTIFY.indication (message_t* frame)
-  {
-    // received a beacon frame
-    ieee154_phyCurrentPage_t page = call MLME_GET.phyCurrentPage();
-    ieee154_macBSN_t beaconSequenceNumber = call BeaconFrame.getBSN(frame);
-
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();   
-    if (!m_isPANDescriptorValid && call BeaconFrame.parsePANDescriptor(
-          frame, RADIO_CHANNEL, page, &m_PANDescriptor) == SUCCESS){
-      // let's see if the beacon is from the coordinator we expect...
-      if (m_PANDescriptor.CoordAddrMode == ADDR_MODE_SHORT_ADDRESS &&
-          m_PANDescriptor.CoordPANId == PAN_ID &&
-          m_PANDescriptor.CoordAddress.shortAddress == COORDINATOR_ADDRESS){
-        // yes - wait until SCAN is finished, then syncronize to beacons
-        m_isPANDescriptorValid = TRUE;
-      }
-    }
-    return frame;
-  }
-
-  event void MLME_SCAN.confirm    (
-                          ieee154_status_t status,
-                          uint8_t ScanType,
-                          uint8_t ChannelPage,
-                          uint32_t UnscannedChannels,
-                          uint8_t EnergyDetectListNumEntries,
-                          int8_t* EnergyDetectList,
-                          uint8_t PANDescriptorListNumEntries,
-                          ieee154_PANDescriptor_t* PANDescriptorList
-                        )
-  {
-    if (m_isPANDescriptorValid){
-      call MLME_SET.macPANId(m_PANDescriptor.CoordPANId);
-      call MLME_SET.macCoordShortAddress(m_PANDescriptor.CoordAddress.shortAddress);
-      call MLME_SYNC.request(m_PANDescriptor.LogicalChannel, m_PANDescriptor.ChannelPage, TRUE);
-      call MLME_ASSOCIATE.request(
-          m_PANDescriptor.LogicalChannel,
-          m_PANDescriptor.ChannelPage,
-          m_PANDescriptor.CoordAddrMode,
-          m_PANDescriptor.CoordPANId,
-          m_PANDescriptor.CoordAddress,
-          m_capabilityInformation,
-          NULL  // security
-          );
-    } else
-      startApp();
-  }
-
-  event void MLME_ASSOCIATE.confirm    (
-                          uint16_t AssocShortAddress,
-                          uint8_t status,
-                          ieee154_security_t *security
-                        )
-  {
-    if ( status == IEEE154_SUCCESS ){
-      // we are now associated - set a timer for disassociation 
-      call Leds.led1On();
-      call DisassociateTimer.startOneShot(312500U);
-    } else {
-      call MLME_ASSOCIATE.request(
-          m_PANDescriptor.LogicalChannel,
-          m_PANDescriptor.ChannelPage,
-          m_PANDescriptor.CoordAddrMode,
-          m_PANDescriptor.CoordPANId,
-          m_PANDescriptor.CoordAddress,
-          m_capabilityInformation,
-          NULL  // security
-          );
-    }
-  }
-
-  event void DisassociateTimer.fired()
-  {
-    if (call MLME_DISASSOCIATE.request  (
-        m_PANDescriptor.CoordAddrMode,
-        m_PANDescriptor.CoordPANId,
-        m_PANDescriptor.CoordAddress,
-        IEEE154_DEVICE_WISHES_TO_LEAVE,
-        FALSE,
-        NULL
-        ) != IEEE154_SUCCESS)
-      call DisassociateTimer.startOneShot(312500U);
-  }
-
-  event void MLME_DISASSOCIATE.confirm    (
-                          ieee154_status_t status,
-                          uint8_t DeviceAddrMode,
-                          uint16_t DevicePANID,
-                          ieee154_address_t DeviceAddress
-                        )
-  {
-    if (status == IEEE154_SUCCESS){
-      call Leds.led1Off();
-    } else {
-      call DisassociateTimer.startOneShot(312500U);
-    }
-  }
-
-  event void MLME_ASSOCIATE.indication (
-                          uint64_t DeviceAddress,
-                          ieee154_CapabilityInformation_t CapabilityInformation,
-                          ieee154_security_t *security
-                        ){}  
-
-  event void MLME_SYNC_LOSS.indication(
-                          ieee154_status_t lossReason,
-                          uint16_t PANId,
-                          uint8_t LogicalChannel,
-                          uint8_t ChannelPage,
-                          ieee154_security_t *security)
-  {
-    startApp();
-  }
-
-  event void MLME_DISASSOCIATE.indication (
-                          uint64_t DeviceAddress,
-                          ieee154_disassociation_reason_t DisassociateReason,
-                          ieee154_security_t *security
-                        ){}
-
-
-  event void MLME_COMM_STATUS.indication (
-                          uint16_t PANId,
-                          uint8_t SrcAddrMode,
-                          ieee154_address_t SrcAddr,
-                          uint8_t DstAddrMode,
-                          ieee154_address_t DstAddr,
-                          ieee154_status_t status,
-                          ieee154_security_t *security
-                        )
-  {
-  }
-}
diff --git a/apps/tests/tkn154/TestDATA/README.txt b/apps/tests/tkn154/TestDATA/README.txt
deleted file mode 100644 (file)
index 06de3a3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-README for TestDATA
-Author/Contact: tinyos-help@millennium.berkeley.edu
-
-Description:
-
-In this application one node takes the role of a PAN coordinator in a
-beacon-enabled 802.15.4 PAN; it transmits periodic beacons and waits for
-incoming DATA frames. A second node acts as a device; it first scans the
-pre-defined channel for beacons from the coordinator and once it finds a beacon
-it tries to synchronize to and track all future beacons. It then starts to
-transmit DATA frames to the coordinator as fast as possible (direct
-transmission in the contention access period, CAP).
-
-The third LED (Telos: blue) is toggled whenever the coordinator has transmitted
-a beacon or whenever a device has received a beacon. On the coordinator the
-second LED (Telos: green) is toggled for every 20 received DATA frames. On a
-device the second LED is toggled for every 20 transmitted (and acknowledged)
-DATA frames. The first LED (Telos: red) is used for debugging, it denotes an
-error in the protocol stack and should never be on.
-
-Tools: NONE
-
-Usage: 
-
-1. Install the coordinator:
-
-    $ cd coordinator; make telosb install
-
-2. Install one or more devices
-
-    $ cd device; make telosb install,X
-
-    where X is a pre-assigned short address and should be different 
-    for every device.
-
-You can change some of the configuration parameters in app_profile.h
-
-Known bugs/limitations:
-
-- Currently this application only works on TelosB nodes
-- The MAC timing is not standard compliant, because TelosB lacks a
-  clock with sufficient precision/accuracy
-
-$Id$o
-
diff --git a/apps/tests/tkn154/TestDATA/app_profile.h b/apps/tests/tkn154/TestDATA/app_profile.h
deleted file mode 100644 (file)
index bf736a0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#ifndef __APP_PROFILE_H
-#define __APP_PROFILE_H
-
-enum {
-  RADIO_CHANNEL = 26,
-  PAN_ID = 0x8172,
-  COORDINATOR_ADDRESS = 0x4331,
-  BEACON_ORDER = 5,
-  SUPERFRAME_ORDER = 5,
-};
-
-#endif
diff --git a/apps/tests/tkn154/TestDATA/coordinator/Makefile b/apps/tests/tkn154/TestDATA/coordinator/Makefile
deleted file mode 100644 (file)
index 42f1130..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-COMPONENT=TestDataAppC
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestDATA/coordinator/TestCoordReceiverC.nc b/apps/tests/tkn154/TestDATA/coordinator/TestCoordReceiverC.nc
deleted file mode 100644 (file)
index db59ec0..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestCoordReceiverC
-{
-  uses {
-    interface Boot;
-    interface MCPS_DATA;
-    interface MLME_RESET;
-    interface MLME_START;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface IEEE154Frame as Frame;
-    interface IEEE154TxBeaconPayload;
-    interface Leds;
-  }
-} implementation {
-
-  bool m_ledCount;
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status != IEEE154_SUCCESS)
-      return;
-    call MLME_SET.macShortAddress(COORDINATOR_ADDRESS);
-    call MLME_SET.macAssociationPermit(FALSE);
-    call MLME_START.request(
-                          PAN_ID,               // PANId
-                          RADIO_CHANNEL,        // LogicalChannel
-                          0,                    // ChannelPage,
-                          0,                    // StartTime,
-                          BEACON_ORDER,         // BeaconOrder
-                          SUPERFRAME_ORDER,     // SuperframeOrder
-                          TRUE,                 // PANCoordinator
-                          FALSE,                // BatteryLifeExtension
-                          FALSE,                // CoordRealignment
-                          0,                    // CoordRealignSecurity,
-                          0                     // BeaconSecurity
-                        );
-  }
-
-  event message_t* MCPS_DATA.indication ( message_t* frame )
-  {
-    if (m_ledCount++ == 20){
-      m_ledCount = 0;
-      call Leds.led1Toggle();
-    }
-    return frame;
-  }
-
-  event void MLME_START.confirm(ieee154_status_t status) {}
-
-  event void MCPS_DATA.confirm(
-                          message_t *msg,
-                          uint8_t msduHandle,
-                          ieee154_status_t status,
-                          uint32_t Timestamp
-                        ){}
-
-  event void IEEE154TxBeaconPayload.aboutToTransmit() { }
-
-  event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length) { }
-
-  event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength) { }
-
-  event void IEEE154TxBeaconPayload.beaconTransmitted() 
-  {
-    ieee154_macBSN_t beaconSequenceNumber = call MLME_GET.macBSN();
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();
-  }  
-}
diff --git a/apps/tests/tkn154/TestDATA/coordinator/TestDataAppC.nc b/apps/tests/tkn154/TestDATA/coordinator/TestDataAppC.nc
deleted file mode 100644 (file)
index eeb8d0d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestDataAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC;
-
-  components TestCoordReceiverC as App;
-  App.MLME_START -> Ieee802154MacC;
-  App.MCPS_DATA -> Ieee802154MacC;
-  App.Frame -> Ieee802154MacC;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-  App.IEEE154TxBeaconPayload -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestDATA/device/Makefile b/apps/tests/tkn154/TestDATA/device/Makefile
deleted file mode 100644 (file)
index 42f1130..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-COMPONENT=TestDataAppC
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestDATA/device/TestDataAppC.nc b/apps/tests/tkn154/TestDATA/device/TestDataAppC.nc
deleted file mode 100644 (file)
index f59355c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestDataAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC;
-
-  components TestDeviceSenderC as App;
-  App.MLME_SCAN -> Ieee802154MacC;
-  App.MLME_SYNC -> Ieee802154MacC;
-  App.MLME_BEACON_NOTIFY -> Ieee802154MacC;
-  App.MLME_SYNC_LOSS -> Ieee802154MacC;
-  App.MCPS_DATA -> Ieee802154MacC;
-  App.Frame -> Ieee802154MacC;
-  App.BeaconFrame -> Ieee802154MacC;
-  App.Packet -> Ieee802154MacC;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestDATA/device/TestDeviceSenderC.nc b/apps/tests/tkn154/TestDATA/device/TestDeviceSenderC.nc
deleted file mode 100644 (file)
index 4534df2..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestDeviceSenderC
-{
-  uses {
-    interface Boot;
-    interface MCPS_DATA;
-    interface MLME_RESET;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface MLME_SCAN;
-    interface MLME_SYNC;
-    interface MLME_BEACON_NOTIFY;
-    interface MLME_SYNC_LOSS;
-    interface IEEE154Frame as Frame;
-    interface IEEE154BeaconFrame as BeaconFrame;
-    interface Leds;
-    interface Packet;
-  }
-} implementation {
-
-  message_t m_frame;
-  uint8_t m_payloadLen;
-  ieee154_PANDescriptor_t m_PANDescriptor;
-  bool m_ledCount;
-  bool m_isPANDescriptorValid;
-  bool m_sending;
-
-  void startApp();
-  task void packetSendTask();
-
-
-  event void Boot.booted() {
-    char payload[] = "Hello Coordinator!";
-    uint8_t *payloadRegion;
-
-    m_payloadLen = strlen(payload);
-    payloadRegion = call Packet.getPayload(&m_frame, m_payloadLen);
-    if (m_payloadLen <= call Packet.maxPayloadLength()){
-      memcpy(payloadRegion, payload, m_payloadLen);
-      call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-    }
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS)
-      startApp();
-  }
-
-  void startApp()
-  {
-    ieee154_phyChannelsSupported_t channelMask;
-    uint8_t scanDuration = BEACON_ORDER;
-
-    m_isPANDescriptorValid = FALSE;
-    call MLME_SET.macShortAddress(TOS_NODE_ID);
-
-    // scan only one channel
-    channelMask = ((uint32_t) 1) << RADIO_CHANNEL;
-
-    // we want all received beacons to be signalled 
-    // through the MLME_BEACON_NOTIFY interface, i.e.
-    // we set the macAutoRequest attribute to FALSE
-    call MLME_SET.macAutoRequest(FALSE);
-    call MLME_SCAN.request  (
-                           PASSIVE_SCAN,           // ScanType
-                           channelMask,            // ScanChannels
-                           scanDuration,           // ScanDuration
-                           0x00,                   // ChannelPage
-                           0,                      // EnergyDetectListNumEntries
-                           NULL,                   // EnergyDetectList
-                           0,                      // PANDescriptorListNumEntries
-                           NULL,                   // PANDescriptorList
-                           0                       // security
-                        );
-  }
-
-  event message_t* MLME_BEACON_NOTIFY.indication (message_t* frame)
-  {
-    // received a beacon frame
-    ieee154_phyCurrentPage_t page = call MLME_GET.phyCurrentPage();
-    ieee154_macBSN_t beaconSequenceNumber = call BeaconFrame.getBSN(frame);
-
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();   
-    if (!m_isPANDescriptorValid && call BeaconFrame.parsePANDescriptor(
-          frame, RADIO_CHANNEL, page, &m_PANDescriptor) == SUCCESS){
-      // let's see if the beacon is from our coordinator...
-      if (m_PANDescriptor.CoordAddrMode == ADDR_MODE_SHORT_ADDRESS &&
-          m_PANDescriptor.CoordPANId == PAN_ID &&
-          m_PANDescriptor.CoordAddress.shortAddress == COORDINATOR_ADDRESS){
-        // yes! wait until SCAN is finished, then syncronize to the beacons
-        m_isPANDescriptorValid = TRUE;
-      }
-    }
-    return frame;
-  }
-
-  event void MLME_SCAN.confirm    (
-                          ieee154_status_t status,
-                          uint8_t ScanType,
-                          uint8_t ChannelPage,
-                          uint32_t UnscannedChannels,
-                          uint8_t EnergyDetectListNumEntries,
-                          int8_t* EnergyDetectList,
-                          uint8_t PANDescriptorListNumEntries,
-                          ieee154_PANDescriptor_t* PANDescriptorList
-                        )
-  {
-    if (m_isPANDescriptorValid){
-      call MLME_SET.macCoordShortAddress(m_PANDescriptor.CoordAddress.shortAddress);
-      call MLME_SET.macPANId(m_PANDescriptor.CoordPANId);
-      call MLME_SYNC.request(m_PANDescriptor.LogicalChannel, m_PANDescriptor.ChannelPage, TRUE);
-      call Frame.setAddressingFields(
-          &m_frame,                
-          ADDR_MODE_SHORT_ADDRESS,        // SrcAddrMode,
-          ADDR_MODE_SHORT_ADDRESS,        // DstAddrMode,
-          m_PANDescriptor.CoordPANId,     // DstPANId,
-          &m_PANDescriptor.CoordAddress,  // DstAddr,
-          NULL                            // security
-          );
-      post packetSendTask(); 
-    } else
-      startApp();
-  }
-
-  task void packetSendTask()
-  {
-    if (!m_sending && m_isPANDescriptorValid &&
-        call MCPS_DATA.request  (
-          &m_frame,                         // frame,
-          m_payloadLen,                     // payloadLength,
-          0,                                // msduHandle,
-          TX_OPTIONS_ACK                    // TxOptions,
-          ) == IEEE154_SUCCESS)
-      m_sending = TRUE;
-  }
-
-  event void MCPS_DATA.confirm    (
-                          message_t *msg,
-                          uint8_t msduHandle,
-                          ieee154_status_t status,
-                          uint32_t timestamp
-                        )
-  {
-    m_sending = FALSE;
-    if (status == IEEE154_SUCCESS && m_ledCount++ == 20){
-      m_ledCount = 0;
-      call Leds.led1Toggle();
-    }
-    post packetSendTask(); 
-  }
-
-  event void MLME_SYNC_LOSS.indication(
-                          ieee154_status_t lossReason,
-                          uint16_t PANId,
-                          uint8_t LogicalChannel,
-                          uint8_t ChannelPage,
-                          ieee154_security_t *security)
-  {
-    startApp();
-  }
-
-  event message_t* MCPS_DATA.indication (message_t* frame)
-  {
-    // we don't expect data
-    return frame;
-  }
-
-}
diff --git a/apps/tests/tkn154/TestINDIRECT/README.txt b/apps/tests/tkn154/TestINDIRECT/README.txt
deleted file mode 100644 (file)
index d0f6683..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-README for TestINDIRECT
-Author/Contact: tinyos-help@millennium.berkeley.edu
-
-Description:
-
-In this application one node takes the role of a PAN coordinator in a
-beacon-enabled 802.15.4 PAN; it transmits periodic beacons and additionally in
-every beacon interval it tries to transmit one DATA frame to a device using
-indirect tranmission. A second node that takes the role of a device first scans
-the pre-defined channel for beacons from the coordinator and once it finds a
-beacon it tries to synchronize to and track all future beacons. Whenever the
-coordinator has data to send (indicated in the beacon), the device extracts the
-DATA frame from the coordinator.
-
-The third LED (Telos: blue) is toggled whenever the coordinator has transmitted
-a beacon, it is not used on the device. On the coordinator the second LED
-(Telos: green) is toggled for every transmitted DATA frames. On a device the
-second LED is toggled for every received DATA frame. The first LED (Telos: red)
-is used for debugging, it denotes an error in the protocol stack and should
-never be on.
-
-Tools: NONE
-
-Usage: 
-
-1. Install the coordinator:
-
-    $ cd coordinator; make telosb install
-
-2. Install one device
-
-    $ cd device; make telosb install
-
-You can change some of the configuration parameters in app_profile.h
-
-Known bugs/limitations:
-
-- Currently this application only works on TelosB nodes
-- The MAC timing is not standard compliant, because TelosB lacks a
-  clock with sufficient precision/accuracy
-
-$Id$
-
diff --git a/apps/tests/tkn154/TestINDIRECT/app_profile.h b/apps/tests/tkn154/TestINDIRECT/app_profile.h
deleted file mode 100644 (file)
index 185bbcd..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#ifndef __APP_PROFILE_H
-#define __APP_PROFILE_H
-
-enum {
-  RADIO_CHANNEL = 26,
-  PAN_ID = 0x1152,
-  DEVICE_ADDRESS = 0x4342,
-  COORDINATOR_ADDRESS = 0x5341,
-  BEACON_ORDER = 5,
-  SUPERFRAME_ORDER = 5,
-};
-
-#endif
diff --git a/apps/tests/tkn154/TestINDIRECT/coordinator/Makefile b/apps/tests/tkn154/TestINDIRECT/coordinator/Makefile
deleted file mode 100644 (file)
index acdecfd..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-COMPONENT=TestIndirectAppC
-PFLAGS += -DIEEE154_BEACON_SYNC_DISABLED -DIEEE154_SCAN_DISABLED
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestINDIRECT/coordinator/TestCoordSenderC.nc b/apps/tests/tkn154/TestINDIRECT/coordinator/TestCoordSenderC.nc
deleted file mode 100644 (file)
index 454cbda..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright 
- *   notice, this list of conditions and the following disclaimer in the 
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names 
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestCoordSenderC
-{
-  uses {
-    interface Boot;
-    interface MCPS_DATA;
-    interface MLME_RESET;
-    interface MLME_START;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface Leds;
-    interface IEEE154Frame as Frame;
-    interface IEEE154TxBeaconPayload;
-    interface Packet;
-  }
-} implementation {
-
-  message_t m_frame;
-  uint8_t m_payloadLen;
-
-  event void Boot.booted() {
-    char payload[] = "Hello Device!";
-    uint8_t *payloadRegion;
-    ieee154_address_t deviceShortAddress;
-
-    // construct the frame
-    m_payloadLen = strlen(payload);
-    payloadRegion = call Packet.getPayload(&m_frame, m_payloadLen);
-    deviceShortAddress.shortAddress = DEVICE_ADDRESS; // destination
-    if (m_payloadLen <= call Packet.maxPayloadLength()){
-      memcpy(payloadRegion, payload, m_payloadLen);
-      call Frame.setAddressingFields(
-          &m_frame,                
-          ADDR_MODE_SHORT_ADDRESS, // SrcAddrMode,
-          ADDR_MODE_SHORT_ADDRESS, // DstAddrMode,
-          PAN_ID,                  // DstPANId,
-          &deviceShortAddress,     // DstAddr,
-          NULL                     // security
-          );
-      call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-    }
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status != IEEE154_SUCCESS)
-      return;
-    call MLME_SET.macShortAddress(COORDINATOR_ADDRESS);
-    call MLME_SET.macAssociationPermit(FALSE);
-    call MLME_START.request(
-                          PAN_ID,           // PANId
-                          RADIO_CHANNEL,    // LogicalChannel
-                          0,                // ChannelPage,
-                          0,                // StartTime,
-                          BEACON_ORDER,     // BeaconOrder
-                          SUPERFRAME_ORDER, // SuperframeOrder
-                          TRUE,             // PANCoordinator
-                          FALSE,            // BatteryLifeExtension
-                          FALSE,            // CoordRealignment
-                          0,                // CoordRealignSecurity
-                          0                 // BeaconSecurity
-                        );
-  }
-
-  void dataRequest()
-  {
-    call MCPS_DATA.request  (
-        &m_frame,                                 // msdu,
-        m_payloadLen,                             // payloadLength,
-        0,                                        // msduHandle,
-        TX_OPTIONS_ACK | TX_OPTIONS_INDIRECT      // TxOptions,
-        );
-  }
-
-  event void MLME_START.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS)
-      dataRequest();
-  }
-
-  event void MCPS_DATA.confirm(
-                          message_t *msg,
-                          uint8_t msduHandle,
-                          ieee154_status_t status,
-                          uint32_t Timestamp
-                        )
-  {
-    if (status == IEEE154_SUCCESS)
-      call Leds.led1Toggle();
-    dataRequest();
-  }
-
-  event message_t* MCPS_DATA.indication ( message_t* frame)
-  {
-    return frame;
-  }
-
-  event void IEEE154TxBeaconPayload.aboutToTransmit() { }
-
-  event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length) { }
-
-  event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength) { }
-
-  event void IEEE154TxBeaconPayload.beaconTransmitted() 
-  {
-    ieee154_macBSN_t beaconSequenceNumber = call MLME_GET.macBSN();
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();
-  }  
-  
-}
diff --git a/apps/tests/tkn154/TestINDIRECT/coordinator/TestIndirectAppC.nc b/apps/tests/tkn154/TestINDIRECT/coordinator/TestIndirectAppC.nc
deleted file mode 100644 (file)
index c64332b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-configuration TestIndirectAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC;
-  components TestCoordSenderC as App;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-  App.MLME_START -> Ieee802154MacC;
-  App.MCPS_DATA -> Ieee802154MacC;
-  App.Frame -> Ieee802154MacC;
-  App.IEEE154TxBeaconPayload -> Ieee802154MacC;
-  App.Packet -> Ieee802154MacC;
-
-}
diff --git a/apps/tests/tkn154/TestINDIRECT/device/Makefile b/apps/tests/tkn154/TestINDIRECT/device/Makefile
deleted file mode 100644 (file)
index 09b0d21..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-COMPONENT=TestIndirectAppC
-PFLAGS += -DIEEE154_BEACON_TX_DISABLED
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestINDIRECT/device/TestDeviceReceiverC.nc b/apps/tests/tkn154/TestINDIRECT/device/TestDeviceReceiverC.nc
deleted file mode 100644 (file)
index 45396db..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-#include "TKN154.h"
-#include "app_profile.h"
-module TestDeviceReceiverC
-{
-  uses {
-    interface Boot;
-    interface MCPS_DATA;
-    interface MLME_RESET;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface MLME_SCAN;
-    interface MLME_SYNC;
-    interface MLME_BEACON_NOTIFY;
-    interface MLME_SYNC_LOSS;
-    interface IEEE154BeaconFrame as BeaconFrame;
-    interface Leds;
-  }
-} implementation {
-
-  ieee154_address_t m_coordAddress;
-  uint8_t m_coordAddressMode;
-  ieee154_macPANId_t m_coordPANID;
-  ieee154_PANDescriptor_t m_PANDescriptor;
-  bool m_isPANDescriptorValid;
-  void startApp();
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-  
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS)
-      startApp();
-  }
-
-  void startApp()
-  {
-    ieee154_phyChannelsSupported_t channel;
-    uint8_t scanDuration = BEACON_ORDER;
-
-    // in this application the coordinator assumes that 
-    // the device has a certain short address    
-    call MLME_SET.macShortAddress(DEVICE_ADDRESS);
-    channel = ((uint32_t) 1) << RADIO_CHANNEL;
-
-    // we want all received beacons to be signalled 
-    // through the MLME_BEACON_NOTIFY interface, i.e.
-    // we set the macAutoRequest attribute to FALSE
-    call MLME_SET.macAutoRequest(FALSE);
-    call MLME_SCAN.request  (
-                           PASSIVE_SCAN,           // ScanType
-                           channel,                // ScanChannels
-                           scanDuration,           // ScanDuration
-                           0x00,                   // ChannelPage
-                           0,                      // EnergyDetectListNumEntries
-                           NULL,                   // EnergyDetectList
-                           0,                      // PANDescriptorListNumEntries
-                           NULL,                   // PANDescriptorList
-                           0                       // security
-                        );
-  }
-
-  event message_t* MLME_BEACON_NOTIFY.indication (message_t* frame)
-  {
-    // received a beacon frame during SCAN
-    ieee154_phyCurrentPage_t page = call MLME_GET.phyCurrentPage();
-
-    if (!m_isPANDescriptorValid && call BeaconFrame.parsePANDescriptor(
-          frame, RADIO_CHANNEL, page, &m_PANDescriptor) == SUCCESS){
-      // let's see if the beacon is from our coordinator...
-      if (m_PANDescriptor.CoordAddrMode == ADDR_MODE_SHORT_ADDRESS &&
-          m_PANDescriptor.CoordPANId == PAN_ID &&
-          m_PANDescriptor.CoordAddress.shortAddress == COORDINATOR_ADDRESS){
-        // wait until SCAN is finished, then syncronize to beacons
-        m_isPANDescriptorValid = TRUE;
-      }
-    }
-    return frame;
-  }
-
-  event void MLME_SCAN.confirm    (
-                          ieee154_status_t status,
-                          uint8_t ScanType,
-                          uint8_t ChannelPage,
-                          uint32_t UnscannedChannels,
-                          uint8_t EnergyDetectListNumEntries,
-                          int8_t* EnergyDetectList,
-                          uint8_t PANDescriptorListNumEntries,
-                          ieee154_PANDescriptor_t* PANDescriptorList
-                        )
-  {
-    if (m_isPANDescriptorValid){
-      // set the macAutoRequest attribute to TRUE, so indirect
-      // transmissions are automatically carried through
-      call MLME_SET.macAutoRequest(TRUE);
-      call MLME_SET.macCoordShortAddress(m_PANDescriptor.CoordAddress.shortAddress);
-      call MLME_SET.macPANId(m_PANDescriptor.CoordPANId);
-      call MLME_SYNC.request(m_PANDescriptor.LogicalChannel, m_PANDescriptor.ChannelPage, TRUE);
-    } else
-      startApp();
-  }
-
-  event void MCPS_DATA.confirm(
-                          message_t *msg,
-                          uint8_t msduHandle,
-                          ieee154_status_t status,
-                          uint32_t Timestamp
-                        )
-  {
-  }
-
-  event void MLME_SYNC_LOSS.indication(
-                          ieee154_status_t lossReason,
-                          uint16_t PANId,
-                          uint8_t LogicalChannel,
-                          uint8_t ChannelPage,
-                          ieee154_security_t *security)
-  {
-    call Leds.led1Off();
-    startApp();
-  }
-
-  event message_t* MCPS_DATA.indication (message_t* frame)
-  {
-    call Leds.led1Toggle();
-    return frame;
-  }
-}
diff --git a/apps/tests/tkn154/TestINDIRECT/device/TestIndirectAppC.nc b/apps/tests/tkn154/TestINDIRECT/device/TestIndirectAppC.nc
deleted file mode 100644 (file)
index 4583acb..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestIndirectAppC
-{
-} implementation {
-  components MainC, LedsC, Ieee802154MacC;
-  components TestDeviceReceiverC as App;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-  App.MLME_SCAN -> Ieee802154MacC;
-  App.MLME_SYNC -> Ieee802154MacC;
-  App.MLME_BEACON_NOTIFY -> Ieee802154MacC;
-  App.MLME_SYNC_LOSS -> Ieee802154MacC;
-  App.MCPS_DATA -> Ieee802154MacC;
-  App.BeaconFrame -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestPROMISCUOUS/Makefile b/apps/tests/tkn154/TestPROMISCUOUS/Makefile
deleted file mode 100644 (file)
index 1aabe6f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-COMPONENT=TestPromiscuousAppC
-PFLAGS += -DIEEE154_BEACON_TX_DISABLED -DIEEE154_BEACON_SYNC_DISABLED -DIEEE154_SCAN_DISABLED
-PFLAGS += -DPRINTF_BUFFER_SIZE=1000
-CFLAGS += -I$(TOSDIR)/lib/printf
-include ../Makefile.include
diff --git a/apps/tests/tkn154/TestPROMISCUOUS/README.txt b/apps/tests/tkn154/TestPROMISCUOUS/README.txt
deleted file mode 100644 (file)
index fdb6941..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-README for TestPROMISCUOUS
-Author/Contact: tinyos-help@millennium.berkeley.edu
-
-Description:
-
-In this application the node enables promiscuous mode, i.e. its radio is
-switched to receive mode and all incoming frames that pass the CRC check are
-signalled to the upper layer. The application uses the TinyOS printf library
-(tos/lib/printf) to output information on the MAC header fields and payload for
-every received frame over the serial port. The second (TelosB: green) LED is
-toggled whenever a frame is received.
-
-Tools: The printf java client in $TOSDIR/../apps/tests/TestPrintf
-
-Usage: 
-
-Install the application on a node
-
-    $ make telosb install
-
-Start the printf client on 
-
-    $ cd $TOSDIR/../apps/tests/TestPrintf
-    $ make telosb
-    $ java net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb
-
-(http://docs.tinyos.net/ has a section on how to use the TinyOS printf library)
-
-Known bugs/limitations:
-
-- Currently this application only works on TelosB nodes
-- The timestamps for ACKs are incorrect
-
-$Id$
-
diff --git a/apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousAppC.nc b/apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousAppC.nc
deleted file mode 100644 (file)
index e48ac50..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestPromiscuousAppC
-{
-} implementation {
- components MainC, TestPromiscuousC as App, LedsC, 
-            Ieee802154MacC as Ieee802154MacC;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-  App.MCPS_DATA -> Ieee802154MacC;
-  App.Frame -> Ieee802154MacC;
-  App.BeaconFrame -> Ieee802154MacC;
-  App.PromiscuousMode -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousC.nc b/apps/tests/tkn154/TestPROMISCUOUS/TestPromiscuousC.nc
deleted file mode 100644 (file)
index bc3699f..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-#include "TKN154.h"
-module TestPromiscuousC
-{
-  uses {
-    interface Boot;
-    interface MLME_RESET;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface MCPS_DATA;
-    interface Leds;
-    interface IEEE154Frame as Frame;
-    interface IEEE154BeaconFrame as BeaconFrame;
-    interface SplitControl as PromiscuousMode;
-  }
-} implementation {
-
-  const char *m_frametype[] = {"Beacon", "Data","Acknowledgement","MAC command", "Unknown"};
-  const char *m_cmdframetype[] = {"unknown command", "Association request","Association response",
-    "Disassociation notification","Data request","PAN ID conflict notification",
-    "Orphan notification", "Beacon request", "Coordinator realignment", "GTS request"};
-
-  enum {
-    RADIO_CHANNEL = 26,
-  };
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    call MLME_SET.phyCurrentChannel(RADIO_CHANNEL);
-    call PromiscuousMode.start();
-  }
-
-  event message_t* MCPS_DATA.indication (message_t* frame)
-  {
-    uint8_t i;
-    uint8_t *payload = call Frame.getPayload(frame);
-    uint8_t payloadLen = call Frame.getPayloadLength(frame);
-    uint8_t *header = call Frame.getHeader(frame);
-    uint8_t headerLen = call Frame.getHeaderLength(frame);
-    uint8_t SrcAddrMode, DstAddrMode;
-    uint8_t frameType, cmdFrameType;
-    ieee154_address_t SrcAddress, DstAddress;
-    uint16_t SrcPANId=0, DstPANId=0;
-
-    if (call Frame.hasStandardCompliantHeader(frame)){
-      frameType = call Frame.getFrameType(frame);
-      if (frameType > FRAMETYPE_CMD)
-        frameType = 4;
-      call Frame.getSrcPANId(frame, &SrcPANId);
-      call Frame.getDstPANId(frame, &DstPANId);
-      call Frame.getSrcAddr(frame, &SrcAddress);
-      call Frame.getDstAddr(frame, &DstAddress);
-      SrcAddrMode = call Frame.getSrcAddrMode(frame);
-      DstAddrMode = call Frame.getDstAddrMode(frame);
-
-      printf("\n");
-      printf("Frametype: %s", m_frametype[frameType]);
-      if (frameType == FRAMETYPE_CMD){
-        cmdFrameType = payload[0];
-        if (cmdFrameType > 9)
-          cmdFrameType = 0;
-        printf(" (%s)", m_cmdframetype[cmdFrameType]);
-      }
-      printf("\n");
-      printf("SrcAddrMode: %d\n", SrcAddrMode);
-      printf("SrcAddr: ");
-      if (SrcAddrMode == ADDR_MODE_SHORT_ADDRESS){
-        printf("0x%hx\n", SrcAddress.shortAddress);
-        printf("SrcPANId: 0x%x\n", SrcPANId);
-      } else if (SrcAddrMode == ADDR_MODE_EXTENDED_ADDRESS){
-        for (i=0; i<8; i++)
-          printf("0x%hx ", ((uint8_t*) &(SrcAddress.extendedAddress))[i]);
-        printf("\n");
-        printf("SrcPANId: 0x%x\n", SrcPANId);
-      } else printf("\n");
-      printf("DstAddrMode: %d\n", DstAddrMode);
-      printf("DstAddr: ");
-      if ( DstAddrMode == ADDR_MODE_SHORT_ADDRESS){
-        printf("0x%hx\n", DstAddress.shortAddress);
-        printf("DestPANId: 0x%x\n", DstPANId);
-      } else if  ( DstAddrMode == ADDR_MODE_EXTENDED_ADDRESS) {
-        for (i=0; i<8; i++)
-          printf("0x%hx ", ((uint8_t*) &(DstAddress.extendedAddress))[i]);
-        printf("\n");    
-        printf("DestPANId: 0x%x\n", DstPANId);
-      } else printf("\n");
-
-      printf("DSN: %d\n", call Frame.getDSN(frame));
-      printf("MHRLen: %d\n", headerLen);
-      printf("MHR: ");
-      for (i=0; i<headerLen; i++){
-        printf("0x%hx ", header[i]);
-      }
-      printf("\n");      
-      printf("PayloadLen: %d\n", payloadLen);
-      printf("Payload: ");
-      for (i=0; i<payloadLen; i++){
-        printf("0x%hx ", payload[i]);
-      }
-      printf("\n");
-      printf("MpduLinkQuality: %d\n", call Frame.getLinkQuality(frame));
-
-      printf("Timestamp: ");
-      if (call Frame.isTimestampValid(frame))
-        printf("%ld\n", call Frame.getTimestamp(frame));
-      else
-        printf("INVALID\n");
-      printfflush(); 
-    }
-    call Leds.led1Toggle();
-    return frame;
-  }
-
-  event void MCPS_DATA.confirm( message_t *msg, uint8_t msduHandle, ieee154_status_t status, uint32_t Timestamp){}
-  event void PromiscuousMode.startDone(error_t error) 
-  {
-    printf("\n*** Radio is now in promiscuous mode, listening on channel %d ***\n", RADIO_CHANNEL);
-    printfflush(); 
-  }
-  event void PromiscuousMode.stopDone(error_t error) {}
-}
diff --git a/apps/tests/tkn154/TestSTARTSYNC/README.txt b/apps/tests/tkn154/TestSTARTSYNC/README.txt
deleted file mode 100644 (file)
index 3e49e7f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-README for TestSTARTSYNC
-Author/Contact: tinyos-help@millennium.berkeley.edu
-
-Description:
-
-In this application one node takes the role of a PAN coordinator in a
-beacon-enabled 802.15.4 PAN; it transmits periodic beacons with a frequency
-defined in the app_profile.h file. A second node acts as a device; it first
-scans all available channels for beacons from the coordinator and once it finds
-a beacon it tries to synchronize to and track all future beacons. 
-
-The third LED (Telos: blue) is toggled whenever the coordinator has transmitted
-a beacon or whenever a device has received a beacon. On the coordinator the
-second LED (Telos: green) is switched on after it has started transmitting
-beacons. On a device the second LED is switched on whenever the device is
-synchronized to the coordinator's beacons. The first LED (Telos: red) is used
-for debugging, it denotes an error in the protocol stack and should never be
-on.
-
-Tools: NONE
-
-Usage: 
-
-1. Install the coordinator:
-
-    $ cd coordinator; make telosb install
-
-2. Install one (or more) devices:
-
-    $ cd device; make telosb install
-
-You can change some of the configuration parameters in app_profile.h
-
-Known bugs/limitations:
-
-- Currently this application only works on TelosB nodes
-- The beacon period is not standard-compliant, because TelosB lacks a
-  clock with sufficient precision/accuracy
-
-$Id$
-
diff --git a/apps/tests/tkn154/TestSTARTSYNC/app_profile.h b/apps/tests/tkn154/TestSTARTSYNC/app_profile.h
deleted file mode 100644 (file)
index 366f111..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#ifndef __APP_PROFILE_H
-#define __APP_PROFILE_H
-
-enum {
-  RADIO_CHANNEL = 26,
-  PAN_ID = 0x7761,
-  COORDINATOR_ADDRESS = 0x1832,
-  BEACON_ORDER = 5,
-  SUPERFRAME_ORDER = 5,
-};
-
-#endif
diff --git a/apps/tests/tkn154/TestSTARTSYNC/coordinator/Makefile b/apps/tests/tkn154/TestSTARTSYNC/coordinator/Makefile
deleted file mode 100644 (file)
index 13db21c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-COMPONENT=TestStartSyncAppC
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestSTARTSYNC/coordinator/TestCoordC.nc b/apps/tests/tkn154/TestSTARTSYNC/coordinator/TestCoordC.nc
deleted file mode 100644 (file)
index f752bda..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright 
- *   notice, this list of conditions and the following disclaimer in the 
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names 
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestCoordC
-{
-  uses {
-    interface Boot;
-    interface MLME_RESET;
-    interface MLME_START;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface Leds;
-    interface IEEE154TxBeaconPayload;
-  }
-} implementation {
-
-  uint8_t m_beaconPayload[] = {0x01, 0x02, 0x03, 0x04, 0x05};
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS){
-      call MLME_SET.macShortAddress(COORDINATOR_ADDRESS);
-      call MLME_SET.macAssociationPermit(FALSE);
-      call MLME_START.request(
-          PAN_ID,             // PANId
-          RADIO_CHANNEL,      // LogicalChannel
-          0,                  // ChannelPage,
-          0,                  // StartTime,
-          BEACON_ORDER,       // BeaconOrder
-          SUPERFRAME_ORDER,   // SuperframeOrder
-          TRUE,               // PANCoordinator
-          FALSE,              // BatteryLifeExtension
-          FALSE,              // CoordRealignment
-          0,                  // no realignment security
-          0                   // no beacon security
-          );
-    }
-  }
-
-  event void MLME_START.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS){
-      call IEEE154TxBeaconPayload.setBeaconPayload(m_beaconPayload, sizeof(m_beaconPayload));
-      call Leds.led1On();
-    }
-  }
-
-  event void IEEE154TxBeaconPayload.aboutToTransmit() { }
-
-  event void IEEE154TxBeaconPayload.setBeaconPayloadDone(void *beaconPayload, uint8_t length) { }
-
-  event void IEEE154TxBeaconPayload.modifyBeaconPayloadDone(uint8_t offset, void *buffer, uint8_t bufferLength) { }
-
-  event void IEEE154TxBeaconPayload.beaconTransmitted() 
-  {
-    ieee154_macBSN_t beaconSequenceNumber = call MLME_GET.macBSN();
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();
-  }
-}
diff --git a/apps/tests/tkn154/TestSTARTSYNC/coordinator/TestStartSyncAppC.nc b/apps/tests/tkn154/TestSTARTSYNC/coordinator/TestStartSyncAppC.nc
deleted file mode 100644 (file)
index d0913c7..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright 
- *   notice, this list of conditions and the following disclaimer in the 
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names 
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestStartSyncAppC
-{
-} implementation {
-
-  components MainC, LedsC, Ieee802154MacC as Ieee802154MacC;
-  components TestCoordC as App;
-
-  MainC.Boot <- App;
-  App.MLME_START -> Ieee802154MacC;
-  App.IEEE154TxBeaconPayload -> Ieee802154MacC;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-}
diff --git a/apps/tests/tkn154/TestSTARTSYNC/device/Makefile b/apps/tests/tkn154/TestSTARTSYNC/device/Makefile
deleted file mode 100644 (file)
index 1f9448f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-COMPONENT=TestStartSyncAppC
-PFLAGS += -DIEEE154_BEACON_TX_DISABLED
-CFLAGS += -I$(shell pwd)/..
-include ../../Makefile.include
diff --git a/apps/tests/tkn154/TestSTARTSYNC/device/TestDeviceC.nc b/apps/tests/tkn154/TestSTARTSYNC/device/TestDeviceC.nc
deleted file mode 100644 (file)
index 93713b8..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/* 
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-#include "TKN154.h"
-#include "app_profile.h"
-module TestDeviceC
-{
-  uses {
-    interface Boot;
-    interface MLME_RESET;
-    interface MLME_SET;
-    interface MLME_GET;
-    interface MLME_SCAN;
-    interface MLME_SYNC;
-    interface MLME_BEACON_NOTIFY;
-    interface MLME_SYNC_LOSS;
-    interface Leds;
-    interface IEEE154BeaconFrame as BeaconFrame;
-  }
-} implementation {
-
-  enum {
-    NUM_PAN_DESCRIPTORS = 10,
-  };
-  ieee154_PANDescriptor_t m_PANDescriptor[NUM_PAN_DESCRIPTORS];
-  void startApp();
-
-  event void Boot.booted() {
-    call MLME_RESET.request(TRUE, BEACON_ENABLED_PAN);
-  }
-  
-  event void MLME_RESET.confirm(ieee154_status_t status)
-  {
-    if (status == IEEE154_SUCCESS)
-      startApp();
-  }
-
-  void startApp()
-  {
-    ieee154_phyChannelsSupported_t supportedChannels;
-    uint8_t scanDuration = BEACON_ORDER;
-
-    // set the short address to whatever was passed 
-    // as a parameter to make system ("make install,X")
-    call MLME_SET.macShortAddress(TOS_NODE_ID); 
-    supportedChannels = call MLME_GET.phyChannelsSupported();
-
-    // setting the macAutoRequest attribute to TRUE means
-    // that during the scan beacons will not be signalled
-    // through MLME_BEACON_NOTIFY
-    call MLME_SET.macAutoRequest(TRUE);
-    call MLME_SCAN.request  (
-        PASSIVE_SCAN,           // ScanType
-        supportedChannels,      // ScanChannels
-        scanDuration,           // ScanDuration
-        0x00,                   // ChannelPage
-        0,                      // EnergyDetectListNumEntries
-        NULL,                   // EnergyDetectList
-        NUM_PAN_DESCRIPTORS,    // PANDescriptorListNumEntries
-        m_PANDescriptor,        // PANDescriptorList
-        0                       // security
-        );
-  }
-
-  event void MLME_SCAN.confirm    (
-                          ieee154_status_t status,
-                          uint8_t ScanType,
-                          uint8_t ChannelPage,
-                          uint32_t UnscannedChannels,
-                          uint8_t EnergyDetectListNumEntries,
-                          int8_t* EnergyDetectList,
-                          uint8_t PANDescriptorListNumEntries,
-                          ieee154_PANDescriptor_t* PANDescriptorList
-                        )
-  {
-    uint8_t i;
-    switch (status){
-      case IEEE154_NO_BEACON:
-        startApp();
-        break;
-      case IEEE154_SUCCESS:
-        if (PANDescriptorListNumEntries > 0){
-          for (i=0; i<PANDescriptorListNumEntries; i++)
-            if (PANDescriptorList[i].CoordAddrMode == ADDR_MODE_SHORT_ADDRESS &&
-                PANDescriptorList[i].CoordPANId == PAN_ID &&
-                PANDescriptorList[i].CoordAddress.shortAddress == COORDINATOR_ADDRESS)
-              break;
-          if (i == PANDescriptorListNumEntries){
-            // found no matching entry
-            startApp();
-          } else {
-            call MLME_SET.macAutoRequest(FALSE); // from now on: give me the beacons
-            call MLME_SET.macPANId(PANDescriptorList[i].CoordPANId);
-            call MLME_SET.macCoordShortAddress(PANDescriptorList[i].CoordAddress.shortAddress);
-            call MLME_SYNC.request(PANDescriptorList[i].LogicalChannel, ChannelPage, TRUE);
-          }
-        }
-        break;
-      default:
-        break;
-    }
-  }
-
-  event message_t* MLME_BEACON_NOTIFY.indication (
-                          message_t* frame
-                        )
-  {
-    ieee154_macBSN_t beaconSequenceNumber = call BeaconFrame.getBSN(frame);
-    if (beaconSequenceNumber & 1)
-      call Leds.led2On();
-    else
-      call Leds.led2Off();    
-    call Leds.led1On();
-    return frame;
-  }
-
-  event void MLME_SYNC_LOSS.indication(
-                          ieee154_status_t lossReason,
-                          uint16_t PANId,
-                          uint8_t LogicalChannel,
-                          uint8_t ChannelPage,
-                          ieee154_security_t *security)
-  {
-    call Leds.led1Off();
-    startApp();
-  }
-}
diff --git a/apps/tests/tkn154/TestSTARTSYNC/device/TestStartSyncAppC.nc b/apps/tests/tkn154/TestSTARTSYNC/device/TestStartSyncAppC.nc
deleted file mode 100644 (file)
index 9373400..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2008, Technische Universitaet Berlin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without 
- * modification, are permitted provided that the following conditions 
- * are met:
- * - Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright 
- *   notice, this list of conditions and the following disclaimer in the 
- *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universitaet Berlin nor the names 
- *   of its contributors may be used to endorse or promote products derived
- *   from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
- * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * - Revision -------------------------------------------------------------
- * $Revision$
- * $Date$
- * @author: Jan Hauer <hauer@tkn.tu-berlin.de>
- * ========================================================================
- */
-
-configuration TestStartSyncAppC
-{
-} implementation {
-
-  components MainC, LedsC, Ieee802154MacC as Ieee802154MacC;
-  components TestDeviceC as App;
-
-  App.MLME_SCAN -> Ieee802154MacC;
-  App.MLME_SYNC -> Ieee802154MacC;
-  App.MLME_BEACON_NOTIFY -> Ieee802154MacC;
-  App.MLME_SYNC_LOSS -> Ieee802154MacC;
-  App.BeaconFrame -> Ieee802154MacC;
-
-  MainC.Boot <- App;
-  App.Leds -> LedsC;
-  App.MLME_RESET -> Ieee802154MacC;
-  App.MLME_SET -> Ieee802154MacC;
-  App.MLME_GET -> Ieee802154MacC;
-
-#ifdef PRINTF_ENABLED
-  components PrintfC;
-  App.PrintfControl -> PrintfC;
-  App.PrintfFlush -> PrintfC;
-#endif
-}