Solved

Best way to handle data being sent over a serial COM

Posted on 2016-10-28
5
23 Views
Last Modified: 2016-11-22
what is the best way to handle data that is being sent over from a Serial COM.

Is there a property that I can reference in the COM control class that can check it for me. I do have a checksum to the device.

I was thinking of a try catch finally statement to add however not sure what property to look for in the COM control.

Thanks,
0
Comment
Question by:cmdolcet
  • 3
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
Stefan Hoffmann earned 500 total points
Comment Utility
You  have the serial port itself with its port settings when you open it. The rest depends on the device, whether its firmware supports a high-level protocol with a checksum option. In this case you need either to handle it your self or check whether there is a library from the manufacturer.
0
 

Author Comment

by:cmdolcet
Comment Utility
OK so lets say I handle it myself, what are some suggestions on how I can do that?

Try Catch statements?
0
 
LVL 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
No. "High level" means that in the transmitted data contains an checksum. So the questions are: What device is it? And what does the manual says about this?
0
 

Author Comment

by:cmdolcet
Comment Utility
The device will send back a NAK or ACK if the command has been accepted then I guess that would answer my question. Would that be the best way to handle things, is listen back for the reply and then make a decision to send again if a NAK occurs?

Thanks,
0
 
LVL 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
Yup. Send your command. Then wait for an answer..
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now