APM:Libraries
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AP_Beacon_Pozyx Class Reference

#include <AP_Beacon_Pozyx.h>

Inheritance diagram for AP_Beacon_Pozyx:
[legend]
Collaboration diagram for AP_Beacon_Pozyx:
[legend]

Public Member Functions

 AP_Beacon_Pozyx (AP_Beacon &frontend, AP_SerialManager &serial_manager)
 
bool healthy ()
 
void update ()
 
- Public Member Functions inherited from AP_Beacon_Backend
 AP_Beacon_Backend (AP_Beacon &frontend)
 
void set_vehicle_position (const Vector3f &pos, float accuracy_estimate)
 
void set_beacon_distance (uint8_t beacon_instance, float distance)
 
void set_beacon_position (uint8_t beacon_instance, const Vector3f &pos)
 
float get_beacon_origin_lat (void) const
 
float get_beacon_origin_lon (void) const
 
float get_beacon_origin_alt (void) const
 

Private Types

enum  ParseState { ParseState_WaitingForHeader = 0, ParseState_WaitingForMsgId = 1, ParseState_WaitingForLen = 2, ParseState_WaitingForContents = 3 }
 

Private Member Functions

void parse_buffer ()
 

Private Attributes

enum AP_Beacon_Pozyx::ParseState parse_state
 
uint8_t parse_msg_id
 
uint8_t parse_msg_len
 
AP_HAL::UARTDriveruart = nullptr
 
uint8_t linebuf [AP_BEACON_POZYX_MSG_LEN_MAX]
 
uint8_t linebuf_len = 0
 
uint32_t last_update_ms = 0
 

Additional Inherited Members

- Protected Member Functions inherited from AP_Beacon_Backend
Vector3f correct_for_orient_yaw (const Vector3f &vector)
 
- Protected Attributes inherited from AP_Beacon_Backend
AP_Beacon_frontend
 
int16_t orient_yaw_deg
 
float orient_cos_yaw = 0.0f
 
float orient_sin_yaw = 1.0f
 

Detailed Description

Definition at line 12 of file AP_Beacon_Pozyx.h.

Member Enumeration Documentation

◆ ParseState

Enumerator
ParseState_WaitingForHeader 
ParseState_WaitingForMsgId 
ParseState_WaitingForLen 
ParseState_WaitingForContents 

Definition at line 27 of file AP_Beacon_Pozyx.h.

Constructor & Destructor Documentation

◆ AP_Beacon_Pozyx()

AP_Beacon_Pozyx::AP_Beacon_Pozyx ( AP_Beacon frontend,
AP_SerialManager serial_manager 
)

Definition at line 24 of file AP_Beacon_Pozyx.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ healthy()

bool AP_Beacon_Pozyx::healthy ( void  )
virtual

Implements AP_Beacon_Backend.

Definition at line 35 of file AP_Beacon_Pozyx.cpp.

Here is the call graph for this function:

◆ parse_buffer()

void AP_Beacon_Pozyx::parse_buffer ( )
private

Definition at line 109 of file AP_Beacon_Pozyx.cpp.

Referenced by update().

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

◆ update()

void AP_Beacon_Pozyx::update ( void  )
virtual

Implements AP_Beacon_Backend.

Definition at line 42 of file AP_Beacon_Pozyx.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ last_update_ms

uint32_t AP_Beacon_Pozyx::last_update_ms = 0
private

Definition at line 43 of file AP_Beacon_Pozyx.h.

Referenced by healthy(), and parse_buffer().

◆ linebuf

uint8_t AP_Beacon_Pozyx::linebuf[AP_BEACON_POZYX_MSG_LEN_MAX]
private

Definition at line 41 of file AP_Beacon_Pozyx.h.

Referenced by parse_buffer(), and update().

◆ linebuf_len

uint8_t AP_Beacon_Pozyx::linebuf_len = 0
private

Definition at line 42 of file AP_Beacon_Pozyx.h.

Referenced by parse_buffer(), and update().

◆ parse_msg_id

uint8_t AP_Beacon_Pozyx::parse_msg_id
private

Definition at line 37 of file AP_Beacon_Pozyx.h.

Referenced by parse_buffer(), and update().

◆ parse_msg_len

uint8_t AP_Beacon_Pozyx::parse_msg_len
private

Definition at line 38 of file AP_Beacon_Pozyx.h.

Referenced by parse_buffer(), and update().

◆ parse_state

enum AP_Beacon_Pozyx::ParseState AP_Beacon_Pozyx::parse_state
private

Referenced by update().

◆ uart

AP_HAL::UARTDriver* AP_Beacon_Pozyx::uart = nullptr
private

Definition at line 40 of file AP_Beacon_Pozyx.h.

Referenced by AP_Beacon_Pozyx(), and update().


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