Click here to Skip to main content
15,916,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Large source code repos Pin
Ozcan ILIKHAN29-Mar-11 5:02
Ozcan ILIKHAN29-Mar-11 5:02 
GeneralRe: Large source code repos Pin
PIEBALDconsult30-Mar-11 18:35
mvePIEBALDconsult30-Mar-11 18:35 
AnswerRe: Large source code repos Pin
BobJanova30-Mar-11 23:46
BobJanova30-Mar-11 23:46 
Question"Client & Server" Pin
CoderAz28-Mar-11 18:43
CoderAz28-Mar-11 18:43 
AnswerRe: "Client & Server" Pin
fish201229-Mar-11 0:58
fish201229-Mar-11 0:58 
AnswerRe: "Client & Server" Pin
Ganesh Kumar Kaki13-Apr-11 2:29
Ganesh Kumar Kaki13-Apr-11 2:29 
Questiontransfer large data Pin
anishkannan28-Mar-11 17:48
anishkannan28-Mar-11 17:48 
AnswerRe: transfer large data Pin
Not Active28-Mar-11 18:01
mentorNot Active28-Mar-11 18:01 
GeneralRe: transfer large data Pin
anishkannan28-Mar-11 18:25
anishkannan28-Mar-11 18:25 
AnswerRe: transfer large data Pin
David198728-Mar-11 21:33
David198728-Mar-11 21:33 
AnswerRe: transfer large data Pin
BobJanova30-Mar-11 23:49
BobJanova30-Mar-11 23:49 
Questionto close connection to database after i use or not ? Pin
Gali197828-Mar-11 9:15
Gali197828-Mar-11 9:15 
AnswerRe: to close connection to database after i use or not ? Pin
Luc Pattyn28-Mar-11 9:24
sitebuilderLuc Pattyn28-Mar-11 9:24 
GeneralRe: to close connection to database after i use or not ? Pin
Wendelius28-Mar-11 10:50
mentorWendelius28-Mar-11 10:50 
GeneralRe: to close connection to database after i use or not ? Pin
Luc Pattyn28-Mar-11 11:30
sitebuilderLuc Pattyn28-Mar-11 11:30 
GeneralRe: to close connection to database after i use or not ? Pin
Wendelius28-Mar-11 11:40
mentorWendelius28-Mar-11 11:40 
JokeRe: to close connection to database after i use or not ? Pin
Ganesh Kumar Kaki13-Apr-11 2:32
Ganesh Kumar Kaki13-Apr-11 2:32 
AnswerRe: to close connection to database after i use or not ? Pin
#realJSOP28-Mar-11 9:55
professional#realJSOP28-Mar-11 9:55 
AnswerRe: to close connection to database after i use or not ? Pin
Wendelius28-Mar-11 10:48
mentorWendelius28-Mar-11 10:48 
AnswerRe: to close connection to database after i use or not ? Pin
PIEBALDconsult28-Mar-11 14:25
mvePIEBALDconsult28-Mar-11 14:25 
QuestionHow to communicate to a device via serial port Pin
_awatts28-Mar-11 6:21
_awatts28-Mar-11 6:21 
GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 9:09
_awatts28-Mar-11 9:09 
GeneralRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 9:21
sitebuilderLuc Pattyn28-Mar-11 9:21 
GeneralRe: How to communicate to a device via serial port Pin
_awatts28-Mar-11 9:57
_awatts28-Mar-11 9:57 
Thanks for the reply, simply confirming 5516 represents 16bit makes this document alot clearer.

If my packet structure is as follows

Preamble
SYNC - Word - A55A16
Packet header
TYPE - Word - 010116
SIZE - Byte - (data size)
DSUM - Byte - Data checksum using 5516 seed
HSUM - Byte - Header checksum using 5516 seed
Packet Data
Start - Byte - data[0]
Data - Data[...]

Am I therefore looking to create an array of bytes, the first 7 bytes for the Preamble and Packet header. Therefore the first two representing SYNC [A5,5A], the next two representing TYPE [01,01], the following byte holding the value for SIZE (number of bytes taken up by data), then the byte holding the value for DSUM, then the byte holding the value for HSUM. The 8th byte will hold a 0 (start of data), any bytes from here on holding the data?

If so, how do I calculate DSUM and HSUM?

Regards,

Andrew
Andy

AnswerRe: How to communicate to a device via serial port Pin
Luc Pattyn28-Mar-11 10:15
sitebuilderLuc Pattyn28-Mar-11 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.