Skip to content

Conversation

@julieta-prieto
Copy link
Contributor

@julieta-prieto julieta-prieto commented Dec 10, 2025

Description

Create recover_from_disconnection method for all networks.

Type of change

Please add a description and delete options that are not relevant.

  • Create public recover_from_disconnection method for all networks
  • Modify net status listener - unify them - use process method in all of them

Tests

  • Add new unit tests if it applies.

Please describe the manual tests that you ran to verify your changes if it applies.

Documentation

Please update the documentation.

  • Update docstrings of every function, method or class that change.
  • Build documentation locally to verify changes.
  • Add the changes at the [Unreleased] section of the CHANGELOG.

@julieta-prieto julieta-prieto changed the base branch from INGK-1223-remove-virtual-drive to INGK-1226-parametrize-jenkins-tests December 10, 2025 13:47
Base automatically changed from INGK-1226-parametrize-jenkins-tests to develop December 11, 2025 10:34
@julieta-prieto julieta-prieto marked this pull request as ready for review December 16, 2025 17:58
self.__network._set_servo_state(node_id, NetState.CONNECTED)
timestamps[node_id] = node.nmt.timestamp
elif servo_state == NetState.DISCONNECTED:
self.__network.recover_from_disconnection()
Copy link
Contributor

Choose a reason for hiding this comment

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

something I wonder....
If you manually call recover_from_disconnection, why shouldn't the _notify_status be called?
Maybe it does not belong to this issue, but it makes no sense to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The point of the issue was to be able to do this stuff without the status listener.
So, if we want to notify the status when we use this method, that implies that there is some net observer.

The only reliable way of having a "observation of the net" is through the status listener.
With the new method you will be able to know when you're connected back again, but not when you're disconnected, that is only possible with the net status listener.

So I do not really see the point of having to notify the status here. That is done by the net status listener already.

callback(status)

@staticmethod
def _ping_servo(servo: EthernetServo) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid calling this a ping. It used to be an actual ping, but now is just reading a reg:

def is_alive(self) -> bool:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@polfeliu I modified is_alive method to accept a number of attempts and completely removed the ping method

@julieta-prieto julieta-prieto merged commit 99905f9 into develop Dec 18, 2025
1 check passed
@julieta-prieto julieta-prieto deleted the INGK-1202-create-recover-from-disconnection-function-for-all-networks branch December 18, 2025 10:55
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.

5 participants