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

Change access point discovery output from interface name to IAccessPoint #119

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

abeltrano
Copy link
Contributor

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Avoid duplication of kernel calls (via nl80211) upon access point creation.

Technical Details

The prior design had access point discovery agents raise discovery change events whose payload was the presence change itself (arrived, departed) and the interface name. While this works, nearly every consumer in nearly every scenario would take this and immediately create an IAccessPoint instance, which would re-do many of the operations the discovery agent had performed to determine the interface name.

The design is now updated for the access point discovery change event payload to contain a std::shared_ptr<IAccessPoint> which is created by the agent itself. The agent is responsible for the creation of the IAccessPoint, and at least in the case of the Linux agents, they now take a IAccessPointFactory that controls the creation of the IAccesPoint. This still allows the creation policy to be controller by the top-level consumer as they orchestrate the creation of the discovery agent and factory.

Now that the discovery agent(s) create the instances, the AccessPointManager no longer needs to do this, and so, no longer takes a std::shared_ptr<IAccessPointFactory> nor creates any of the instances.

Test Results

  • Ran netremote-cli wifi enumaps and ensured the output matches that of the previous design+impl.
  • All unit tests pass.

Reviewer Focus

  • None

Future Work

  • None

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 January 22, 2024 21:06
@abeltrano abeltrano merged commit cf28679 into develop Jan 22, 2024
4 checks passed
@abeltrano abeltrano deleted the apdiscoveryif branch January 22, 2024 21:30
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.

1 participant