Removed old unused timetable code
This commit is contained in:
parent
84fd0f9ae1
commit
30c0c5eaf6
4 changed files with 1 additions and 97 deletions
|
@ -50,8 +50,6 @@
|
|||
#include "net/rime/rimestats.h"
|
||||
#include "net/netstack.h"
|
||||
|
||||
#include "sys/timetable.h"
|
||||
|
||||
#define WITH_SEND_CCA 1
|
||||
|
||||
#define FOOTER_LEN 2
|
||||
|
@ -615,20 +613,11 @@ cc2420_set_pan_addr(unsigned pan,
|
|||
/*
|
||||
* Interrupt leaves frame intact in FIFO.
|
||||
*/
|
||||
#if CC2420_TIMETABLE_PROFILING
|
||||
#define cc2420_timetable_size 16
|
||||
TIMETABLE(cc2420_timetable);
|
||||
TIMETABLE_AGGREGATE(aggregate_time, 10);
|
||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||
int
|
||||
cc2420_interrupt(void)
|
||||
{
|
||||
CC2420_CLEAR_FIFOP_INT();
|
||||
process_poll(&cc2420_process);
|
||||
#if CC2420_TIMETABLE_PROFILING
|
||||
timetable_clear(&cc2420_timetable);
|
||||
TIMETABLE_TIMESTAMP(cc2420_timetable, "interrupt");
|
||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||
|
||||
last_packet_timestamp = cc2420_sfd_start_time;
|
||||
pending++;
|
||||
|
@ -645,10 +634,7 @@ PROCESS_THREAD(cc2420_process, ev, data)
|
|||
|
||||
while(1) {
|
||||
PROCESS_YIELD_UNTIL(ev == PROCESS_EVENT_POLL);
|
||||
#if CC2420_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(cc2420_timetable, "poll");
|
||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||
|
||||
|
||||
PRINTF("cc2420_process: calling receiver callback\n");
|
||||
|
||||
packetbuf_clear();
|
||||
|
@ -658,12 +644,6 @@ PROCESS_THREAD(cc2420_process, ev, data)
|
|||
packetbuf_set_datalen(len);
|
||||
|
||||
NETSTACK_RDC.input();
|
||||
#if CC2420_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(cc2420_timetable, "end");
|
||||
timetable_aggregate_compute_detailed(&aggregate_time,
|
||||
&cc2420_timetable);
|
||||
timetable_clear(&cc2420_timetable);
|
||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "net/rime/rimestats.h"
|
||||
#include "net/netstack.h"
|
||||
|
||||
#include "sys/timetable.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifndef CC2520_CONF_AUTOACK
|
||||
|
@ -593,20 +592,11 @@ cc2520_set_pan_addr(unsigned pan,
|
|||
/*
|
||||
* Interrupt leaves frame intact in FIFO.
|
||||
*/
|
||||
#if CC2520_TIMETABLE_PROFILING
|
||||
#define cc2520_timetable_size 16
|
||||
TIMETABLE(cc2520_timetable);
|
||||
TIMETABLE_AGGREGATE(aggregate_time, 10);
|
||||
#endif /* CC2520_TIMETABLE_PROFILING */
|
||||
int
|
||||
cc2520_interrupt(void)
|
||||
{
|
||||
CC2520_CLEAR_FIFOP_INT();
|
||||
process_poll(&cc2520_process);
|
||||
#if CC2520_TIMETABLE_PROFILING
|
||||
timetable_clear(&cc2520_timetable);
|
||||
TIMETABLE_TIMESTAMP(cc2520_timetable, "interrupt");
|
||||
#endif /* CC2520_TIMETABLE_PROFILING */
|
||||
|
||||
last_packet_timestamp = cc2520_sfd_start_time;
|
||||
cc2520_packets_seen++;
|
||||
|
@ -622,9 +612,6 @@ PROCESS_THREAD(cc2520_process, ev, data)
|
|||
|
||||
while(1) {
|
||||
PROCESS_YIELD_UNTIL(ev == PROCESS_EVENT_POLL);
|
||||
#if CC2520_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(cc2520_timetable, "poll");
|
||||
#endif /* CC2520_TIMETABLE_PROFILING */
|
||||
|
||||
PRINTF("cc2520_process: calling receiver callback\n");
|
||||
|
||||
|
@ -635,12 +622,6 @@ PROCESS_THREAD(cc2520_process, ev, data)
|
|||
|
||||
NETSTACK_RDC.input();
|
||||
/* flushrx(); */
|
||||
#if CC2520_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(cc2520_timetable, "end");
|
||||
timetable_aggregate_compute_detailed(&aggregate_time,
|
||||
&cc2520_timetable);
|
||||
timetable_clear(&cc2520_timetable);
|
||||
#endif /* CC2520_TIMETABLE_PROFILING */
|
||||
}
|
||||
|
||||
PROCESS_END();
|
||||
|
|
|
@ -67,8 +67,6 @@
|
|||
#include "net/rime/rimestats.h"
|
||||
#include "net/netstack.h"
|
||||
|
||||
#include "sys/timetable.h"
|
||||
|
||||
#define WITH_SEND_CCA 0
|
||||
|
||||
/* Timestamps have not been tested */
|
||||
|
@ -1277,11 +1275,6 @@ rf230_set_pan_addr(unsigned pan,
|
|||
static volatile rtimer_clock_t interrupt_time;
|
||||
static volatile int interrupt_time_set;
|
||||
#endif /* RF230_CONF_TIMESTAMPS */
|
||||
#if RF230_TIMETABLE_PROFILING
|
||||
#define rf230_timetable_size 16
|
||||
TIMETABLE(rf230_timetable);
|
||||
TIMETABLE_AGGREGATE(aggregate_time, 10);
|
||||
#endif /* RF230_TIMETABLE_PROFILING */
|
||||
int
|
||||
rf230_interrupt(void)
|
||||
{
|
||||
|
@ -1297,11 +1290,6 @@ if (RF230_receive_on) {
|
|||
|
||||
process_poll(&rf230_process);
|
||||
|
||||
#if RF230_TIMETABLE_PROFILING
|
||||
timetable_clear(&rf230_timetable);
|
||||
TIMETABLE_TIMESTAMP(rf230_timetable, "interrupt");
|
||||
#endif /* RF230_TIMETABLE_PROFILING */
|
||||
|
||||
rf230_pending = 1;
|
||||
|
||||
#if RADIOSTATS //TODO:This will double count buffered packets
|
||||
|
@ -1339,9 +1327,6 @@ PROCESS_THREAD(rf230_process, ev, data)
|
|||
while(1) {
|
||||
PROCESS_YIELD_UNTIL(ev == PROCESS_EVENT_POLL);
|
||||
RF230PROCESSFLAG(42);
|
||||
#if RF230_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(rf230_timetable, "poll");
|
||||
#endif /* RF230_TIMETABLE_PROFILING */
|
||||
|
||||
packetbuf_clear();
|
||||
|
||||
|
@ -1369,12 +1354,6 @@ PROCESS_THREAD(rf230_process, ev, data)
|
|||
packetbuf_set_datalen(len);
|
||||
RF230PROCESSFLAG(2);
|
||||
NETSTACK_RDC.input();
|
||||
#if RF230_TIMETABLE_PROFILING
|
||||
TIMETABLE_TIMESTAMP(rf230_timetable, "end");
|
||||
timetable_aggregate_compute_detailed(&aggregate_time,
|
||||
&rf230_timetable);
|
||||
timetable_clear(&rf230_timetable);
|
||||
#endif /* RF230_TIMETABLE_PROFILING */
|
||||
} else {
|
||||
#if RADIOSTATS
|
||||
RF230_receivefail++;
|
||||
|
|
|
@ -43,44 +43,12 @@
|
|||
|
||||
#include "net/rime/timesynch.h"
|
||||
|
||||
#include "sys/profile.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS(test_shell_process, "Test Contiki shell");
|
||||
AUTOSTART_PROCESSES(&test_shell_process);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#if 0
|
||||
PROCESS(shell_xmacprofile_process, "xmacprofile");
|
||||
SHELL_COMMAND(xmacprofile_command,
|
||||
"xmacprofile",
|
||||
"xmacprofile: show aggregate time",
|
||||
&shell_xmacprofile_process);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define xmac_timetable_size 256
|
||||
TIMETABLE_DECLARE(xmac_timetable);
|
||||
PROCESS_THREAD(shell_xmacprofile_process, ev, data)
|
||||
{
|
||||
int i;
|
||||
char buf[40];
|
||||
PROCESS_BEGIN();
|
||||
|
||||
for(i = 0; i < xmac_timetable_size; ++i) {
|
||||
if(xmac_timetable.timestamps[i].id != NULL) {
|
||||
snprintf(buf, sizeof(buf), "%u %u \"%s\"",
|
||||
xmac_timetable.timestamps[i].time + timesynch_offset(),
|
||||
(unsigned short)xmac_timetable.timestamps[i].id,
|
||||
xmac_timetable.timestamps[i].id);
|
||||
shell_output_str(&xmacprofile_command, buf, "");
|
||||
}
|
||||
}
|
||||
/* xmacprofile_aggregate_print_detailed();*/
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(test_shell_process, ev, data)
|
||||
{
|
||||
PROCESS_BEGIN();
|
||||
|
@ -96,10 +64,6 @@ PROCESS_THREAD(test_shell_process, ev, data)
|
|||
shell_rime_netcmd_init();
|
||||
shell_text_init();
|
||||
|
||||
#if 0
|
||||
shell_register_command(&xmacprofile_command);
|
||||
#endif
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue