|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | pdec_error_response |
| struct | pdec_distance_result |
| struct | pdec_device_list |
| struct | pdec_send_data_result |
| struct | pdec_ranging_event |
| struct | pdec_tdoa_report |
| struct | pdec_tdoa_report_event |
| struct | pdec_counters |
| struct | pdec_t |
Macros | |
| #define | PDEC_MAX_DEVICES 32 |
| #define | PDEC_MAX_TDOA_REPORTS 32 |
| #define | PDEC_MAX_PAYLOAD_LEN 255 |
| #define | PDEC_MAX_DATA_LEN 252 |
Enumerations | |
| enum | pdec_command { PDEC_CMD_RANGE = 0x01 , PDEC_CMD_GET_DISTANCE = 0x02 , PDEC_CMD_LIST_DEVICES = 0x03 , PDEC_CMD_SEND_DATA = 0x04 } |
| enum | pdec_msg { PDEC_MSG_ERROR = 0x7F , PDEC_MSG_RANGE_RESULT = 0x81 , PDEC_MSG_DISTANCE = 0x82 , PDEC_MSG_DEVICE_LIST = 0x83 , PDEC_MSG_SEND_DATA_RESULT = 0x84 , PDEC_MSG_RANGING_EVENT = 0x90 , PDEC_MSG_TDOA_REPORT_EVENT = 0x92 } |
| enum | pdec_status { PDEC_STATUS_OK = 0x00 , PDEC_STATUS_ERROR = 0x01 , PDEC_STATUS_INVALID_LENGTH = 0x02 , PDEC_STATUS_NOT_FOUND = 0x03 , PDEC_STATUS_RANGE_FAILED = 0x04 , PDEC_STATUS_MESSAGE_TOO_LONG = 0x05 } |
| enum | pdec_event_kind { PDEC_EVENT_SINGLE_SIDED = 0x00 , PDEC_EVENT_DOUBLE_SIDED = 0x01 , PDEC_EVENT_INDIRECT = 0x02 } |
| enum | pdec_rx_state { PDEC_RX_SYNC_1 , PDEC_RX_SYNC_2 , PDEC_RX_LEN , PDEC_RX_PAYLOAD , PDEC_RX_CHECKSUM } |
Functions | |
| void | pdec_init (void) |
| void | pdec_periodic_report (void) |
| void | pdec_event (void) |
| bool | pdec_range (uint16_t dst_id) |
| bool | pdec_get_distance (uint16_t dst_id) |
| bool | pdec_list_devices (void) |
| bool | pdec_send_data (uint16_t dst_id, const uint8_t *data, uint8_t len) |
Variables | |
| pdec_t | pdec |
| struct pdec_error_response |
| Data Fields | ||
|---|---|---|
| uint8_t | command | |
| enum pdec_status | status | |
| bool | updated | |
| struct pdec_distance_result |
| Data Fields | ||
|---|---|---|
| float | distance | |
| uint16_t | dst_id | |
| enum pdec_status | status | |
| bool | updated | |
| struct pdec_device_list |
| struct pdec_send_data_result |
| Data Fields | ||
|---|---|---|
| uint16_t | dst_id | |
| uint8_t | sent_len | |
| enum pdec_status | status | |
| bool | updated | |
| struct pdec_ranging_event |
| Data Fields | ||
|---|---|---|
| float | distance | |
| uint16_t | dst_id | |
| enum pdec_event_kind | kind | |
| uint16_t | src_id | |
| bool | updated | |
| struct pdec_tdoa_report |
| struct pdec_tdoa_report_event |
| Data Fields | ||
|---|---|---|
| uint32_t | blink_id | |
| uint8_t | count | |
| uint8_t | expected_count | |
| struct pdec_tdoa_report | reports[PDEC_MAX_TDOA_REPORTS] | |
| bool | timed_out | |
| uint8_t | total_count | |
| bool | truncated | |
| bool | updated | |
| struct pdec_counters |
| struct pdec_t |
| Data Fields | ||
|---|---|---|
| struct pdec_counters | counters | |
| struct uart_periph * | dev | |
| struct pdec_device_list | devices | |
| struct pdec_distance_result | last_distance | |
| struct pdec_error_response | last_error | |
| struct pdec_distance_result | last_range | |
| struct pdec_ranging_event | last_ranging_event | |
| struct pdec_send_data_result | last_send_data | |
| struct pdec_tdoa_report_event | last_tdoa_report_event | |
| uint8_t | rx_checksum | |
| uint8_t | rx_idx | |
| uint8_t | rx_len | |
| uint8_t | rx_payload[PDEC_MAX_PAYLOAD_LEN] | |
| enum pdec_rx_state | rx_state | |
| #define PDEC_MAX_DATA_LEN 252 |
Definition at line 25 of file pdec.h.
Referenced by pdec_send_data().
| #define PDEC_MAX_DEVICES 32 |
Definition at line 17 of file pdec.h.
Referenced by pdec_dispatch_frame().
| #define PDEC_MAX_PAYLOAD_LEN 255 |
Definition at line 24 of file pdec.h.
Referenced by pdec_dispatch_frame(), and pdec_send_frame().
| #define PDEC_MAX_TDOA_REPORTS 32 |
Definition at line 21 of file pdec.h.
Referenced by pdec_dispatch_frame().
| enum pdec_command |
| enum pdec_event_kind |
| enum pdec_msg |
| enum pdec_rx_state |
| enum pdec_status |
| void pdec_event | ( | void | ) |
Definition at line 427 of file pdec.c.
References _pdec_event(), and pdec.
| bool pdec_get_distance | ( | uint16_t | dst_id | ) |
Definition at line 377 of file pdec.c.
References pdec_target_cmd_payload::dst_id, pdec, PDEC_CMD_GET_DISTANCE, and pdec_send_frame().
| void pdec_init | ( | void | ) |
Definition at line 417 of file pdec.c.
References _pdec_init(), and pdec.
| bool pdec_list_devices | ( | void | ) |
Definition at line 386 of file pdec.c.
References pdec, PDEC_CMD_LIST_DEVICES, and pdec_send_frame().
| void pdec_periodic_report | ( | void | ) |
Definition at line 422 of file pdec.c.
References _pdec_periodic_report(), and pdec.
| bool pdec_range | ( | uint16_t | dst_id | ) |
Definition at line 368 of file pdec.c.
References pdec_target_cmd_payload::dst_id, pdec, PDEC_CMD_RANGE, and pdec_send_frame().
Referenced by uwb_range().
Definition at line 394 of file pdec.c.
References pdec_target_cmd_payload::dst_id, pdec, PDEC_CMD_SEND_DATA, PDEC_MAX_DATA_LEN, and pdec_send_frame().
|
extern |
Definition at line 22 of file pdec.c.
Referenced by _pdec_event(), _pdec_init(), _pdec_periodic_report(), pdec_dispatch_frame(), pdec_event(), pdec_get_distance(), pdec_init(), pdec_list_devices(), pdec_parse_byte(), pdec_periodic_report(), pdec_range(), pdec_send_data(), and pdec_send_frame().