]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
*** empty log message ***
authorrarseverino <rarseverino>
Mon, 31 Aug 2009 15:51:37 +0000 (15:51 +0000)
committerrarseverino <rarseverino>
Mon, 31 Aug 2009 15:51:37 +0000 (15:51 +0000)
tos/lib/net/zigbee/apps/Test_APL/Makefile
tos/lib/net/zigbee/apps/Test_APL/Test_APL.h
tos/lib/net/zigbee/apps/Test_APL/Test_APL.nc
tos/lib/net/zigbee/apps/Test_APL/Test_APLM.nc
tos/lib/net/zigbee/ieee802154/includes/printfUART.h
tos/lib/net/zigbee/ieee802154/mac/MacM.nc
tos/lib/net/zigbee/ieee802154/macTDBS/MacM.nc
tos/lib/net/zigbee/ieee802154/nwk/NWK.nc
tos/lib/net/zigbee/ieee802154/nwk/NWKM.nc
tos/lib/net/zigbee/ieee802154/nwk/nwk_const.h

index 04386a649ea2b908aff8c20d90c8b75ee6821a8a..9479b3edde5ec59b42db9bc6d66b801a2b8e49c6 100644 (file)
@@ -1,6 +1,31 @@
 COMPONENT=Test_APL
 
+TKN154_PLATFORM_INCLUDE=$(TOSROOT)/tos/platforms/telosb/mac/tkn154/Makefile.include
+
+ifndef TKN154_MAC
 PFLAGS +=      -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/includes \
+               -I$(TOSROOT)/tos/lib/net/zigbee/Wrapper\
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/macTDBS \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/phy \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/timerasyncTDBS \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/interfaces \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/interfaces/mac \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/interfaces/phy \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/cc2420 \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/interfaces/nwk \
+                       -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/nwk
+
+else
+
+PFLAGS += -I$(TOSROOT)/tos//lib/mac/tkn154 \
+       -I$(TOSROOT)/tos//lib/mac/tkn154/dummies \
+       -I$(TOSROOT)/tos//lib/mac/tkn154/interfaces/MCPS \
+       -I$(TOSROOT)/tos//lib/mac/tkn154/interfaces/MLME \
+       -I$(TOSROOT)/tos//lib/mac/tkn154/interfaces/private \
+       -I$(TOSROOT)/tos//lib/mac/tkn154/interfaces/public\
+\
+-I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/includes \
+-I$(TOSROOT)/tos/lib/net/zigbee/Wrapper\
                        -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/macTDBS \
                        -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/phy \
                        -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/timerasyncTDBS \
@@ -10,6 +35,11 @@ PFLAGS +=    -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/includes \
                        -I$(TOSROOT)/tos/lib/net/zigbee/cc2420 \
                        -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/interfaces/nwk \
                        -I$(TOSROOT)/tos/lib/net/zigbee/ieee802154/nwk
-                       
-include $(MAKERULES)
+
+  include $(TKN154_PLATFORM_INCLUDE)   
+
+endif
+
+include $(MAKERULES)           
+
 
index 21030d236fd4939884d7e082bd2aef174c81ee3c..2398f16b326afe2d7646583cf7f0793f3557a9db 100644 (file)
@@ -1,3 +1,3 @@
 /* Defines for wrapper layer*/
-#define TKN154_MAC //to use TKN MAC
-//#define OPEN_ZB_MAC //to use OPEN-ZB MAC
\ No newline at end of file
+//#define TKN154_MAC //to use TKN MAC
+#define OPEN_ZB_MAC //to use OPEN-ZB MAC
\ No newline at end of file
index 3ea6d59abcdbacb1d55ecd30a07f5da3a6b86af7..de0fffeedbdac052f1816b64d57635e3cecc4a2e 100644 (file)
@@ -16,6 +16,9 @@
 #include "nwk_func.h"
 #include "UserButton.h"
 
+#include "Test_APL.h"
+
+
 configuration Test_APL {
 }
 implementation {
index 7e58da6d16c9ff2ee643296d51403a4fb99157ed..fa477fa960f4c0c4670d410fd508328d56f8002c 100644 (file)
@@ -1,3 +1,5 @@
+//#define OPEN_ZB_MAC
+
 /*
  * @author IPP HURRAY http://www.hurray.isep.ipp.pt/art-wise
  * @author Andre Cunha
@@ -607,18 +609,24 @@ implementation {
     //printfUART("Timer fired\n", "");
        if (TYPE_DEVICE == COORDINATOR)
        {       
-               //printfUART("coordinator procedure\n", "");
+               
+
+
+//printfUART("coordinator procedure\n", "");
                //start forming a PAN
                //command result_t request(uint32_t ScanChannels, uint8_t ScanDuration, uint8_t BeaconOrder, uint8_t SuperframeOrder, uint16_t PANId, bool BatteryLifeExtension);
                call NLME_NETWORK_FORMATION.request(0x000000ff, 8, BEACON_ORDER, SUPERFRAME_ORDER, MAC_PANID,0);
                
                //call Leds.redOff();
-               call Leds.led0Off();
+               //call Leds.led0Off();
                //call Test_timer.start(TIMER_REPEAT, 8000); 
        }
        else
        {       
-               //printfUART("child procedure\n", "");
+               
+
+
+//printfUART("child procedure\n", "");
                
                //call NLME_NETWORK_FORMATION.request(0x000000ff, 8, BEACON_ORDER, SUPERFRAME_ORDER, PANID,0);
                
@@ -740,7 +748,9 @@ event error_t NLME_NETWORK_DISCOVERY.confirm(uint8_t NetworkCount,networkdescrip
 
 event error_t NLME_NETWORK_FORMATION.confirm(uint8_t Status)
 {      
-       //printfUART("NLME_NETWORK_FORMATION.confirm\n", ""); 
+       
+
+//printfUART("NLME_NETWORK_FORMATION.confirm\n", ""); 
 
        return SUCCESS;
 }
@@ -860,7 +870,7 @@ return SUCCESS;
 event void Notify.notify( button_state_t state)
 {
        if (state == BUTTON_PRESSED) {
-               call Leds.led0On();
+               //call Leds.led0On();
                call T_init.startOneShot(5000);
 
        }
index f19f13bf729fe1bd3a8c7b02c5cc7692a715f33a..35a736fd14ef89a710a7d775f0d0e65a72cdf83e 100644 (file)
@@ -72,7 +72,7 @@
 //#include <stdio.h>
 
 // Comment out the line below to DISABLE printf statements.
-//#define PRINTFUART_ENABLED
+#define PRINTFUART_ENABLED
 
 
 // -------------------------------------------------------------------
index dc25d0f3a5ce3f520e19f1b1850d17f4371a1668..cf405995a906670f5d4989f153ea624fb9c30407 100644 (file)
@@ -738,7 +738,7 @@ async event error_t TimerAsync.sd_fired()
        }
        else
        {
-       //temporariamente aqui //atenção quando for para o cluster-tree é preciso mudar para fora
+       //temporariamente aqui //aten��o quando for para o cluster-tree � preciso mudar para fora
        //e necessario destinguir ZC de ZR (que tem que manter a sync com o respectivo pai)
        if (on_sync == 0)
        {
@@ -2019,7 +2019,7 @@ void indication_cmd(MPDU *pdu, int8_t ppduLinkQuality)
                                                                                        
                                                                                        if ( PANCoordinator==0 )
                                                                                        {
-                                                                                               ////////////printfUART("i´m not a pan\n", ""); 
+                                                                                               ////////////printfUART("im not a pan\n", ""); 
                                                                                                return;
                                                                                        }
                                                                        atomic{
index 2d88c165d447eb11fdbd93f9e34fb4e14e7ac7ec..d3ba973dffdc4829c29d0d6a826d65000989e9ba 100644 (file)
@@ -757,7 +757,7 @@ async event error_t TimerAsync.sd_fired()
        }
        else
        {
-       //temporariamente aqui //atenção quando for para o cluster-tree é preciso mudar para fora
+       //temporariamente aqui //aten��o quando for para o cluster-tree � preciso mudar para fora
        //e necessario destinguir ZC de ZR (que tem que manter a sync com o respectivo pai)
        if (on_sync == 0)
        {
@@ -2190,7 +2190,7 @@ void indication_cmd(MPDU *pdu, int8_t ppduLinkQuality)
                                                                                        
                                                                                        if ( PANCoordinator==0 )
                                                                                        {
-                                                                                               //////////printfUART("i´m not a pan\n", ""); 
+                                                                                               //////////printfUART("im not a pan\n", ""); 
                                                                                                return;
                                                                                        }
                                                                        atomic{
@@ -3871,7 +3871,7 @@ return SUCCESS;
 
 command error_t MLME_RESET.request(uint8_t set_default_PIB)
 {
-
+printfUART("MLME_RESET.request\n", "");
 
 return SUCCESS;
 }
@@ -3908,7 +3908,7 @@ command error_t MLME_START.request(uint32_t PANId, uint8_t LogicalChannel, uint8
        uint32_t BO_EXPONENT;
        uint32_t SO_EXPONENT;
 
-       ////////printfUART("MLME_START.request\n", "");
+       printfUART("MLME_START.request\n", "");
        //pag 102
        atomic {
        PANCoordinator=1;
index a54e271ff6acd87dede92a204eebf9f3d061f182..0d35ddf33c64659cef171e409cb273b36be91f9c 100644 (file)
@@ -52,17 +52,27 @@ implementation {
   components LedsC;
   components NWKM;
        
-  components Mac;
-  
+  //components Mac;
+
+//////////
+  components WrapperC;
+
+/////////////
+
+
+
   NWKM.Leds -> LedsC;
    
    
        components RandomC;
        NWKM.Random -> RandomC;
    
-   
-  //MAC interfaces
   
+
+
+  //MAC interfaces
+  /*
   NWKM.MLME_START -> Mac.MLME_START;
   
   NWKM.MLME_GET ->Mac.MLME_GET;
@@ -77,12 +87,40 @@ implementation {
   NWKM.MLME_ORPHAN->Mac.MLME_ORPHAN;
   NWKM.MLME_SYNC->Mac.MLME_SYNC;
   NWKM.MLME_SYNC_LOSS->Mac.MLME_SYNC_LOSS;
-  NWKM.MLME_RESET->Mac.MLME_RESET;
-  
+ NWKM.MLME_RESET->Mac.MLME_RESET;
   NWKM.MLME_SCAN->Mac.MLME_SCAN;
   
-  
   NWKM.MCPS_DATA->Mac.MCPS_DATA;
+*/
+
+///////////
+NWKM.MLME_RESET->WrapperC;
+NWKM.MLME_START -> WrapperC;
+  
+  NWKM.MLME_GET ->WrapperC;
+  NWKM.MLME_SET ->WrapperC;
+  
+  NWKM.MLME_BEACON_NOTIFY ->WrapperC;
+  NWKM.MLME_GTS -> WrapperC;
+  
+  NWKM.MLME_ASSOCIATE->WrapperC;
+  NWKM.MLME_DISASSOCIATE->WrapperC;
+  
+  NWKM.MLME_ORPHAN->WrapperC;
+  NWKM.MLME_SYNC->WrapperC;
+  NWKM.MLME_SYNC_LOSS->WrapperC;
+  NWKM.MLME_SCAN->WrapperC;
+  
+  NWKM.MCPS_DATA->WrapperC;
+
+
+
+
+///////////////
+  
+
+
+
        
        
        
index be241313e9b007fbb67a34b925c5c84e1941ae7f..9b0c42b05c8b4e8d299070633513cc91a13f9a6d 100644 (file)
@@ -870,7 +870,7 @@ command error_t NLME_NETWORK_FORMATION.request(uint32_t ScanChannels, uint8_t Sc
        call MLME_SET.request(MACBEACONPAYLOAD,v_temp);
        
 
-       ////printfUART("NLME_NETWORK_FORMATION.request\n", "");
+       printfUART("NLME_NETWORK_FORMATION.request\n", "");
        //perform an energydetection scan
        //perform an active scan
        //and select a suitable channel
@@ -931,6 +931,14 @@ command error_t NLME_NETWORK_FORMATION.request(uint32_t ScanChannels, uint8_t Sc
        
        call MLME_START.request(PANId, LOGICAL_CHANNEL,BeaconOrder ,SuperframeOrder,1,0,0,0,0);
        
+
+
+
+call MLME_RESET.request(1);
+
+
+
+
        return SUCCESS;
 }
        
@@ -1017,7 +1025,7 @@ command error_t NLME_JOIN.request(uint16_t PANId, bool JoinAsRouter, bool Rejoin
                                
                //destinaddress[0]=neighbortable[parent_index].Extended_Address0;
                //destinaddress[1]=neighbortable[parent_index].Extended_Address1;
-               //verificar o endereço do pan coordinator
+               //verificar o endereo do pan coordinator
                destinaddress[0]=0x00000000;
                
                
index a4eefd61f27b67cb38202827bc697f97bb96f08c..76b9a6a8c8760ce08d3dfa2ce25ec407aa6b235e 100644 (file)
 
 //SELECTED DEVICE TYPE
 
-#define TYPE_DEVICE END_DEVICE
+//#define TYPE_DEVICE END_DEVICE
 //#define TYPE_DEVICE ROUTER
-//#define TYPE_DEVICE COORDINATOR
+#define TYPE_DEVICE COORDINATOR
 
 //test definitions
-#define DEVICE_DEPTH 0x01
+#define DEVICE_DEPTH 0x00
 
 //used to operate in a fixed channel
 #define LOGICAL_CHANNEL 0x15