APM:Libraries
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends | List of all members
AP_Radio Class Reference

#include <AP_Radio.h>

Collaboration diagram for AP_Radio:
[legend]

Classes

struct  stats
 

Public Types

enum  ap_radio_type { RADIO_TYPE_NONE =0, RADIO_TYPE_CYRF6936 =1, RADIO_TYPE_CC2500 =2 }
 
enum  ap_radio_protocol { PROTOCOL_AUTO =0, PROTOCOL_DSM2 =1, PROTOCOL_DSMX =2, PROTOCOL_D16 =3 }
 

Public Member Functions

 AP_Radio (void)
 
bool init (void)
 
bool reset (void)
 
bool send (const uint8_t *pkt, uint16_t len)
 
void start_recv_bind (void)
 
uint32_t last_recv_us (void)
 
uint8_t num_channels (void)
 
uint16_t read (uint8_t chan)
 
void update (void)
 
uint32_t get_tx_version (void)
 
const struct statsget_stats (void)
 
void handle_data_packet (mavlink_channel_t chan, const mavlink_data96_t &m)
 
void set_wifi_channel (uint8_t channel)
 

Static Public Member Functions

static AP_Radioinstance (void)
 

Static Public Attributes

static const struct AP_Param::GroupInfo var_info []
 

Private Attributes

AP_Radio_backenddriver
 
AP_Int8 radio_type
 
AP_Int8 protocol
 
AP_Int8 debug_level
 
AP_Int8 disable_crc
 
AP_Int8 rssi_chan
 
AP_Int8 pps_chan
 
AP_Int8 tx_rssi_chan
 
AP_Int8 tx_pps_chan
 
AP_Int8 telem_enable
 
AP_Int8 transmit_power
 
AP_Int8 tx_max_power
 
AP_Int8 fcc_test
 
AP_Int8 stick_mode
 
AP_Int8 factory_test
 
AP_Int8 tx_buzzer_adjust
 
AP_Int8 auto_bind_time
 
AP_Int8 auto_bind_rssi
 

Static Private Attributes

static AP_Radio_instance
 

Friends

class AP_Radio_backend
 

Detailed Description

Definition at line 27 of file AP_Radio.h.

Member Enumeration Documentation

◆ ap_radio_protocol

Enumerator
PROTOCOL_AUTO 
PROTOCOL_DSM2 
PROTOCOL_DSMX 
PROTOCOL_D16 

Definition at line 76 of file AP_Radio.h.

◆ ap_radio_type

Enumerator
RADIO_TYPE_NONE 
RADIO_TYPE_CYRF6936 
RADIO_TYPE_CC2500 

Definition at line 70 of file AP_Radio.h.

Constructor & Destructor Documentation

◆ AP_Radio()

AP_Radio::AP_Radio ( void  )

Member Function Documentation

◆ get_stats()

const struct stats& AP_Radio::get_stats ( void  )

◆ get_tx_version()

uint32_t AP_Radio::get_tx_version ( void  )

◆ handle_data_packet()

void AP_Radio::handle_data_packet ( mavlink_channel_t  chan,
const mavlink_data96_t &  m 
)

Referenced by GCS_MAVLINK::handle_data_packet(), and instance().

Here is the caller graph for this function:

◆ init()

bool AP_Radio::init ( void  )

◆ instance()

static AP_Radio* AP_Radio::instance ( void  )
inlinestatic

Definition at line 89 of file AP_Radio.h.

Referenced by GCS_MAVLINK::handle_data_packet(), PX4::PX4RCInput::init(), and ChibiOS::RCInput::new_input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ last_recv_us()

uint32_t AP_Radio::last_recv_us ( void  )

◆ num_channels()

uint8_t AP_Radio::num_channels ( void  )

◆ read()

uint16_t AP_Radio::read ( uint8_t  chan)

◆ reset()

bool AP_Radio::reset ( void  )

◆ send()

bool AP_Radio::send ( const uint8_t *  pkt,
uint16_t  len 
)

◆ set_wifi_channel()

void AP_Radio::set_wifi_channel ( uint8_t  channel)

Referenced by instance().

Here is the caller graph for this function:

◆ start_recv_bind()

void AP_Radio::start_recv_bind ( void  )

◆ update()

void AP_Radio::update ( void  )

Friends And Related Function Documentation

◆ AP_Radio_backend

friend class AP_Radio_backend
friend

Definition at line 30 of file AP_Radio.h.

Member Data Documentation

◆ _instance

AP_Radio* AP_Radio::_instance
staticprivate

Definition at line 120 of file AP_Radio.h.

Referenced by instance().

◆ auto_bind_rssi

AP_Int8 AP_Radio::auto_bind_rssi
private

Definition at line 118 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_autobind_rssi().

◆ auto_bind_time

AP_Int8 AP_Radio::auto_bind_time
private

Definition at line 117 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_autobind_time().

◆ debug_level

AP_Int8 AP_Radio::debug_level
private

Definition at line 104 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_debug_level().

◆ disable_crc

AP_Int8 AP_Radio::disable_crc
private

Definition at line 105 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_disable_crc().

◆ driver

AP_Radio_backend* AP_Radio::driver
private

Definition at line 100 of file AP_Radio.h.

◆ factory_test

AP_Int8 AP_Radio::factory_test
private

Definition at line 115 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_factory_test().

◆ fcc_test

AP_Int8 AP_Radio::fcc_test
private

Definition at line 113 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_fcc_test().

◆ pps_chan

AP_Int8 AP_Radio::pps_chan
private

Definition at line 107 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_pps_chan().

◆ protocol

AP_Int8 AP_Radio::protocol
private

Definition at line 103 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_protocol().

◆ radio_type

AP_Int8 AP_Radio::radio_type
private

Definition at line 102 of file AP_Radio.h.

◆ rssi_chan

AP_Int8 AP_Radio::rssi_chan
private

Definition at line 106 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_rssi_chan().

◆ stick_mode

AP_Int8 AP_Radio::stick_mode
private

Definition at line 114 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_stick_mode().

◆ telem_enable

AP_Int8 AP_Radio::telem_enable
private

Definition at line 110 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_telem_enable().

◆ transmit_power

AP_Int8 AP_Radio::transmit_power
private

Definition at line 111 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_transmit_power().

◆ tx_buzzer_adjust

AP_Int8 AP_Radio::tx_buzzer_adjust
private

Definition at line 116 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_tx_buzzer_adjust().

◆ tx_max_power

AP_Int8 AP_Radio::tx_max_power
private

◆ tx_pps_chan

AP_Int8 AP_Radio::tx_pps_chan
private

Definition at line 109 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_tx_pps_chan().

◆ tx_rssi_chan

AP_Int8 AP_Radio::tx_rssi_chan
private

Definition at line 108 of file AP_Radio.h.

Referenced by AP_Radio_backend::get_tx_rssi_chan().

◆ var_info

const struct AP_Param::GroupInfo AP_Radio::var_info[]
static

Definition at line 86 of file AP_Radio.h.


The documentation for this class was generated from the following file: