Best way to handle data being sent over a serial COM

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,
cmdolcetAsked:
Who is Participating?
 
ste5anConnect With a Mentor Senior DeveloperCommented:
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
 
cmdolcetAuthor Commented:
OK so lets say I handle it myself, what are some suggestions on how I can do that?

Try Catch statements?
0
 
ste5anSenior DeveloperCommented:
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
 
cmdolcetAuthor Commented:
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
 
ste5anSenior DeveloperCommented:
Yup. Send your command. Then wait for an answer..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.