Hello,
I have made some changes to the message template code I've been working on:

1. Transformed the code into a message template parser
   - changed the file name to message_template_parser
- put the code that previously made a dict into a class called MessageTemplateParser

2. Transformed the previously called "Packet" code into MessageTemplate code (considering each message in the message_template.msg to be a Message Template) - renamed Packet to MessageTemplate, PacketBlock to MessageTemplateBlock, and PacketVariable to MessageTemplateVariable - extracted all the header information for each particular message template and its blocks and put it into the object's fields

3. Nicer formatted printing of the Parsed message template. If you run bin\packets you will see the message_template.msg reprinting from the parser all perty-like.

Next to do:
1. Store the size of the block variables, not just their type NAMES. We need this to read and build messages. This should be done at template parsing time and not when building our reading.

2. Create MessageReader
- Move over the functionality in message_template.py into this class (such as decodeNum, decodeFrequency) - Use size stored in block variables to read from a buffer and store it into the variable

3. Create MessageBuilder
- Move over functionality in message_template.py into this class (such as encodeHeader) - Use the size stored in the block variables to write data into the variable buffer

4. Write Message classes that mimic the Message Template classes, but will be used to actually create a packet (probably later on, not soon)
   - eg: MessageData, MessageBlockData, MessageVariableData

5. Write tests for all the newly created classes



_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/pyogp

Reply via email to