I am developing (well, not personally) an embedded box that communicates to a PC host. They talk using Ethernet (TCPIP). The box interfaces to some industrial equipment, sends info to the PC and the PC controlls it.
It has been suggested that we use a bit-level protocol where a frame is composed of bytes and some bytes contain data while other bytes contain bit-leven control and status information. In my view this might suit box-to-box communication on some RS*** link. But when we have a full fledged PC and 10MBPS Ethernet, I think that a more verbose text-based protocol would be better where the messages use say XML tags or something like that. The reason I think this is because: a) it makes the messages easier to read, b) it makes socket programming easier (i.e. not having to assemble and parse bits from bytes). Presumably the consideration was speed (i.e. the less information the faster the protocol), but I don't think that in our case this should be a constraint.
Am I wrong?
Thanks
By the way, on another related issue, the design is currently purely master (PC) slave (box). This requires that the PC poll the box for eny infomration and status change. I think that having a mixed mode (i.e. each can be both) asynchronous method would be better because this way, each device only "speaks" when it needs to and we don't load up the network with polling. Is this a correct assumption? (I know both ways would work but still...).
Thanks again!