Difference between revisions of "Pyogp/Documentation/Specification/pyogp.lib.base"

From Second Life Wiki
Jump to navigation Jump to search
Line 8: Line 8:


===Message Template===
===Message Template===
The message template  
Can be found [[https://svn.secondlife.com/svn/linden/projects/2008/pyogp/pyogp.lib.base/trunk/pyogp/lib/base/data/message_template.msg message_template.msg]] <br>
The message template is the file that outlines all the different types of UDP messages that can be sent. It breaks each message down by the message header information, its blocks, and the block data. <br>
In order to communicate between the client and sim (or anything else) we need to be able to parse the message template, determine which messages can be sent, build messages based on the format they are specified to be in, and then read incoming messages.
 
===Message Template Parser===
In order to build or read (and therefore send or receive) any UDP messages, we have to first parse the message template. The parser parses the message template, searching for each message listed in it, and then iterates through the message's blocks and the block data. <br>
The parser goes through the message template and constructs a data object of type MessageTemplate, MessageTemplateBlock, and MessageTemplateVariable. These types are used to store general information about the message that is read from the message template. In other words, these objects created by the parser hold no incoming or outgoing data. They are simply used as templates to build data out of. They allow us to know the header information for the message, the blocks it is supposed to have, and the data that the blocks are supposed to have.<br>
 
 
 
 
===Message Template Builder===
 
===Message Template Reader===
[[Category:Pyogp]]
[[Category:Pyogp]]

Revision as of 09:08, 29 July 2008

ToDo: fill out this page Enus Linden 10:10, 24 July 2008 (PDT)

see Pyogp/Client_Lib


UDP Template Messaging

There are a few main components to sending a UDP message, the message template, the parser, the builder, and the reader.

Message Template

Can be found [message_template.msg]
The message template is the file that outlines all the different types of UDP messages that can be sent. It breaks each message down by the message header information, its blocks, and the block data.
In order to communicate between the client and sim (or anything else) we need to be able to parse the message template, determine which messages can be sent, build messages based on the format they are specified to be in, and then read incoming messages.

Message Template Parser

In order to build or read (and therefore send or receive) any UDP messages, we have to first parse the message template. The parser parses the message template, searching for each message listed in it, and then iterates through the message's blocks and the block data.
The parser goes through the message template and constructs a data object of type MessageTemplate, MessageTemplateBlock, and MessageTemplateVariable. These types are used to store general information about the message that is read from the message template. In other words, these objects created by the parser hold no incoming or outgoing data. They are simply used as templates to build data out of. They allow us to know the header information for the message, the blocks it is supposed to have, and the data that the blocks are supposed to have.



Message Template Builder

Message Template Reader