Contiki-NG
|
The structure of a device driver for a radio in Contiki. More...
#include <os/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... | |
radio_result_t(* | get_value )(radio_param_t param, radio_value_t *value) |
Get a radio parameter value. More... | |
radio_result_t(* | set_value )(radio_param_t param, radio_value_t value) |
Set a radio parameter value. More... | |
radio_result_t(* | get_object )(radio_param_t param, void *dest, size_t size) |
Get a radio parameter object. More... | |
radio_result_t(* | set_object )(radio_param_t param, const void *src, size_t size) |
Set a radio parameter object. More... | |
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 255 of file radio.h.
Referenced by rf_cmd_ieee_rx().
radio_result_t(* radio_driver::get_object) (radio_param_t param, void *dest, size_t size) |
Get a radio parameter object.
The argument 'dest' must point to a memory area of at least 'size' bytes, and this memory area will contain the parameter object if the function succeeds.
Definition at line 280 of file radio.h.
Referenced by rf_cmd_ieee_rx().
radio_result_t(* radio_driver::get_value) (radio_param_t param, radio_value_t *value) |
Get a radio parameter value.
Definition at line 270 of file radio.h.
Referenced by rf_cmd_ieee_rx().
int(* radio_driver::off) (void) |
Turn the radio off.
Definition at line 267 of file radio.h.
Referenced by PROCESS_THREAD(), and rf_cmd_ieee_rx().
int(* radio_driver::on) (void) |
Turn the radio on.
Definition at line 264 of file radio.h.
Referenced by PROCESS_THREAD(), and rf_cmd_ieee_rx().
int(* radio_driver::prepare) (const void *payload, unsigned short payload_len) |
Prepare the radio with a packet to be sent.
Definition at line 242 of file radio.h.
Referenced by rf_cmd_ieee_rx().
int(* radio_driver::read) (void *buf, unsigned short buf_len) |
Read a received packet into a buffer.
Definition at line 251 of file radio.h.
Referenced by PROCESS_THREAD().
int(* radio_driver::send) (const void *payload, unsigned short payload_len) |
Prepare & transmit a packet.
Definition at line 248 of file radio.h.
Referenced by rf_cmd_ieee_rx().
radio_result_t(* radio_driver::set_object) (radio_param_t param, const void *src, size_t size) |
Set a radio parameter object.
The memory area referred to by the argument 'src' will not be accessed after the function returns.
Definition at line 286 of file radio.h.
Referenced by rf_cmd_ieee_rx().
radio_result_t(* radio_driver::set_value) (radio_param_t param, radio_value_t value) |
Set a radio parameter value.
Definition at line 273 of file radio.h.
Referenced by rf_cmd_ieee_rx().
int(* radio_driver::transmit) (unsigned short transmit_len) |
Send the packet that has previously been prepared.
Definition at line 245 of file radio.h.
Referenced by rf_cmd_ieee_rx().