Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add neutral <-> DDI adapter conversion functions for UWB_APP_CONFIG_PARAM #150

Merged
merged 13 commits into from
Mar 21, 2023

Conversation

abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Breaking change
  • Non-functional change
  • Documentation
  • Infrastructure

Goals

Allow UWB_APP_CONFIG_PARAM to be converted to and from its corresponding neutral type UwbApplicationConfigurationParameter.

Technical Details

  • Add To and From neutral <-> DDI adapter conversion functions and unit tests.
  • Add default-implemented operator==() for UwbApplicationConfigurationParameter.

Test Results

  • All unit tests pass on Linux and Windows.

Reviewer Focus

  • Consider whether the interpretation of the UWB_APP_CONFIG_PARAM_TYPE_DEVICE_MAC_ADDRESS parameter type is correct. It was assumed that the raw address information is provided in the paramValue array (eg. uint8_t data[2] and uint8_t data[8] for short and extended types respectively).

Future Work

  • The conversion function for UWB_APP_CONFIG_PARAM_TYPE_DST_MAC_ADDRESS is not implemented yet since we haven't yet figured out a way to decode the parameter value because the address type is not specified in the pure UCI encoding. If UwbCx encoded it exactly in this way, we'll have no way of knowing the address type. Probably it makes sense to prepend the array of addresses with the corresponding UWB_APP_CONFIG_PARAM_TYPE_MAC_ADDRESS_MODE value.
  • The UWB_APP_CONFIG_PARAMS (collection) DDI type needs conversion functions added as well. These will likely be adapter from the existing code @forwardpointer already wrote for the DDI specific wrappers.
  • Remove the DDI specific wrappers for UWB_APP_CONFIG_PARAM and UWB_APP_CONFIG_PARAMS.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner March 20, 2023 18:29
windows/devices/uwb/UwbCxAdapterDdiLrp.cxx Outdated Show resolved Hide resolved
windows/devices/uwb/UwbCxAdapterDdiLrp.cxx Outdated Show resolved Hide resolved
windows/devices/uwb/UwbCxAdapterDdiLrp.cxx Outdated Show resolved Hide resolved
corbin-phipps
corbin-phipps previously approved these changes Mar 20, 2023
forwardpointer
forwardpointer previously approved these changes Mar 20, 2023
@abeltrano abeltrano merged commit 5b28621 into develop Mar 21, 2023
@abeltrano abeltrano deleted the uwbappcfgparamconvert branch March 21, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants