openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
Loading...
Searching...
No Matches
ccc_session.h
Go to the documentation of this file.
1
4#ifndef CCC_SESSION_H
5#define CCC_SESSION_H
6
7#include <stdint.h>
8
9#include "ccc_mac.h" /* struct ccc_ran_params, enum ccc_hop_mode, CCC_URSK_LEN */
10
12#define CCC_ALIRO_VENDOR_OUI 0x4A191Bu
13
19 uint8_t ursk[CCC_URSK_LEN];
20 uint32_t uwb_session_id;
21 uint32_t sts_index0;
22 uint32_t uwb_time0;
23 uint32_t hop_key_rw;
24 uint16_t mac_mode_offset;
25 uint8_t n_ran_s;
27 uint8_t n_responder;
30};
31
33uint16_t ccc_session_n_round(const struct ccc_ran_session *s);
34
36int ccc_session_to_ran_params(const struct ccc_ran_session *s, struct ccc_ran_params *out);
37
38#endif /* CCC_SESSION_H */
#define CCC_URSK_LEN
UWB Ranging Secret Key length, bytes (the schedule's root input).
Definition ccc_kdf.h:16
— CCC UWB MAC layer: ranging-round scheduling, SP0 frame codec, DS-TWR.
ccc_hop_mode
Hopping mode.
Definition ccc_mac.h:99
int ccc_session_to_ran_params(const struct ccc_ran_session *s, struct ccc_ran_params *out)
Map an Aliro session onto the CCC MAC's ranging-schedule parameters.
Definition ccc_session.c:33
uint16_t ccc_session_n_round(const struct ccc_ran_session *s)
Rounds per ranging block, from N_RAN_S and the slot parameters (0 if the denominator is 0).
Definition ccc_session.c:11
Per-session ranging schedule parameters (negotiated in setup).
Definition ccc_mac.h:116
An Aliro ranging session: the URSK + the M1-M4 setup parameters; the interface to the CCC MAC.
Definition ccc_session.h:18
uint32_t uwb_session_id
M1: UWB Session Identifier.
Definition ccc_session.h:20
enum ccc_hop_mode hop_mode
M2/M3: hopping configuration.
Definition ccc_session.h:29
uint8_t n_responder
M3: N_Responder.
Definition ccc_session.h:27
uint32_t hop_key_rw
M4: Hop Mode Key (HOP_Key_RW).
Definition ccc_session.h:23
uint8_t n_slot_per_round
M3: N_Slot_per_Round.
Definition ccc_session.h:28
uint32_t sts_index0
M4: STS_Index0.
Definition ccc_session.h:21
uint8_t n_chap_per_slot
M3: N_Chap_per_Slot.
Definition ccc_session.h:26
uint32_t uwb_time0
M4: UWB_Time0 block-time anchor.
Definition ccc_session.h:22
uint16_t mac_mode_offset
M3: MAC Mode round offset O^k (F = H + O).
Definition ccc_session.h:24
uint8_t n_ran_s
M3: selected RAN multiplier N_RAN_S.
Definition ccc_session.h:25
uint8_t ursk[CCC_URSK_LEN]
Ranging secret key (aliro_kdf).
Definition ccc_session.h:19