I have two while loops, one to first check start sequence (frame start), once done.
The second loop checks for the checksum value, end sequence (frame end) and if not end of valid, treats this isas a message payload and reads from the stream until a valid end sequence (frame end) is found. Each (n) payload starts with a 3 bytes header (2 bytes identifier + 1 byte length of the succeeding data) and then the actual data.
I have two while loops, one to first check start sequence (frame start), once done. The second loop checks for the checksum value, end sequence (frame end) and if not end of valid treats this is a message payload and reads from the stream until a valid end sequence (frame end) is found.
I have two while loops, one to first check start sequence (frame start), once done.
The second loop checks for the checksum value, end sequence (frame end) and if not, treats this as a message payload and reads from the stream until a valid end sequence (frame end) is found. Each (n) payload starts with a 3 bytes header (2 bytes identifier + 1 byte length of the succeeding data) and then the actual data.
Can I please havePlease advise on how to improve the method below that reads TCP datamessages including framing bytes, through a MemoryStream since I can't use NetworkStream? Is my checksum calculation correct? The sensor documentation indicates that to calculate it you must include all payload data except starting and ending sequence.
Can I please have advise on how to improve the method below that reads TCP data including framing bytes?
Please advise on how to improve the method below that reads TCP messages including framing bytes, through a MemoryStream since I can't use NetworkStream? Is my checksum calculation correct? The sensor documentation indicates that to calculate it you must include all payload data except starting and ending sequence.
I have totwo while loops, one to first check start sequence (frame start), once done. The second loop checks for the checksum value, end sequence (frame end) and if not end of valid treats this is a message payload and reads from the stream until a valid end sequence (frame end) is found.
I have to while loops, one to first check start sequence (frame start), once done. The second loop checks for the checksum value, end sequence (frame end) and if not end of valid treats this is a message payload and reads from the stream until a valid end sequence (frame end) is found.
I have two while loops, one to first check start sequence (frame start), once done. The second loop checks for the checksum value, end sequence (frame end) and if not end of valid treats this is a message payload and reads from the stream until a valid end sequence (frame end) is found.