??? 11/15/06 09:58 Read: times |
#128011 - Many ways.... Responding to: ???'s previous message |
I can't see any reason why you can't do a multi step sequence under Delphi (or VB etc)- I do it all the time. If I want to decode a protocol from incoming serial data, the serial object gives me an event when data is available - I then process the available bytes via a state machine. If I want to transmit a sequence, use a system timer (standard with Delphi) and use a state machine. You can also use this to check for available bytes if you so desire.
As for your protocol - how about SOAP? Or you could simply have a request response method - do you have any records? return a record if you have one or respond with no. The PC keeps on requesting records until it gets a no response. You can then be a little smarter and add retry etc. As for protocol design, it all comes down to what you want to achieve. Pretty much what I've described above is what many protocols do. You could look at how TCP/IP performs it's tasks - its a well proven protocol. |