Implement the UCI CMD/RSP/NTF cleanup in CR-498
The UCI spec v2.0.0_0.9r0 (released in Jan 2023) contains CR498 which
does the following cleanup for UCI CMD/RSP/NTF:
- Renames GID 0x02 from RANGING_CONTROL_GROUP to SESSION_CONTROL_GROUP,
along with the UCI Commands/Responses/Notifications in the GID.
- Moves DATA_CREDIT_NTF and DATA_TRANSFER_STATUS_NTF from GID 0x01
(SESSION_CONFIG) to 0x02 (SESSION_CONTROL).
The CL does the PDL as well as corresponding Rust code changes.
Bug: 267232898
Test: atest libuwb_core_test libuwb_uci_packet_tests libuwb_uci_jni_rust_tests ServiceUwbTests
Change-Id: I7b8ee7bf003fcded545b81d8dcfd4173d0a42227
diff --git a/src/rust/uwb_core/src/session/session_manager.rs b/src/rust/uwb_core/src/session/session_manager.rs
index ff68bb2..e5b5fd8 100644
--- a/src/rust/uwb_core/src/session/session_manager.rs
+++ b/src/rust/uwb_core/src/session/session_manager.rs
@@ -336,7 +336,7 @@
);
}
},
- UciSessionNotification::RangeData(range_data) => {
+ UciSessionNotification::SessionInfo(range_data) => {
if self.active_sessions.get(&range_data.session_id).is_some() {
let _ = self.session_notf_sender.send(SessionNotification::RangeData {
session_id: range_data.session_id,
@@ -473,7 +473,7 @@
}
pub(crate) fn range_data_notf(range_data: SessionRangeData) -> UciNotification {
- UciNotification::Session(UciSessionNotification::RangeData(range_data))
+ UciNotification::Session(UciSessionNotification::SessionInfo(range_data))
}
pub(super) async fn setup_session_manager<F>(
diff --git a/src/rust/uwb_core/src/uci/command.rs b/src/rust/uwb_core/src/uci/command.rs
index 8168f81..3230531 100644
--- a/src/rust/uwb_core/src/uci/command.rs
+++ b/src/rust/uwb_core/src/uci/command.rs
@@ -68,13 +68,13 @@
session_id: u32,
ranging_round_indexes: Vec<u8>,
},
- RangeStart {
+ SessionStart {
session_id: SessionId,
},
- RangeStop {
+ SessionStop {
session_id: SessionId,
},
- RangeGetRangingCount {
+ SessionGetRangingCount {
session_id: SessionId,
},
AndroidSetCountryCode {
@@ -93,18 +93,13 @@
type Error = Error;
fn try_from(cmd: UciCommand) -> std::result::Result<Self, Self::Error> {
let packet = match cmd {
+ // UCI Session Config Commands
UciCommand::SessionInit { session_id, session_type } => {
uwb_uci_packets::SessionInitCmdBuilder { session_id, session_type }.build().into()
}
UciCommand::SessionDeinit { session_id } => {
uwb_uci_packets::SessionDeinitCmdBuilder { session_id }.build().into()
}
- UciCommand::RangeStart { session_id } => {
- uwb_uci_packets::RangeStartCmdBuilder { session_id }.build().into()
- }
- UciCommand::RangeStop { session_id } => {
- uwb_uci_packets::RangeStopCmdBuilder { session_id }.build().into()
- }
UciCommand::CoreGetDeviceInfo => {
uwb_uci_packets::GetDeviceInfoCmdBuilder {}.build().into()
}
@@ -141,7 +136,6 @@
.build()
.into()
}
-
UciCommand::SessionUpdateActiveRoundsDtTag { session_id, ranging_round_indexes } => {
uwb_uci_packets::SessionUpdateActiveRoundsDtTagCmdBuilder {
session_id,
@@ -150,7 +144,6 @@
.build()
.into()
}
-
UciCommand::AndroidGetPowerStats => {
uwb_uci_packets::AndroidGetPowerStatsCmdBuilder {}.build().into()
}
@@ -170,8 +163,15 @@
UciCommand::DeviceReset { reset_config } => {
uwb_uci_packets::DeviceResetCmdBuilder { reset_config }.build().into()
}
- UciCommand::RangeGetRangingCount { session_id } => {
- uwb_uci_packets::RangeGetRangingCountCmdBuilder { session_id }.build().into()
+ // UCI Session Control Commands
+ UciCommand::SessionStart { session_id } => {
+ uwb_uci_packets::SessionStartCmdBuilder { session_id }.build().into()
+ }
+ UciCommand::SessionStop { session_id } => {
+ uwb_uci_packets::SessionStopCmdBuilder { session_id }.build().into()
+ }
+ UciCommand::SessionGetRangingCount { session_id } => {
+ uwb_uci_packets::SessionGetRangingCountCmdBuilder { session_id }.build().into()
}
};
Ok(packet)
diff --git a/src/rust/uwb_core/src/uci/notification.rs b/src/rust/uwb_core/src/uci/notification.rs
index 2463cb4..8e73c14 100644
--- a/src/rust/uwb_core/src/uci/notification.rs
+++ b/src/rust/uwb_core/src/uci/notification.rs
@@ -69,8 +69,8 @@
/// list of controlees.
status_list: Vec<ControleeStatus>,
},
- /// (Short/Extended)Mac()RangeDataNtf equivalent
- RangeData(SessionRangeData),
+ /// (Short/Extended)Mac()SessionInfoNtf equivalent
+ SessionInfo(SessionRangeData),
}
/// The session range data.
@@ -186,8 +186,12 @@
use uwb_uci_packets::UciNotificationChild;
match evt.specialize() {
UciNotificationChild::CoreNotification(evt) => Ok(Self::Core(evt.try_into()?)),
- UciNotificationChild::SessionNotification(evt) => Ok(Self::Session(evt.try_into()?)),
- UciNotificationChild::RangingNotification(evt) => Ok(Self::Session(evt.try_into()?)),
+ UciNotificationChild::SessionConfigNotification(evt) => {
+ Ok(Self::Session(evt.try_into()?))
+ }
+ UciNotificationChild::SessionControlNotification(evt) => {
+ Ok(Self::Session(evt.try_into()?))
+ }
UciNotificationChild::AndroidNotification(evt) => evt.try_into(),
UciNotificationChild::UciVendor_9_Notification(evt) => vendor_notification(evt.into()),
UciNotificationChild::UciVendor_A_Notification(evt) => vendor_notification(evt.into()),
@@ -221,19 +225,19 @@
}
}
-impl TryFrom<uwb_uci_packets::SessionNotificationPacket> for SessionNotification {
+impl TryFrom<uwb_uci_packets::SessionConfigNotificationPacket> for SessionNotification {
type Error = Error;
fn try_from(
- evt: uwb_uci_packets::SessionNotificationPacket,
+ evt: uwb_uci_packets::SessionConfigNotificationPacket,
) -> std::result::Result<Self, Self::Error> {
- use uwb_uci_packets::SessionNotificationChild;
+ use uwb_uci_packets::SessionConfigNotificationChild;
match evt.specialize() {
- SessionNotificationChild::SessionStatusNtf(evt) => Ok(Self::Status {
+ SessionConfigNotificationChild::SessionStatusNtf(evt) => Ok(Self::Status {
session_id: evt.get_session_id(),
session_state: evt.get_session_state(),
reason_code: evt.get_reason_code(),
}),
- SessionNotificationChild::SessionUpdateControllerMulticastListNtf(evt) => {
+ SessionConfigNotificationChild::SessionUpdateControllerMulticastListNtf(evt) => {
Ok(Self::UpdateControllerMulticastList {
session_id: evt.get_session_id(),
remaining_multicast_list_size: evt.get_remaining_multicast_list_size() as usize,
@@ -248,51 +252,51 @@
}
}
-impl TryFrom<uwb_uci_packets::RangingNotificationPacket> for SessionNotification {
+impl TryFrom<uwb_uci_packets::SessionControlNotificationPacket> for SessionNotification {
type Error = Error;
fn try_from(
- evt: uwb_uci_packets::RangingNotificationPacket,
+ evt: uwb_uci_packets::SessionControlNotificationPacket,
) -> std::result::Result<Self, Self::Error> {
- use uwb_uci_packets::RangingNotificationChild;
+ use uwb_uci_packets::SessionControlNotificationChild;
match evt.specialize() {
- RangingNotificationChild::RangeDataNtf(evt) => evt.try_into(),
+ SessionControlNotificationChild::SessionInfoNtf(evt) => evt.try_into(),
_ => {
- error!("Unknown RangingNotificationPacket: {:?}", evt);
+ error!("Unknown SessionInfoNtfPacket: {:?}", evt);
Err(Error::Unknown)
}
}
}
}
-impl TryFrom<uwb_uci_packets::RangeDataNtfPacket> for SessionNotification {
+impl TryFrom<uwb_uci_packets::SessionInfoNtfPacket> for SessionNotification {
type Error = Error;
fn try_from(
- evt: uwb_uci_packets::RangeDataNtfPacket,
+ evt: uwb_uci_packets::SessionInfoNtfPacket,
) -> std::result::Result<Self, Self::Error> {
let raw_ranging_data = evt.clone().to_vec();
- use uwb_uci_packets::RangeDataNtfChild;
+ use uwb_uci_packets::SessionInfoNtfChild;
let ranging_measurements = match evt.specialize() {
- RangeDataNtfChild::ShortMacTwoWayRangeDataNtf(evt) => {
+ SessionInfoNtfChild::ShortMacTwoWaySessionInfoNtf(evt) => {
RangingMeasurements::ShortAddressTwoWay(
evt.get_two_way_ranging_measurements().clone(),
)
}
- RangeDataNtfChild::ExtendedMacTwoWayRangeDataNtf(evt) => {
+ SessionInfoNtfChild::ExtendedMacTwoWaySessionInfoNtf(evt) => {
RangingMeasurements::ExtendedAddressTwoWay(
evt.get_two_way_ranging_measurements().clone(),
)
}
- RangeDataNtfChild::ShortMacOwrAoaRangeDataNtf(evt) => {
+ SessionInfoNtfChild::ShortMacOwrAoaSessionInfoNtf(evt) => {
RangingMeasurements::ShortAddressOwrAoa(
evt.get_owr_aoa_ranging_measurements().clone(),
)
}
- RangeDataNtfChild::ExtendedMacOwrAoaRangeDataNtf(evt) => {
+ SessionInfoNtfChild::ExtendedMacOwrAoaSessionInfoNtf(evt) => {
RangingMeasurements::ExtendedAddressOwrAoa(
evt.get_owr_aoa_ranging_measurements().clone(),
)
}
- RangeDataNtfChild::ShortMacDlTDoARangeDataNtf(evt) => {
+ SessionInfoNtfChild::ShortMacDlTDoASessionInfoNtf(evt) => {
match ShortAddressDlTdoaRangingMeasurement::parse(&evt.clone().to_vec()) {
Some(v) => {
if v.len() == evt.get_no_of_ranging_measurements().into() {
@@ -305,7 +309,7 @@
None => return Err(Error::BadParameters),
}
}
- RangeDataNtfChild::ExtendedMacDlTDoARangeDataNtf(evt) => {
+ SessionInfoNtfChild::ExtendedMacDlTDoASessionInfoNtf(evt) => {
match ExtendedAddressDlTdoaRangingMeasurement::parse(&evt.clone().to_vec()) {
Some(v) => {
if v.len() == evt.get_no_of_ranging_measurements().into() {
@@ -319,11 +323,11 @@
}
}
_ => {
- error!("Unknown RangeDataNtfPacket: {:?}", evt);
+ error!("Unknown SessionInfoNtfPacket: {:?}", evt);
return Err(Error::Unknown);
}
};
- Ok(Self::RangeData(SessionRangeData {
+ Ok(Self::SessionInfo(SessionRangeData {
sequence_number: evt.get_sequence_number(),
session_id: evt.get_session_id(),
current_ranging_interval_ms: evt.get_current_ranging_interval(),
@@ -486,7 +490,7 @@
}
#[test]
- fn test_session_notification_casting_from_extended_mac_two_way_range_data_ntf() {
+ fn test_session_notification_casting_from_extended_mac_two_way_session_info_ntf() {
let extended_measurement = uwb_uci_packets::ExtendedAddressTwoWayRangingMeasurement {
mac_address: 0x1234_5678_90ab,
status: StatusCode::UciStatusOk,
@@ -503,8 +507,8 @@
slot_index: 0,
rssi: u8::MAX,
};
- let extended_two_way_range_data_ntf =
- uwb_uci_packets::ExtendedMacTwoWayRangeDataNtfBuilder {
+ let extended_two_way_session_info_ntf =
+ uwb_uci_packets::ExtendedMacTwoWaySessionInfoNtfBuilder {
sequence_number: 0x10,
session_id: 0x11,
rcr_indicator: 0x12,
@@ -512,16 +516,16 @@
two_way_ranging_measurements: vec![extended_measurement.clone()],
}
.build();
- let raw_ranging_data = extended_two_way_range_data_ntf.clone().to_vec();
+ let raw_ranging_data = extended_two_way_session_info_ntf.clone().to_vec();
let range_notification =
- uwb_uci_packets::RangingNotificationPacket::try_from(extended_two_way_range_data_ntf)
+ uwb_uci_packets::SessionInfoNtfPacket::try_from(extended_two_way_session_info_ntf)
.unwrap();
let session_notification = SessionNotification::try_from(range_notification).unwrap();
- let uci_notification_from_extended_two_way_range_data_ntf =
+ let uci_notification_from_extended_two_way_session_info_ntf =
UciNotification::Session(session_notification);
assert_eq!(
- uci_notification_from_extended_two_way_range_data_ntf,
- UciNotification::Session(SessionNotification::RangeData(SessionRangeData {
+ uci_notification_from_extended_two_way_session_info_ntf,
+ UciNotification::Session(SessionNotification::SessionInfo(SessionRangeData {
sequence_number: 0x10,
session_id: 0x11,
ranging_measurement_type: uwb_uci_packets::RangingMeasurementType::TwoWay,
@@ -536,7 +540,7 @@
}
#[test]
- fn test_session_notification_casting_from_short_mac_two_way_range_data_ntf() {
+ fn test_session_notification_casting_from_short_mac_two_way_session_info_ntf() {
let short_measurement = uwb_uci_packets::ShortAddressTwoWayRangingMeasurement {
mac_address: 0x1234,
status: StatusCode::UciStatusOk,
@@ -553,7 +557,7 @@
slot_index: 0,
rssi: u8::MAX,
};
- let short_two_way_range_data_ntf = uwb_uci_packets::ShortMacTwoWayRangeDataNtfBuilder {
+ let short_two_way_session_info_ntf = uwb_uci_packets::ShortMacTwoWaySessionInfoNtfBuilder {
sequence_number: 0x10,
session_id: 0x11,
rcr_indicator: 0x12,
@@ -561,16 +565,16 @@
two_way_ranging_measurements: vec![short_measurement.clone()],
}
.build();
- let raw_ranging_data = short_two_way_range_data_ntf.clone().to_vec();
+ let raw_ranging_data = short_two_way_session_info_ntf.clone().to_vec();
let range_notification =
- uwb_uci_packets::RangingNotificationPacket::try_from(short_two_way_range_data_ntf)
+ uwb_uci_packets::SessionInfoNtfPacket::try_from(short_two_way_session_info_ntf)
.unwrap();
let session_notification = SessionNotification::try_from(range_notification).unwrap();
- let uci_notification_from_short_two_way_range_data_ntf =
+ let uci_notification_from_short_two_way_session_info_ntf =
UciNotification::Session(session_notification);
assert_eq!(
- uci_notification_from_short_two_way_range_data_ntf,
- UciNotification::Session(SessionNotification::RangeData(SessionRangeData {
+ uci_notification_from_short_two_way_session_info_ntf,
+ UciNotification::Session(SessionNotification::SessionInfo(SessionRangeData {
sequence_number: 0x10,
session_id: 0x11,
ranging_measurement_type: uwb_uci_packets::RangingMeasurementType::TwoWay,
@@ -585,7 +589,7 @@
}
#[test]
- fn test_session_notification_casting_from_extended_mac_owr_aoa_range_data_ntf() {
+ fn test_session_notification_casting_from_extended_mac_owr_aoa_session_info_ntf() {
let extended_measurement = uwb_uci_packets::ExtendedAddressOwrAoaRangingMeasurement {
mac_address: 0x1234_5678_90ab,
status: OwrAoaStatusCode::UciStatusSuccess,
@@ -597,8 +601,8 @@
aoa_elevation: 7,
aoa_elevation_fom: 8,
};
- let extended_owr_aoa_range_data_ntf =
- uwb_uci_packets::ExtendedMacOwrAoaRangeDataNtfBuilder {
+ let extended_owr_aoa_session_info_ntf =
+ uwb_uci_packets::ExtendedMacOwrAoaSessionInfoNtfBuilder {
sequence_number: 0x10,
session_id: 0x11,
rcr_indicator: 0x12,
@@ -606,16 +610,16 @@
owr_aoa_ranging_measurements: vec![extended_measurement.clone()],
}
.build();
- let raw_ranging_data = extended_owr_aoa_range_data_ntf.clone().to_vec();
+ let raw_ranging_data = extended_owr_aoa_session_info_ntf.clone().to_vec();
let range_notification =
- uwb_uci_packets::RangingNotificationPacket::try_from(extended_owr_aoa_range_data_ntf)
+ uwb_uci_packets::SessionInfoNtfPacket::try_from(extended_owr_aoa_session_info_ntf)
.unwrap();
let session_notification = SessionNotification::try_from(range_notification).unwrap();
- let uci_notification_from_extended_owr_aoa_range_data_ntf =
+ let uci_notification_from_extended_owr_aoa_session_info_ntf =
UciNotification::Session(session_notification);
assert_eq!(
- uci_notification_from_extended_owr_aoa_range_data_ntf,
- UciNotification::Session(SessionNotification::RangeData(SessionRangeData {
+ uci_notification_from_extended_owr_aoa_session_info_ntf,
+ UciNotification::Session(SessionNotification::SessionInfo(SessionRangeData {
sequence_number: 0x10,
session_id: 0x11,
ranging_measurement_type: uwb_uci_packets::RangingMeasurementType::OwrAoa,
@@ -630,7 +634,7 @@
}
#[test]
- fn test_session_notification_casting_from_short_mac_owr_aoa_range_data_ntf() {
+ fn test_session_notification_casting_from_short_mac_owr_aoa_session_info_ntf() {
let short_measurement = uwb_uci_packets::ShortAddressOwrAoaRangingMeasurement {
mac_address: 0x1234,
status: OwrAoaStatusCode::UciStatusSuccess,
@@ -642,7 +646,7 @@
aoa_elevation: 7,
aoa_elevation_fom: 8,
};
- let short_owr_aoa_range_data_ntf = uwb_uci_packets::ShortMacOwrAoaRangeDataNtfBuilder {
+ let short_owr_aoa_session_info_ntf = uwb_uci_packets::ShortMacOwrAoaSessionInfoNtfBuilder {
sequence_number: 0x10,
session_id: 0x11,
rcr_indicator: 0x12,
@@ -650,16 +654,16 @@
owr_aoa_ranging_measurements: vec![short_measurement.clone()],
}
.build();
- let raw_ranging_data = short_owr_aoa_range_data_ntf.clone().to_vec();
+ let raw_ranging_data = short_owr_aoa_session_info_ntf.clone().to_vec();
let range_notification =
- uwb_uci_packets::RangingNotificationPacket::try_from(short_owr_aoa_range_data_ntf)
+ uwb_uci_packets::SessionInfoNtfPacket::try_from(short_owr_aoa_session_info_ntf)
.unwrap();
let session_notification = SessionNotification::try_from(range_notification).unwrap();
- let uci_notification_from_short_owr_aoa_range_data_ntf =
+ let uci_notification_from_short_owr_aoa_session_info_ntf =
UciNotification::Session(session_notification);
assert_eq!(
- uci_notification_from_short_owr_aoa_range_data_ntf,
- UciNotification::Session(SessionNotification::RangeData(SessionRangeData {
+ uci_notification_from_short_owr_aoa_session_info_ntf,
+ UciNotification::Session(SessionNotification::SessionInfo(SessionRangeData {
sequence_number: 0x10,
session_id: 0x11,
ranging_measurement_type: uwb_uci_packets::RangingMeasurementType::OwrAoa,
@@ -682,7 +686,7 @@
}
.build();
let session_notification_packet =
- uwb_uci_packets::SessionNotificationPacket::try_from(session_status_ntf).unwrap();
+ uwb_uci_packets::SessionConfigNotificationPacket::try_from(session_status_ntf).unwrap();
let session_notification =
SessionNotification::try_from(session_notification_packet).unwrap();
let uci_notification_from_session_status_ntf =
@@ -717,10 +721,11 @@
controlee_status: vec![controlee_status.clone(), another_controlee_status.clone()],
}
.build();
- let session_notification_packet = uwb_uci_packets::SessionNotificationPacket::try_from(
- session_update_controller_multicast_list_ntf,
- )
- .unwrap();
+ let session_notification_packet =
+ uwb_uci_packets::SessionConfigNotificationPacket::try_from(
+ session_update_controller_multicast_list_ntf,
+ )
+ .unwrap();
let session_notification =
SessionNotification::try_from(session_notification_packet).unwrap();
let uci_notification_from_session_update_controller_multicast_list_ntf =
diff --git a/src/rust/uwb_core/src/uci/response.rs b/src/rust/uwb_core/src/uci/response.rs
index ec6b8e5..546dc3e 100644
--- a/src/rust/uwb_core/src/uci/response.rs
+++ b/src/rust/uwb_core/src/uci/response.rs
@@ -43,9 +43,9 @@
SessionGetState(Result<SessionState>),
SessionUpdateControllerMulticastList(Result<()>),
SessionUpdateActiveRoundsDtTag(Result<SessionUpdateActiveRoundsDtTagResponse>),
- RangeStart(Result<()>),
- RangeStop(Result<()>),
- RangeGetRangingCount(Result<usize>),
+ SessionStart(Result<()>),
+ SessionStop(Result<()>),
+ SessionGetRangingCount(Result<usize>),
AndroidSetCountryCode(Result<()>),
AndroidGetPowerStats(Result<PowerStats>),
RawUciCmd(Result<RawUciMessage>),
@@ -68,9 +68,9 @@
Self::matches_result_retry(result)
}
Self::SessionUpdateActiveRoundsDtTag(result) => Self::matches_result_retry(result),
- Self::RangeStart(result) => Self::matches_result_retry(result),
- Self::RangeStop(result) => Self::matches_result_retry(result),
- Self::RangeGetRangingCount(result) => Self::matches_result_retry(result),
+ Self::SessionStart(result) => Self::matches_result_retry(result),
+ Self::SessionStop(result) => Self::matches_result_retry(result),
+ Self::SessionGetRangingCount(result) => Self::matches_result_retry(result),
Self::AndroidSetCountryCode(result) => Self::matches_result_retry(result),
Self::AndroidGetPowerStats(result) => Self::matches_result_retry(result),
Self::RawUciCmd(result) => Self::matches_result_retry(result),
@@ -94,8 +94,8 @@
use uwb_uci_packets::UciResponseChild;
match evt.specialize() {
UciResponseChild::CoreResponse(evt) => evt.try_into(),
- UciResponseChild::SessionResponse(evt) => evt.try_into(),
- UciResponseChild::RangingResponse(evt) => evt.try_into(),
+ UciResponseChild::SessionConfigResponse(evt) => evt.try_into(),
+ UciResponseChild::SessionControlResponse(evt) => evt.try_into(),
UciResponseChild::AndroidResponse(evt) => evt.try_into(),
UciResponseChild::UciVendor_9_Response(evt) => raw_response(evt.into()),
UciResponseChild::UciVendor_A_Response(evt) => raw_response(evt.into()),
@@ -144,31 +144,35 @@
}
}
-impl TryFrom<uwb_uci_packets::SessionResponsePacket> for UciResponse {
+impl TryFrom<uwb_uci_packets::SessionConfigResponsePacket> for UciResponse {
type Error = Error;
fn try_from(
- evt: uwb_uci_packets::SessionResponsePacket,
+ evt: uwb_uci_packets::SessionConfigResponsePacket,
) -> std::result::Result<Self, Self::Error> {
- use uwb_uci_packets::SessionResponseChild;
+ use uwb_uci_packets::SessionConfigResponseChild;
match evt.specialize() {
- SessionResponseChild::SessionInitRsp(evt) => {
+ SessionConfigResponseChild::SessionInitRsp(evt) => {
Ok(UciResponse::SessionInit(status_code_to_result(evt.get_status())))
}
- SessionResponseChild::SessionDeinitRsp(evt) => {
+ SessionConfigResponseChild::SessionDeinitRsp(evt) => {
Ok(UciResponse::SessionDeinit(status_code_to_result(evt.get_status())))
}
- SessionResponseChild::SessionGetCountRsp(evt) => Ok(UciResponse::SessionGetCount(
- status_code_to_result(evt.get_status()).map(|_| evt.get_session_count()),
- )),
- SessionResponseChild::SessionGetStateRsp(evt) => Ok(UciResponse::SessionGetState(
- status_code_to_result(evt.get_status()).map(|_| evt.get_session_state()),
- )),
- SessionResponseChild::SessionUpdateControllerMulticastListRsp(evt) => {
+ SessionConfigResponseChild::SessionGetCountRsp(evt) => {
+ Ok(UciResponse::SessionGetCount(
+ status_code_to_result(evt.get_status()).map(|_| evt.get_session_count()),
+ ))
+ }
+ SessionConfigResponseChild::SessionGetStateRsp(evt) => {
+ Ok(UciResponse::SessionGetState(
+ status_code_to_result(evt.get_status()).map(|_| evt.get_session_state()),
+ ))
+ }
+ SessionConfigResponseChild::SessionUpdateControllerMulticastListRsp(evt) => {
Ok(UciResponse::SessionUpdateControllerMulticastList(status_code_to_result(
evt.get_status(),
)))
}
- SessionResponseChild::SessionUpdateActiveRoundsDtTagRsp(evt) => {
+ SessionConfigResponseChild::SessionUpdateActiveRoundsDtTagRsp(evt) => {
Ok(UciResponse::SessionUpdateActiveRoundsDtTag(Ok(
SessionUpdateActiveRoundsDtTagResponse {
status: evt.get_status(),
@@ -176,13 +180,13 @@
},
)))
}
- SessionResponseChild::SessionSetAppConfigRsp(evt) => {
+ SessionConfigResponseChild::SessionSetAppConfigRsp(evt) => {
Ok(UciResponse::SessionSetAppConfig(SetAppConfigResponse {
status: evt.get_status(),
config_status: evt.get_cfg_status().clone(),
}))
}
- SessionResponseChild::SessionGetAppConfigRsp(evt) => {
+ SessionConfigResponseChild::SessionGetAppConfigRsp(evt) => {
Ok(UciResponse::SessionGetAppConfig(
status_code_to_result(evt.get_status()).map(|_| {
evt.get_tlvs().clone().into_iter().map(|tlv| tlv.into()).collect()
@@ -194,21 +198,21 @@
}
}
-impl TryFrom<uwb_uci_packets::RangingResponsePacket> for UciResponse {
+impl TryFrom<uwb_uci_packets::SessionControlResponsePacket> for UciResponse {
type Error = Error;
fn try_from(
- evt: uwb_uci_packets::RangingResponsePacket,
+ evt: uwb_uci_packets::SessionControlResponsePacket,
) -> std::result::Result<Self, Self::Error> {
- use uwb_uci_packets::RangingResponseChild;
+ use uwb_uci_packets::SessionControlResponseChild;
match evt.specialize() {
- RangingResponseChild::RangeStartRsp(evt) => {
- Ok(UciResponse::RangeStart(status_code_to_result(evt.get_status())))
+ SessionControlResponseChild::SessionStartRsp(evt) => {
+ Ok(UciResponse::SessionStart(status_code_to_result(evt.get_status())))
}
- RangingResponseChild::RangeStopRsp(evt) => {
- Ok(UciResponse::RangeStop(status_code_to_result(evt.get_status())))
+ SessionControlResponseChild::SessionStopRsp(evt) => {
+ Ok(UciResponse::SessionStop(status_code_to_result(evt.get_status())))
}
- RangingResponseChild::RangeGetRangingCountRsp(evt) => {
- Ok(UciResponse::RangeGetRangingCount(
+ SessionControlResponseChild::SessionGetRangingCountRsp(evt) => {
+ Ok(UciResponse::SessionGetRangingCount(
status_code_to_result(evt.get_status()).map(|_| evt.get_count() as usize),
))
}
diff --git a/src/rust/uwb_core/src/uci/uci_logger.rs b/src/rust/uwb_core/src/uci/uci_logger.rs
index e3e5630..07fd701 100644
--- a/src/rust/uwb_core/src/uci/uci_logger.rs
+++ b/src/rust/uwb_core/src/uci/uci_logger.rs
@@ -16,10 +16,10 @@
use std::convert::TryFrom;
use uwb_uci_packets::{
- AppConfigTlv, AppConfigTlvType, Packet, SessionCommandChild, SessionGetAppConfigRspBuilder,
- SessionResponseChild, SessionSetAppConfigCmdBuilder, UciCommandChild, UciControlPacketChild,
- UciControlPacketPacket, UciDataPacketPacket, UciResponseChild, UciResponsePacket,
- UCI_PACKET_HAL_HEADER_LEN,
+ AppConfigTlv, AppConfigTlvType, Packet, SessionConfigCommandChild, SessionConfigResponseChild,
+ SessionGetAppConfigRspBuilder, SessionSetAppConfigCmdBuilder, UciCommandChild,
+ UciControlPacketChild, UciControlPacketPacket, UciDataPacketPacket, UciResponseChild,
+ UciResponsePacket, UCI_PACKET_HAL_HEADER_LEN,
};
use crate::error::{Error, Result};
@@ -72,8 +72,8 @@
fn filter_uci_command(cmd: UciControlPacketPacket) -> UciControlPacketPacket {
match cmd.specialize() {
UciControlPacketChild::UciCommand(control_cmd) => match control_cmd.specialize() {
- UciCommandChild::SessionCommand(session_cmd) => match session_cmd.specialize() {
- SessionCommandChild::SessionSetAppConfigCmd(set_config_cmd) => {
+ UciCommandChild::SessionConfigCommand(session_cmd) => match session_cmd.specialize() {
+ SessionConfigCommandChild::SessionSetAppConfigCmd(set_config_cmd) => {
let session_id = set_config_cmd.get_session_id();
let tlvs = set_config_cmd.get_tlvs().to_owned();
let filtered_tlvs = tlvs.into_iter().map(filter_tlv).collect();
@@ -89,8 +89,8 @@
fn filter_uci_response(rsp: UciResponsePacket) -> UciResponsePacket {
match rsp.specialize() {
- UciResponseChild::SessionResponse(session_rsp) => match session_rsp.specialize() {
- SessionResponseChild::SessionGetAppConfigRsp(rsp) => {
+ UciResponseChild::SessionConfigResponse(session_rsp) => match session_rsp.specialize() {
+ SessionConfigResponseChild::SessionGetAppConfigRsp(rsp) => {
let status = rsp.get_status();
let tlvs = rsp.get_tlvs().to_owned();
let filtered_tlvs = tlvs.into_iter().map(filter_tlv).collect();
diff --git a/src/rust/uwb_core/src/uci/uci_manager.rs b/src/rust/uwb_core/src/uci/uci_manager.rs
index 7367500..cf929d4 100644
--- a/src/rust/uwb_core/src/uci/uci_manager.rs
+++ b/src/rust/uwb_core/src/uci/uci_manager.rs
@@ -376,27 +376,27 @@
}
async fn range_start(&self, session_id: SessionId) -> Result<()> {
- let cmd = UciCommand::RangeStart { session_id };
+ let cmd = UciCommand::SessionStart { session_id };
match self.send_cmd(UciManagerCmd::SendUciCommand { cmd }).await {
- Ok(UciResponse::RangeStart(resp)) => resp,
+ Ok(UciResponse::SessionStart(resp)) => resp,
Ok(_) => Err(Error::Unknown),
Err(e) => Err(e),
}
}
async fn range_stop(&self, session_id: SessionId) -> Result<()> {
- let cmd = UciCommand::RangeStop { session_id };
+ let cmd = UciCommand::SessionStop { session_id };
match self.send_cmd(UciManagerCmd::SendUciCommand { cmd }).await {
- Ok(UciResponse::RangeStop(resp)) => resp,
+ Ok(UciResponse::SessionStop(resp)) => resp,
Ok(_) => Err(Error::Unknown),
Err(e) => Err(e),
}
}
async fn range_get_ranging_count(&self, session_id: SessionId) -> Result<usize> {
- let cmd = UciCommand::RangeGetRangingCount { session_id };
+ let cmd = UciCommand::SessionGetRangingCount { session_id };
match self.send_cmd(UciManagerCmd::SendUciCommand { cmd }).await {
- Ok(UciResponse::RangeGetRangingCount(resp)) => resp,
+ Ok(UciResponse::SessionGetRangingCount(resp)) => resp,
Ok(_) => Err(Error::Unknown),
Err(e) => Err(e),
}
@@ -1385,8 +1385,8 @@
let (uci_manager, mut mock_hal) = setup_uci_manager_with_open_hal(
move |hal| {
- let cmd = UciCommand::RangeStart { session_id };
- let resp = into_uci_hal_packets(uwb_uci_packets::RangeStartRspBuilder {
+ let cmd = UciCommand::SessionStart { session_id };
+ let resp = into_uci_hal_packets(uwb_uci_packets::SessionStartRspBuilder {
status: uwb_uci_packets::StatusCode::UciStatusOk,
});
@@ -1408,8 +1408,8 @@
let (uci_manager, mut mock_hal) = setup_uci_manager_with_open_hal(
move |hal| {
- let cmd = UciCommand::RangeStop { session_id };
- let resp = into_uci_hal_packets(uwb_uci_packets::RangeStopRspBuilder {
+ let cmd = UciCommand::SessionStop { session_id };
+ let resp = into_uci_hal_packets(uwb_uci_packets::SessionStopRspBuilder {
status: uwb_uci_packets::StatusCode::UciStatusOk,
});
@@ -1432,11 +1432,12 @@
let (uci_manager, mut mock_hal) = setup_uci_manager_with_open_hal(
move |hal| {
- let cmd = UciCommand::RangeGetRangingCount { session_id };
- let resp = into_uci_hal_packets(uwb_uci_packets::RangeGetRangingCountRspBuilder {
- status: uwb_uci_packets::StatusCode::UciStatusOk,
- count,
- });
+ let cmd = UciCommand::SessionGetRangingCount { session_id };
+ let resp =
+ into_uci_hal_packets(uwb_uci_packets::SessionGetRangingCountRspBuilder {
+ status: uwb_uci_packets::StatusCode::UciStatusOk,
+ count,
+ });
hal.expected_send_command(cmd, resp, Ok(()));
},
diff --git a/src/rust/uwb_uci_packets/uci_packets.pdl b/src/rust/uwb_uci_packets/uci_packets.pdl
index 00a8082..81a090e 100644
--- a/src/rust/uwb_uci_packets/uci_packets.pdl
+++ b/src/rust/uwb_uci_packets/uci_packets.pdl
@@ -8,7 +8,7 @@
enum GroupId : 4 {
CORE = 0x00,
SESSION_CONFIG = 0x01,
- RANGING_SESSION_CONTROL = 0x02,
+ SESSION_CONTROL = 0x02,
DATA_CONTROL = 0x03,
TEST = 0x0d,
VENDOR_RESERVED_9 = 0x09,
@@ -29,7 +29,7 @@
enum GroupIdOrDataPacketFormat : 4 {
CORE = 0x00,
SESSION_CONFIG_OR_DATA_SND = 0x01,
- RANGING_SESSION_CONTROL_OR_DATA_RCV = 0x02,
+ SESSION_CONTROL_OR_DATA_RCV = 0x02,
DATA_CONTROL = 0x03,
TEST = 0x0d,
VENDOR_RESERVED_9 = 0x09,
@@ -51,7 +51,7 @@
CORE_GENERIC_ERROR_NTF = 0x07,
}
-enum SessionOpCode : 6 {
+enum SessionConfigOpCode : 6 {
SESSION_INIT = 0x00,
SESSION_DEINIT = 0x01,
SESSION_STATUS_NTF = 0x02,
@@ -60,14 +60,20 @@
SESSION_GET_COUNT = 0x05,
SESSION_GET_STATE = 0x06,
SESSION_UPDATE_CONTROLLER_MULTICAST_LIST = 0x07,
- SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG = 0X09,
+ SESSION_UPDATE_ACTIVE_ROUNDS_ANCHOR = 0x08,
+ SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG = 0x09,
+ SESSION_SET_INITIATOR_DT_ANCHOR_RR_RDM_LIST = 0x0a,
+ SESSION_QUERY_DATA_SIZE_IN_RANGING = 0x0b,
+ SESSION_SET_HUS_CONFIG = 0x0c,
}
-enum RangeOpCode : 6 {
- RANGE_START = 0x00,
- RANGE_STOP = 0x01,
- RANGE_INTERVAL_UPDATE_REQ = 0x02,
- RANGE_GET_RANGING_COUNT = 0x03,
+enum SessionControlOpCode : 6 {
+ SESSION_START = 0x00,
+ SESSION_STOP = 0x01,
+ SESSION_RESERVED = 0x02,
+ SESSION_GET_RANGING_COUNT = 0x03,
+ SESSION_DATA_CREDIT_NTF = 0x04,
+ SESSION_DATA_TRANSFER_STATUS_NTF = 0x05,
}
enum AppDataOpCode : 6 {
@@ -461,27 +467,27 @@
_body_,
}
-packet SessionCommand : UciCommand (group_id = SESSION_CONFIG) {
+packet SessionConfigCommand : UciCommand (group_id = SESSION_CONFIG) {
_body_,
}
-packet SessionResponse : UciResponse (group_id = SESSION_CONFIG) {
+packet SessionConfigResponse : UciResponse (group_id = SESSION_CONFIG) {
_body_,
}
-packet SessionNotification : UciNotification (group_id = SESSION_CONFIG) {
+packet SessionConfigNotification : UciNotification (group_id = SESSION_CONFIG) {
_body_,
}
-packet RangingCommand : UciCommand (group_id = RANGING_SESSION_CONTROL) {
+packet SessionControlCommand : UciCommand (group_id = SESSION_CONTROL) {
_body_,
}
-packet RangingResponse : UciResponse (group_id = RANGING_SESSION_CONTROL) {
+packet SessionControlResponse : UciResponse (group_id = SESSION_CONTROL) {
_body_,
}
-packet RangingNotification : UciNotification (group_id = RANGING_SESSION_CONTROL) {
+packet SessionControlNotification : UciNotification (group_id = SESSION_CONTROL) {
_body_,
}
@@ -626,7 +632,7 @@
"\x60\x07\x00\x01\x00\x00\x00\x01",
}
-packet SessionInitCmd : SessionCommand (opcode = 0x0) { //SESSION_INIT
+packet SessionInitCmd : SessionConfigCommand (opcode = 0x0) { //SESSION_INIT
session_id: 32,
session_type: SessionType,
}
@@ -635,7 +641,7 @@
"\x21\x00\x00\x05\x00\x00\x00\x01\x02\x03\x04\x01",
}
-packet SessionInitRsp : SessionResponse (opcode = 0x0) { //SESSION_INIT
+packet SessionInitRsp : SessionConfigResponse (opcode = 0x0) { //SESSION_INIT
status: StatusCode,
}
@@ -643,7 +649,7 @@
"\x41\x00\x00\x01\x00\x00\x00\x11",
}
-packet SessionDeinitCmd : SessionCommand (opcode = 0x1) { //SESSION_DEINIT
+packet SessionDeinitCmd : SessionConfigCommand (opcode = 0x1) { //SESSION_DEINIT
session_id: 32,
}
@@ -651,7 +657,7 @@
"\x21\x01\x00\x04\x00\x00\x00\x01\x02\x03\x04",
}
-packet SessionDeinitRsp : SessionResponse (opcode = 0x1) { //SESSION_DEINIT
+packet SessionDeinitRsp : SessionConfigResponse (opcode = 0x1) { //SESSION_DEINIT
status: StatusCode,
}
@@ -659,7 +665,7 @@
"\x41\x01\x00\x01\x00\x00\x00\x00",
}
-packet SessionStatusNtf : SessionNotification (opcode = 0x2) { //SESSION_STATUS_NTF
+packet SessionStatusNtf : SessionConfigNotification (opcode = 0x2) { //SESSION_STATUS_NTF
session_id: 32,
session_state: SessionState,
reason_code: ReasonCode,
@@ -675,7 +681,7 @@
v: 8[],
}
-packet SessionSetAppConfigCmd : SessionCommand (opcode = 0x3) { //SESSION_SET_APP_CONFIG
+packet SessionSetAppConfigCmd : SessionConfigCommand (opcode = 0x3) { //SESSION_SET_APP_CONFIG
session_id: 32,
_count_(tlvs): 8,
tlvs: AppConfigTlv[]
@@ -690,7 +696,7 @@
status: StatusCode,
}
-packet SessionSetAppConfigRsp : SessionResponse (opcode = 0x3) { //SESSION_SET_APP_CONFIG
+packet SessionSetAppConfigRsp : SessionConfigResponse (opcode = 0x3) { //SESSION_SET_APP_CONFIG
status: StatusCode,
_count_(cfg_status): 8,
cfg_status: AppConfigStatus[],
@@ -700,7 +706,7 @@
"\x41\x03\x00\x04\x00\x00\x00\x01\x01\x01\x00",
}
-packet SessionGetAppConfigCmd : SessionCommand (opcode = 0x4) { //SESSION_GET_APP_CONFIG
+packet SessionGetAppConfigCmd : SessionConfigCommand (opcode = 0x4) { //SESSION_GET_APP_CONFIG
session_id: 32,
_count_(app_cfg): 8,
app_cfg: 8[], // AppConfigTlvType (Infra does not allow array of enums)
@@ -710,7 +716,7 @@
"\x21\x04\x00\x05\x00\x00\x00\x01\x02\x03\x04\x00",
}
-packet SessionGetAppConfigRsp : SessionResponse (opcode = 0x4) { //SESSION_GET_APP_CONFIG
+packet SessionGetAppConfigRsp : SessionConfigResponse (opcode = 0x4) { //SESSION_GET_APP_CONFIG
status: StatusCode,
_count_(tlvs): 8,
tlvs: AppConfigTlv[],
@@ -720,14 +726,14 @@
"\x41\x04\x00\x02\x00\x00\x00\x01\x00",
}
-packet SessionGetCountCmd : SessionCommand (opcode = 0x5) { //SESSION_GET_COUNT
+packet SessionGetCountCmd : SessionConfigCommand (opcode = 0x5) { //SESSION_GET_COUNT
}
test SessionGetCountCmd {
"\x21\x05\x00\x00\x00\x00\x00",
}
-packet SessionGetCountRsp : SessionResponse (opcode = 0x5) { //SESSION_GET_COUNT
+packet SessionGetCountRsp : SessionConfigResponse (opcode = 0x5) { //SESSION_GET_COUNT
status: StatusCode,
session_count: 8,
}
@@ -736,7 +742,7 @@
"\x41\x05\x00\x02\x00\x00\x00\x00\x01",
}
-packet SessionGetStateCmd : SessionCommand (opcode = 0x6) { //SESSION_GET_STATE
+packet SessionGetStateCmd : SessionConfigCommand (opcode = 0x6) { //SESSION_GET_STATE
session_id: 32,
}
@@ -744,7 +750,7 @@
"\x21\x06\x00\x04\x00\x00\x00\x00\x01\x02\x03",
}
-packet SessionGetStateRsp : SessionResponse (opcode = 0x6) { //SESSION_GET_STATE
+packet SessionGetStateRsp : SessionConfigResponse (opcode = 0x6) { //SESSION_GET_STATE
status: StatusCode,
session_state: SessionState,
}
@@ -753,7 +759,7 @@
"\x41\x06\x00\x02\x00\x00\x00\x00\x01",
}
-packet SessionUpdateActiveRoundsDtTagCmd : SessionCommand (opcode = 0x9) { //SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG
+packet SessionUpdateActiveRoundsDtTagCmd : SessionConfigCommand (opcode = 0x9) { //SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG
session_id: 32,
_count_(ranging_round_indexes): 8,
ranging_round_indexes: 8[],
@@ -763,7 +769,7 @@
"\x21\x09\x00\x0a\x00\x00\x00\x03\x03\x0f\x0c\x05\x08\x00\x00\x00\x00",
}
-packet SessionUpdateActiveRoundsDtTagRsp : SessionResponse (opcode = 0x9) { //SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG
+packet SessionUpdateActiveRoundsDtTagRsp : SessionConfigResponse (opcode = 0x9) { //SESSION_UPDATE_ACTIVE_ROUNDS_DT_TAG
status: StatusCode,
_count_(ranging_round_indexes): 8,
ranging_round_indexes: 8[],
@@ -797,7 +803,7 @@
ADD_CONTROLEE_WITH_LONG_SUB_SESSION_KEY = 0x03,
}
-packet SessionUpdateControllerMulticastListCmd : SessionCommand (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
+packet SessionUpdateControllerMulticastListCmd : SessionConfigCommand (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
session_id: 32,
action: UpdateMulticastListAction,
_payload_,
@@ -818,7 +824,7 @@
controlees: Controlee_V2_0_32_Byte_Version[],
}
-packet SessionUpdateControllerMulticastListRsp : SessionResponse (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
+packet SessionUpdateControllerMulticastListRsp : SessionConfigResponse (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
status: StatusCode,
}
@@ -832,7 +838,7 @@
status: MulticastUpdateStatusCode,
}
-packet SessionUpdateControllerMulticastListNtf : SessionNotification (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
+packet SessionUpdateControllerMulticastListNtf : SessionConfigNotification (opcode = 0x7) { //SESSION_UPDATE_CONTROLLER_MULTICAST_LIST
session_id: 32,
remaining_multicast_list_size: 8,
_count_(controlee_status): 8,
@@ -843,20 +849,19 @@
"\x61\x07\x00\x06\x00\x00\x00\x00\x01\x02\x03\x04\x00",
}
-
-packet RangeStartCmd : RangingCommand (opcode = 0x0) { //RANGE_START
+packet SessionStartCmd : SessionControlCommand (opcode = 0x0) { //RANGE_START
session_id: 32,
}
-test RangeStartCmd {
+test SessionStartCmd {
"\x22\x00\x00\x04\x00\x00\x00\x00\x01\x02\x03",
}
-packet RangeStartRsp : RangingResponse (opcode = 0x0) { //RANGE_START
+packet SessionStartRsp : SessionControlResponse (opcode = 0x0) { //RANGE_START
status: StatusCode,
}
-test RangeStartRsp {
+test SessionStartRsp {
"\x42\x00\x00\x01\x00\x00\x00\x00",
}
@@ -927,7 +932,7 @@
OWR_AOA = 0x03,
}
-packet RangeDataNtf : RangingNotification (opcode = 0x0) { //RANGE_START
+packet SessionInfoNtf : SessionControlNotification (opcode = 0x0) { // SESSION_INFO
sequence_number: 32,
session_id: 32,
rcr_indicator: 8,
@@ -939,84 +944,84 @@
_body_,
}
-packet ShortMacTwoWayRangeDataNtf : RangeDataNtf (ranging_measurement_type = TWO_WAY, mac_address_indicator = SHORT_ADDRESS) {
+packet ShortMacTwoWaySessionInfoNtf : SessionInfoNtf (ranging_measurement_type = TWO_WAY, mac_address_indicator = SHORT_ADDRESS) {
_count_(two_way_ranging_measurements) : 8,
two_way_ranging_measurements : ShortAddressTwoWayRangingMeasurement[],
}
-test ShortMacTwoWayRangeDataNtf {
+test ShortMacTwoWaySessionInfoNtf {
"\x62\x00\x00\x19\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
}
-packet ExtendedMacTwoWayRangeDataNtf : RangeDataNtf (ranging_measurement_type = TWO_WAY, mac_address_indicator = EXTENDED_ADDRESS) {
+packet ExtendedMacTwoWaySessionInfoNtf : SessionInfoNtf (ranging_measurement_type = TWO_WAY, mac_address_indicator = EXTENDED_ADDRESS) {
_count_(two_way_ranging_measurements) : 8,
two_way_ranging_measurements : ExtendedAddressTwoWayRangingMeasurement[],
}
-test ExtendedMacTwoWayRangeDataNtf {
+test ExtendedMacTwoWaySessionInfoNtf {
"\x62\x00\x00\x19\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00",
}
-packet ShortMacDlTDoARangeDataNtf : RangeDataNtf (ranging_measurement_type = DL_TDOA, mac_address_indicator = SHORT_ADDRESS) {
+packet ShortMacDlTDoASessionInfoNtf : SessionInfoNtf (ranging_measurement_type = DL_TDOA, mac_address_indicator = SHORT_ADDRESS) {
no_of_ranging_measurements : 8,
_payload_,
}
-packet ExtendedMacDlTDoARangeDataNtf : RangeDataNtf (ranging_measurement_type = DL_TDOA, mac_address_indicator = EXTENDED_ADDRESS) {
+packet ExtendedMacDlTDoASessionInfoNtf : SessionInfoNtf (ranging_measurement_type = DL_TDOA, mac_address_indicator = EXTENDED_ADDRESS) {
no_of_ranging_measurements : 8,
_payload_,
}
-packet ShortMacOwrAoaRangeDataNtf : RangeDataNtf (ranging_measurement_type = OWR_AOA, mac_address_indicator = SHORT_ADDRESS) {
+packet ShortMacOwrAoaSessionInfoNtf : SessionInfoNtf (ranging_measurement_type = OWR_AOA, mac_address_indicator = SHORT_ADDRESS) {
_count_(owr_aoa_ranging_measurements) : 8,
owr_aoa_ranging_measurements : ShortAddressOwrAoaRangingMeasurement[],
}
-test ShortMacOwrAoaRangeDataNtf {
+test ShortMacOwrAoaSessionInfoNtf {
"\x62\x00\x00\x19\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
"\x62\x00\x00\x26\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xaa\xbb\x00\x00\x01\x01\x00\x03\x04\x60\x05\x06\x50",
}
-packet ExtendedMacOwrAoaRangeDataNtf : RangeDataNtf (ranging_measurement_type = OWR_AOA, mac_address_indicator = EXTENDED_ADDRESS) {
+packet ExtendedMacOwrAoaSessionInfoNtf : SessionInfoNtf (ranging_measurement_type = OWR_AOA, mac_address_indicator = EXTENDED_ADDRESS) {
_count_(owr_aoa_ranging_measurements) : 8,
owr_aoa_ranging_measurements : ExtendedAddressOwrAoaRangingMeasurement[],
}
-test ExtendedMacOwrAoaRangeDataNtf {
+test ExtendedMacOwrAoaSessionInfoNtf {
"\x62\x00\x00\x19\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x03\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00",
"\x62\x00\x00\x2c\x00\x00\x00\x00\x02\x03\x04\x05\x06\x07\x08\x00\x0a\x01\x01\x01\x03\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\xaa\xbb\xcc\xdd\x01\x02\x03\x04\x00\x00\x01\x01\x00\x03\x04\x60\x05\x06\x50",
}
-packet RangeStopCmd : RangingCommand (opcode = 0x1) { //RANGE_STOP
+packet SessionStopCmd : SessionControlCommand (opcode = 0x1) { // SESSION_STOP
session_id: 32,
}
-test RangeStopCmd {
+test SessionStopCmd {
"\x22\x01\x00\x04\x00\x00\x00\x00\x02\x03\x04",
}
-packet RangeStopRsp : RangingResponse (opcode = 0x1) { //RANGE_STOP
+packet SessionStopRsp : SessionControlResponse (opcode = 0x1) { // SESSION_STOP
status: StatusCode,
}
-test RangeStopRsp {
+test SessionStopRsp {
"\x42\x01\x00\x01\x00\x00\x00\x00",
}
-packet RangeGetRangingCountCmd : RangingCommand (opcode = 0x3) { //RANGE_GET_RANGING_COUNT
+packet SessionGetRangingCountCmd : SessionControlCommand (opcode = 0x3) { // SESSION_GET_RANGING_COUNT
session_id: 32,
}
-test RangeGetRangingCountCmd {
+test SessionGetRangingCountCmd {
"\x22\x03\x00\x04\x00\x00\x00\x00\x02\x03\x04",
}
-packet RangeGetRangingCountRsp : RangingResponse (opcode = 0x3) { //RANGE_GET_RANGING_COUNT
+packet SessionGetRangingCountRsp : SessionControlResponse (opcode = 0x3) { // SESSION_GET_RANGING_COUNT
status: StatusCode,
count: 32,
}
-test RangeGetRangingCountRsp {
+test SessionGetRangingCountRsp {
"\x42\x03\x00\x05\x00\x00\x00\x00\x02\x03\x04\x05",
}