Marcel Hauf pisze: > My current problem is I don´t know how much I should create with the > generator and what. > I would create the classes from the xml file (protocol, packet,...) and > for the classes some getters, setters like llnz wrote me. > Also he wrote me that the generated library should create frames. As I > understand frames are network packets, aren´t they? > So best would be that incoming frames triggers events and out going > frames should be created via a method? > Should I only create one protocol library which only has the protocol > handling like the frames and a separate client library? > Or should I include the connection part and the rest, too?
The libtpproto-java already contains a generator that converts protocol description files to class files (for frames, which indeed are over-the-wire packets). The generator is supposed to be target-language-agnostic, so maybe you could use it. You'd need to implement one interface, which, in spite being only single, unfortunately is not the most straighforward and easily understandable, but I think it would be easier to use it than to create another parser/generator. Maybe if I added some documentation about the flow of invocations... :) As for the rest, the core of libtpproto-java (which is separate from the frame handling) is rather small and might be a good thing to rip off from ;) -- KS "To an engineer, everyone looks like a chimp" - Dilbert
signature.asc
Description: OpenPGP digital signature
_______________________________________________ tp-devel mailing list [email protected] http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel
