• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 71
  • Last Modified:

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,
0
cmdolcet
Asked:
cmdolcet
  • 3
  • 2
1 Solution
 
ste5anSenior 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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now