Contiki 2.5
Data Fields
radio_driver Struct Reference

The structure of a device driver for a radio in Contiki. More...

#include <core/dev/radio.h>

Data Fields

int(* prepare )(const void *payload, unsigned short payload_len)
 Prepare the radio with a packet to be sent. More...
 
int(* transmit )(unsigned short transmit_len)
 Send the packet that has previously been prepared. More...
 
int(* send )(const void *payload, unsigned short payload_len)
 Prepare & transmit a packet. More...
 
int(* read )(void *buf, unsigned short buf_len)
 Read a received packet into a buffer. More...
 
int(* channel_clear )(void)
 Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not. More...
 
int(* receiving_packet )(void)
 Check if the radio driver is currently receiving a packet.
 
int(* pending_packet )(void)
 Check if the radio driver has just received a packet.
 
int(* on )(void)
 Turn the radio on. More...
 
int(* off )(void)
 Turn the radio off. More...
 

Detailed Description

The structure of a device driver for a radio in Contiki.

Definition at line 61 of file radio.h.

Field Documentation

int(* radio_driver::channel_clear)(void)

Perform a Clear-Channel Assessment (CCA) to find out if there is a packet in the air or not.

Definition at line 79 of file radio.h.

int(* radio_driver::off)(void)

Turn the radio off.

Definition at line 91 of file radio.h.

int(* radio_driver::on)(void)

Turn the radio on.

Definition at line 88 of file radio.h.

int(* radio_driver::prepare)(const void *payload, unsigned short payload_len)

Prepare the radio with a packet to be sent.

Definition at line 66 of file radio.h.

int(* radio_driver::read)(void *buf, unsigned short buf_len)

Read a received packet into a buffer.

Definition at line 75 of file radio.h.

int(* radio_driver::send)(const void *payload, unsigned short payload_len)

Prepare & transmit a packet.

Definition at line 72 of file radio.h.

int(* radio_driver::transmit)(unsigned short transmit_len)

Send the packet that has previously been prepared.

Definition at line 69 of file radio.h.