[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII Nido.nc, 1.4, 1.5 PCRadio.h, 1.1, 1.2 event_queue.c, 1.3, 1.4 hpl.c, 1.3, 1.4

Elaine Cheong celaine at users.sourceforge.net
Thu Nov 9 19:36:30 PST 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31528/tos/platform/ptII

Modified Files:
	Nido.nc PCRadio.h event_queue.c hpl.c 
Log Message:
Fixed some debug output statements to use _PTII_NODEID.  Not possible to fix
all of them, since some output statements do not use NODE_NUM, and get the
node id from a data structure instead.



Index: Nido.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/Nido.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Nido.nc	1 Feb 2006 07:50:12 -0000	1.4
--- Nido.nc	10 Nov 2006 03:36:28 -0000	1.5
***************
*** 333,338 ****
  
        tos_state.node_state[i].time = start_time;
        dbg_clear(DBG_SIM|DBG_USR3, "SIM: Time for mote %lli initialized to %lli.\n",
!                 i, tos_state.node_state[i].time);
      }
  
--- 333,342 ----
  
        tos_state.node_state[i].time = start_time;
+       // Viptos: _PTII_NODEID is passed to the preprocessor as a macro definition.
+       // Viptos: We assume that there is only one node per TOSSIM.
+       //dbg_clear(DBG_SIM|DBG_USR3, "SIM: Time for mote %lli initialized to %lli.\n",
        dbg_clear(DBG_SIM|DBG_USR3, "SIM: Time for mote %lli initialized to %lli.\n",
!       //          i, tos_state.node_state[i].time);
!               _PTII_NODEID, tos_state.node_state[i].time);
      }
  

Index: PCRadio.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/PCRadio.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PCRadio.h	19 Apr 2005 01:16:12 -0000	1.1
--- PCRadio.h	10 Nov 2006 03:36:28 -0000	1.2
***************
*** 91,95 ****
    TOS_queue_insert_event(uevent);
    printTime(buf, 1024);
!   dbg(DBG_UART, "Enqueueing uart_send_event at %s for mote %i", buf, NODE_NUM);
  }
  
--- 91,98 ----
    TOS_queue_insert_event(uevent);
    printTime(buf, 1024);
!   // Viptos: _PTII_NODEID is passed to the preprocessor as a macro definition.
!   // Viptos: We assume that there is only one node per TOSSIM.
!   //dbg(DBG_UART, "Enqueueing uart_send_event at %s for mote %i", buf, NODE_NUM);
!   dbg(DBG_UART, "Enqueueing uart_send_event at %s for mote %i", buf, _PTII_NODEID);
  }
  

Index: event_queue.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/event_queue.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** event_queue.c	1 Feb 2006 07:50:12 -0000	1.3
--- event_queue.c	10 Nov 2006 03:36:28 -0000	1.4
***************
*** 96,100 ****
      timeStr[0] = 0;
      printOtherTime(timeStr, 128, ftime);
!     dbg(DBG_QUEUE, "Popping event for mote %i with time %s.\n", event->mote, timeStr);
    }
    
--- 96,103 ----
      timeStr[0] = 0;
      printOtherTime(timeStr, 128, ftime);
!     // Viptos: _PTII_NODEID is passed to the preprocessor as a macro definition.
!     // Viptos: We assume that there is only one node per TOSSIM.
!     //dbg(DBG_QUEUE, "Popping event for mote %i with time %s.\n", event->mote, timeStr);
!     dbg(DBG_QUEUE, "Popping event for mote %i with time %s.\n", _PTII_NODEID, timeStr);
    }
    
***************
*** 152,158 ****
        // Viptos: We assume that there is only one node per TOSSIM.
        //dbg(DBG_QUEUE, "Setting TOS_LOCAL_ADDRESS to %hi\n", (short)(event->mote & 0xffff));
!       dbg(DBG_QUEUE, "Setting TOS_LOCAL_ADDRESS to %hi\n", _PTII_NODEID);
        //atomic TOS_LOCAL_ADDRESS = (short)(event->mote & 0xffff);
!       atomic TOS_LOCAL_ADDRESS = _PTII_NODEID;
  
        event->handle(event, &tos_state); 
--- 155,161 ----
        // Viptos: We assume that there is only one node per TOSSIM.
        //dbg(DBG_QUEUE, "Setting TOS_LOCAL_ADDRESS to %hi\n", (short)(event->mote & 0xffff));
!       dbg(DBG_QUEUE, "Setting TOS_LOCAL_ADDRESS to %hi\n", (short)(_PTII_NODEID & 0xffff));
        //atomic TOS_LOCAL_ADDRESS = (short)(event->mote & 0xffff);
!       atomic TOS_LOCAL_ADDRESS = (short)(_PTII_NODEID & 0xffff);
  
        event->handle(event, &tos_state); 

Index: hpl.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/hpl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hpl.c	1 Feb 2006 07:50:12 -0000	1.3
--- hpl.c	10 Nov 2006 03:36:28 -0000	1.4
***************
*** 163,167 ****
    // Viptos: We assume that there is only one node per TOSSIM.
    //atomic TOS_LOCAL_ADDRESS = (short)(event->mote & 0xffff);
!   atomic TOS_LOCAL_ADDRESS = _PTII_NODEID;
  
    /*
--- 163,167 ----
    // Viptos: We assume that there is only one node per TOSSIM.
    //atomic TOS_LOCAL_ADDRESS = (short)(event->mote & 0xffff);
!   atomic TOS_LOCAL_ADDRESS = (short)(_PTII_NODEID & 0xffff);
  
    /*



More information about the Tinyos-contrib-commits mailing list