??? 11/15/06 07:59 Read: times |
#128007 - Right way to design/develop a protocol |
Hi,
i post my question here because the topic is not directy 8051 related.First of all sorry for the long post but it's necessary to correctly explain correctly the problem! I'm developing a project using a Silicon labs C8051F340 chip, the device will be a sort of datalogger and is supposed to do the following things: - Collect radio (868 hz) data pockets from many remote sensors. - Store them in a flash memory in form of records. The buffer have a fixed lenght and after is full, the new record will overwrite the oldest. - Store a alarm-log in the flash memory. - handle a link with GPRS modem and UDP protocol (the UDP stack is implemented by the modem)to a remote server for downloading all the data. - handle e local link with a PC for setup diagnostics etc. The main question is how to correct design the communication protocol between device and PC/remote server. In the past i done small project and developed simple protocols. My idea is that the device must be "slave" and the responsability for sending the commands must be of the PC program. For example the sequence should be : - Pc "call" the device. - They autenticate. - PC call for any alarm present, if present download alarm log. - PC call for new record. If new records download them. - PC close the session. In few words there are many small and simple protocol command for (for example) reading record index, locate the record pointer at a particular location, read the record pointed etc. The PC program must use them and create a sort of "script" doing the sequence it needs. In this way if you want to change sequence you "only" change the PC program and not the firmware in the device. But my collegue (he's doing the PC program using delphi) don't agree because using event-driven controls it says it's difficult to realize a multiple step sequence. Can you suggest something maybe some link/documentation to read? Regards. massimo |