![]() |
how i prepare c++ code for implementing my own protocol
helo my protocol format is given below
{ destno,mode,no.of packet,pktsize,,pktno,textsize,CRC} description:- { is starting flag destno - 4bytes mode - 1 byte no.of pkt - 4byes pktsize - 6 bytes pktno 3 bytes text size 6 bytes CRC is 2 bytes i want to write c++ code(or c code) to prepare this packet and after this i want to transfer this packet over serial port. after that how i write a code to receive this packet from serial port and how i extract this packet after receiving the packet. Regards, Amit Reply With Quote |
First you'd write code which would take destno, mode, no.of packet, pktsize, pktno, textsize & CRC as variables and package them as you've described. After that you could send that packet across the serial port to a waiting client/server which would undo the packaging giving back the original variables destno, mode, no.of packet, pktsize, pktno, textsize & CRC.
As for the requested quote Quote:
|
can u help me with code
Quote:
but i m new in this stuff. can u explain me with code and u told that after preparing the packet i have to send to client /server but in serial communication is it possible to implement client -server concept. anyway first help in writing code for this packet preparation Thx n Regards, Amit |
well dont expect to be spoon fed. If you can provide some base code so far may be you should look around the forum some. I do recall seeing some post about writing up your own client/server data sending apps, but im not sure what protocal why were in.
Also as may say use your google Fu. try looking herer for serial info....might help..... http://en.wikipedia.org/wiki/Serial_communication sounds like a nice project. |
Quote:
|
| All times are GMT -5. The time now is 3:12 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC