Skip to content

Conversation

@erfz
Copy link
Contributor

@erfz erfz commented Jul 11, 2022

Description

Implemented primarily in their respective drivers, these changes cause LS372 and SCPI agents to attempt to re-establish a socket connection whenever a read/write unexpectedly fails. As written, any read/write attempts made just prior to a connection failure are "thrown away" and a ConnectionResetError is always thrown following a successful reconnection. This can be caught by agent code to react accordingly. In particular, the acquisition Processes in these agents (acq and monitor_output respectively) have been adjusted to automatically restart acquisition/monitoring upon reconnection.

Motivation and Context

This achieves the desired behavior in these agents of not needing to manually restart long-running Processes if there is a momentary connection failure.

How Has This Been Tested?

Additional test cases have been written that roughly simulate a connection failure. The LS372 changes have been tested with the physical device.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Unless I am preparing a release, I have opened this PR onto the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants