Microchip® Advanced Software Framework

SmartConnect_6LoWPAN/core/net/mac/mac.h File Reference

    MAC driver header file
Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se
#include "contiki-conf.h"
#include "dev/radio.h"

Data Structures

struct  mac_driver
 The structure of a MAC protocol driver in Contiki. More...
 

Typedefs

typedef void(* mac_callback_t )(void *ptr, int status, int transmissions)
 

Enumerations

enum  {
  MAC_TX_OK,
  MAC_TX_COLLISION,
  MAC_TX_NOACK,
  MAC_TX_DEFERRED,
  MAC_TX_AGAIN,
  MAC_TX_ERR,
  MAC_TX_ERR_FATAL
}
 

Functions

void mac_call_sent_callback (mac_callback_t sent, void *ptr, int status, int num_tx)
 

typedef void(* mac_callback_t)(void *ptr, int status, int transmissions)

anonymous enum
Enumerator
MAC_TX_OK 

The MAC layer transmission was OK.

The MAC layer transmission could not be performed due to a

collision.

MAC_TX_COLLISION 

The MAC layer did not get an acknowledgement for the packet.

MAC_TX_NOACK 

The MAC layer deferred the transmission for a later time.

MAC_TX_DEFERRED 

The MAC layer should retransmit the same packet in a given time.

MAC_TX_AGAIN 

The MAC layer transmission could not be performed because of an error.

The upper layer may try again later.

MAC_TX_ERR 

The MAC layer transmission could not be performed because of a fatal error.

The upper layer does not need to try again, as the error will be fatal then as well.

MAC_TX_ERR_FATAL 

void mac_call_sent_callback ( mac_callback_t  sent,
void *  ptr,
int  status,
int  num_tx 
)