[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/printf PrintfC.nc, 1.5, 1.6 PrintfP.nc, 1.5, 1.6 printf.h, 1.5, 1.6

Kevin Klues klueska at users.sourceforge.net
Thu Apr 19 18:14:15 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/printf
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6456

Modified Files:
	PrintfC.nc PrintfP.nc printf.h 
Log Message:
Update to meet tep 3 standards for naming messages

Index: PrintfC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/printf/PrintfC.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PrintfC.nc	20 Apr 2007 00:55:32 -0000	1.5
--- PrintfC.nc	20 Apr 2007 01:14:13 -0000	1.6
***************
*** 50,54 ****
  implementation {
    components SerialActiveMessageC;
!   components new SerialAMSenderC(AM_PRINTFMSG);
    components PrintfP;
    components LedsC;
--- 50,54 ----
  implementation {
    components SerialActiveMessageC;
!   components new SerialAMSenderC(AM_PRINTF_MSG);
    components PrintfP;
    components LedsC;

Index: PrintfP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/printf/PrintfP.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PrintfP.nc	20 Apr 2007 00:55:32 -0000	1.5
--- PrintfP.nc	20 Apr 2007 01:14:13 -0000	1.6
***************
*** 80,93 ****
    
    task void retrySend() {
!     if(call AMSend.send(AM_BROADCAST_ADDR, &printfMsg, sizeof(printf_msg)) != SUCCESS)
        post retrySend();
    }
    
    void sendNext() {
!   	printf_msg* m = (printf_msg*)call Packet.getPayload(&printfMsg, NULL);
!   	length_to_send = (bytes_left_to_flush < sizeof(printf_msg)) ? bytes_left_to_flush : sizeof(printf_msg);
    	memset(m->buffer, 0, sizeof(printfMsg));
    	memcpy(m->buffer, (uint8_t*)next_byte, length_to_send);
!     if(call AMSend.send(AM_BROADCAST_ADDR, &printfMsg, sizeof(printf_msg)) != SUCCESS)
        post retrySend();  
      else {
--- 80,93 ----
    
    task void retrySend() {
!     if(call AMSend.send(AM_BROADCAST_ADDR, &printfMsg, sizeof(printf_msg_t)) != SUCCESS)
        post retrySend();
    }
    
    void sendNext() {
!   	printf_msg_t* m = (printf_msg_t*)call Packet.getPayload(&printfMsg, NULL);
!   	length_to_send = (bytes_left_to_flush < sizeof(printf_msg_t)) ? bytes_left_to_flush : sizeof(printf_msg_t);
    	memset(m->buffer, 0, sizeof(printfMsg));
    	memcpy(m->buffer, (uint8_t*)next_byte, length_to_send);
!     if(call AMSend.send(AM_BROADCAST_ADDR, &printfMsg, sizeof(printf_msg_t)) != SUCCESS)
        post retrySend();  
      else {

Index: printf.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/printf/printf.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** printf.h	20 Apr 2007 00:55:32 -0000	1.5
--- printf.h	20 Apr 2007 01:14:13 -0000	1.6
***************
*** 38,45 ****
  typedef nx_struct printf_msg {
    nx_uint8_t buffer[TOSH_DATA_LENGTH];
! } printf_msg;
  
  enum {
!   AM_PRINTFMSG = 100,
  };
  
--- 38,45 ----
  typedef nx_struct printf_msg {
    nx_uint8_t buffer[TOSH_DATA_LENGTH];
! } printf_msg_t;
  
  enum {
!   AM_PRINTF_MSG = 100,
  };
  



More information about the Tinyos-2-commits mailing list