Jump to content

Protocol architecture taking care of different interfaces (Serial, USB, Ethernet)


Recommended Posts

Hi LAVers,

 

does anyone have an idea or starting point on how to create the abstraction needed to implement a simple serial communication protocol through various serial communication types such as RS-232, USB or Ethernet without duplicating all the code that takes care of the framing, payload and such?

 

Thanks in advance

Markus

Link to comment

Use VISA.  DONE!

 

Seriously! I took a project I did a couple of years ago that used GPIB for all instrument communications.  Luckily I used the VISA drivers.  Most of the instruments were changed to use Ethernet.  The only part of my code that changed was the initialization.

Link to comment

Use VISA.  DONE!

 

Seriously! I took a project I did a couple of years ago that used GPIB for all instrument communications.  Luckily I used the VISA drivers.  Most of the instruments were changed to use Ethernet.  The only part of my code that changed was the initialization.

 

Definitely have to echo that. If VISA doesn't work for your case only a very complex OOP architecture that will take you years to develop, would!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.