Changeset 536

Show
Ignore:
Timestamp:
04/23/08 15:53:46 (3 months ago)
Author:
agr
Message:

SAMPL NCK removed, use ACK with error_code instead

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nano-RK/projects/SAMPL/app_pkt_handlers/control_pkt.c

    r535 r536  
    55#include <control_pkt.h> 
    66#include <ack_pkt.h> 
    7 #include <nck_pkt.h> 
    87 
    98 
     
    1110{ 
    1211ACK_PKT_T p; 
    13 NCK_PKT_T n; 
    1412CONTROL_PKT_T r; 
    1513uint8_t num_pkts,i,selected,checksum; 
     
    4543  pkt->num_msgs=1; 
    4644  pkt->pkt_type=ACK_PKT; 
     45  pkt->error_code=0;  // set error type for NCK 
    4746  } 
    4847  else 
     
    5453  printf( "%d\r\n",checksum ); 
    5554  // build NCK reply packet 
    56   n.mac_addr=my_mac; 
    57   pkt->payload_len = nck_pkt_add( &n, pkt->payload,0); 
     55  p.mac_addr=my_mac; 
     56  pkt->payload_len = ack_pkt_add( &p, pkt->payload,0); 
    5857  pkt->num_msgs=1; 
    59   pkt->pkt_type=NCK_PKT; 
     58  pkt->pkt_type=ACK_PKT; 
     59  pkt->error_code=1;  // set error type for NCK 
    6060  } 
    6161 
  • nano-RK/projects/SAMPL/client/aggregate.c

    r535 r536  
    4141        ack_aggregate(us_pkt_in, us_pkt );       
    4242        break; 
    43   case NCK_PKT: 
    44         nck_aggregate(us_pkt_in, us_pkt );       
    45         break; 
    4643  case PING_PKT: 
    4744        ping_aggregate(us_pkt_in, us_pkt );      
  • nano-RK/projects/SAMPL/client/makefile

    r535 r536  
    2828SRC += ../app_pkt_handlers/ping_pkt.c 
    2929SRC += ../app_pkt_handlers/ack_pkt.c 
    30 SRC += ../app_pkt_handlers/nck_pkt.c 
    3130SRC += ../app_pkt_handlers/route_pkt.c 
    3231SRC += ../app_pkt_handlers/trace.c 
  • nano-RK/projects/SAMPL/include/sampl.h

    r535 r536  
    8282#define  WIRELESS_UPDATE_PKT    0x02 
    8383#define  ACK_PKT                0x03 
    84 #define  NCK_PKT              0x04 
     84#define  ERROR_PKT            0x04 
    8585#define  ROUTE_PKT              0x05 
    8686#define  SENSOR_LONG_PKT        0x06