Solved

Best way to handle data being sent over a serial COM

Posted on 2016-10-28
5
44 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 33

Accepted Solution

by:
ste5an earned 500 total points
ID: 41865156
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
ID: 41867085
OK so lets say I handle it myself, what are some suggestions on how I can do that?

Try Catch statements?
0
 
LVL 33

Expert Comment

by:ste5an
ID: 41875758
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
ID: 41889634
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 33

Expert Comment

by:ste5an
ID: 41894239
Yup. Send your command. Then wait for an answer..
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

837 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