Microchip® Advanced Software Framework

phase.c File Reference

    Common functionality for phase optimization in duty cycling radio protocols
Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se
#include "net/mac/phase.h"
#include "net/packetbuf.h"
#include "sys/contiki-clock.h"
#include "sys/ctimer.h"
#include "net/queuebuf.h"
#include "net/nbr-table.h"

Data Structures

struct  phase
 
struct  phase_queueitem
 

Macros

#define _DEBUG_   0
 
#define MAX_NOACKS   16
 
#define MAX_NOACKS_TIME   CLOCK_SECOND * 30
 
#define PHASE_CONF_DRIFT_CORRECT   0
 
#define PHASE_DEFER_THRESHOLD   1
 
#define PHASE_DRIFT_CORRECT   0
 
#define PHASE_QUEUESIZE   8
 
#define PRINTDEBUG(...)
 
#define PRINTF(...)
 

Functions

 MEMB (queued_packets_memb, struct phase_queueitem, PHASE_QUEUESIZE)
 
 NBR_TABLE (struct phase, nbr_phase)
 
void phase_init (void)
 
void phase_update (const linkaddr_t *neighbor, rtimer_clock_t time, int mac_status)
 
phase_status_t phase_wait (const linkaddr_t *neighbor, rtimer_clock_t cycle_time, rtimer_clock_t guard_time, mac_callback_t mac_callback, void *mac_callback_ptr, struct rdc_buf_list *buf_list)
 
static void send_packet (void *ptr)
 

#define _DEBUG_   0
#define MAX_NOACKS   16

Referenced by phase_update().

#define MAX_NOACKS_TIME   CLOCK_SECOND * 30

Referenced by phase_update().

#define PHASE_CONF_DRIFT_CORRECT   0
#define PHASE_DEFER_THRESHOLD   1

Referenced by phase_wait().

#define PHASE_DRIFT_CORRECT   0

Referenced by phase_wait().

#define PHASE_QUEUESIZE   8
#define PRINTDEBUG (   ...)
#define PRINTF (   ...)

Referenced by phase_update().

MEMB ( queued_packets_memb  ,
struct phase_queueitem  ,
PHASE_QUEUESIZE   
)
NBR_TABLE ( struct phase  ,
nbr_phase   
)
void phase_init ( void  )

References memb_init(), nbr_table_register(), and NULL.

Referenced by init().