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

Mdns device controller update device #5956

Merged

Conversation

vivien-apple
Copy link
Contributor

Problem

When the device IP change, the pairing information needs to be updated. This PR adds DeviceController::UpdateDevice to the DeviceController in order to look over Mdns for the latest device information.

For the moment, the signature is UpdateDevice(Device * device, uint64_t fabricId) since the fabric is not stored anywhere but it is needed in order to properly do the Mdns mapping. At some point the fabricId will likely be retrieved from the controller or something similar.

This PR also add a update method to chip-tool in order to update the pairing information if needed.

Summary of Changes

  • Add DeviceController::UpdateDevice(Device * device, uint64_t fabricId);
  • Add a update method to the Discover module of chip-tool

@vivien-apple vivien-apple force-pushed the Mdns_DeviceControllerUpdateDevice branch from c51a32e to 803912d Compare April 12, 2021 17:24

CHIP_ERROR Run(PersistentStorage & storage, NodeId localId, NodeId remoteId) override
/////////// DiscoverCommand Interface /////////
CHIP_ERROR RunCommand(NodeId remoteId, uint64_t fabricId) override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a better name for this simply be Resolve, or perhaps Discover?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure it's this way as it follows the current RunCommand/Run style of the class (Resolve).

@woody-apple woody-apple self-requested a review April 12, 2021 20:56

CHIP_ERROR Run(PersistentStorage & storage, NodeId localId, NodeId remoteId) override
/////////// DiscoverCommand Interface /////////
CHIP_ERROR RunCommand(NodeId remoteId, uint64_t fabricId) override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure it's this way as it follows the current RunCommand/Run style of the class (Resolve).

@msandstedt msandstedt merged commit e047d27 into project-chip:master Apr 13, 2021
Damian-Nordic added a commit to Damian-Nordic/connectedhomeip that referenced this pull request Apr 15, 2021
After project-chip#5956 has been merged, the device controller works as
a Resolver delegate, so no separate DeviceAddressUpdater is
needed. In fact, they interfere which each other.

Switch Python CHIP controller to using the mechanisms
introduced by project-chip#5956, fix a couple of issues and remove no
longer necessary code.
woody-apple pushed a commit that referenced this pull request Apr 15, 2021
After #5956 has been merged, the device controller works as
a Resolver delegate, so no separate DeviceAddressUpdater is
needed. In fact, they interfere which each other.

Switch Python CHIP controller to using the mechanisms
introduced by #5956, fix a couple of issues and remove no
longer necessary code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants