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

Create a Serial Stream Adapter #231

Open
DominicOram opened this issue Apr 18, 2017 · 4 comments
Open

Create a Serial Stream Adapter #231

DominicOram opened this issue Apr 18, 2017 · 4 comments

Comments

@DominicOram
Copy link
Contributor

At ISIS we have legacy drivers that talk to devices that are connected via a serial port. For testing purposes it would be useful to write an emulator that these drivers can communicate with. We are currently doing this by running another script to convert Serial <-> TCP, see diagram below

image

Note that the physical loopback is unfortunately required for the OS to properly recognise the port.

It would be useful if Lewis could communicate using serial, therefore removing the need for the script. I am happy to do the work for this, if you think it's something that would benefit Lewis.

@MichaelWedel
Copy link
Contributor

Thanks for taking the time to write up the issue, I think it's an interesting use case and would enable Lewis to be used for testing a larger variety of higher level software.

Is the TCP <-> Serial script available somewhere? It would be interesting to take a look and maybe it already provides a base for an implementation.

I'm adding it to the current milestone and some tags as well.

@MikeHart85
Copy link
Contributor

The script is available here: com2tcp.py

The related IBEX issue is here: Emulator: Connect LabView drivers to emulator

@MichaelWedel MichaelWedel modified the milestones: Release 1.1, Release 1.2 Jun 1, 2017
@MikeHart85 MikeHart85 modified the milestones: Release 1.2, Release 1.3 Sep 21, 2017
@FreddieAkeroyd
Copy link
Member

Is it OK for me to take a look at this?

@MikeHart85
Copy link
Contributor

Absolutely!

I think we left this be mostly because the com2tcp script approach seemed to be working and actually looked like an elegant approach, as far as amount of code required to accomplish the goal goes.

An integrated solution would be cleaner in terms of less interacting components, but will likely require much more code / refactoring of existing code.

You'll want almost all of the code from the TCP Stream adapter, except have it connect via serial port somehow. Last time I looked, I remember not seeing a clean way to do this, without either copy-pasting huge chunks of stream adapter code into a new serial adapter, or some major refactoring to allow two adapters to share the same code.

@mattclarke mattclarke removed this from the Release 1.3 milestone Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants