|
openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
|
— reader-context lifecycle. More...
#include "aliro_uwb_internal.h"#include <aliro_uwb_adapter/aliro_uwb_adapter.h>#include <cherry/cherry_ccc.h>#include "woz_alloc.h"#include <string.h>#include "woz_log.h"Functions | |
| enum aliro_uwb_err | cherry_err_to_aliro (enum cherry_err err) |
| Map a CCC error code to its Aliro UWB equivalent, treating unknown errors as internal failures. | |
| static enum aliro_uwb_err | copy_capabilities (struct aliro_uwb_adapter *adapter, struct cherry_core_event_device_capabilities *caps) |
| Deep-copy the device CCC capabilities into the adapter. | |
| static bool | reader_config_valid (const struct aliro_uwb_adapter_reader_config *config) |
| Validate that a reader configuration offers at least one valid hopping sequence and respects configured bounds, returning false if invalid. | |
| struct aliro_uwb_adapter * | aliro_uwb_adapter_create_reader (struct cherry *cherry_ctx, struct cherry_core_event_device_capabilities *caps, struct aliro_uwb_adapter_reader_config *config) |
| Create a reader-mode adapter, copying the peer's CCC capabilities into it and resolving the minimum RAN multiplier against the reader's own configuration. | |
| void | aliro_uwb_adapter_set_diagnostics (struct aliro_uwb_adapter *aliro_ctx, struct cherry_common_diag_cfg config) |
| Store a diagnostics configuration in the adapter for later application to CCC sessions, allocating storage if needed. | |
| void | aliro_uwb_adapter_destroy (struct aliro_uwb_adapter *aliro_ctx) |
| Destroy an Aliro UWB adapter, freeing all associated CCC capabilities arrays and diagnostic configuration. | |
— reader-context lifecycle.
| struct aliro_uwb_adapter * aliro_uwb_adapter_create_reader | ( | struct cherry * | cherry_ctx, |
| struct cherry_core_event_device_capabilities * | caps, | ||
| struct aliro_uwb_adapter_reader_config * | config | ||
| ) |
Create a reader-mode adapter, copying the peer's CCC capabilities into it and resolving the minimum RAN multiplier against the reader's own configuration.
Create a reader-mode adapter.
| void aliro_uwb_adapter_destroy | ( | struct aliro_uwb_adapter * | aliro_ctx | ) |
Destroy an Aliro UWB adapter, freeing all associated CCC capabilities arrays and diagnostic configuration.
Release an adapter context.
| void aliro_uwb_adapter_set_diagnostics | ( | struct aliro_uwb_adapter * | aliro_ctx, |
| struct cherry_common_diag_cfg | config | ||
| ) |
Store a diagnostics configuration in the adapter for later application to CCC sessions, allocating storage if needed.
Set the diagnostics configuration applied to new sessions.
| enum aliro_uwb_err cherry_err_to_aliro | ( | enum cherry_err | err | ) |
Map a CCC error code to its Aliro UWB equivalent, treating unknown errors as internal failures.
| err | CCC error code to translate. |
enum aliro_uwb_err value, or ALIRO_UWB_ERR_INTERNAL if unrecognized.
|
static |
Deep-copy the device CCC capabilities into the adapter.
| adapter | Adapter whose ccc_caps field receives the copied capabilities. |
| caps | Device capabilities event supplying the source CCC capabilities to copy. |
ALIRO_UWB_ERR_NONE on success, or ALIRO_UWB_ERR_INTERNAL if the source capabilities are missing or allocation fails.
|
static |
Validate that a reader configuration offers at least one valid hopping sequence and respects configured bounds, returning false if invalid.
| config | Reader configuration to validate. |