From: Dieter W. <wi...@oe...> - 2001-10-25 10:41:41
|
Hi Kelvin, First of all thanks regarding the exam, that worked out nicely. I do not have much left so it is not such an issue :) Now to our issues.... Regarding the : and CRLF characters (let's call those tokens FRAME_START and FRAME_END), it is very easy to pass them on. In Java a byte is -128 to +127 this is the main reason for the byte reading methods to return int (which is actually -2147483648 to 2147483647). According to my calculation I would say we have enough encoding space.... ;) The LRC Value could be easily extracted at the transport layer, and checked too, whether byte banging or not. I also do think that the byte banging is not such an issue in our case, it would be interesting to see whether the performance and use of resources differ by any means. Also note that the message does not perform any kind of computations despite extracting the values. It would throw an Exception if something is malformed and this exception would end in the transport. In fact the message instance is nothing else then a Data Model for the message, and whether you discard that one or the byte[] is also more a philosophical discussion :) The checks would be still performed by the transport.... I also agree with you that the way you call things make a change. I introduced this concept [Transaction] because I understood from the context of the specs for ModbusTCP that there are always sequences of request-response which are tightly coupled. As I am also doing work with databases and other data stores, I borrowed the vocabulary from there, as I thought it would be a common nomer :) However, probably it is too much master(client)/ModbusTCP centric....I don't know. Would you suggest an alternative name? I guess this sheds another light on the proposal you made too. I will try to make up the Stream to show how it is meant, and probably I manage to prepare an interaction diagram to show what exactly happens when we are reading a message :) This could maybe show the knots in our two approaches and indicate a way to open those. Regards, Dieter |