mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-20 16:32:12 +00:00
using the same addresses in both netsim and non-netsim
This commit is contained in:
parent
94b06b4617
commit
92ecda2202
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: example-rucb.c,v 1.3 2008/04/24 11:50:04 fros4943 Exp $
|
* $Id: example-rucb.c,v 1.4 2008/11/11 11:25:39 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,28 +119,28 @@ PROCESS_THREAD(example_rucb_process, ev, data)
|
|||||||
button_sensor.activate();
|
button_sensor.activate();
|
||||||
|
|
||||||
PROCESS_PAUSE();
|
PROCESS_PAUSE();
|
||||||
|
|
||||||
#if NETSIM
|
|
||||||
if(rimeaddr_node_addr.u8[0] == 51 &&
|
if(rimeaddr_node_addr.u8[0] == 51 &&
|
||||||
rimeaddr_node_addr.u8[1] == 0) {
|
rimeaddr_node_addr.u8[1] == 0) {
|
||||||
#else
|
|
||||||
if(rimeaddr_node_addr.u16[0] == 2) {
|
|
||||||
#endif
|
|
||||||
rimeaddr_t recv;
|
rimeaddr_t recv;
|
||||||
|
|
||||||
#if NETSIM
|
|
||||||
recv.u8[0] = 52;
|
recv.u8[0] = 52;
|
||||||
recv.u8[1] = 0;
|
recv.u8[1] = 0;
|
||||||
#else
|
|
||||||
recv.u16[0] = 1;
|
|
||||||
#endif
|
|
||||||
start_time = clock_time();
|
start_time = clock_time();
|
||||||
|
|
||||||
|
/*printf("%u.%u: sending rucb to address %u.%u at time %u\n",
|
||||||
|
rimeaddr_node_addr.u8[0],
|
||||||
|
rimeaddr_node_addr.u8[1],
|
||||||
|
recv.u8[0],
|
||||||
|
recv.u8[1],
|
||||||
|
start_time);*/
|
||||||
|
|
||||||
rucb_send(&rucb, &recv);
|
rucb_send(&rucb, &recv);
|
||||||
#if NETSIM
|
#if NETSIM
|
||||||
ether_send_done();
|
ether_send_done();
|
||||||
#endif /* NETSIM */
|
#endif /* NETSIM */
|
||||||
}
|
}
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
||||||
PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event &&
|
PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user